-
1. Command Button Simple of RichFaces 4
iabughosh Apr 23, 2011 5:58 PM (in response to javacorner)hi mostafa,
welcome to the forum, i think that you can't use execute="@this" with a4j:commandButton, i've tried your code with execute="{id for text}" only the output text has rendered :
<!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>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputText value="Name:" />
<h:inputText id="t1" value="#{userBean.name}" />
<a4j:commandButton value="Say Hello" render="out" execute="t1" />
</h:panelGrid>
</h:form>
<br />
<a4j:outputPanel id="out">
<h:outputText value="Hello #{userBean.name} !"
rendered="#{not empty userBean.name}" />
</a4j:outputPanel>
</h:body>
</html>
-
2. Command Button Simple of RichFaces 4
javacorner Apr 24, 2011 4:28 PM (in response to iabughosh)Many thanks man it is worked fine. But why it is working in the demo site with @this
-
3. Command Button Simple of RichFaces 4
iabughosh Apr 25, 2011 5:41 AM (in response to javacorner)@this means execute the parent component, it is widely used with a4j:ajax, if you put @this in the previous example it means that execute the panelGrid which is not executable.
note : i saw the demo and the execute on a4j:commandButton = "@form".
regards.