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

Reply via email to