Re: Changing value of a WOConditional binding inside WORepetition
Re: Changing value of a WOConditional binding inside WORepetition
- Subject: Re: Changing value of a WOConditional binding inside WORepetition
- From: Ken Anderson <email@hidden>
- Date: Tue, 30 Aug 2005 16:56:15 -0400
Since you are directly modifying an attribute that is determining the
structure of the page, things are getting messed up (WO doesn't like
this). What I usually do is have the hyperlink put the record to
modify into a temporary variable (or something), then update the EO's
flag in appendToResponse(). Something like this (just pseudocode here)
public WOComponent flipDeletedFlag() {
recordToDelete = currentRecord;
return context().page();
}
public void appendToResponse(WOResponse aResponse, WOContext aContext) {
if (recordToDelete != null) {
recordToDelete.setDeleted(true);
recordToDelete = null;
super.appendToReponse(aResponse, aContext);
}
Ken
On Aug 30, 2005, at 3:11 PM, David Holt wrote:
I have a conditional that wraps a hyperlink for marking documents
for deletion. The binding is set to the value of the deletion flag.
If a document has already been marked, the hyperlink allows an
"undelete" and resets the flag. Clicking the link changes the
underlying variable, but it doesn't immediately affect the
WOConditional until I log out and then log back in. What am I doing
wrong?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden