Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-153

A Tabbed Pane doesn't update the model.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.1.1
    • None
    • Tabbed Pane
    • None
    • Windows XP, Java 1.5.0, TomCat 5.5.15, Java Server Faces 1.1.1, Tomahawk tlib version 1.0.10

    Description

      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"; }

      }

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            karbol David Carbol
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: