1 2 Previous Next 21 Replies Latest reply on Apr 30, 2008 7:15 AM by gob Go to original post
      • 15. Re: a4j:status confused after opening modalPanel
        liuliu

        hi ilya_shaikovsky

        I have a similar problem with artmooney. I Can open my modalpanel, but cant close it. I will send you my example war.

        • 16. Re: a4j:status confused after opening modalPanel
          ilya_shaikovsky

          Thank you for your help!

          http://jira.jboss.com/jira/browse/RF-3207

          check for workaround inside the bug.

          For me all works fine if I specify tabPanel Id instead of two form ids. The problem is reproduced only if the last id from reRender list not found in DOM tree.

          • 17. Re: a4j:status confused after opening modalPanel
            artmooney

            In my case all rerender targets exist. So why does it not work?


            The follwing page is included by

            <rich:tabPanel id="doctorDetailsTabPanel"
            binding="#{doctorDetailsController.tabPanel}"
            selectedTab="#{doctorDetailsController.startTab}" switchType="ajax">

            <rich:tab id="relationsTab" label="Beziehungen"
            disabled="#{doctorDetailsController.isNotPersistent}"
            switchType="ajax">
            <f:subview id="doctorDetailsRelations">
            <c:import url="/pages/content/doctor_details/relations.jsp" />
            </f:subview>
            </rich:tab>

            ....





            <a4j:form id="newRelation">
            <a4j:commandButton styleClass="submitButton"
            value="Neue Beziehung"
            onclick="javascript:Richfaces.showModalPanel('edit_relations', {width:700, top:230})"
            status="commonstatus"
            actionListener="#{doctorDetailsController.newRelation}"
            reRender="edit_relation_panel" />
            </a4j:form>

            <rich:spacer height="5" />

            <a4j:form id="relationsForm">

            <rich:dataTable id="relations"
            value="#{doctorDetailsController.doctor.relations}"
            var="relation"
            sortMode="single"
            binding="#{doctorDetailsController.relationsTable}"
            rows="10">

            <rich:column width="22px">
            <h:graphicImage value="/images/prcrm/#{relation.second.contactImage}_small.gif" styleClass="small_icon" />
            </rich:column>

            <rich:column>
            <f:facet name="header">
            <f:verbatim>Nr</f:verbatim>
            </f:facet>
            <h:commandLink value="#{relation.second.id}"
            action="#{doctorDetailsController.jumpToContact}"
            actionListener="#{doctorDetailsController.jumpToContact}">
            <f:attribute name="contactId" value="#{relation.second.id}"/>
            <f:setPropertyActionListener target="#{doctorDetailsController.redisplay}" value="true" />
            </h:commandLink>
            </rich:column>

            <rich:column>
            <f:facet name="header">
            <f:verbatim>Name</f:verbatim>
            </f:facet>
            <h:outputText value="#{relation.second.name}" />
            </rich:column>

            <rich:column>
            <f:facet name="header">
            <f:verbatim>Vorname</f:verbatim>
            </f:facet>
            <h:outputText value="#{relation.second.firstname}" />
            </rich:column>

            <rich:column>
            <f:facet name="header">
            <f:verbatim>Adresse</f:verbatim>
            </f:facet>
            <h:outputText value="#{relation.second.address}" />
            </rich:column>

            <rich:column width="150px">
            <f:facet name="header">
            <h:outputText value="Beziehung"/>
            </f:facet>
            <h:outputText value="#{relation.relationType.name}"/>
            </rich:column>

            <rich:column width="45px" id="editIcon">
            <f:facet name="header">
            <h:outputText value="#{msgs.actionEdit}" />
            </f:facet>
            <a4j:commandLink
            onclick="javascript:Richfaces.showModalPanel('edit_relations', {width:550, top:230})"
            reRender="edit_relation_panel" actionListener="#{doctorDetailsController.selectRelation}"
            status="commonstatus">
            <f:attribute name="relationId" value="#{relation.id}"/>
            <h:graphicImage value="/images/prcrm/edit.png"
            styleClass="small_icon" />
            </a4j:commandLink>
            </rich:column>

            <rich:column width="45px" id="deleteIcon">
            <f:facet name="header">
            <h:outputText value="#{msgs.actionDelete}" />
            </f:facet>
            <a4j:commandLink
            reRender="relationsForm" actionListener="#{doctorDetailsController.removeRelation}">
            <f:attribute name="relationId" value="#{relation.id}"/>
            <h:graphicImage value="/images/prcrm/close.png"
            styleClass="small_icon" />
            </a4j:commandLink>
            </rich:column>

            </rich:dataTable>
            </a4j:form>



            <rich:modalPanel id="edit_relations" minHeight="230" minWidth="550"
            height="230" width="550" zindex="2000">
            <f:facet name="header">
            <h:outputText value="Bearbeitung Beziehung" />
            </f:facet>
            <f:facet name="controls">
            <h:graphicImage value="/images/prcrm/close.png"
            style="cursor:pointer"
            onclick="Richfaces.hideModalPanel('edit_relations')" />
            </f:facet>

            <a4j:outputPanel id="edit_relation_panel" layout="none">
            <a4j:form id="editRelation">

            <h:panelGrid columns="4">

            <h:outputLabel for="partner" value="Kontakt"/>
            <h:inputText id="partner" value="#{doctorDetailsController.selectedRelation}" readonly="true">
            <prconv:convertSpecial converterType="de.praenatal.crm.view.converter.PatientRelationConverter"
            elExpression="#{doctorDetailsController.doctor.relations}"/>
            </h:inputText>
            <rich:message for="partner"/>
            <a4j:commandButton styleClass="submitButton" value="#{msgs.contactSearchButton}"
            onclick="javascript:Richfaces.showModalPanel('search_contact', {width:750, top:100, height:700})"
            status="commonstatus"/>


            <h:outputLabel for="type" value="Typ"/>
            <h:selectOneMenu id="type" required="true" value="#{doctorDetailsController.selectedRelation.relationType}">
            <prconv:convertSpecial converterType="de.praenatal.crm.view.converter.RelationTypeConverter"
            elExpression="#{doctorDetailsController.allRelationTypes}"/>
            <f:selectItems value="#{doctorDetailsController.allRelationTypesItems}"/>
            </h:selectOneMenu>
            <rich:message for="type"/>
            <f:verbatim></f:verbatim>
            </h:panelGrid>

            <a4j:commandButton styleClass="submitButton" value="Ãœbernehmen"
            reRender="relationsForm"
            actionListener="#{doctorDetailsController.saveRelation}"
            status="commonstatus"
            onclick="Richfaces.hideModalPanel('edit_relations')" />
            </a4j:form>
            </a4j:outputPanel>

            </rich:modalPanel>




            <rich:modalPanel id="search_contact" minHeight="230" minWidth="550"
            height="230" width="550" zindex="2000">
            <f:facet name="header">
            <h:outputText value="Kontakt suchen" />
            </f:facet>
            <f:facet name="controls">
            <h:graphicImage value="/images/prcrm/close.png"
            style="cursor:pointer"
            onclick="Richfaces.hideModalPanel('search_contact')" />
            </f:facet>

            <h:panelGrid columns="1">
            <rich:messages ajaxRendered="true" errorClass="errorMessage" infoClass="infoMessage"/>
            </h:panelGrid>

            <a4j:outputPanel id="search_contact_panel" layout="none">
            <a4j:form id="contactSearchForm" ajaxSubmit="true">

            <h:panelGrid columns="2">

            <h:outputLabel for="searchType" value="Suchklasse"/>
            <h:selectOneMenu id="searchType" value="#{doctorDetailsController.contactSearchController.searchType}"
            onchange="javascript:updateSearchFields(this.options[this.selectedIndex].value)">
            <f:selectItems value="#{doctorDetailsController.contactSearchController.searchTypes}"/>
            </h:selectOneMenu>

            <h:outputLabel for="piaIdToSearch" value="#{msgs.piaId}"/>
            <h:inputText id="piaIdToSearch" value="#{doctorDetailsController.contactSearchController.piaIdToSearch}"
            binding="#{doctorDetailsController.contactSearchController.piaIdToSearchUI}">
            </h:inputText>

            <h:outputLabel for="nameToSearch" value="#{msgs.patientName}"/>
            <h:inputText id="nameToSearch" value="#{doctorDetailsController.contactSearchController.nameToSearch}"
            binding="#{doctorDetailsController.contactSearchController.nameToSearchUI}">
            </h:inputText>

            <h:outputLabel for="firstNameToSearch" value="#{msgs.patientFirstname}"/>
            <h:inputText id="firstNameToSearch" value="#{doctorDetailsController.contactSearchController.firstnameToSearch}"
            binding="#{doctorDetailsController.contactSearchController.firstnameToSearchUI}"/>

            <h:outputLabel for="townToSearch" value="#{msgs.patientTown}"/>
            <h:inputText id="townToSearch" value="#{doctorDetailsController.contactSearchController.townToSearch}"
            binding="#{doctorDetailsController.contactSearchController.townToSearchUI}"/>

            <h:outputLabel for="companyToSearch" value="#{msgs.contractorCompany}"/>
            <h:inputText id="companyToSearch" value="#{doctorDetailsController.contactSearchController.companyToSearch}"
            binding="#{doctorDetailsController.contactSearchController.companyToSearchUI}"/>

            <h:outputLabel for="dateOfBirthToSearch" value="#{msgs.patientDateOfBirth}"/>
            <rich:calendar id="dateOfBirth" value="#{doctorDetailsController.contactSearchController.dateOfBirthToSearch}"
            datePattern="dd.MM.yyyy" enableManualInput="true"
            binding="#{doctorDetailsController.contactSearchController.dateOfBirthToSearchUI}"/>

            <h:inputHidden id="validator" value="poop"
            validator="#{doctorDetailsController.contactSearchController.validateSearchInput}">
            </h:inputHidden>

            </h:panelGrid>

            <a4j:commandButton value="Suchen" type="submit" ajaxSingle="false" reRender="contactSearchResultsForm"
            actionListener="#{doctorDetailsController.contactSearchController.search}"/>
            </a4j:form>

            <rich:spacer height="5"/>

            <a4j:form id="contactSearchResultsForm">
            <rich:scrollableDataTable id="results"
            value="#{doctorDetailsController.contactSearchController.contacts}"
            var="currentContact"
            binding="#{doctorDetailsController.contactSearchController.table}"
            sortMode="single"
            height="150px"
            width="100%">

            <f:facet name="caption">
            <h:outputText value="Patienten"/>
            </f:facet>

            <rich:column width="20px">
            <f:facet name="header">
            <f:verbatim></f:verbatim>
            </f:facet>
            <a4j:commandLink actionListener="#{doctorDetailsController.contactSearchController.selectContact}"
            reRender="partner"
            onclick="Richfaces.hideModalPanel('search_contact')">
            <f:attribute name="contactId" value="#{currentContact.id}"/>
            <h:graphicImage value="/images/prcrm/add.png" styleClass="small_icon" />

            </a4j:commandLink>
            </rich:column>

            <rich:column width="50px" sortBy="#{currentContact.id}">
            <f:facet name="header">
            <f:verbatim>Nr</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.id}" />
            </rich:column>

            <rich:column width="20px" sortBy="#{currentContact.contactImage}">
            <f:facet name="header">
            <f:verbatim>Typ</f:verbatim>
            </f:facet>
            <h:graphicImage value="/images/prcrm/#{currentContact.contactImage}_small.gif" styleClass="small_icon" />
            </rich:column>

            <rich:column width="100px" sortBy="#{currentContact.name}">
            <f:facet name="header">
            <f:verbatim>Name</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.name}" />
            </rich:column>

            <rich:column width="100px" sortBy="#{currentContact.firstname}">
            <f:facet name="header">
            <f:verbatim>Vorname</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.firstname}" />
            </rich:column>

            <rich:column width="100px" rendered="#{doctorDetailsController.contactSearchController.searchType == 'de.praenatal.crm.jpa.Patient'}">
            <f:facet name="header">
            <f:verbatim>Ãœberweisender Arzt</f:verbatim>
            </f:facet>
            <h:commandLink value="#{currentContact.doctor.displayRepresentation}"
            action="#{doctorDetailsController.contactSearchController.jumpToContact}"
            actionListener="#{doctorDetailsController.contactSearchController.jumpToContact}">
            <f:attribute name="contactId" value="#{currentContact.doctor.id}"/>
            </h:commandLink>
            </rich:column>

            <rich:column width="100px" sortBy="#{currentContact.company}" rendered="#{doctorDetailsController.contactSearchController.searchType == 'de.praenatal.crm.jpa.Contractor'}">
            <f:facet name="header">
            <f:verbatim>Firma</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.company}" />
            </rich:column>

            <rich:column width="100px" sortBy="#{currentContact.surgeryType}" rendered="#{doctorDetailsController.contactSearchController.searchType == 'de.praenatal.crm.jpa.Doctor'}">
            <f:facet name="header">
            <f:verbatim>Praxisart</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.surgeryType}" />
            </rich:column>

            <rich:column width="100px" sortBy="#{currentContact.surgeryName}" rendered="#{doctorDetailsController.contactSearchController.searchType == 'de.praenatal.crm.jpa.Doctor'}">
            <f:facet name="header">
            <f:verbatim>Praxisname</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.surgeryName}" />
            </rich:column>

            <rich:column width="100px" sortBy="#{currentContact.town}">
            <f:facet name="header">
            <f:verbatim>Ort</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.town}" />
            </rich:column>

            <rich:column width="75px" sortBy="#{currentContact.town}">
            <f:facet name="header">
            <f:verbatim>PLZ</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.postcode}" />
            </rich:column>

            <rich:column width="100px">
            <f:facet name="header">
            <f:verbatim>Adresse</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.address}" />
            </rich:column>

            <rich:column width="100px">
            <f:facet name="header">
            <f:verbatim>Geburtsdatum</f:verbatim>
            </f:facet>
            <h:outputText value="#{currentContact.dateOfBirth}">
            <f:convertDateTime pattern="dd.MM.yyyy" timeZone="#{constants.timeZone}"/>
            </h:outputText>
            </rich:column>

            </rich:scrollableDataTable>
            </a4j:form>

            </a4j:outputPanel>


            </rich:modalPanel>

            • 18. Re: a4j:status confused after opening modalPanel
              artmooney

              error[16:42:16,203]: New node for ID content:doctorDetailsRelations:edit_relation_panel is not present in response

              • 19. Re: a4j:status confused after opening modalPanel
                ilya_shaikovsky

                artmooney, we'll try to reproduce your problem using the paeg snippet but It'll be more usefull to create an example.

                I do not want to get whole confidential project :) just working sceleton to just deploy run and explore.

                liuliu's case was explored in a ten minutes using test sample he send me.

                • 20. Re: a4j:status confused after opening modalPanel
                  nbelaevski

                  Looks like that is http://jira.jboss.com/jira/browse/RF-3207 dublication

                  • 21. Re: a4j:status confused after opening modalPanel
                    gob

                    I have not switched a4j: status in stop mode and no method is called a4j: commandButton onmouseout, ie after pressing a button locked, my code:

                    <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
                    <a4j:status startText="Progress" stopText="Done" />
                    <rich:tabPanel switchType="ajax" tabClass="tabPanel" selectedTab="t1" immediate="true">
                    <rich:tab label="1111" name="t1">
                    <h:form id="FoneForm">
                    <h:outputLabel for="fone" id="labelFone" value="add:" />
                    <rich:message for="fone"/>
                    <h:inputText id="fone" value="#{foneBean.fone}" validator="#{foneBean.Fone_validate}" size="25" maxlength="21" required="true"><f:validateLength minimum="5" maximum="21"/></h:inputText>
                    <a4j:commandButton value="1111" id="buttonAdd" actionListener="#{foneBean.onAddFone}" onclick="this.disabled=true;" oncomplete="this.disabled=false; this.src='./img/page/button_add.jpg';" onmouseover="this.src='./img/page/button_add_active.jpg';" onmouseout="this.src='./img/page/button_add.jpg';"/>
                    </h:form>
                    </rich:tab>

                    <rich:tab label="222" name="t2">
                    <h:form id="ChangePassForm">
                    <h:panelGrid columns="4" cellpadding="0" cellspacing="0">
                    <h:inputSecret id="passOld" size="30" maxlength="20" value="#{changePassBean.passOld}" required="true" />
                    <rich:message id="testMess" for="passOld"/>
                    <a4j:commandButton value="2222" id="buttonChangePass" action="#{changePassBean.onChangePass}" onclick="this.disabled=true;" oncomplete="this.disabled=false; this.src='./img/page/button_change.jpg';" onmouseover="this.src='./img/page/button_change_active.jpg';" onmouseout="this.src='./img/page/button_change.jpg';" />
                    </h:panelGrid>
                    </h:form>
                    </rich:tab>
                    </rich:tabPanel>

                    a4j:log:
                    debug[15:00:52,421]: Find meta name='Ajax-Update-Ids' content='FoneForm:j_id4,ChangePassForm:testMess'
                    debug[15:00:52,421]: Find meta name='Ajax-Response' content='true'

                    although ChangePassForm: testMess is in another tab...
                    and further in the log:

                    debug[15:00:52,468]: Attempt to update part of page for Id: ChangePassForm:testMess
                    debug[15:00:52,468]: call getElementById for id= ChangePassForm:testMess
                    warn[15:00:52,468]: Node for replace by response with id ChangePassForm:testMess not found in document

                    If you remove rich:message id="testMess" for="passOld" the problem disappears

                    1 2 Previous Next