The problem is that #{param.edit} doesn't maintain a constant value.
The component's "rendered" attribute value must be the same between
the first and second request. If it's rendered on the initial
request, but not rendered on the submitting request, then the backing
bean won't be updated (the value won't even be validated).
Components are only evaluated (decoded, converted, validated, copied
to backing beans, rendered) if the rendered attribute is true.
On 12/5/05, "R. Müller" <[EMAIL PROTECTED]> wrote:
> hi group,
>
> in a particular form i want the fields only editable, if there is
> explicitly set a edit-param.
>
> I've tried it with the following code :
>
> <h:outputText rendered="#{empty param.edit}"
> value="#{backingBean.value}/>
> <h:selectOneMenu rendered="#{!empty param.edit}"
> value="#{backingBean.value}">
> <f:selectItems value="#{selectItems}" />
> </h:selectOneMenu>
>
> But i've noticed that when submitting the form the 'setter'-method of
> the 'backingBean.value' is never called.
> Leaving out the 'rendering'-attribute, which means that the component is
> always editable everthing works fine.
> I've got the same behaviour when using the 'disabled'-attribute.
>
> Does anybody has an explanation for this or hints how to solve this in a
> 'clean way' ?
>
> thanx
>
>
> ronald
> --
> *********************************************************
> *M-Unicomp GmbH
> *
> *Ronald Müller
> *
> *Plauener Straße 163-165, Haus 11
> *13053 Berlin
> *
> *fon : +49 ( 0 ) 30 / 98 69 61 54
> *mobil : +49 ( 0 ) 172 / 93 95 00 4
> *fax : +49 ( 0 ) 30 / 98 69 61 55
> *email : [EMAIL PROTECTED]
> *web : www.unicomp-berlin.de
> ********************************************************
>