0 Replies Latest reply on Jul 24, 2008 3:53 AM by juergen.zimmermann

    No Ajax-Requests inside modalPanel ?

    juergen.zimmermann

      I tried to make Ajax requests inside rich:modalPanel, but had no success. Any hint is appreciated!

      The modal panel is defined as follows:

      <rich:modalPanel id="detailModalPanel2" width="400" height="300">
       <f:facet name="header">
       <h:outputFormat id="detailModalTitle2" value="#{i18n['modalPanel.details.title']}">
       <f:param id="detailModalTitleId2" value="#{kunde.id}"/>
       </h:outputFormat>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage id="closeDetailModalPanel2" value="/images/close.png" style="cursor:pointer" alt="#{i18n['modalPanel.button.close']}"/>
       <rich:componentControl for="detailModalPanel2" attachTo="closeDetailModalPanel2" operation="hide" event="onclick"/>
       </h:panelGroup>
       </f:facet>
      
       <a4j:include viewId="/kundenverwaltung/modalPanel.details2.xhtml" />
      </rich:modalPanel>
      
      <h:outputLink id="openDetailModalPanel2" value="#">
       <h:graphicImage id="detailsIcon" url="/images/details2.gif" alt="#{i18n['modalPanel.button.details2']}"/>
       <rich:componentControl for="detailModalPanel2" attachTo="openDetailModalPanel2" operation="show" event="onclick"/>
      </h:outputLink>


      The included file for the modal panel is a tabPanel. However, if I click on the 2nd tab, then nothing happens. If I change switchType to "client", then everything works fine.
      <a4j:form id="tabPanelForm">
       <rich:tabPanel id="tabPanel" switchType="ajax">
       <rich:tab id="stammdatenTab">
       <f:facet name="label">
       <h:panelGroup>
       <h:graphicImage value="/images/stammdaten.gif"/>
        
       <h:outputText value="#{i18n['panelGridDetails.kunde.stammdaten']}" />
       </h:panelGroup>
       </f:facet>
       <h:panelGrid id="ausgewaehlterKunde" columns="2">
       ...
       </h:panelGrid>
       </rich:tab>
      
       <rich:tab id="bestellungenTab" rendered="#{not empty kunde.bestellungen}">
       <f:facet name="label">
       <h:panelGroup>
       <h:graphicImage value="/images/bestellungen.gif"/>
        
       <h:outputText value="#{i18n['tabelle.kunde.bestellungen']}" />
       </h:panelGroup>
       </f:facet>
       <h:dataTable id="bestellungenTabelle"
       value="#{kunde.bestellungen}"
       var="bestellung">
       <rich:column>
       <rich:simpleTogglePanel label="#{i18n['bestellung']} #{bestellung.id}"
       opened="false"
       width="100%"
       heigth="100%"
       switchType="client">
       <rich:dataTable id="bestellungTabelle"
       value="#{bestellung.bestellpositionen}"
       var="bp">
       <rich:column>
       <f:facet name="header">
       <h:outputText value="#{i18n['bestellung.anzahl']}"/>
       </f:facet>
       <h:outputText value="#{bp.anzahl}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <h:outputText value="#{i18n['bestellung.artikel']}"/>
       </f:facet>
       <h:outputText value="#{bp.artikel.bezeichnung}"/>
       </rich:column>
       </rich:dataTable>
       </rich:simpleTogglePanel>
       </rich:column>
       </h:dataTable>
       </rich:tab>
       </rich:tabPanel>
      </a4j:form>