You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Walter Mourão <wa...@arcadian.com.br> on 2008/02/14 13:02:44 UTC
Re: [Trinidad] tr:inputText read-only
Hi Folks, thanks the interest so far.
> 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?
>
The posted value is being read directly from the request parameters.
that's why Trinidad's EditableValueRenderer (a base class) has an extra
> check
> against the EL, if it is read-only. Standard JSF doesn't do that.
>
Actually, before trying to use the EL, I realized that if I don't put the
value property or if I use a simple string (value="xxx") the tr:inputText
doesn't become read only and works fine. That's why I thought it should be
possible to use the EL.
A way around could be using <h:inputText/>, since there is no such an
> additional read-only check.
>
Yes. I've made some tests with h:inputText, but in this case I loose some
useful properties (partialTriggers and label for example). I will try again.
Clarifying, I'm building a pure (no external dependencies) facelets/trinidad
autocomplete component. I'm glad it is almost ready to be shown.
So, I will try another path to finish the component. If somebody knows a
workaround to make the inputText writable without the setter, please let me
know.
Thanks,
--
Walter Mourão
http://waltermourao.com.br
http://waltermourao.blogspot.com
http://arcadian.com.br
On Thu, Feb 14, 2008 at 6:02 AM, Matthias Wessendorf <ma...@apache.org>
wrote:
> > > 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.
>
> that's why Trinidad's EditableValueRenderer (a base class) has an extra
> check
> against the EL, if it is read-only. Standard JSF doesn't do that.
>
> -M
>
> >
> > 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
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>
>
--
Walter Mourão
http://waltermourao.com.br
http://waltermourao.blogspot.com
http://arcadian.com.br
Re: [Trinidad] tr:inputText read-only
Posted by Walter Mourão <wa...@arcadian.com.br>.
Hi,
> so, what do you want to "set" without a setter ??
>
I'm using two inputTexts: one visible, so the user can enter the search
string (the server gets its value using the request parameters), and another
(hidden) with the actual value being set.
Anyway I managed to make the component work using h:inputText, except one
point: the skin... Could you please give me directions to make the
h:inputText follow the current Trinidad skin ?
Thanks,
On Feb 18, 2008 4:40 AM, Matthias Wessendorf <ma...@apache.org> wrote:
> Hi,
> > Actually, before trying to use the EL, I realized that if I don't put
> the
> > value property or if I use a simple string (value="xxx") the
> tr:inputText
> > doesn't become read only and works fine. That's why I thought it should
> be
> > possible to use the EL.
>
> value="xyz" is literal text, we check if the EL is readOnly.
>
> >
> >
> > > A way around could be using <h:inputText/>, since there is no such an
> > > additional read-only check.
> > >
> >
> > Yes. I've made some tests with h:inputText, but in this case I loose
> some
> > useful properties (partialTriggers and label for example). I will try
> again.
> >
> > Clarifying, I'm building a pure (no external dependencies)
> facelets/trinidad
> > autocomplete component. I'm glad it is almost ready to be shown.
> >
> > So, I will try another path to finish the component. If somebody knows a
> > workaround to make the inputText writable without the setter, please let
> me
>
> so, what do you want to "set" without a setter ??
>
> -M
>
> > know.
> >
> > Thanks,
> >
> >
> > --
> > Walter Mourão
> > http://waltermourao.com.br
> > http://waltermourao.blogspot.com
> > http://arcadian.com.br
> >
> >
> >
> >
> > On Thu, Feb 14, 2008 at 6:02 AM, Matthias Wessendorf <ma...@apache.org>
> > wrote:
> > >
> > > > > 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.
> > >
> > > that's why Trinidad's EditableValueRenderer (a base class) has an
> extra
> > check
> > > against the EL, if it is read-only. Standard JSF doesn't do that.
> > >
> > > -M
> > >
> > >
> > > >
> > > > 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
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > >
> > > further stuff:
> > > blog: http://matthiaswessendorf.wordpress.com/
> > > sessions: http://www.slideshare.net/mwessendorf
> > > mail: matzew-at-apache-dot-org
> > >
> > >
> >
> >
> >
> > --
> > Walter Mourão
> > http://waltermourao.com.br
> > http://waltermourao.blogspot.com
> > http://arcadian.com.br
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>
>
--
Walter Mourão
http://waltermourao.com.br
http://waltermourao.blogspot.com
http://arcadian.com.br
Re: [Trinidad] tr:inputText read-only
Posted by Matthias Wessendorf <ma...@apache.org>.
Hi,
> Actually, before trying to use the EL, I realized that if I don't put the
> value property or if I use a simple string (value="xxx") the tr:inputText
> doesn't become read only and works fine. That's why I thought it should be
> possible to use the EL.
value="xyz" is literal text, we check if the EL is readOnly.
>
>
> > A way around could be using <h:inputText/>, since there is no such an
> > additional read-only check.
> >
>
> Yes. I've made some tests with h:inputText, but in this case I loose some
> useful properties (partialTriggers and label for example). I will try again.
>
> Clarifying, I'm building a pure (no external dependencies) facelets/trinidad
> autocomplete component. I'm glad it is almost ready to be shown.
>
> So, I will try another path to finish the component. If somebody knows a
> workaround to make the inputText writable without the setter, please let me
so, what do you want to "set" without a setter ??
-M
> know.
>
> Thanks,
>
>
> --
> Walter Mourão
> http://waltermourao.com.br
> http://waltermourao.blogspot.com
> http://arcadian.com.br
>
>
>
>
> On Thu, Feb 14, 2008 at 6:02 AM, Matthias Wessendorf <ma...@apache.org>
> wrote:
> >
> > > > 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.
> >
> > that's why Trinidad's EditableValueRenderer (a base class) has an extra
> check
> > against the EL, if it is read-only. Standard JSF doesn't do that.
> >
> > -M
> >
> >
> > >
> > > 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
> > >
> > >
> >
> >
> >
> >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > mail: matzew-at-apache-dot-org
> >
> >
>
>
>
> --
> Walter Mourão
> http://waltermourao.com.br
> http://waltermourao.blogspot.com
> http://arcadian.com.br
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org