Hi Yes,I agree to your point,have tried that also.
Infact, the idea to intialize it in the way given below is taken from the Grid component of tapestry,as I am trying to build a customized grid over the tapestry default grid. The value transferred from Component A to B doesn't seem to be a problem...Its the transfer of field value from B to A using the method as given in the mail.Not sure if there is something to do with the binding stuff or I am overlooking something here. Thanks Akshay -----Original Message----- From: "Chris Poulsen" <mailingl...@nesluop.dk> Sent: 21-11-2014 17:07 To: "Tapestry users" <users@tapestry.apache.org> Subject: Re: Property Values to be modified don't initialize the property where you declare it. Use onActivate setupRender or similar to set det default value On Fri, Nov 21, 2014 at 4:06 PM, akshay <akshayestat...@gmail.com> wrote: > Hi Thiago, > > Yes it should be field, just a typo :). But anyways, below is the > scneario:- > > > I have a component A and Component B > > > Component A{ > > @Component(id = "B", parameters = { "sortAscending=sortAscending"}) > private ComponentB b; > > @Property > private boolean sortAscending=true; > > > } > > > Component B{ > > @Persist > private ComponentA a; > > @Parameter(required = true) > private boolean sortAscending; > > Object setupRender(){ > > > a.updateXXX(sortAscending); > > }} > > When the values is true, which is set by default it works all fine. But > when the value is moved to false, On debug I see that > the value stored by sortAscending in ComponentB is correct but as soon as > it goes within the method a.updateXXX(sortAscending), its > its replaced by true. > > For identifying the reason, I checked that my property conduit value is > always true in component B. I just changed the value of the conduit > properties manually through debugger to false and then made the call to the > above metioned component method and everything worked fine. This leads me > to a conclusion that the conduit field property has something to do > here, if I am not doing something wrong here. > > > Best Regards > Akshay > > On Fri, Nov 21, 2014 at 3:41 PM, Thiago H de Paula Figueiredo < > thiag...@gmail.com> wrote: > > > On Fri, 21 Nov 2014 12:13:51 -0200, akshay <akshayestat...@gmail.com> > > wrote: > > > > Dear all, > >> > >> I have a strange scenario like below :- > >> > >> I have a component A > >> { > >> @Parameter(required = true) > >> private boolean isXYZ; > >> > >> } > >> > >> > >> On debug, i see two parameters associated to the above field > >> > >> -----isXYZ and isXYZ_FieldConduit. > >> > > > > They're not parameters. They're fields. Please use the right vocabulary > or > > people won't understand what you're saying. :) > > > > Somehow, the values of both the fields are loaded differently and are > not > >> in sync. > >> > > > > the _FieldConduit thing is actually a PropertyConduit instance, not the > > field type, so they're supposed to be different. You shouldn't worry > about > > the _FieldConduit thing at all. > > > > Is production mode off? If yes, Tapestry should keep the field updated. > > > > What exactly is the problem you're having? > > > > May be its something which is just against the tapestry way. Not sure, > >> any suggestion will be helpful. > >> > > > > This is actually how Tapestry works on page, component and mixin fields: > > by transforming them. ;) This field, which is a parameter, is only left > on > > class, but any access to it (setting a value or reading it) is done > through > > the PropertyConduit. > > > > -- > > Thiago H. de Paula Figueiredo > > Tapestry, Java and Hibernate consultant and developer > > http://machina.com.br > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > -- > Cheers!! > Akshay >