Ron,
Thanks for the tip worked like a charm
~chris
On 1/5/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
>
> annotate an abstract method which returns the PropertySelection, then
> leave the getClientSelections() as is, withaout anotations.
> didn't look past that point...
> cheers,
> ron
>
>
> Chris Chiappone wrote:
> > 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;
> > while(clientIt.hasNext()){
> > Client c = clientIt.next();
> > clientArr[i] = c.getLongname();
> > i++;
> > }
> > Arrays.sort(clientArr);
> > 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 @
> > org.apache.tapestry.annotations.Component
> (inheritInformalParameters=false,
> > bindings=[model=clientSelections, value=clientName],
> id=clientSelections,
> > type=PropertySelection) of public
> > org.apache.tapestry.form.IPropertySelectionModel
> > view.pages.OpenCase.getClientSelections() Stack Trace:
> >
> > - org.apache.tapestry.TapestryUtils.getComponent(TapestryUtils.java
> :304)
> >
> >
> > Thanks in advance for the help.
> >
> >
> > --
> > ~chris
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
~chris