0 Replies Latest reply on Nov 15, 2010 7:56 AM by Rene Gritsch

    ModalPanel showWhenRendered Form problem

    Rene Gritsch Newbie

      I have an ajaxRendered=true outputPanel around a modalPanel which shows up when rendered.

      This works fine, but if a have a form inside with an inputfield (ajax support) for example, the form get´s

      submitted but the values are not set to my model. I tried everything from links,buttons etc. they have the same behaviour.


      When i use a normal modalPanel everything works fine. I´ve also tried to us a form only around the inputfield but this

      makes no difference too.


      @ i found out that it has something todo with the facesmessages, because if i open the modalpanel manually without showWhenRendered the

      msg variable in the datatable resolves to null after i ajax submit the inputfield. When does the jsf fw reset the facesmessages ?!



      <ui:composition xmlns        ="http://www.w3.org/1999/xhtml" 
                      xmlns:ui    ="http://java.sun.com/jsf/facelets"
                      xmlns:h        ="http://java.sun.com/jsf/html"
                      xmlns:a4j    ="http://richfaces.org/a4j"
                      xmlns:f        ="http://java.sun.com/jsf/core"
                      xmlns:s        ="http://jboss.com/products/seam/taglib" 
                      xmlns:t        ="http://myfaces.apache.org/tomahawk"
                      xmlns:rich    ="http://richfaces.org/rich"
               <a4j:outputPanel ajaxRendered="true" id="messagesView">


                   <rich:modalPanel id="messagesPanel" autosized="true" minWidth="300" width="500" minHeight="300" moveable="false" resizeable="false" rendered="#{facesMessages.currentMessages.size() gt 0}" showWhenRendered="true">
                      <f:facet name="header">
                              <h:outputText value="Test"></h:outputText>
                       <f:facet name="controls">
                              <h:graphicImage value="#{resources.image('message.close')}" height="16" width="16" styleClass="hidelink" id="hidelink" style="padding:1px"/>
                              <rich:componentControl for="messagesPanel" attachTo="hidelink" operation="hide" event="onclick"/>
                          <rich:dataTable  onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
                               <f:facet name="header">
                                             <h:outputText value="Test" />
                                              <h:outputText value="Message" />
                                    <a4j:form id="formMessageDialogSingleField">
                                              <a4j:support ajaxSingle="true" event="onchange"/>
                                  <h:outputText value="#{msg.detail}" style="color: red; font-weight:bold" />
                          </rich:dataTable>             </rich:modalPanel>