Hi!

What does 'use saveState on...' mean?
Tamas


Grant Smith wrote:
Is the bean request scoped ? If so, use saveState on #{loginBean.flag}.

On 7/12/07, *...Gargi* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote:


    I have an inputText component whose "disable" attribute is bound
    to a booelan
    in the backing bean in request scope.

    while the page is loading flag = true. Later when i change the
    flag to false
    (on button click), the inputText component does become enabled,
    but its
    value does not get set in the backing bean.

    JSP code :
    <h:inputText id = "input" value = "#{loginBean.text}"  disabled =
    "#{loginBean.flag}"/>
    <h:commandButton  id = "disable" value = "DISABLE" action =
    "#{loginBean.disable}"  />
    <h:commandButton  id = "enable" value = "ENABLE" action =
    "#{loginBean.enable}"  />

    Backing Bean code :
    public String text;
    public boolean flag = true;
    public void disable() { this.setFlag(true);}
    public void enable() { this.setFlag(false);}
    (+ getter-setter methods..)

    This is strange because the situation is nto the same when inputText
    component is enabled to begin with. In that case it functions as
    expected.

    Solutions/discussions will be appreciated....thanks

    --
    View this message in context:
    
http://www.nabble.com/disable-enable-%3Ch%3AinputText%3E-dynamically-tf4070769.html#a11568580
    Sent from the MyFaces - Users mailing list archive at Nabble.com
    <http://Nabble.com>.




--
Grant Smith

Reply via email to