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

h/t:selectOneMenu not working in nested t:dataLists or t:dataTables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.1.6
    • None
    • None
    • Tomcat 5.5.12, MyFaces 1.1.5

    Description

      I want to display a table nested in another table (detailStamp feature of extended dataTable). I realised this using two nested t:dataTable s. The outer table features commandButtons to toggle displaying the inner table(s). In the inner table I would like to display a t/h:selectOneMenu in one of the columns:

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>

      [...]

      <h:form id="form">
      <t:dataTable var="it" value="#

      {bekoViewBean.items}

      "
      varDetailToggler="detailToggler">
      <t:column>
      <h:commandButton id="detail_show" rendered="#

      {detailToggler.currentDetailExpanded}

      "
      value="hide"
      action="#

      {detailToggler.toggleDetail}">
      </h:commandButton>
      <h:commandButton id="detail_hide" rendered="#{!detailToggler.currentDetailExpanded}"
      value="show"
      action="#{detailToggler.toggleDetail}

      ">
      </h:commandButton>
      </t:column>

      <f:facet name="detailStamp">
      <h:panelGroup>
      <t:dataTable var="booking" value="#

      {it.bookings}

      ">
      <t:column>
      <t:selectOneMenu rendered="#

      {booking.bookingId <= 0}

      "
      value="#

      {booking.newTrial}

      ">
      <f:convertNumber/>
      <f:selectItem itemLabel="1" itemValue="Trial"/>
      </t:selectOneMenu>
      <h:commandButton value="Add"></h:commandButton>
      </t:column>
      <t:column>
      <h:selectBooleanCheckbox value="#

      {booking.split}

      " onclick="submit()">
      </h:selectBooleanCheckbox>
      </t:column>
      </t:dataTable>
      </h:panelGroup>
      </f:facet>
      </t:dataTable>
      </h:form>
      [...]

      Behavior experienced:

      1. Outer table displays.
      2. User clicks to open display of Details for one row.
      3. Detail Row is expanded (displaying the selectOneMenu, the button and the checkbox).
      4. All further interactions trigger a round trip, but no updates of the data model take place any more. Hiding the detail does not work anymore.

      If I comment out the selectOneMenu, I can toggle detail views and e.g. the checkbox is correctly updated in the detail facet.
      If change the h:panelGroup to a t:panelGroup, then the getter for the checkbox is called, but not the setter.

      I tried to rebuild this using two nested dataList s and tables by using the html TagLib of Sergej Smirnov from http://www.jsftutorials.net/htmLib/ but had a similar problem there.

      Thanks for your help,

      Jens

      Attachments

        1. tomahawk_bug.jsp
          2 kB
          Jens Scheidtmann

        Activity

          People

            Unassigned Unassigned
            scheidtm Jens Scheidtmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: