Author: ilya_shaikovsky
Date: 2010-05-28 05:12:41 -0400 (Fri, 28 May 2010)
New Revision: 17342
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java
root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
Log:
some refactoring +
https://jira.jboss.org/browse/RF-8291
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-28
08:47:20 UTC (rev 17341)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/common/navigation/DemoNavigator.java 2010-05-28
09:12:41 UTC (rev 17342)
@@ -1,5 +1,6 @@
package org.richfaces.demo.common.navigation;
+import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
@@ -13,7 +14,11 @@
@ManagedBean
@SessionScoped
-public class DemoNavigator {
+public class DemoNavigator implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 3970933260901989658L;
private static final String DEMO_VIEW_PARAMETER = "demo";
private static final String SAMPLE_VIEW_PARAMETER = "sample";
private static final String SEPARATOR = "/";
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java 2010-05-28
08:47:20 UTC (rev 17341)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/poll/PollBean.java 2010-05-28
09:12:41 UTC (rev 17342)
@@ -3,6 +3,7 @@
*/
package org.richfaces.demo.poll;
+import java.io.Serializable;
import java.util.Date;
import javax.faces.bean.ManagedBean;
@@ -14,8 +15,12 @@
*/
@ManagedBean
@ViewScoped
-public class PollBean {
+public class PollBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7871292328251171957L;
private Date pollStartTime;
private boolean pollEnabled;
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-05-28
08:47:20 UTC (rev 17341)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/region/RegionBean.java 2010-05-28
09:12:41 UTC (rev 17342)
@@ -33,9 +33,5 @@
public void setUser2(UserBean user2) {
this.user2 = user2;
}
-
- public static long getSerialversionuid() {
- return serialVersionUID;
- }
-
+
}
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java 2010-05-28
08:47:20 UTC (rev 17341)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/SlidesBean.java 2010-05-28
09:12:41 UTC (rev 17342)
@@ -1,5 +1,6 @@
package org.richfaces.demo.tables;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@@ -14,8 +15,12 @@
*/
@ManagedBean
@ViewScoped
-public class SlidesBean {
+public class SlidesBean implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6498592143189891265L;
private static final String FILE_EXT = ".jpg";
private static final int FILES_COUNT = 9;
private static final String PATH_PREFIX = "/images/nature/";
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-28
08:47:20 UTC (rev 17341)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-28
09:12:41 UTC (rev 17342)
@@ -17,6 +17,10 @@
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/panel.xhtml 2010-05-28
09:12:41 UTC (rev 17342)
@@ -22,25 +22,25 @@
<composite:implementation>
<h:outputStylesheet name="rich/css/panel.css" />
- <div class="rich-panel #{compositeComponent.attrs.styleClass}"
id="#{cc.attrs.id}"
+ <div class="rich-panel #{cc.attrs.styleClass}"
id="#{cc.attrs.id}"
style="#{cc.attrs.style}"
- onclick="#{compositeComponent.attrs.onclick}"
- ondblclick="#{compositeComponent.attrs.ondblclick}"
- onkeydown="#{compositeComponent.attrs.onkeydown}"
- onkeypress="#{compositeComponent.attrs.onkeypress}"
- onkeyup="#{compositeComponent.attrs.onkeyup}"
- onmousedown="#{compositeComponent.attrs.onmousedown}"
- onmousemove="#{compositeComponent.attrs.onmousemove}"
- onmouseout="#{compositeComponent.attrs.onmouseout}"
- onmouseover="#{compositeComponent.attrs.onmouseover}"
- onmouseup="#{compositeComponent.attrs.onmouseup}">
+ onclick="#{cc.attrs.onclick}"
+ ondblclick="#{cc.attrs.ondblclick}"
+ onkeydown="#{cc.attrs.onkeydown}"
+ onkeypress="#{cc.attrs.onkeypress}"
+ onkeyup="#{cc.attrs.onkeyup}"
+ onmousedown="#{cc.attrs.onmousedown}"
+ onmousemove="#{cc.attrs.onmousemove}"
+ onmouseout="#{cc.attrs.onmouseout}"
+ onmouseover="#{cc.attrs.onmouseover}"
+ onmouseup="#{cc.attrs.onmouseup}">
<h:panelGroup rendered="#{not empty cc.facets.header}">
- <div class="rich-panel-header
#{compositeComponent.attrs.headerClass}">
+ <div class="rich-panel-header #{cc.attrs.headerClass}">
<composite:renderFacet name="header"/>
</div>
</h:panelGroup>
- <div class="rich-panel-body #{compositeComponent.attrs.bodyClass}" >
+ <div class="rich-panel-body #{cc.attrs.bodyClass}" >
<composite:insertChildren />
</div>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/region/region.xhtml 2010-05-28
09:12:41 UTC (rev 17342)
@@ -7,19 +7,21 @@
xmlns:rich="http://java.sun.com/jsf/composite/rich">
<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 processing definitions from
components id's
- and use declarative 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> execute="@region"</b></p>
- <p>
- Look to the simple example bellow. There are two similar user info panels. But the ajax
behaviors inside the
- first panel uses execute declarations and pointed to panelGrid id. And the second panel
inputs just wrapped
- to region without any additional execute definitions.
- </p>
+ <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
+ processing definitions from components id's and use declarative
+ 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>
+ execute="@region"</b></p>
+ <p>Look to the simple example bellow. There are two similar user
+ info panels. But the ajax behaviors inside the first panel uses execute
+ declarations and pointed to panelGrid id. And the second panel inputs
+ just wrapped to region without any additional execute definitions.</p>
<h:form>
<h:panelGrid columns="2">
<rich:panel id="userInfoPanel1">
@@ -39,13 +41,15 @@
</h:inputText>
</h:panelGrid>
</rich:panel>
- <rich:panel id="echopanel1">
+ <h:panelGrid columns="2" id="echopanel1">
<f:facet name="header">
Echo Panel
</f:facet>
+ <h:outputText value="Entered name:" />
<h:outputText value="#{regionBean.user1.name}" />
+ <h:outputText value="Entered email:" />
<h:outputText value="#{regionBean.user1.email}" />
- </rich:panel>
+ </h:panelGrid>
</h:panelGrid>
</h:form>
<h:form>
@@ -67,13 +71,15 @@
</h:panelGrid>
</a4j:region>
</rich:panel>
- <rich:panel id="echopanel2">
+ <h:panelGrid columns="2" id="echopanel2">
<f:facet name="header">
Echo Panel
</f:facet>
- <h:outputText value="#{regionBean.user1.name}" />
- <h:outputText value="#{regionBean.user1.email}" />
- </rich:panel>
+ <h:outputText value="Entered name:" />
+ <h:outputText value="#{regionBean.user2.name}" />
+ <h:outputText value="Entered email:" />
+ <h:outputText value="#{regionBean.user2.email}" />
+ </h:panelGrid>
</h:panelGrid>
</h:form>