myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lantian (JIRA)" <myfaces-...@incubator.apache.org>
Subject [jira] Commented: (MYFACES-296) all of the input components can not save sates when they are not rendered at the first time
Date Fri, 12 Aug 2005 01:07:01 GMT
    [ http://issues.apache.org/jira/browse/MYFACES-296?page=comments#action_12318559 ] 

lantian commented on MYFACES-296:
---------------------------------

thanks for your focus!
the following is my jsp source code:

<f:view>
   <h:form>
        <h:SelectBooleanCheckbox id="checkbox1" value="#{myBean.renderedText}" /><br>
        <h:commandButton id="button1" value="submit" /><br>
        <h:inputText id="input1" value="#{myBean.text}" rendered="#{myBean.renderedText}"
/> <br>
        <h:commandButton id="button2" value="submitText" action="#{myBean.doSubmitText}"
             rendered="#{myBean.renderedText}" /><br>
  </h:form>
<f:view>


the following is myBean source code:
public class MyBean
{
    private boolean renderedText=false;
    private String text="input me ";
    public String getText()
    {
       return this.text;
    }
    public void setText(_text)
    {
        this.text=_text;
    }
    public boolean getRenderedText()
   {
      return this.renderedText;
   }
public void setRenderedText(boolean _renderedText)
{
this.renderedText=_renderedText;
}
public doSubmitText()
{
System.out.println(this.renderedText);
}
}

when the page was rendered first time ,we can not see the input1 and button2 of course .
then we clicked checkbox1 to make it checked then clicked button1,we can see the input1 and
button2 now,
but we modified the data of input1 then clicked button2, the text attribute of myBean was
not changed,and
the doSubmitText method was not invoked.

please view the folowing  article,it will help more!
http://forum.java.sun.com/thread.jspa?threadID=581959&tstart=45



> all of the input components  can not save sates when they are not rendered at the first
time
> --------------------------------------------------------------------------------------------
>
>          Key: MYFACES-296
>          URL: http://issues.apache.org/jira/browse/MYFACES-296
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: jdk 1.4.2
>     Reporter: lantian
>     Assignee: Martin Marinschek
>     Priority: Critical

>
> i make the rendered property of   input components  to be dynamic by binding it whith
a boolean variable of backingben,but 
> myface can not save the sates of input components when they are not rendered at the first
time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message