[richfaces-issues] [JBoss JIRA] (RF-12761) The first ajax request after a jsFunction don´t work

Adelmo santos (JIRA) jira-events at lists.jboss.org
Sat Jan 26 14:06:47 EST 2013


     [ https://issues.jboss.org/browse/RF-12761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adelmo santos updated RF-12761:
-------------------------------

    Description: 
After execute a ajax request with jsFunction and render a rich:panel or a rich:popup and try to invoke a4j:commandButton within this rich:panel rendered,  the first request don´t work.

View:

<!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:rich="http://richfaces.org/rich"
   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">
 
   <h:head>
   </h:head>
   <h:body>  
		<h:form>
			<a4j:jsFunction name="jsFunctionTest" actionListener="#{testBean.methodA}" render=":panel"/>
			<h:commandButton value="Test">
				<f:ajax onevent="jsFunctionTest()"/>
			</h:commandButton>
		</h:form>
		
		<rich:panel id="panel" >
			<h:form >
				<a4j:commandButton value="OK" actionListener="#{testBean.methodB}" />
			</h:form>
		</rich:panel>
	</h:body>
</html>


Bean:


import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;

@SessionScoped
@ManagedBean(name="testBean")
public class TestMBean {
	public void methodA(ActionEvent event) {
		System.out.println("TestMBean.methodA()");
	}
	
	public void methodB(ActionEvent event) {
		System.out.println("TestMBean.methodB()");
	}
}


  was:
After execute a ajax request with jsFunction and render a rich:panel or a rich:popup and try to invoke a4j:commandButton within this rich:panel rendered  the first request don´t work.

View:

<!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:rich="http://richfaces.org/rich"
   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">
 
   <h:head>
   </h:head>
   <h:body>  
		<h:form>
			<a4j:jsFunction name="jsFunctionTest" actionListener="#{testBean.methodA}" render=":panel"/>
			<h:commandButton value="Test">
				<f:ajax onevent="jsFunctionTest()"/>
			</h:commandButton>
		</h:form>
		
		<rich:panel id="panel" >
			<h:form >
				<a4j:commandButton value="OK" actionListener="#{testBean.methodB}" />
			</h:form>
		</rich:panel>
	</h:body>
</html>


Bean:


import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;

@SessionScoped
@ManagedBean(name="testBean")
public class TestMBean {
	public void methodA(ActionEvent event) {
		System.out.println("TestMBean.methodA()");
	}
	
	public void methodB(ActionEvent event) {
		System.out.println("TestMBean.methodB()");
	}
}



    
> The first ajax request after a jsFunction don´t work
> ----------------------------------------------------
>
>                 Key: RF-12761
>                 URL: https://issues.jboss.org/browse/RF-12761
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-a4j-core
>    Affects Versions: 4.3.0.CR2
>         Environment: Windows 7 - IE9
> Mojarra 2.1.17
> Richfaces 4.3.CR2
>            Reporter: Adelmo santos
>
> After execute a ajax request with jsFunction and render a rich:panel or a rich:popup and try to invoke a4j:commandButton within this rich:panel rendered,  the first request don´t work.
> View:
> <!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:rich="http://richfaces.org/rich"
>    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">
>  
>    <h:head>
>    </h:head>
>    <h:body>  
> 		<h:form>
> 			<a4j:jsFunction name="jsFunctionTest" actionListener="#{testBean.methodA}" render=":panel"/>
> 			<h:commandButton value="Test">
> 				<f:ajax onevent="jsFunctionTest()"/>
> 			</h:commandButton>
> 		</h:form>
> 		
> 		<rich:panel id="panel" >
> 			<h:form >
> 				<a4j:commandButton value="OK" actionListener="#{testBean.methodB}" />
> 			</h:form>
> 		</rich:panel>
> 	</h:body>
> </html>
> Bean:
> import javax.faces.bean.ManagedBean;
> import javax.faces.bean.SessionScoped;
> import javax.faces.event.ActionEvent;
> @SessionScoped
> @ManagedBean(name="testBean")
> public class TestMBean {
> 	public void methodA(ActionEvent event) {
> 		System.out.println("TestMBean.methodA()");
> 	}
> 	
> 	public void methodB(ActionEvent event) {
> 		System.out.println("TestMBean.methodB()");
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list