9 Replies Latest reply on Aug 12, 2008 9:58 AM by ajanz

    modalpanel containing datatable no calling setter method

    ajanz

      i got an modalpanel with an datatable

      when i click the commandbutton neither of my Setter Methods jsp1Bean.setMembers and jsp1Beam.setMembername are called.

      why?

      my code is



       <rich:modalPanel id="selectactor" autosized="true">
      
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="auwahl"></h:outputText>
       </h:panelGroup>
       </f:facet>
       <a4j:form id="frm2">
       <rich:dataTable value="#{jsp1Bean.members}" var="m"
       onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0" columnsWidth="5%,10%,85%"
       width="100%" border="0" columns="3">
      
      
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column colspan="1">
       <h:outputText value="" />
       </rich:column>
       <rich:column colspan="1">
       <h:outputText value="Benutzer/Rolle" />
       </rich:column>
       <rich:column colspan="1">
       <h:outputText value="Name" />
       </rich:column>
      
       </rich:columnGroup>
      
       </f:facet>
       <rich:columnGroup>
       <rich:column colspan="1">
       <center><h:selectBooleanCheckbox value="#{m.selected}" />
       </center>
       </rich:column>
       <rich:column colspan="1">
       <center><h:graphicImage value="#{m.image}"></h:graphicImage>
       </center>
       </rich:column>
       <rich:column colspan="1">
       <h:outputText value="#{m.name}" />
       </rich:column>
      
      
       </rich:columnGroup>
       <rich:componentControl event="onRowClick" for="" operation="">
       <f:param value="#{m.name}" name="membername" />
       </rich:componentControl>
      
      
       </rich:dataTable>
      
       <br />
       <a4j:commandButton actionListener="#{SessionBean.processAction}" action="#{SessionBean.setActorForTask}" styleClass="rich-button" immediate="true" reRender="maintable" oncomplete="Richfaces.hideModalPanel('selectactor')" value="ok">
       <a4j:actionparam name="m1" assignTo="#{jsp1Bean.membername}"
       value="{membername}" ></a4j:actionparam>
       </a4j:commandButton>
      </a4j:form >
      
      
      
      
       </rich:modalPanel>
      


        • 1. Re: modalpanel containing datatable no calling setter method
          ilya_shaikovsky

          at list remove immediate true from commandButton

          • 2. Re: modalpanel containing datatable no calling setter method
            ajanz

            ok i did that.

            setmembername is now called. but {membername} is not evaluated, means membername="{membername}" and not membername="some_name"

            setmembers is not called.

            but if the modalpanel is called again, my selection is still there....

            • 3. Re: modalpanel containing datatable no calling setter method
              ilya_shaikovsky

              "but if the modalpanel is called again, my selection is still there...."

              and what have you done to remove it? Have you reRendered modal panel content before showing again?

              • 4. Re: modalpanel containing datatable no calling setter method
                ajanz

                ah ok. no i have not....

                • 5. Re: modalpanel containing datatable no calling setter method
                  ajanz

                  but the setter method's are still not called.

                  may be some validation error?

                  • 6. Re: modalpanel containing datatable no calling setter method
                    ajanz

                    using a4j:log

                    i see

                    debug[17:16:08,516]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click
                    debug[17:16:08,516]: NEW AJAX REQUEST !!! with form :frm2
                    debug[17:16:08,532]: Append hidden control frm2 with value [frm2] and value attribute [frm2]
                    debug[17:16:08,532]: Append hidden control autoScroll with value [] and value attribute []
                    debug[17:16:08,532]: Append hidden control javax.faces.ViewState with value [j_id1] and value attribute [j_id1]
                    debug[17:16:08,532]: parameter frm2:j_id_jsp_780441180_33 with value frm2:j_id_jsp_780441180_33
                    debug[17:16:08,548]: parameter m1 with value {membername}
                    debug[17:16:08,563]: Start XmlHttpRequest

                    no sending of the values from the datatable... and {membername} instead of some name

                    • 7. Re: modalpanel containing datatable no calling setter method
                      ajanz

                      please help. my project is getting into trouble...

                      so i got some problems the last time i am looking for support for the next two weeks. germany preferred. so if someone feels he could do this please contact me. so we can talk about money ;-)

                      • 8. Re: modalpanel containing datatable no calling setter method

                        How somebody can contact you if you do not provide any contact info?

                        To use an Exadel MaxCare, send a e-mail to max _at_ exadel _dot_ com

                        • 9. Re: modalpanel containing datatable no calling setter method
                          ajanz

                          solved the problem my own.

                          code is now

                           <h:form id="frm23">
                          
                           <h:inputText id="selmember" value="#{jsp1Bean.membername}" style="width:100%"> </h:inputText>
                          
                           <rich:suggestionbox width="200" height="50" usingSuggestObjects="true" id="selectlist" for="selmember" suggestionAction="#{jsp1Bean.suggestMember}" var="s" fetchValue="#{s.name}">
                           <h:column>
                           <h:outputText value="#{s.name}" />
                           </h:column>
                          
                           </rich:suggestionbox>
                           <br/>
                           <br/>
                           <rich:separator></rich:separator>
                          
                           <br/>
                          
                          
                          
                           <rich:dataTable value="#{jsp1Bean.members}" var="m"
                           onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
                           onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
                           cellpadding="0" cellspacing="0" columnsWidth="5%,10%,85%"
                           width="100%" border="0" columns="3">
                           <a4j:support event="onRowClick" reRender="selmember" actionListener="#{jsp1Bean.processAction}" >
                           <a4j:ajaxListener type="de.lorenz.soaworkflow.beans.LosAjaxActionListener"></a4j:ajaxListener>
                           <a4j:actionparam name="membername" assignTo="#{jsp1Bean.membername}" value="#{m.name}"> </a4j:actionparam>
                           </a4j:support>
                          
                          
                          
                          
                          
                          
                          
                           <f:facet name="header">
                           <rich:columnGroup>
                           <rich:column colspan="1">
                           <h:outputText value="" />
                           </rich:column>
                           <rich:column colspan="1">
                           <h:outputText value="Benutzer/Rolle" />
                           </rich:column>
                           <rich:column colspan="1">
                           <h:outputText value="Name" />
                           </rich:column>
                          
                           </rich:columnGroup>
                          
                           </f:facet>
                           <rich:columnGroup>
                           <rich:column colspan="1">
                           <center><h:selectBooleanCheckbox value="#{m.selected}" />
                           </center>
                           </rich:column>
                           <rich:column colspan="1">
                           <center><h:graphicImage value="#{m.image}"></h:graphicImage>
                           </center>
                           </rich:column>
                           <rich:column colspan="1">
                           <h:outputText value="#{m.name}" />
                           </rich:column>
                          
                          
                           </rich:columnGroup>
                          
                          
                          
                           </rich:dataTable>
                          
                           <br></br>
                           <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
                          
                           </h:form >