Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-12865

Correct deferred partial response ending by leveraging PVC wrapper chain

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.3.1
    • Fix Version/s: 5.0.0.Alpha3
    • Component/s: core, third-party
    • Labels:
    • Environment:

      weblogic 10.3.4, Myfaces 2.1.10, Richfaces 4.3.1, OmniFaces1.3

    • Sprint:
      5.0.0.Alpha3 - Sprint 1
    • Steps to Reproduce:
      Hide

      Issue title was: A4j:commandButton fail to render/update other components with MyFaces

      Sample code is attached below. It fail to update the output panel after submit from the a4j:commandButton.

      web.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.5"
       xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
       <display-name>SBA</display-name>
       
       <listener>
        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
       </listener>
       <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.do</url-pattern>
       </servlet-mapping>
       <session-config>
        <session-timeout>30</session-timeout>
       </session-config>
      </web-app>
      

      test.xhml

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html 
      	xmlns="http://www.w3.org/1999/xhtml" 
      	xmlns:h="http://java.sun.com/jsf/html" 
      	xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets" 
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">
       
       
      	<h:head>
      		<title>TEST</title>
      	</h:head>
      	<h:body>
      	
      	<h:form>
      		<h:inputText value="#{testBean.test}"></h:inputText>
      		<a4j:outputPanel id="outputPanel">
      			<h:outputText value="#{testBean.test}"/>
      		</a4j:outputPanel>
      		
      		<a4j:commandButton value="Test" action="#{testBean.doAction}"  id="btn" execute="@form"
      			render="outputPanel" />
      	<a4j:log/>			
      	</h:form>
      	</h:body>
      </html>
      

      TestBean.java

      package abc.backing.sba;
       
      import javax.faces.bean.ManagedBean;
      import javax.faces.bean.SessionScoped;
       
      @ManagedBean
      @SessionScoped
      public class TestBean {
       
      	private String test;
       
      	public String getTest() {
      		return test;
      	}
       
      	public void setTest(String test) {
      		this.test = test;
      	}
      	public void doAction() {
      		System.out.println("123");
      	}
      }
      
      

      a4j:log shows the following error:

      debug[11:26:09.365]: richfaces.queue: Nothing to submit
      error[11:26:09.366]: Received 'error@malformedXML' event from <input id=j_id_6:btn ...>
      error[11:26:09.366]: [200] undefined: undefined
      

      Show
      Issue title was: A4j:commandButton fail to render/update other components with MyFaces Sample code is attached below. It fail to update the output panel after submit from the a4j:commandButton. web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>SBA</display-name>   <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> </web-app> test.xhml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">     <h:head> <title>TEST</title> </h:head> <h:body> <h:form> <h:inputText value="#{testBean.test}"></h:inputText> <a4j:outputPanel id="outputPanel"> <h:outputText value="#{testBean.test}"/> </a4j:outputPanel> <a4j:commandButton value="Test" action="#{testBean.doAction}" id="btn" execute="@form" render="outputPanel" /> <a4j:log/> </h:form> </h:body> </html> TestBean.java package abc.backing.sba;   import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped;   @ManagedBean @SessionScoped public class TestBean {   private String test;   public String getTest() { return test; }   public void setTest(String test) { this.test = test; } public void doAction() { System.out.println("123"); } } a4j:log shows the following error: debug[11:26:09.365]: richfaces.queue: Nothing to submit error[11:26:09.366]: Received 'error@malformedXML' event from <input id=j_id_6:btn ...> error[11:26:09.366]: [200] undefined: undefined

      Description

      After submit from a a4j:commandButton, it fail to re-render / update other component on the page.

      This problem only appear in MyFaces. It does not happens in Mojarra.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  lfryc Lukáš Fryč
                  Reporter:
                  blamlam blam lam
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 2 hours
                    2h
                    Remaining:
                    Remaining Estimate - 2 hours
                    2h
                    Logged:
                    Time Spent - Not Specified
                    Not Specified