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

http://issues.apache.org/bugzilla/show_bug.cgi?id=30511

Struts-faces form input with rendered attribute set





------- Additional Comments From [EMAIL PROTECTED]  2004-08-07 05:27 -------
Xavier,

I presume that "serverForm" represents a request scoped managed bean?  If so, is
the default value of the "mtc" property (when you instantiate a new instance of
this class) equal to "edit"?  If not, that's where your problem is.

Let's walk through the logic that JSF goes through to see why this is important:
* The form submit occurs
* JSF restores the state of all the components in the tree
* The decoding logic for processing incoming submit values
  checks (among other things) that the input field's "rendered"
  property was set to true
* In your case, that means the expression will be evaluated
  at form submit time, as well as at rendering time
* If "serverForm" is a request scoped attribute, it will
  most likely not be there, so the managed bean facility
  will create it
* If the default value is not 'edit', then the rendered
  property of this component will appear to be false ... so
  JSF will not try to decode the actual incoming value.

Without seeing the actual page, and your JSF configuration files, this is all
just a guess (and, if you want to do that, the Struts user mailing list makes a
*much* better place to have a conversation than a bug report).  But this should
give you a plausible explanation for one way that the behavior you observe is
actually to be expected.

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

Reply via email to