You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "David Carbol (JIRA)" <de...@myfaces.apache.org> on 2006/02/22 14:41:37 UTC

[jira] Created: (TOMAHAWK-153) A Tabbed Pane doesn't update the model.

A Tabbed Pane doesn't update the model.
---------------------------------------

         Key: TOMAHAWK-153
         URL: http://issues.apache.org/jira/browse/TOMAHAWK-153
     Project: MyFaces Tomahawk
        Type: Bug
  Components: Tabbed Pane  
    Versions: 1.1.1    
 Environment: Windows XP, Java 1.5.0, TomCat 5.5.15, Java Server Faces 1.1.1, Tomahawk tlib version 1.0.10
    Reporter: David Carbol


I have created very simple form, where there is a <h:inputText ... > within <t:panelTab>. The problem is that after submiting the form, values from the input text fields are not set in the model (managed-bean). Please, see the following snapshots:

<<< TEST.JSP - page that contains the form: >>>

<f:view>
    <HTML>
    <BODY>
    <CENTER>
        <h:form>
            <t:panelTabbedPane>
                <t:panelTab label="Tab #1">
                    <f:verbatim>
                        <h:inputText value="#{testBean.firstValue}"/>
                    </f:verbatim>
                </t:panelTab>
                <t:panelTab label="Tab #2">
                    <f:verbatim>
                        <h:inputText value="#{testBean.secondValue}"/>
                    </f:verbatim>
                </t:panelTab>
                <h:commandButton value="SUBMIT" action="#{testBean.submit}"/>
            </t:panelTabbedPane>
        </h:form>
    </CENTER>
    </BODY>
    </HTML>
</f:view>

<< FACES-CONFIG.XML snapshot >>>
    <managed-bean>
        <managed-bean-name>testBean</managed-bean-name>
        <managed-bean-class>TestPackage.TestBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

    <navigation-rule>
        <from-view-id>/test.jsp</from-view-id>
        <navigation-case>
            <from-outcome>success</from-outcome>
            <to-view-id>/WEB-INF/results/result.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>

<<< RESULT.JSP >>>
<f:view>
    <HTML>
    <BODY>
    First value from the form:
    <h:outputText value="#{testBean.firstValue}"/>
    <br>
    Second value from the form:
    <h:outputText value="#{testBean.secondValue}"/>
    </BODY>
    </HTML>
</f:view>

<<< TESTBEAN.JAVA >>>
public class TestBean {
    private String firstValue = "One";
    private String secondValue = "Two";

    public String getFirstValue() {
        return firstValue;
    }

    public void setFirstValue(String firstValue) {
        this.firstValue = firstValue;
    }

    public String getSecondValue() {
        return secondValue;
    }

    public void setSecondValue(String secondValue) {
        this.secondValue = secondValue;
    }

    public String submit() {
        return "success";
    }
}

-- 
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: (TOMAHAWK-153) A Tabbed Pane doesn't update the model.

Posted by "Thomas Goorden (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-153?page=comments#action_12376237 ] 

Thomas Goorden commented on TOMAHAWK-153:
-----------------------------------------

We seem to experiencing the same problem, even without the (incorrect) use of <f:verbatim>.

It seems this issue is still very much present:
http://mail-archives.apache.org/mod_mbox/myfaces-users/200410.mbox/%3C4179256E.1040905@apache.org%3E

If you look at the broadcast method in HtmlPanelTabbedPane (even in the current SVN trunk), there is a call to renderResponse upon a TabChangeEvent. It seems this would force a renderResponse, which prevents the apply request values fase. The mail references commenting out just this line, but I'm unsure as to what the impact would be on the rest of the functionality (as is typical with JSF).

Any input?

> A Tabbed Pane doesn't update the model.
> ---------------------------------------
>
>          Key: TOMAHAWK-153
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-153
>      Project: MyFaces Tomahawk
>         Type: Bug

>   Components: Tabbed Pane
>     Versions: 1.1.1
>  Environment: Windows XP, Java 1.5.0, TomCat 5.5.15, Java Server Faces 1.1.1, Tomahawk tlib version 1.0.10
>     Reporter: David Carbol

