[email protected]
[Top] [All Lists]

Dynamic Property Selection List

Subject: Dynamic Property Selection List
From: Chris Chiappone
Date: Thu, 5 Jan 2006 12:36:15 -0500
I having trouble creating a dynamic selection list with tap 4.  I am trying
to do this using annotations, which may be part of my problem.  Here is the
code for my page:

 @Component(id = "clientSelections", type="PropertySelection",
   bindings = {"model=clientSelections", "value=clientName"})
 public IPropertySelectionModel getClientSelections(){
  ISponsorHome ish = getSponsorHome();
  Collection clients = ish.getAllClients();
  Iterator<Client> clientIt = clients.iterator();
  String[] clientArr = new String[clients.size()];
  int i = 1;
   Client c = clientIt.next();
   clientArr[i] = c.getLongname();
  clientArr[0] = appMess.getString("default.selection");
  return new StringPropertySelectionModel(clientArr);

And here is the exception:

  org.apache.hivemind.ApplicationRuntimeException Component
OpenCase/clientSelections is not assignable to type
org.apache.tapestry.form.IPropertySelectionModel. location: Annotation @
bindings=[model=clientSelections, value=clientName], id=clientSelections,
type=PropertySelection) of public
view.pages.OpenCase.getClientSelections() Stack Trace:

   - org.apache.tapestry.TapestryUtils.getComponent(TapestryUtils.java:304)

Thanks in advance for the help.

<Prev in Thread] Current Thread [Next in Thread>