Walter Mourão schrieb:
> Hi folks,
> I'm trying to show a tr:inputText with a (initial) value calculated
> from an EL expression (no value binding since the value will be read
> from the request), something like <tr:inputText
> value="#{fn:join(somevar)}" />. But the input becomes "read-only". I
> found in the tag documentation and I think it is related:
>
>     the value of the component. If the EL binding for the "value"
>     points to a bean property with a getter but no setter, and this is
>     an editable component, the component will be rendered in read-only
>     mode.
>
>
> Is there a way to make the inputText writable when it gets its value
> from an EL expression ?

If the component is editable, but there is no setter for the component
to store its new value into during postback, then what should it do?

In your example, there is no way that any data entered by the used can
be written back to "fn:join(somevar)", so any user data entered would
have to be thrown away on postback. Therefore when there is no setter
method, the *only* sane thing to do is make the component non-editable
or disabled.

Maybe what you are asking is for the component to be *disabled* rather
than *read-only*? That would seem to be reasonable..but how can a
"writable" field possibly be useful here?

Regards, Simon

Reply via email to