>
> I have created very simple form, where there is a <h:inputText ... > within <t:panelTab>. The problem is that after submiting the form, values from the input text fields are not set in the model (managed-bean). Please, see the following snapshots:
> <<< TEST.JSP - page that contains the form: >>>
> <f:view>
>     <HTML>
>     <BODY>
>     <CENTER>
>         <h:form>
>             <t:panelTabbedPane>
>                 <t:panelTab label="Tab #1">
>                     <f:verbatim>
>                         <h:inputText value="#{testBean.firstValue}"/>
>                     </f:verbatim>
>                 </t:panelTab>
>                 <t:panelTab label="Tab #2">
>                     <f:verbatim>
>                         <h:inputText value="#{testBean.secondValue}"/>
>                     </f:verbatim>
>                 </t:panelTab>
>                 <h:commandButton value="SUBMIT" action="#{testBean.submit}"/>
>             </t:panelTabbedPane>
>         </h:form>
>     </CENTER>
>     </BODY>
>     </HTML>
> </f:view>
> << FACES-CONFIG.XML snapshot >>>
>     <managed-bean>
>         <managed-bean-name>testBean</managed-bean-name>
>         <managed-bean-class>TestPackage.TestBean</managed-bean-class>
>         <managed-bean-scope>session</managed-bean-scope>
>     </managed-bean>
>     <navigation-rule>
>         <from-view-id>/test.jsp</from-view-id>
>         <navigation-case>
>             <from-outcome>success</from-outcome>
>             <to-view-id>/WEB-INF/results/result.jsp</to-view-id>
>         </navigation-case>
>     </navigation-rule>
> <<< RESULT.JSP >>>
> <f:view>
>     <HTML>
>     <BODY>
>     First value from the form:
>     <h:outputText value="#{testBean.firstValue}"/>
>     <br>
>     Second value from the form:
>     <h:outputText value="#{testBean.secondValue}"/>
>     </BODY>
>     </HTML>
> </f:view>
> <<< TESTBEAN.JAVA >>>
> public class TestBean {
>     private String firstValue = "One";
>     private String secondValue = "Two";
>     public String getFirstValue() {
>         return firstValue;
>     }
>     public void setFirstValue(String firstValue) {
>         this.firstValue = firstValue;
>     }
>     public String getSecondValue() {
>         return secondValue;
>     }
>     public void setSecondValue(String secondValue) {
>         this.secondValue = secondValue;
>     }
>     public String submit() {
>         return "success";
>     }
> }

-- 
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: (TOMAHAWK-153) A Tabbed Pane doesn't update the model.

Posted by "Jorge Rodr?guez Pedrianes (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-153?page=comments#action_12370854 ] 

Jorge Rodríguez Pedrianes commented on TOMAHAWK-153:
----------------------------------------------------

Hello David, i see your question but think that you are one error in your jsp, because if you put this in your jsp, 
   <f:verbatim>
        <h:inputText value="#{testBean.firstValue}"/>
    </f:verbatim> 

the inputText not exixts, you render only a text "<h:inputText value="#{testBean.firstValue}"/>" no html "<input". see the signification of "verbatim". Also, i have made this, and to me work ok!!



> A Tabbed Pane doesn't update the model.
> ---------------------------------------
>
>          Key: TOMAHAWK-153
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-153
>      Project: MyFaces Tomahawk
>         Type: Bug
>   Components: Tabbed Pane
>     Versions: 1.1.1
>  Environment: Windows XP, Java 1.5.0, TomCat 5.5.15, Java Server Faces 1.1.1, Tomahawk tlib version 1.0.10
>     Reporter: David Carbol

>
> I have created very simple form, where there is a <h:inputText ... > within <t:panelTab>. The problem is that after submiting the form, values from the input text fields are not set in the model (managed-bean). Please, see the following snapshots:
> <<< TEST.JSP - page that contains the form: >>>
> <f:view>
>     <HTML>
>     <BODY>
>     <CENTER>
>         <h:form>
>             <t:panelTabbedPane>
>                 <t:panelTab label="Tab #1">
>                     <f:verbatim>
>                         <h:inputText value="#{testBean.firstValue}"/>
>                     </f:verbatim>
>                 </t:panelTab>
>                 <t:panelTab label="Tab #2">
>                     <f:verbatim>
>                         <h:inputText value="#{testBean.secondValue}"/>
>                     </f:verbatim>
>                 </t:panelTab>
>                 <h:commandButton value="SUBMIT" action="#{testBean.submit}"/>
>             </t:panelTabbedPane>
>         </h:form>
>     </CENTER>
>     </BODY>
>     </HTML>
> </f:view>
> << FACES-CONFIG.XML snapshot >>>
>     <managed-bean>
>         <managed-bean-name>testBean</managed-bean-name>
>         <managed-bean-class>TestPackage.TestBean</managed-bean-class>
>         <managed-bean-scope>session</managed-bean-scope>
>     </managed-bean>
>     <navigation-rule>
>         <from-view-id>/test.jsp</from-view-id>
>         <navigation-case>
>             <from-outcome>success</from-outcome>
>             <to-view-id>/WEB-INF/results/result.jsp</to-view-id>
>         </navigation-case>
>     </navigation-rule>
> <<< RESULT.JSP >>>
> <f:view>
>     <HTML>
>     <BODY>
>     First value from the form:
>     <h:outputText value="#{testBean.firstValue}"/>
>     <br>
>     Second value from the form:
>     <h:outputText value="#{testBean.secondValue}"/>
>     </BODY>
>     </HTML>
> </f:view>
> <<< TESTBEAN.JAVA >>>
> public class TestBean {
>     private String firstValue = "One";
>     private String secondValue = "Two";
>     public String getFirstValue() {
>         return firstValue;
>     }
>     public void setFirstValue(String firstValue) {
>         this.firstValue = firstValue;
>     }
>     public String getSecondValue() {
>         return secondValue;
>     }
>     public void setSecondValue(String secondValue) {
>         this.secondValue = secondValue;
>     }
>     public String submit() {
>         return "success";
>     }
> }

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