Author: ilya_shaikovsky
Date: 2009-07-29 03:49:36 -0400 (Wed, 29 Jul 2009)
New Revision: 15031
Removed:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/choices.xhtml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/choices.xhtml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/PushBean.java
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable.xhtml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-7619
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2009-07-29
07:12:02 UTC (rev 15030)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2009-07-29
07:49:36 UTC (rev 15031)
@@ -38,7 +38,7 @@
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
- <param-value>true</param-value>
+ <param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
@@ -52,17 +52,13 @@
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
- <context-param>
- <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
- <param-value>true</param-value>
- </context-param>
<context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
- <param-value>ALL</param-value>
+ <param-value>DEFAULT</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
- <param-value>ALL</param-value>
+ <param-value>DEFAULT</param-value>
</context-param>
<listener>
Deleted:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/choices.xhtml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/choices.xhtml 2009-07-29
07:12:02 UTC (rev 15030)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/choices.xhtml 2009-07-29
07:49:36 UTC (rev 15031)
@@ -1,34 +0,0 @@
-<!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:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
- <ui:composition template="/templates/component-sample.xhtml">
- <ui:define name="sample">
- <p>
-Desc </p>
- <fieldset class="demo_fieldset">
- <legend class="demo_legend">Table cells updates</legend>
- <div class="sample-container">
- <ui:include src="/richfaces/dataTable/examples/choices.xhtml"/>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/dataTable/examples/choices.xhtml"/>
- </ui:include>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcetype" value="java" />
- <ui:param name="openlabel" value="Choice Object" />
- <ui:param name="sourcepath"
value="/richfaces/dataTable/snippets/Choice.java"/>
- </ui:include>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcetype" value="java" />
- <ui:param name="openlabel" value="Choices Bean" />
- <ui:param name="sourcepath"
value="/richfaces/dataTable/snippets/ChoicesBean.java"/>
- </ui:include>
- </div>
- </fieldset>
- </ui:define>
-
- </ui:composition>
-</html>
Deleted:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/choices.xhtml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/choices.xhtml 2009-07-29
07:12:02 UTC (rev 15030)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/choices.xhtml 2009-07-29
07:49:36 UTC (rev 15031)
@@ -1,55 +0,0 @@
-<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
- <style>
-.top {
- vertical-align: top;
-}
-</style>
- <h:form>
- <rich:dataTable value="#{choicesBean.choices}" var="choice"
- rowKeyVar="row" ajaxKeys="#{choicesBean.keysSet}">
- <f:facet name="header">
- <h:outputText value="Voting for favourite fruit" />
- </f:facet>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="" />
- </f:facet>
- <h:outputText value="#{row}" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Choice name" />
- </f:facet>
- <h:outputText value="#{choice.label}" id="choiceLabel" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Current Votes" />
- </f:facet>
- <h:outputText value="#{choice.votesCount}" id="choiceVotes"
/>
- </rich:column>
- </rich:dataTable>
- <a4j:commandButton value="Start" action="#{choicesBean.start}"
- id="start" disabled="#{choicesBean.enabled}"
ajaxSingle="true"
- reRender="push, stop, start" limitToList="true" />
-
- <a4j:commandButton value="Stop" action="#{choicesBean.stop}"
id="stop"
- disabled="#{!choicesBean.enabled}" ajaxSingle="true"
- reRender="push,start, stop" limitToList="true" />
- <a4j:outputPanel layout="block" id="tempResults">
- <h:outputText
- value="Latest update votes was: #{choicesBean.updateInfo} at
#{choicesBean.timeStamp}"
- rendered="#{choicesBean.enabled}" />
- </a4j:outputPanel>
-
- <a4j:push enabled="#{choicesBean.enabled}" interval="3000"
- timeout="3000" eventProducer="#{choicesBean.addListener}"
id="push"
- limitToList="true" action="#{choicesBean.processUpdates}"
- reRender="choiceVotes, push, tempResults" />
- </h:form>
-</ui:composition>
\ No newline at end of file
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable.xhtml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable.xhtml 2009-07-29
07:12:02 UTC (rev 15030)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable.xhtml 2009-07-29
07:49:36 UTC (rev 15031)
@@ -21,9 +21,6 @@
<rich:tab label="Edit Table with ModalPanel"
name="editDataTable">
<ui:include src="/richfaces/dataTable/editDataTable.xhtml"/>
</rich:tab>
- <rich:tab label="Push and Table cells updates"
name="choices">
- <ui:include src="/richfaces/dataTable/choices.xhtml"/>
- </rich:tab>
<rich:tab name="info" label="Tag Information">
<rich:insert
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
Deleted:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/PushBean.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/PushBean.java 2009-07-29
07:12:02 UTC (rev 15030)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/snippets/PushBean.java 2009-07-29
07:49:36 UTC (rev 15031)
@@ -1,104 +0,0 @@
-/**
- *
- */
-package org.richfaces.demo.push;
-
-import java.util.Date;
-import java.util.EventListener;
-import java.util.EventObject;
-import java.util.UUID;
-
-import org.ajax4jsf.event.PushEventListener;
-
-/**
- * @author Ilya Shaikovsky
- *
- */
-
-public class PushBean implements Runnable {
-
- private String uuid = "";
-
- private boolean enabled = false;
-
- private Date startDate;
-
- PushEventListener listener;
-
- private Thread thread;
-
- // private int eventsFired counter;
-
- public void addListener(EventListener listener) {
- synchronized (listener) {
- System.out.println("PushBean.addListener()");
- if (this.listener != listener) {
- this.listener = (PushEventListener) listener;
- }
- }
- }
-
- public void run() {
- System.out.println("PushBean.run() executed");
- while (thread != null) {
- try {
- System.out.println(((new Date()).getTime()-startDate.getTime())>=60000);
- if (((new Date()).getTime()-startDate.getTime())>=20000) {
- stop();
- }
- uuid = UUID.randomUUID().toString();
- listener.onEvent(new EventObject(this));
- Thread.sleep(10000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- // e.printStackTrace();
- }
- }
- }
-
- public String getUuid() {
- System.out.println(uuid + "returned");
- return uuid;
- }
-
- public void start() {
- if (thread == null) {
- thread = new Thread(this);
- thread.setDaemon(true);
- thread.start();
- System.out.println("PushBean.start()");
- setStartDate(new Date());
- setEnabled(true);
- System.out.println("thread started");
- }
- }
-
- public void stop() {
- if (thread != null) {
- //thread.stop();
- setStartDate(null);
- setEnabled(false);
- thread = null;
- }
- }
-
- public Thread getThread() {
- return thread;
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public Date getStartDate() {
- return startDate;
- }
-
- public void setStartDate(Date startDate) {
- this.startDate = startDate;
- }
-}
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml 2009-07-29
07:12:02 UTC (rev 15030)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push/usage.xhtml 2009-07-29
07:49:36 UTC (rev 15031)
@@ -76,13 +76,11 @@
value="/richfaces/push/examples/push.xhtml" />
<ui:param name="openlabel" value="View Source" />
</ui:include>
- <ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
- value="/richfaces/push/snippets/PushBean.java" />
- <ui:param name="openlabel" value="View PushBean code" />
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/WEB-INF/src/org/richfaces/demo/push/PushBean.java"/>
+ <ui:param name="openlabel" value="View PushBean.java Source"
/>
<ui:param name="sourcetype" value="java" />
- </ui:include>
-
+ </ui:include>
</div>
</fieldset>
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml 2009-07-29
07:12:02 UTC (rev 15030)
+++
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/push.xhtml 2009-07-29
07:49:36 UTC (rev 15031)
@@ -1,4 +1,3 @@
-<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
@@ -7,7 +6,21 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Ajax Push</ui:define>
<ui:define name="body">
- <ui:include src="/templates/include/tab-panel.xhtml" />
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab"
+ selectedTab="#{componentNavigator.currentComponent.activeTab}"
valueChangeListener="#{componentNavigator.tabPanelSwitched}">
+ <rich:tab label="Usage" name="usage">
+ <ui:include src="/richfaces/push/usage.xhtml"/>
+ </rich:tab>
+ <rich:tab label="Push and Table cells updates"
name="choices">
+ <ui:include src="/richfaces/push/choices.xhtml"/>
+ </rich:tab>
+ <rich:tab name="info" label="Tag Information">
+ <rich:insert
+ src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+ errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
+ </rich:tabPanel>
</ui:define>
</ui:composition>
</html>
+