Without seeing more of your code, my guess it that you are
unconditionally calling setChannelSetup() in your pageBeginRender
method. Something like this:
public void pageBeginRender(PageEvent event) {
setChannelSetup(new ArrayList<Cello6ChannelSetup>());
}
Remember that pageBeginRender is called *every time* the page is
rendered, not just the first time the page is displayed. So, if your
button calls a listener method that does something along the lines of
this:
public void addNewSetup() {
Cello6ChannelSetup setup = new Cello6ChannelSetup(...);
getChannelSetup().add(setup);
}
Then the pageBeginRender method runs *after* your listener method,
thus wiping out the change by re-initializing the list. I can
probably guess your next question, but I'll wait to see if I'm on the
right track first.
FYI, a good way to get a handle on Tapestry behavior for things like
this is to set a breakpoint in your listener method and in your
pageBeginRender method so you can see the order in which they are
called.
-Ryan
On Oct 14, 2006, at 11:52 AM, Jabbar wrote:
Hello,
I've been struggling all day editing persistent page properties and
finding that the values of the properties is not what I expected after
the render phases
The persistant page property is
@Persist
public abstract List<Cello6ChannelSetup> getChannelSetup();
public abstract void setChannelSetup(List<Cello6ChannelSetup> d);
This gets sets in PageBeginRender when the page is first called. A
button on the page is pressed which changes the property of one of the
elements of the list. After the render the value of the channelSetup
property is not what I expect.
Does anybody have any ideas?
Thanks
--
Thanks
A Jabbar Azam
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Ryan Holmes, CISSP
[EMAIL PROTECTED]
ph. (213) 626-0026
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]