Author: ilya_shaikovsky
Date: 2011-03-02 10:06:48 -0500 (Wed, 02 Mar 2011)
New Revision: 22018
Modified:
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml
Log:
http://jira.jboss.org/browse/RF-10512
@akolonitsky - looked through, but most of the review related to Sean future demo review.
Modified:
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml
===================================================================
---
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml 2011-03-02
14:09:48 UTC (rev 22017)
+++
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml 2011-03-02
15:06:48 UTC (rev 22018)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
-<ui:composition>
+<ui:composition>
<p><b>a4j:region</b> component designed for marking zones which
should be processed during Ajax requests without using execute
definitions at Ajax behaviors/components. This allow to decouple the
@@ -12,15 +12,19 @@
wrapping by this tag instead.</p>
<p>In <b>RichFaces 3.3</b> all the view was processed if no regions
specified as <b>ViewRoot itself was region by default</b>. And in
<b>RichFaces
- 4.x</b> - all the controls has <b>execute="@this" by
default</b> according
- to JSF 2 specifications. But if the <b>controls wrapped with
- a4j:region</b> component and has no execute definitions - them uses<b>
+ 4.x</b> - all the controls except some specific ones(<i>e.g.
+ a4j:command* normally used to submit whole form so has @form by default</i>)
+ has <b>execute="@this" by default</b> according to JSF 2
+ specifications. But if the <b>controls wrapped with a4j:region</b>
+ component and has no explicit execute definitions - them uses<b>
execute="@region"</b></p>
<p>Look to the simple example below. There are two similar user
- info panels. But the <b><u>button inside the first panel will not
works</u> </b>as not uses execute
- declarations and by default execut equals to @this. Separate definition needed to start
working properly.
- And the <b>second panel inputs
- just wrapped to region with the commandButton and works</b> without any additional
execute definitions.</p>
+ info panels. But the <b><u>button with <a4j:ajax/> inside
+ the first panel will not works</u> </b> as not uses execute declarations and
by
+ default execute equals to @this. Separate definition needed to start
+ working properly. And the <b>second panel with the same button and
+ inputs just wrapped to region and works</b> without any additional execute
+ definitions.</p>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
<ui:param name="src" value="#{demoNavigator.sampleIncludeURI}"
/>
@@ -28,5 +32,8 @@
<ui:param name="openLabel" value="View Source" />
<ui:param name="hideLabel" value="Hide Source" />
</ui:include>
+ <p><i>Again, as it was mentioned if you will use
+ <a4j:commandButton> both panels will start to work properly as
+ command controls has specific execute = @form by default. </i></p>
</ui:composition>
</html>
\ No newline at end of file
Modified:
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml
===================================================================
---
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml 2011-03-02
14:09:48 UTC (rev 22017)
+++
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml 2011-03-02
15:06:48 UTC (rev 22018)
@@ -18,7 +18,9 @@
<h:outputText value="User email: " />
<h:inputText value="#{regionBean.user1.email}"/>
</h:panelGrid>
- <a4j:commandButton render="echopanel1" value="submit"/>
+ <h:commandButton value="submit">
+ <a4j:ajax render="echopanel1"/>
+ </h:commandButton>
</h:panelGrid>
<h:panelGrid columns="2" id="echopanel1">
<f:facet name="header">
@@ -44,7 +46,9 @@
<h:outputText value="User email: " />
<h:inputText value="#{regionBean.user2.email}"/>
</h:panelGrid>
- <a4j:commandButton render="echopanel2" value="submit"/>
+ <h:commandButton render="echopanel2" value="submit">
+ <a4j:ajax render="echopanel2"/>
+ </h:commandButton>
</a4j:region>
</h:panelGrid>
<h:panelGrid columns="2" id="echopanel2">