9 Replies Latest reply on Aug 2, 2007 9:37 PM by Tom McCobb

    Controls imbedded in simpleTogglePanel will not fire

    Tom McCobb Newbie

      I have a group of simpleTogglePanels displayed in rich:dataTable rows. Within each panel I have a selectOneMenu and a selectBooleanCheckbox or a second selectOneMenu. Depending on the nature of the item that is being display either the first or the second simpleTogglePanel will be rendered.

      The problem is that in the first panel, the selectOneMenu never triggers its valueChangeEvent, and the selectBooleanCheckbox will fire the the first time when it is clicked, but will not respond to un-checking.

      In the second panel, the first selectOneMenu (the same one as above) never triggers the change event, and the second one always works.

      Is there a problem with imbedding controls in the togglePanels?

      <h:form>
      <rich:dataTable value="#{cart.cartItems}" var="item" id="carttable"
       width="100%" cellpadding="0" cellspacing="0" border="0"
       style="border:none;" binding="#{cart.cartTable}" >
       <rich:column style="border:none;">
       <rich:simpleTogglePanel id="catalogitem" switchType="client"
       headerClass="classPanel" label="#{item.properties.title} for #{item.registrant.fullName}"
       opened="false" style="border:none;"
       rendered="#{item.itemType == 'CATALOG'}">
       <h:outputText value="Registrant: " />
       <t:selectOneMenu id="registrantSelector" value="#{item.registrantId}" styleClass="selectStyle"
       valueChangeListener="#{item.updateRegistrant}" onchange="submit();">
       <f:selectItems value="#{content.householdSelect}" />
       </t:selectOneMenu>
       <htm:hr />
       <h:outputText value="PAFA credit $#{item.properties.pafa} "/>
       <h:selectBooleanCheckbox value="#{item.selectPafa}" onclick="submit();"
       valueChangeListener="#{item.updatePafaCredit}" id="pafaCheck" disabled="#{item.properties.pafa == '0'}"
       rendered="#{item.itemType == 'CATALOG'}" />
       <h:outputText value=" Check here for PAFA credit"/>
       <htm:br />
       <htm:hr />
       <h:outputText
       value="#{item.properties.classDay} #{item.properties.startTimeFmt} to #{item.properties.endTimeFmt}" />
       <htm:br />
       <htm:hr />
       <h:outputText
       value="#{item.properties.startDateFmt} - #{item.properties.endDateFmt} " />
       <h:outputText value=" [#{item.properties.sessions}wks]" />
       <htm:br />
       <htm:hr />
       <h:outputText value="Member: " />
       <h:outputText value="$#{item.properties.costMember} " />
       <h:outputText
       value=" + $#{item.properties.feeFmt} Supply Cost = $#{item.properties.totalMemberCost} " />
       <htm:br />
       <htm:hr />
       <h:outputText value="Non-Member: " />
       <h:outputText value="$#{item.properties.costNon}" />
       <h:outputText
       value=" + $#{item.properties.feeFmt} Supply Cost = $#{item.properties.totalNonMemberCost} " />
       </rich:simpleTogglePanel>
       <rich:simpleTogglePanel id="memberitem" switchType="client"
       headerClass="classPanel" label="#{item.properties.title} for #{item.registrant.fullName}"
       opened="false" style="border:none;"
       rendered="#{item.itemType == 'MEMBERSHIP'}">
       <h:outputText value="Registrant: " />
       <h:selectOneMenu value="#{item.registrantId}" styleClass="selectStyle" onchange="submit();" valueChangeListener="#{item.updateRegistrant}">
       <f:selectItems value="#{content.householdSelect}" />
       </h:selectOneMenu>
       <htm:hr />
       <h:outputText value="Membership Level: " />
       <h:selectOneMenu value="#{item.properties.memCatId}" styleClass="selectStyle" valueChangeListener="#{item.updateMembershipCost}" onchange="submit();">
       <f:selectItems value="#{display.membershipLevels}" />
       </h:selectOneMenu>
       <htm:hr />
       <h:outputText value="Membership Cost: " />
       <h:outputText value="$#{item.properties.costFmt} " />
       <htm:hr />
       </rich:simpleTogglePanel>
       </rich:column>
       <rich:column style="border:none;vertical-align:top;">
       <h:selectBooleanCheckbox value="#{item.selected}" id="cartCheck"
       valueChangeListener="#{cart.setChecks}" onclick="submit();"/>
       </rich:column>
      </rich:dataTable>
      
      <h:commandButton immediate="true" image="#{path}/images/update.png" actionListener="#{cart.updateCartSelections}"
       style="border-style:none;margin:30px 0 0 275px " rendered="#{cart.cartCount > 0 }"/>
      </h:form>