I think there is a bug with inputTextArea
dune89 Jan 20, 2012 5:33 AMHello together i have a Problem that my textArea is not rendered right. It does not execute the getter Methods :/ the other components on the other side execute them..
Here are the code snippets to reproduce that behavior:
xhtml:
<!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></h:head>
<body>
<h:form>
<a4j:outputPanel ajaxRendered="true">
<h:inputText required="true" value="#{myData.text}" />
<h:inputTextarea value="#{myData.text}" />
<h:outputText value="#{myData.text}" />
<a4j:commandButton value="Request">
<a4j:ajax event="click" listener="#{controller.dummy()}" execute="@all"/>
</a4j:commandButton>
<rich:popupPanel id="popup" modal="true">
<a4j:commandButton onclick="#{rich:component('popup')}.hide()">
<a4j:ajax event="click" listener="#{controller.doSth()}" execute="@this"/>
</a4j:commandButton>
</rich:popupPanel>
<a4j:commandButton value="Show Popup">
<a4j:ajax event="click" listener="#{controller.reset()}" execute="@this"/>
</a4j:commandButton>
<h:panelGroup rendered="#{myData.ren}">
<script>#{rich:component('popup')}.show();</script>
</h:panelGroup>
<h:messages />
</a4j:outputPanel>
</h:form>
</body>
</html>
Controller class
@Named
@SessionScoped
public class Controller implements Serializable{
private static final long serialVersionUID = 1L;
@Inject
MyData data;
public void doSth()
{
System.out.println("doSth");
data.setText("Will it be rendered ?");
data.setRen(false);
}
public void reset()
{
data.setRen(true);
}
public void dummy()
{
}
}
Model Class
@Named
@SessionScoped
public class MyData implements Serializable
{
private static final long serialVersionUID = 1L;
private String text = "";
private boolean ren = false;
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public boolean isRen() {
return ren;
}
public void setRen(boolean ren) {
this.ren = ren;
}
}
I hope u can help me find a solution, need a workaround or someone who can tell me what i have done wrong
Wish you a great weekend
Regards from Germany
Matthias