On 6/6/05, gvp <[EMAIL PROTECTED]> wrote:
>
>   I faced a problem with strange behavior of tacos:tree treeState.
>   I put directLink inside of tree node with folliwng custom action:
> 
>   <property-specification name="treeState" type="java.util.Set" 
> persistent="yes" initial-value="new java.util.HashSet()" />

Tapestry has an odd behavior when it comes to persistent properties
with initial-values: it does not persist the value if you don't
explictly call the setter (thus firing a change notification event),
instead it keeps recreating it with initial-value next time around.
Based on the problem you described, I think that's the issue here.
There are two ways around this:

1) let the tacos:Tree initialize your persistent state property (it
will make a new HashSet and fire the right events at the right time).
Basically you just remove initial-value:

<property-specification name="treeState" type="java.util.Set" persistent="yes"/>

2) Keep the initial-value, but make sure you do a 
setTreeState(getTreeState()); whenever you have affected that Set
(either directly or via a TreeManager).

Hope this helps,
  Viktor

ps. I'm cc-ing this on the tacos-devel list, just so at least it gets
archived there as well.. i will of course keep answering questions
raised on tapestry-user as well.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to