You need to buffer the first PropertySelection.

Have your page define a second property, say "bufferedValue".

In beginResponse(), set bufferedValue to the actual value.

On render, the first PS will read the actual value from the buffered
property.

The second PS will be driven by the actual property.

On rewind, the first PS will update the buffered property.  The second PS
will still be driven by the actual property.

Inside your form's listener, you apply the bufferedValue to the actual
property.

It looks like there's a need for a more generalized version of ListEdit that
can do this buffering (perhaps built around a hidden form field)
automatically.

----- Original Message -----
From: "Simon Robins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 18, 2002 6:45 AM
Subject: [Tapestry-developer] Connected Parameters problem with 'form'
direction


> Hi,
>
> I have a page with two PropertySelection components on it. The second
> PS component is wrapped in a conditional which depends on the value of
> the first PS component.
>
> The problem is that the after the first PS component renders (in the
> rewind cycle) it write its new value. This is consistent with the
> documentation. However, this is only part way through the rewind phase
> and so all later components that depend on this value render
> incorrectly and Tapestry fires a StalePage exception.
>
> I can't see any way to know which value is correct during rewind as the
> relevant set method can be called a number of times with different
> values during both phases.
>
> It seems that a parameter connected with a direction of 'form' should
> write its value at the end of the entire rewind phase rather than just
> after its component has finished rendering.
>
> Any help would be appreciated.
>
> Regards,
>
> Simon
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to