On 3/5/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> That sounds odd. What happens if you try making it "ognl:getUserRoles()"
> instead?

I tried this based on your recommendation.  Unfortunately, it does not work.

Matt

>
>
> On 3/5/06, Matt Raible < [EMAIL PROTECTED]> wrote:
> > Yes, I am using the 4.0 DTD with the following:
> >
> >     <component id="userRoles"
> type="contrib:MultiplePropertySelection">
> >        <binding name="model" value="availableRoles"/>
> >        <binding name="selectedList" value="userRoles"/>
> >        <binding name="renderer" value="beans.multipleCheckboxRenderer"/>
> >     </component>
> >
> > Matt
> >
> > On 3/5/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
> > > Aren't you using the 4.0 dtd?
> > > It should be
> > > <binding name="selectedList" value="userRoles"/>
> > >
> > >
> > > From Matt Raible < [EMAIL PROTECTED]>:
> > >
> > > > In Tapestry 3, I had methods in my pages like the following:
> > > >
> > > >     public List getUserRoles() {
> > > >         List selectedRoles = new
> ArrayList(getUser().getRoles().size());
> > > >
> > > >         for (Iterator it =
> getUser().getRoles().iterator();
> > > >                  (it != null) && it.hasNext();) {
> > > >             Role role = (Role) it.next();
> > > >             selectedRoles.add(role.getName());
> > > >         }
> > > >
> > > >         return selectedRoles;
> > > >     }
> > > >
> > > > I then called them in my .page specification using:
> > > >
> > > >     <component id="userRoles"
> type="contrib:MultiplePropertySelection">
> > > >        <binding name="model" expression="availableRoles"/>
> > > >        <binding name="selectedList" expression="userRoles"/>
> > > >        <binding name="renderer"
> > > > expression="beans.multipleCheckboxRenderer"/>
> > > >     </component>
> > > >
> > > > Hower, it doesn't seem that this is possible with Tapestry 4 - even if
> > > > I use expression="ognl:userRoles".  I have to add an abstract
> > > > getUserRoles() method and put the above logic in my pageBeginRender()
> > > > method.
> > > >
> > > > Is this "as designed" or am I doing something wrong?
> > > >
> > > > Thanks,
> > > >
> > > > Matt
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to