You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "lantian (JIRA)" <my...@incubator.apache.org> on 2005/07/04 07:09:10 UTC

[jira] Created: (MYFACES-296) all of the input components can not save sates when they are not rendered at the first time

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
    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


[jira] Commented: (MYFACES-296) all of the input components can not save sates when they are not rendered at the first time

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-296?page=comments#action_12318593 ] 

Martin Marinschek commented on MYFACES-296:
-------------------------------------------

I tried that out - had to correct the sourcecode in several things, this is the revised version:

public class MyBean
{
    private boolean renderedText=false;
    private String text="input me ";
    public String getText()
    {
       return this.text;
    }
    public void setText(String text)
    {
        this.text=text;
    }
    public boolean getRenderedText()
   {
      return this.renderedText;
   }
    public void setRenderedText(boolean _renderedText)
    {
    this.renderedText=_renderedText;
    }
    public String doSubmitText()
    {
        System.out.println(this.renderedText);

        return "";
    }
}

Bean was defined as a session scoped bean!

State-Saving method: CLIENT_SIDE

... and it worked great! So I am closing this right now... Can be reopened if more information comes up.

> 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
>      Fix For: Nightly Build

>
> 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


[jira] Closed: (MYFACES-296) all of the input components can not save sates when they are not rendered at the first time

Posted by "Martin Marinschek (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-296?page=all ]
     
Martin Marinschek closed MYFACES-296:
-------------------------------------

    Fix Version: Nightly Build
     Resolution: Cannot Reproduce

> 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
>      Fix For: Nightly Build

>
> 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


[jira] Commented: (MYFACES-296) all of the input components can not save sates when they are not rendered at the first time

Posted by "lantian (JIRA)" <my...@incubator.apache.org>.
    [ 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