DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18501>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18501

Controller wipes out exisiting request form data





------- Additional Comments From [EMAIL PROTECTED]  2003-03-31 14:29 -------
I think some kind of populate check mechanism could be implemented in 
RequestProcessor for allowing action chaining.
Each form would be populated only one time per request, and no repopulating
should be done in subsequent actions in the chain.

Meanwhile, i have a solution for allowing action chaining.
Consider creating a property named readOnly with a setter method 
(initially false).
Now the action which want to access this form should tipically do

  form.setReadOnly(false);
  form.setXXX(...);
  form.setYYY(...);
  form.setZZZ(...);
  form.setReadOnly(true);

The setter methods for the other properties (as nedded) should be, of course
  public void setXXX(String s) {
    if (!readOnly) {
       this.xxx = s;
    }
  }

This way we can control the populating of the forms in the request.
This has a disanvantage: the form can't be used in session UNLESS you can
garantee that readOnly is always set to false in the last (or first) action in a
chaining. You you don't do this, the form in the session will become an imuttable
instance sooner or latter.

Best Regards,
Carlos Silva

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

Reply via email to