7 Replies Latest reply on Mar 27, 2012 12:27 PM by daxxy

    Why Target Unreachable in rich:popUp?

    daxxy

      Richfaces 4.2.0.

       

      I am trying to duplicate the functionality shown in Data Table Edit of showcase with one big difference.  I am using a dataGrid instead of a dataTable, but I figured I could get it to work anyway.  I am get a  "Target Unreachable, 'editedAlternate' returned null" error, and it seems clear why I am getting it.  When the page loads, contactView.editedAlternate resolves to null. Duh.

       

      What I don't understand is why the example in the showcase does *not* get this error.  What are you doing that I am not?  I don't see where editedCar is getting initialized except *after* the commandLink to display the popup is invoked. So how come editedCar is not resolving to null and producing this same error?

       

      Here is excerpt from my code. Let me know if you need more info

       

        <rich:dataGrid value="#{contactView.doors.alternateList}" var="alt" rowKeyVar="idx">

          <rich:panel>

            <a4j:commandLink execute="@this" render="editPanel"
              oncomplete="#{rich:component('editPanel')}.show()" >
              <h:graphicImage value="/icons/edit.png" />
              <f:setPropertyActionListener
                target="#{contactView.editedAlternate}" value="#{alt}" />
            </a4j:commandLink>

            <a4j:commandLink action="#{contactView.delete(alt)}">
              <h:graphicImage value="/icons/delete.png" />
            </a4j:commandLink>

            <h:panelGrid columns="1">
              <h:outputText id="nm11" value="#{alt.name}" />
              <h:outputText id="pgr11" value="#{alt.phone}" />
              <h:outputText id="adr11" value="#{alt.pager}" />
              <h:outputText id="adr21" value="#{alt.comment}" />
            </h:panelGrid>

          </rich:panel>
        </rich:dataGrid>

        <rich:popupPanel id="editPanel" >
       
          <h:panelGrid columns="2">
            <h:outputText value="Name" />
            <h:inputText id="innm21" value="#{contactView.editedAlternate.name}" />
            <h:outputText value="Phone" />
            <h:inputText id="inpgr21" value="#{contactView.editedAlternate.phone}" />
            <h:outputText value="Pager" />
            <h:inputText id="inadr41" value="#{contactView.editedAlternate.pager}" />
            <h:outputText value="Comment" />
            <h:inputText id="inadr31" value="#{contactView.editedAlternate.comment}" />
          </h:panelGrid>
         
          <a4j:commandLink value="Save" actionListener="#{contactView.save(contactView.editedAlternate)}"
          render="list newcontact" oncomplete="#{rich:component('editPanel')}.hide(); return false;"/>
         
          <a4j:commandButton value="Cancel" onclick="#{rich:component('editPanel')}.hide(); return false;" />
         
        </rich:popupPanel>

       

      And here is the stack trace

       

      16:08:58,276 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/contacts-as7].[FacesServlet]] (http--0.0.0.0-8080-3) Servlet.service() for servlet FacesServlet threw exception: javax.enterprise.event.ObserverException

      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_25]

      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_25]

      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_25]

      at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_25]

      at java.lang.Class.newInstance0(Class.java:355) [rt.jar:1.6.0_25]

      at java.lang.Class.newInstance(Class.java:308) [rt.jar:1.6.0_25]

      at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:343) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:340) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:73) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:162) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:569) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:559) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:554) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:74) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:126) [prettyfaces-jsf2-3.3.2.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.0.Final-redhat-1.jar:7.1.0.Final-redhat-1]

      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final-redhat-1.jar:7.1.0.Final-redhat-1]

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]

      Caused by: javax.servlet.ServletException: /index.xhtml @85,55 value="#{contactView.editedAlternate.name}": Target Unreachable, 'editedAlternate' returned null

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final-redhat-1.jar:2012-02-22 16:46]

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final-redhat-1.jar:]

      at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

      ... 20 more

      Caused by: javax.el.PropertyNotFoundException: /index.xhtml @85,55 value="#{contactView.editedAlternate.name}": Target Unreachable, 'editedAlternate' returned null

      at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) [jsf-impl-2.1.5-redhat-1.jar:2.1.5-redhat-1]

      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95) [jsf-impl-2.1.5-redhat-1.jar:2.1.5-redhat-1]

      at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIInput.validate(UIInput.java:960) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIInput.executeValidate(UIInput.java:1233) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIInput.processValidators(UIInput.java:698) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIForm.processValidators(UIForm.java:253) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1214) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1172) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76) [jsf-impl-2.1.5-redhat-1.jar:2.1.5-redhat-1]

      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.5-redhat-1.jar:2.1.5-redhat-1]

      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.5-redhat-1.jar:2.1.5-redhat-1]

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Final-redhat-1.jar:2.0.0.Final-redhat-1]

      ... 26 more

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      TDR

        • 1. Re: Why Target Unreachable in rich:popUp?
          sunkaram

          if you look at the code for 'Edit' link in the demo

           

                          <a4j:commandLink styleClass="no-decor" render="editGrid" execute="@this"

                              oncomplete="#{rich:component('editPane')}.show()">

                              <h:graphicImage value="/images/icons/edit.gif" alt="edit" />

                              <a4j:param value="#{it.index}" assignTo="#{carsBean.currentCarIndex}" />

                              <f:setPropertyActionListener target="#{carsBean.editedCar}" value="#{car}" />

                          </a4j:commandLink>

          the line

          <f:setPropertyActionListener target="#{carsBean.editedCar}" value="#{car}" />

          sets the current 'car' object for carsBean.editedCar, when user clicks on 'Edit' link..

           


          • 2. Re: Why Target Unreachable in rich:popUp?
            daxxy

            Mine does the same thing

             

            <a4j:commandLink execute="@this" render="editPanel"
                    oncomplete="#{rich:component('editPanel')}.show()" >
                    <h:graphicImage value="/icons/edit.png" />
                    <f:setPropertyActionListener
                      target="#{contactView.editedAlternate}" value="#{alt}" />
                  </a4j:commandLink>

            • 3. Re: Why Target Unreachable in rich:popUp?
              sunkaram

              can you post ur bean class, just curious to know why its not working :-)

              which bean scope are you using?

              • 4. Re: Why Target Unreachable in rich:popUp?
                daxxy

                @ViewScoped

                 

                Here is the source:

                 

                import gov.ssa.dne.nmst.model.AlternateContact;
                import gov.ssa.dne.nmst.model.Doors;

                import java.io.Serializable;

                import javax.ejb.EJB;
                import javax.faces.bean.ViewScoped;
                import javax.inject.Named;

                import org.apache.commons.lang.StringUtils;

                @SuppressWarnings("serial")
                @Named
                @ViewScoped
                public class ContactView implements Serializable {

                    public ContactView() {
                        System.out.println("new ContactView");
                    }

                    @EJB
                    ContactService contactService;

                    private String siteCode;
                    private Doors doors;
                    private Boolean editMode;
                    private AlternateContact alternateContact;
                    private AlternateContact editedAlternate;

                    static final Integer MAX_ALTERNATES = 3;

                    // NOTE add @observation to either retrieve or create
                    // re-run retrieve when a create, delete, or edit is called
                    public String retrieve() {
                        System.out.println("Retrieving contact for site code " + siteCode);
                        if (siteCode == null || siteCode.equals("0000")) {
                            this.doors = null;
                            return null;
                        }
                        this.doors = this.contactService.findDoors(siteCode);
                        System.out.println("doors_id is " + doors.getDoorsId());
                        return "index.jsf?sitecode=" + siteCode + "&faces-redirect=true";
                    }

                    public String reset() {
                        System.out.println("Resetting");
                        siteCode = "";
                        return "index.jsf";
                    }

                    public void loadAlternate() {
                        System.out.println("loading empty alternate");
                        this.alternateContact = this.contactService.newAlternate();
                    }

                    public String create() {
                        System.out.println("Create a new alternate");
                        this.alternateContact = this.contactService.newAlternate();
                        this.editMode = true;
                        return "index.jsf?sitecode=" + siteCode + "&faces-redirect=true";
                    }

                    public String save() {
                        System.out.println("Persisting new alternate");
                        this.contactService.save(alternateContact, doors);
                        return "index.jsf?sitecode=" + siteCode + "&faces-redirect=true";
                    }

                    public String save(AlternateContact editedContact) {
                        System.out.println("Update existing alternate");
                        this.contactService.save(editedContact);
                        return "index.jsf?sitecode=" + siteCode + "&faces-redirect=true";
                    }

                    public String delete(AlternateContact alt) {
                        System.out.println("Deleting alternate");
                        this.contactService.deleteAlternate(alt);
                        return "index.jsf?sitecode=" + siteCode + "&faces-redirect=true";
                    }

                    public String edit(AlternateContact alt) {
                        System.out.println("Editing alternate");
                        this.editMode = true;
                        this.alternateContact = alt;
                        return "index.jsf?sitecode=" + siteCode + "&faces-redirect=true";
                    }

                    // GETTERS and SETTERS


                }

                 

                And here is the service class which is invoked

                 

                 

                @Stateless
                public class ContactService {


                    @PersistenceContext
                    EntityManager em;

                    private String siteCode;
                    private Doors doors;

                    public Doors findDoors(String siteCode) {
                        this.siteCode = siteCode;
                        if (siteCode == null || siteCode.equals("")) {
                            return null;
                        }
                        doors = em.find(Doors.class, findDoorsIdBySiteCode());
                        //logger.info("findDoors via site code "+ siteCode);
                        return doors;
                    }

                    private Integer findDoorsIdBySiteCode() {
                        if (this.siteCode != null) {
                            //logger.info("findDoorsIdBySiteCode via site code "+ siteCode);
                            return (Integer) em
                                    .createQuery(
                                            "SELECT d.doorsId FROM Doors d"
                                                    + " WHERE d.siteCode=:sitecode")
                                    .setParameter("sitecode", this.siteCode).getSingleResult();
                        }
                        return null;
                    }

                    public AlternateContact newAlternate() {
                        return new AlternateContact();
                    }

                    public void save(AlternateContact alternate, Doors doors) {
                        //logger.info("Saving alternate contact for sitecode "+doors.getSiteCode());
                        alternate.setAltIndex(doors.getAlternateList().size() + 1);
                        alternate.setDoors(doors);
                        this.em.persist(alternate);
                        // this.em.merge(alternate);
                    }

                    public void deleteAlternate(AlternateContact alternate) {
                        AlternateContact alt = em.find(AlternateContact.class,
                                alternate.getAltId());
                        // logger.info("Removing alternate contact for sitecode "+
                        // alternate.getDoors().getSiteCode());
                        em.remove(alt);
                    }

                    public void save(AlternateContact editedAlternate) {
                        AlternateContact alt = em.find(AlternateContact.class,
                                editedAlternate.getAltId());
                        alt.setName(editedAlternate.getName());
                        alt.setPhone(editedAlternate.getPhone());
                        alt.setPager(editedAlternate.getPager());
                        alt.setComment(editedAlternate.getComment());
                        System.out.println("did this work?");
                        Doors d = em.find(Doors.class, alt.getDoors().getDoorsId());
                        System.out.println("did we even get here?");
                    }

                }

                 

                Thanks for taking a look.

                • 5. Re: Why Target Unreachable in rich:popUp?
                  sunkaram

                  I want see where you are populationg 'alternateList' object for datatable  (contactView.doors.alternateList) - getAlternateList method of 'Doors' object

                   

                  So, you are able to list the items in the main page and when you click on edit link you are getting 'null' pointer.. right??

                   

                  1. try changing scope to SessionScope, just for testing: to see if we are doing anything wrong with viewScope...

                   

                  2. also, try adding following method to see if viewScope bean not not initializing everytime you click on a action...

                   

                  @PostConstruct

                            public void init()

                            {

                                System.out.println("Bean initialized...");

                            }

                  • 6. Re: Why Target Unreachable in rich:popUp?
                    daxxy

                    I'm going to put this on hold for the time beging while I work out some other things.  I will update when/if I have more information.

                    • 7. Re: Why Target Unreachable in rich:popUp?
                      daxxy

                      Hi - sorry for the time out.  I was messing around with my POM and broke everything.  I should mention that I am using seam-faces ViewScoped together with Named. Perhaps this is relevant?

                       

                      Here is exactly what is happening -- either the problem has morphed or I didn't correctly describe it the other day. I don't actually remember.


                      PROBLEM ALWAYS OCCURS:

                         Start with a blank form  http://localhost:8080/contacts-as7/index.jsf , type a site code in the input field and click Find Site Code (which calls contactView.retrieve() )

                       

                      PROBLEM NEVER OCCURS

                         Start with a URL that includes the site code http://localhost:8080/contacts-as7/index.jsf?sitecode=102  contactView.retrieve() is called as a JSF preRenderView event (see f:metadata)

                       

                       

                      Here is the xhtml.  I didn't include the full thing previously because I didn't think it wcas relevant. Now I'm not so sure.

                       

                      <f:metadata>
                        <f:viewParam name="sitecode" value="#{contactView.siteCode}" />
                        <f:event listener="#{contactView.retrieve}" type="preRenderView"></f:event>
                        <f:event listener="#{contactView.loadAlternate}" type="preRenderView"></f:event>
                      </f:metadata>
                      <h:form>
                        <h:messages />

                        <h:panelGrid columns="3">
                          <h:outputLabel for="contact">Enter site code:</h:outputLabel>
                          <h:inputText id="contact" value="#{contactView.siteCode}" />
                          <h:message for="contact" />
                        </h:panelGrid>

                        <h:commandButton id="find" value="Find Site Code"
                          action="#{contactView.retrieve}" />

                        <h:button value="Reset" includeViewParams="false" />


                        <rich:panel>
                          <f:facet name="header">
                            <h:outputText value="Site Code #{contactView.doors.siteCode}" />
                          </f:facet>
                          <h:panelGrid columns="1">
                            <h:outputText
                              value="Report corrections to your DOORS administrator" />

                            <h:outputText id="nm1" value="#{contactView.doors.name}" />
                            <h:outputText id="pgr1" value="#{contactView.doors.pager}" />
                            <h:outputText id="adr1" value="#{contactView.doors.addr1}" />
                            <h:outputText id="adr2" value="#{contactView.doors.addr2}"
                              rendered="#{not empty contactView.doors.addr2}" />
                            <h:outputText id="csz"
                              value="#{contactView.doors.city}, #{contactView.doors.state} #{contactView.doors.zip}" />

                          </h:panelGrid>
                        </rich:panel>

                        <rich:dataGrid value="#{contactView.doors.alternateList}" id="list"
                          var="alt" rowKeyVar="idx">

                          <rich:panel>

                            <a4j:commandLink execute="@this" render="testPanel"
                              oncomplete="#{rich:component('editPanel')}.show()">
                              <h:graphicImage value="/icons/edit.png" />

                       

                       

                       

                              <f:setPropertyActionListener target="#{contactView.editedAlternate}" value="#{alt}" />      </a4j:commandLink>

                            <a4j:commandLink action="#{contactView.delete(alt)}">
                              <h:graphicImage value="/icons/delete.png" />
                            </a4j:commandLink>

                            <h:panelGrid columns="1">
                              <h:outputText id="nm11" value="#{alt.name}" />
                              <h:outputText id="pgr11" value="#{alt.phone}" />
                              <h:outputText id="adr11" value="#{alt.pager}" />
                              <h:outputText id="adr21" value="#{alt.comment}" />
                            </h:panelGrid>

                          </rich:panel>
                        </rich:dataGrid>


                        <rich:popupPanel id="editPanel">
                          <h:outputText value="hey" />
                          <h:panelGrid columns="2">
                            <h:outputText value="Name" />
                            <h:inputText id="innm21" value="#{contactView.editedAlternate.name}" />
                            <h:outputText value="Phone" />
                            <h:inputText id="inpgr21" value="#{contactView.editedAlternate.phone}" />
                            <h:outputText value="Pager" />
                            <h:inputText id="inadr41"  value="#{contactView.editedAlternate.pager}" />
                            <h:outputText value="Comment" />
                            <h:inputText id="inadr31" value="#{contactView.editedAlternate.comment}" />
                          </h:panelGrid>
                          <a4j:commandLink value="Save"
                            actionListener="#{contactView.save(contactView.editedAlternate)}"
                            render="list newcontact"
                            oncomplete="#{rich:component('editPanel')}.hide(); return false;" />
                          <a4j:commandButton value="Cancel"
                            onclick="#{rich:component('editPanel')}.hide(); return false;" />
                        </rich:popupPanel>


                        <a4j:outputPanel id="newcontact"
                          rendered="#{not contactView.enoughAlternates}">
                          <h:panelGrid columns="2">
                            <h:outputText value="Name" />
                            <h:inputText id="innm11" value="#{contactView.alternateContact.name}" />
                            <h:outputText value="Phone" />
                            <h:inputText id="inpgr11"  value="#{contactView.alternateContact.phone}" />
                            <h:outputText value="Pager" />
                            <h:inputText id="inadr11" value="#{contactView.alternateContact.pager}" />
                            <h:outputText value="Comment" />
                            <h:inputText id="inadr21" value="#{contactView.alternateContact.comment}" />
                          </h:panelGrid>
                        </a4j:outputPanel>

                        <a4j:commandLink value="Save" actionListener="#{contactView.save}"
                          render="list newcontact" />

                      </h:form>

                       

                      Here is a better description of the problem. The problem no longer (did it ever??) occurs when I clicked the edit action.