-
1. Re: a4j:ajax Will get/set bean, but will not rerender on page.
jhuska Jun 11, 2013 4:33 AM (in response to slammajamma)Hello Mitchel,
the problem will be somewhere else than in this snippet. Could you please post (or attach) complete facelet and bean code ?
-
2. Re: a4j:ajax Will get/set bean, but will not rerender on page.
slammajamma Jun 11, 2013 11:49 AM (in response to jhuska)I have re-constructed this issue on a test project to make illistration easier.
Here is the bean:
package test;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
/**
*
* @author michael
*/
@ManagedBean(name="test")
@SessionScoped
public class test{
private String i = "";
/**
* Creates a new instance of test
*/
public test() {
}
/**
* @return the i
*/
public String getI() {
System.out.println("Getting");
return i;
}
/**
* @param i the i to set
*/
public void setI(String i) {
System.out.println("Setting");
this.i = i;
}
}
index.xhtml:
<?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:a4j="http://richfaces.org/a4j">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<h:form>
<h:inputText value="#{test.i}">
<a4j:ajax event="keyup" render="out" />
</h:inputText>
<h:outputText value="#{test.i}" id="out" />
</h:form>
</h:body>
</html>
-
3. Re: a4j:ajax Will get/set bean, but will not rerender on page.
jhuska Jun 11, 2013 2:33 PM (in response to slammajamma)1 of 1 people found this helpfulWeird
I have copy and paste you code.
See here:
https://github.com/jhuska/richfaces-sanbox/tree/822598
It is working on JBoss AS 7.1.1.Final and using Chrome and Firefox. What is you environment ?
OS:
Application Container/Servlet container:
browser:
JSF implementation versionL: Mojarra or MyFaces ?
-
4. Re: a4j:ajax Will get/set bean, but will not rerender on page.
slammajamma Jun 11, 2013 3:09 PM (in response to jhuska)1 of 1 people found this helpfulHmmm... that is strange...
I am running windows 7, tomcat 7, chrome/mozilla
You have me on the implementation... I am using what ever is bundled wiht netbeans 7.3. How can I make the distinction?
The lib is named JSF 2.1 - javax.faces.jar. It breaks down like... com.sun.faces.*
-
5. Re: a4j:ajax Will get/set bean, but will not rerender on page.
slammajamma Jun 11, 2013 8:21 PM (in response to slammajamma)I had to rip netbeans apart.... but I got this working. It had something to do wiht the way the library was built.
Thank you for your help... Knowing that the code was the first step in the right direction!