Raphaƫl Jean <raphael.jean <at> entropysoft.net> writes:
>
> Philippe,
>
> The problem you are seeing is not related to properties being initialized out
of order. The <at> If component
> only evaluates its condition during render and saves the result in a hidden
form field. When the form
> rewinds, it uses the value saved during render. In your case, the myProp !=
null condition is only
> evaluated during render (and is probably true at that time). During rewind,
the <at> If condition is still
> true no matter what the value of myProp is.
>
> To fix this, you need to add a volative=true parameter to the <at> If
component, to force it to evaluate its
> condition at all times. But then you might get StaleLinkException problems...
>
> Another way is to derive your own GenericLink component, that doesn't render
during rewind:
> protected void renderComponent(IMarkupWriter writer,
> IRequestCycle cycle)
> {
> + if (cycle.isRewinding())
> + return;
> getRenderer().renderLink(writer, cycle, this);
> }
>
> Hope this helps,
>
> Raphael Jean
> EntropySoft
>
Thank you very much Raphael for your answer !
I will look at that with attention.
But I still think that is a pitty we need to create our own components in
place of Tapestry components because they are not working all the time.
I think that the form life cycle / rewind system is too complicated, we need to
create workarounds even for basic needs. ;-(
Thank you
Philippe
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]