Set subscribe = true in your page class' setupRender method, not in its declaration. On Aug 26, 2012 6:23 AM, "sommeralex" <alexander.som...@gmail.com> wrote:
> Hello, > > I have a component, which is taking a userId and (should) take a boolean. > My > component is implemented and already working with the userID - but not with > the boolean. checking subscribed == true or checking with subscribed != > null > is never true. (so the boolean is always null) > > the component: > > @Parameter > private Boolean subscribed; > @Parameter > private Long userId; > @Inject > private GroupService groupService; > > @Property > private Group curGroup; > @Property(write = false) > private List<Group> groups; > > public void setupRender() { > if (userId != null) { > if (subscribed == true){ > this.groups = > groupService.findBySubscriberId(userId); > }else{ > this.groups = > groupService.findByOwnerId(userId); > } > } else { > this.groups = groupService.getAllGroups(); > } > } > > the call from my tml page: > > <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> > > <t:group.listGroups userId="userId" subscribed="subscribed" /> > > </t:layout> > > the java page: > > > public class ListSubscribedGroups { > > @Property(write=false) > private Long userId; > > @Property(write=false) > private Boolean subscribed = true; > > public void onActivate(Long userId){ > this.userId = userId; > } > > } > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/parameter-Boolean-not-working-tp5715807.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >