JBoss Rich Faces SVN: r9914 - in trunk/sandbox/ui: extendedDataTable/src/main/java/org/richfaces/sandbox/component and 19 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-05 07:33:04 -0400 (Tue, 05 Aug 2008)
New Revision: 9914
Removed:
trunk/sandbox/ui/extendedDataTable/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java
trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx
trunk/sandbox/ui/panel2/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/panel2/src/main/java/org/richfaces/component/UIBeanValidator.java
trunk/sandbox/ui/panel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx
trunk/sandbox/ui/rex-messageBox/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/rex-messageBox/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java
trunk/sandbox/ui/rex-messageBox/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx
trunk/sandbox/ui/rex-resizable/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/rex-resizable/src/main/java/org/richfaces/component/UIBeanValidator.java
trunk/sandbox/ui/rex-resizable/src/main/templates/org/richfaces/htmlBeanValidator.jspx
trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UIBeanValidator.java
trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx
trunk/sandbox/ui/sortableHeader/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/sortableHeader/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java
trunk/sandbox/ui/sortableHeader/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx
trunk/sandbox/ui/treeTable/src/main/config/component/beanValidator.xml
trunk/sandbox/ui/treeTable/src/main/java/org/richfaces/component/UIBeanValidator.java
trunk/sandbox/ui/treeTable/src/main/templates/org/richfaces/htmlBeanValidator.jspx
Log:
Validator stuff removed
Deleted: trunk/sandbox/ui/extendedDataTable/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/extendedDataTable/src/main/config/component/beanValidator.xml 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.sandbox.BeanValidator</name>
- <family>org.richfaces.sandbox.BeanValidator</family>
- <classname>org.richfaces.sandbox.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.sandbox.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.sandbox.BeanValidatorRenderer</name>
- <template>org/richfaces/sandbox/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.sandbox.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.sandbox.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.sandbox.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.sandbox.BeanValidator";
-
-}
Deleted: trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.sandbox.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.sandbox.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/panel2/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/panel2/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/panel2/src/main/config/component/beanValidator.xml 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.BeanValidator</name>
- <family>org.richfaces.BeanValidator</family>
- <classname>org.richfaces.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.BeanValidatorRenderer</name>
- <template>org/richfaces/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/sandbox/ui/panel2/src/main/java/org/richfaces/component/UIBeanValidator.java
===================================================================
--- trunk/sandbox/ui/panel2/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/panel2/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.BeanValidator";
-
-}
Deleted: trunk/sandbox/ui/panel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx
===================================================================
--- trunk/sandbox/ui/panel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/panel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/rex-messageBox/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/rex-messageBox/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/rex-messageBox/src/main/config/component/beanValidator.xml 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.sandbox.BeanValidator</name>
- <family>org.richfaces.sandbox.BeanValidator</family>
- <classname>org.richfaces.sandbox.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.sandbox.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.sandbox.BeanValidatorRenderer</name>
- <template>org/richfaces/sandbox/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.sandbox.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/sandbox/ui/rex-messageBox/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java
===================================================================
--- trunk/sandbox/ui/rex-messageBox/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/rex-messageBox/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.sandbox.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.sandbox.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.sandbox.BeanValidator";
-
-}
Deleted: trunk/sandbox/ui/rex-messageBox/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx
===================================================================
--- trunk/sandbox/ui/rex-messageBox/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/rex-messageBox/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.sandbox.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.sandbox.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/rex-resizable/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/rex-resizable/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/rex-resizable/src/main/config/component/beanValidator.xml 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.BeanValidator</name>
- <family>org.richfaces.BeanValidator</family>
- <classname>org.richfaces.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.BeanValidatorRenderer</name>
- <template>org/richfaces/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/sandbox/ui/rex-resizable/src/main/java/org/richfaces/component/UIBeanValidator.java
===================================================================
--- trunk/sandbox/ui/rex-resizable/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/rex-resizable/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.BeanValidator";
-
-}
Deleted: trunk/sandbox/ui/rex-resizable/src/main/templates/org/richfaces/htmlBeanValidator.jspx
===================================================================
--- trunk/sandbox/ui/rex-resizable/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/rex-resizable/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/beanValidator.xml 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.BeanValidator</name>
- <family>org.richfaces.BeanValidator</family>
- <classname>org.richfaces.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.BeanValidatorRenderer</name>
- <template>org/richfaces/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UIBeanValidator.java
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.BeanValidator";
-
-}
Deleted: trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/sortableHeader/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/sortableHeader/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/sortableHeader/src/main/config/component/beanValidator.xml 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.sandbox.BeanValidator</name>
- <family>org.richfaces.sandbox.BeanValidator</family>
- <classname>org.richfaces.sandbox.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.sandbox.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.sandbox.BeanValidatorRenderer</name>
- <template>org/richfaces/sandbox/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.sandbox.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/sandbox/ui/sortableHeader/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java
===================================================================
--- trunk/sandbox/ui/sortableHeader/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/sortableHeader/src/main/java/org/richfaces/sandbox/component/UIBeanValidator.java 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.sandbox.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.sandbox.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.sandbox.BeanValidator";
-
-}
Deleted: trunk/sandbox/ui/sortableHeader/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx
===================================================================
--- trunk/sandbox/ui/sortableHeader/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/sortableHeader/src/main/templates/org/richfaces/sandbox/htmlBeanValidator.jspx 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.sandbox.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.sandbox.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/treeTable/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/sandbox/ui/treeTable/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/treeTable/src/main/config/component/beanValidator.xml 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.BeanValidator</name>
- <family>org.richfaces.BeanValidator</family>
- <classname>org.richfaces.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.BeanValidatorRenderer</name>
- <template>org/richfaces/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/sandbox/ui/treeTable/src/main/java/org/richfaces/component/UIBeanValidator.java
===================================================================
--- trunk/sandbox/ui/treeTable/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/treeTable/src/main/java/org/richfaces/component/UIBeanValidator.java 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.BeanValidator";
-
-}
Deleted: trunk/sandbox/ui/treeTable/src/main/templates/org/richfaces/htmlBeanValidator.jspx
===================================================================
--- trunk/sandbox/ui/treeTable/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
+++ trunk/sandbox/ui/treeTable/src/main/templates/org/richfaces/htmlBeanValidator.jspx 2008-08-05 11:33:04 UTC (rev 9914)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
16 years, 5 months
JBoss Rich Faces SVN: r9913 - in trunk/ui/state/src/main: java/org/richfaces/ui/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-05 07:28:30 -0400 (Tue, 05 Aug 2008)
New Revision: 9913
Removed:
trunk/ui/state/src/main/config/component/beanValidator.xml
trunk/ui/state/src/main/java/org/richfaces/ui/component/UIBeanValidator.java
trunk/ui/state/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx
Log:
Validator stuff removed
Deleted: trunk/ui/state/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/ui/state/src/main/config/component/beanValidator.xml 2008-08-05 10:52:02 UTC (rev 9912)
+++ trunk/ui/state/src/main/config/component/beanValidator.xml 2008-08-05 11:28:30 UTC (rev 9913)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "http://labs.jboss.com/jbossrichfaces/component-config.dtd">
-
-<components>
- <component>
- <name>org.richfaces.ui.BeanValidator</name>
- <family>org.richfaces.ui.BeanValidator</family>
- <classname>org.richfaces.ui.component.html.HtmlBeanValidator</classname>
- <superclass>org.richfaces.ui.component.UIBeanValidator</superclass>
- <description>
- <![CDATA[
- ]]>
- </description>
- <renderer generate="true" override="true">
- <name>org.richfaces.ui.BeanValidatorRenderer</name>
- <template>org/richfaces/ui/htmlBeanValidator.jspx</template>
- </renderer>
- <tag>
- <name>beanValidator</name>
- <classname>org.richfaces.ui.taglib.BeanValidatorTag</classname>
- <superclass>
- org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- </tag>
- <!--
- <taghandler>
- <classname>org.ajax4jsf.tag.TestHandler</classname>
- </taghandler>
- -->
- &ui_component_attributes;
- <!--
- <property>
- <name>param</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"default"</defaultvalue>
- </property>
- -->
- </component>
-</components>
Deleted: trunk/ui/state/src/main/java/org/richfaces/ui/component/UIBeanValidator.java
===================================================================
--- trunk/ui/state/src/main/java/org/richfaces/ui/component/UIBeanValidator.java 2008-08-05 10:52:02 UTC (rev 9912)
+++ trunk/ui/state/src/main/java/org/richfaces/ui/component/UIBeanValidator.java 2008-08-05 11:28:30 UTC (rev 9913)
@@ -1,19 +0,0 @@
-/**
- *
- */
-
-package org.richfaces.ui.component;
-
-import javax.faces.component.UIComponentBase;
-
-/**
- * JSF component class
- *
- */
-public abstract class UIBeanValidator extends UIComponentBase {
-
- public static final String COMPONENT_TYPE = "org.richfaces.ui.BeanValidator";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.ui.BeanValidator";
-
-}
Deleted: trunk/ui/state/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx
===================================================================
--- trunk/ui/state/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx 2008-08-05 10:52:02 UTC (rev 9912)
+++ trunk/ui/state/src/main/templates/org/richfaces/ui/htmlBeanValidator.jspx 2008-08-05 11:28:30 UTC (rev 9913)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- class="org.richfaces.ui.renderkit.html.BeanValidatorRenderer"
- baseclass="org.ajax4jsf.renderkit.AjaxComponentRendererBase"
- component="org.richfaces.ui.component.UIBeanValidator"
- >
- <f:clientid var="clientId"/>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id"
- >
- </div>
-</f:root>
\ No newline at end of file
16 years, 5 months
JBoss Rich Faces SVN: r9912 - trunk/test-applications/jsp/src/main/webapp/DragAndDrop.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-05 06:52:02 -0400 (Tue, 05 Aug 2008)
New Revision: 9912
Modified:
trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
Log:
+dndParam
Modified: trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-08-05 10:35:01 UTC (rev 9911)
+++ trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-08-05 10:52:02 UTC (rev 9912)
@@ -30,7 +30,16 @@
ondragstart="#{event.ondragstart}"
onbeforedomupdate="#{event.onbeforedomupdate}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- id="dragSupportID" binding="#{dndBean.htmlDrag}" >
+ id="dragSupportID" binding="#{dndBean.htmlDrag}" dragIndicator="indicator">
+ <rich:dndParam name="default">
+ <h:graphicImage value="/pics/ajax_process.gif" />
+ </rich:dndParam>
+ <rich:dndParam name="accept">
+ <h:graphicImage value="/src/main/webapp/pics/expand.gif"/>
+ </rich:dndParam>
+ <rich:dndParam name="reject">
+ <h:graphicImage value="/src/main/webapp/pics/collapse.gif"/>
+ </rich:dndParam>
</rich:dragSupport>
</h:panelGrid>
</h:column>
@@ -47,12 +56,13 @@
ondragenter="#{event.ondragenter}"
ondragexit="#{event.ondragexit}" ondrop="#{event.ondrop}"
ondropend="#{event.ondropend}" oncomplete="#{event.oncomplete}"
- onbeforedomupdate="#{event.onbeforedomupdate}" binding="#{dndBean.htmlDrop}">
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ binding="#{dndBean.htmlDrop}">
</rich:dropSupport>
</h:panelGrid>
</h:column>
</h:dataTable>
-
+
<h:panelGrid id="dndActionID" columns="1">
<h:commandButton action="#{dndBean.add1}" value="add Drag test" />
<h:commandButton action="#{dndBean.add2}" value="add Drop test" />
@@ -72,10 +82,13 @@
</f:facet>
<rich:dndParam name="accept" value="ACCEPT:" />
<rich:dndParam name="reject">
+
<f:verbatim>
<i style="text-decoration: line-through;">REJECT:</i>
</f:verbatim>
</rich:dndParam>
+ <rich:dndParam name="dropping" value="dropping"></rich:dndParam>
+ <rich:dndParam name="dragging" value="dragging"></rich:dndParam>
</rich:dragIndicator>
<rich:dragIndicator id="dIndicator" acceptClass="defaultIndicator"
@@ -103,9 +116,8 @@
<h:panelGrid styleClass="dropzoneDecoration" id="grid1">
<f:verbatim>Accepts file and folder... Customizes</f:verbatim>
<rich:dropSupport id="zone1" oncomplete="#{event.oncomplete}"
- ondragenter="#{event.ondragenter}"
- ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}"
- ondrop="#{event.ondrop}"
+ ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}"
+ ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
onbeforedomupdate="#{event.onbeforedomupdate}"
acceptedTypes="file, folder" typeMapping="{file: testDrop}">
<rich:dndParam name="testDrop">
@@ -124,9 +136,9 @@
<h:panelGrid styleClass="dropzoneDecoration" id="grid3">
<f:verbatim>Accepts none... Customizes</f:verbatim>
<rich:dropSupport typeMapping="{file: testDrop}"
- oncomplete="#{event.oncomplete}"
- ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}"
- ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
+ oncomplete="#{event.oncomplete}" ondragenter="#{event.ondragenter}"
+ ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}"
+ ondrop="#{event.ondrop}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="testDrop">
<h:graphicImage height="16" width="16"
@@ -138,9 +150,9 @@
<h:panelGrid styleClass="dropzoneDecoration" id="grid4">
<f:verbatim>Accepts file and folder</f:verbatim>
<rich:dropSupport acceptedTypes="file, folder"
- oncomplete="#{event.oncomplete}"
- ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}"
- ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
+ oncomplete="#{event.oncomplete}" ondragenter="#{event.ondragenter}"
+ ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}"
+ ondrop="#{event.ondrop}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="testDrop" value="testDropValue" />
</rich:dropSupport>
@@ -161,7 +173,8 @@
<rich:dragSupport dragType="file" dragIndicator="indicator"
ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}" onbeforedomupdate="#{event.onbeforedomupdate}">
+ oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="label" value="Label" />
<rich:dndParam name="testDrag" value="testDragValue" />
</rich:dragSupport>
@@ -172,7 +185,7 @@
<rich:dragSupport dragType="folder" dragIndicator="indicator"
ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}"
+ oncomplete="#{event.oncomplete}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="label" value="Label" />
<rich:dndParam name="testDrag" value="testDragValue for Folder" />
@@ -208,7 +221,7 @@
<rich:dragSupport dragType="folder" dragIndicator="defaultIndicator"
ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}"
+ oncomplete="#{event.oncomplete}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="label" value="testDragValue for Folder" />
</rich:dragSupport>
@@ -221,7 +234,7 @@
<rich:dragSupport dragType="file" dragIndicator="defaultIndicator"
ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}"
+ oncomplete="#{event.oncomplete}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="marker" value="testMarkerValue" />
<rich:dndParam name="label" value="testDragValue" />
@@ -236,16 +249,17 @@
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
- <a4j:commandLink value="getDragValue" reRender="findID1"></a4j:commandLink>
+ <a4j:commandLink value="getDragType" reRender="findID1"></a4j:commandLink>
</rich:column>
<rich:column id="findID1">
- <h:outputText value="#{rich:findComponent('dragSupportID').dragValue}"/>
+ <h:outputText value="#{rich:findComponent('dragSupportID').dragType}" />
</rich:column>
<rich:column>
<a4j:commandLink value="getDropValue" reRender="findID2"></a4j:commandLink>
</rich:column>
<rich:column id="findID2">
- <h:outputText value="#{rich:findComponent('dropSupportID').dropValue}" />
+ <h:outputText
+ value="#{rich:findComponent('dropSupportID').dropValue}" />
</rich:column>
<rich:column>
<a4j:commandLink value="getAcceptClass" reRender="findID3"></a4j:commandLink>
16 years, 5 months
JBoss Rich Faces SVN: r9911 - trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-08-05 06:35:01 -0400 (Tue, 05 Aug 2008)
New Revision: 9911
Modified:
trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss
Log:
RF-4039
Modified: trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss
===================================================================
--- trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss 2008-08-05 10:34:29 UTC (rev 9910)
+++ trunk/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/css/progressBar.xcss 2008-08-05 10:35:01 UTC (rev 9911)
@@ -14,7 +14,7 @@
.rich-progress-bar-uploaded{background-repeat : repeat-x;}
.rich-progress-bar-uploaded-dig{overflow : hidden; position : absolute; top : 0px; left : 0px;}
.rich-progress-bar-shell{margin-bottom : 2px; border : 1px solid;}
- .rich-progress-bar-shell-dig{position : relative; margin-bottom : 2px; border : 1px solid;}
+ .rich-progress-bar-shell-dig{position : relative; margin-bottom : 2px; border : 1px solid; overflow: hidden;}
.rich-progress-bar-remained{text-align : center; font-weight : bold; position : relative;}
.rich-progress-bar-completed{text-align : center; font-weight : bold; background-repeat : repeat-x;}
.rich-progress-bar-padding{padding: 0px}
16 years, 5 months
JBoss Rich Faces SVN: r9910 - in trunk/sandbox/samples/extendedDataTable-sample/src/main: java/org/richfaces/samples/extdt/model/impl and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-08-05 06:34:29 -0400 (Tue, 05 Aug 2008)
New Revision: 9910
Added:
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_en.properties
Modified:
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java
trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml
Log:
developer's demo improvements
Added: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_en.properties
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_en.properties (rev 0)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_en.properties 2008-08-05 10:34:29 UTC (rev 9910)
@@ -0,0 +1,16 @@
+demo.title=Extended data table demonstration
+patient.firstName=First name
+patient.id=Id
+patient.lastName=Last name
+patient.admissionDate=Admission date
+table.width=Width
+table.height=Height
+table.update=Update values
+table.sortMode=Sort mode
+table.selectionMode=Selection mode
+table.patientsNumber=Number of patients
+table.testComponentState=Test component state
+table.back=Back
+demo.testPageTitle=Component state test page
+table.paginated=Enable paginator
+table.rowsNumber=Number of rows
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties 2008-08-05 10:21:12 UTC (rev 9909)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties 2008-08-05 10:34:29 UTC (rev 9910)
@@ -3,3 +3,14 @@
patient.id=Id
patient.lastName=Last name
patient.admissionDate=Admission date
+table.width=Width
+table.height=Height
+table.update=Update values
+table.sortMode=Sort mode
+table.selectionMode=Selection mode
+table.patientsNumber=Number of patients
+table.testComponentState=Test component state
+table.back=Back
+demo.testPageTitle=Component state test page
+table.paginated=Enable paginator
+table.rowsNumber=Number of rows
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java 2008-08-05 10:21:12 UTC (rev 9909)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java 2008-08-05 10:34:29 UTC (rev 9910)
@@ -15,29 +15,30 @@
public class DemoPatientProvider implements DataProvider<DemoPatient>{
private String allFirstNames[] = {
- "Aaron", "Abbott", "Abel", "Abner",
- "Abraham", "Adam", "Addison", "Adler",
- "Adley", "Adrian", "Aedan", "Aiken",
- "Alan", "Alastair", "Albern", "Albert",
- "Albion", "Alden", "Aldis", "Aldrich",
- "Alexander","Alfie", "Alfred", "Algernon",
- "Alston", "Alton", "Alvin", "Ambrose",
- "Amery", "Amos", "Andrew", "Angus",
- "Ansel", "Anthony", "Archer", "Archibald",
- "Arlen", "Arnold", "Arthur", "Arvel",
- "Atwater", "Atwood", "Aubrey", "Austin"
+ "Aaron", "Abbott", "Abel", "Abner",
+ "Abraham", "Adam", "Addison", "Adler",
+ "Adley", "Adrian", "Aedan", "Aiken",
+ "Alan", "Alastair", "Albern", "Albert",
+ "Albion", "Alden", "Aldis", "Aldrich",
+ "Alexander", "Alfie", "Alfred", "Algernon",
+ "Alston", "Alton", "Alvin", "Ambrose",
+ "Amery", "Amos", "Andrew", "Angus",
+ "Ansel", "Anthony", "Archer", "Archibald",
+ "Arlen", "Arnold", "Arthur", "Arvel",
+ "Atwater", "Atwood", "Aubrey", "Austin",
+ "Małgorzata", "Paweł", "Piotr"
};
private String allLastNames[] = {
- "Brown", "Smith", "Patel",
- "Jones", "Williams", "Johnson",
- "Taylor", "Thomas", "Roberts",
- "Khan", "Lewis", "Jackson",
- "Clarke", "James", "Phillips",
- "Wilson", "Ali", "Mason",
- "Mitchell", "Rose", "Davis",
- "Davies", "Rodriguez", "Cox",
- "Alexander"
+ "Brown", "Smith", "Patel",
+ "Jones", "Williams", "Johnson",
+ "Taylor", "Thomas", "Roberts",
+ "Khan", "Lewis", "Jackson",
+ "Clarke", "James", "Phillips",
+ "Wilson", "Ali", "Mason",
+ "Davies", "Rodriguez", "Cox",
+ "Alexander", "Popiołek", "Buda",
+ "Goławski", "Kawiak", "Mitchel"
};
@@ -59,12 +60,12 @@
private String generateRandomFirstName() {
int rand = Math.abs(random.nextInt());
- return allFirstNames[rand%(allFirstNames.length-1)];
+ return allFirstNames[rand%(allFirstNames.length)];
}
private String generateRandomLastName() {
int rand = Math.abs(random.nextInt());
- return allLastNames[rand%(allLastNames.length-1)];
+ return allLastNames[rand%(allLastNames.length)];
}
/* (non-Javadoc)
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-08-05 10:21:12 UTC (rev 9909)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-08-05 10:34:29 UTC (rev 9910)
@@ -26,8 +26,8 @@
</navigation-rule>
<application>
<locale-config>
- <default-locale>pl</default-locale>
- <supported-locale>de</supported-locale>
+ <default-locale>en</default-locale>
+ <supported-locale>pl</supported-locale>
<supported-locale>en</supported-locale>
</locale-config>
<resource-bundle>
16 years, 5 months
JBoss Rich Faces SVN: r9909 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-08-05 06:21:12 -0400 (Tue, 05 Aug 2008)
New Revision: 9909
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
preparation for the https://jira.jboss.org/jira/browse/RF-4001 added
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-08-05 09:03:55 UTC (rev 9908)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-08-05 10:21:12 UTC (rev 9909)
@@ -677,7 +677,14 @@
var bottomStyleClass;
var htmlTextWeekDayBar='';
var context;
- var eventsStr = 'onclick="'+tempStr+'eventCellOnClick(event, this);" onmouseover="'+tempStr+'eventCellOnMouseOver(event, this);" onmouseout="'+tempStr+'eventCellOnMouseOut(event, this);"';
+
+// TODO (version 3.3.0): remove onmouse over/up/out/down css classes and onclick listeners if component disabled
+// var eventsStr = "";
+// if (!this.params.disabled) {
+// eventsStr = 'onclick="'+tempStr+'eventCellOnClick(event, this);" onmouseover="'+tempStr+'eventCellOnMouseOver(event, this);" onmouseout="'+tempStr+'eventCellOnMouseOut(event, this);"';
+// }
+
+ var eventsStr = 'onclick="'+tempStr+'eventCellOnClick(event, this);" onmouseover="'+tempStr+'eventCellOnMouseOver(event, this);" onmouseout="'+tempStr+'eventCellOnMouseOut(event, this);"';
if (this.params.showWeekDaysBar)
{
var htmlTextWeekDayBar = '<tr id="'+this.params.weekDayBarId+'">';
@@ -1776,7 +1783,7 @@
changeCurrentDateOffset: function(yearOffset, monthOffset) {
var date = new Date(this.currentDate.getFullYear()+yearOffset, this.currentDate.getMonth()+monthOffset,1);
-
+
if (this.invokeEvent("currentdateselect", $(this.id), null, date))
{
// fix for RF-2450.
@@ -1791,52 +1798,52 @@
today: function(noUpdate, noHighlight) {
- var now = new Date();
-
- var nowyear = now.getFullYear();
- var nowmonth = now.getMonth();
- var nowdate = now.getDate();
- var updateflag = false;
-
- if (nowdate!=this.todayDate.getDate()) {updateflag=true; this.todayDate = now;}
-
- if (nowyear != this.currentDate.getFullYear() || nowmonth != this.currentDate.getMonth() )
- {
- updateflag = true;
- this.currentDate = new Date(nowyear, nowmonth, 1);
- }
-
- if (this.todayControlMode=='select')
- {
- noHighlight=true;
- }
-
- if (updateflag)
- {
- if (noUpdate) this.render(); else this.onUpdate();
- }
- else
- {
- // highlight today
+ var now = new Date();
+
+ var nowyear = now.getFullYear();
+ var nowmonth = now.getMonth();
+ var nowdate = now.getDate();
+ var updateflag = false;
- if (this.isVisible && this.todayCellId && !noHighlight)
+ if (nowdate!=this.todayDate.getDate()) {updateflag=true; this.todayDate = now;}
+
+ if (nowyear != this.currentDate.getFullYear() || nowmonth != this.currentDate.getMonth() )
{
- this.clearEffect(this.todayCellId, this.highlightEffect);
- if (this.todayCellColor!="transparent")
+ updateflag = true;
+ this.currentDate = new Date(nowyear, nowmonth, 1);
+ }
+
+ if (this.todayControlMode=='select')
+ {
+ noHighlight=true;
+ }
+
+ if (updateflag)
+ {
+ if (noUpdate) this.render(); else this.onUpdate();
+ }
+ else
+ {
+ // highlight today
+
+ if (this.isVisible && this.todayCellId && !noHighlight)
{
- this.highlightEffect = new Effect.Highlight($(this.todayCellId), {startcolor: this.todayCellColor, duration:0.3, transition: Effect.Transitions.sinoidal,
- afterFinish: this.onHighlightFinish});
+ this.clearEffect(this.todayCellId, this.highlightEffect);
+ if (this.todayCellColor!="transparent")
+ {
+ this.highlightEffect = new Effect.Highlight($(this.todayCellId), {startcolor: this.todayCellColor, duration:0.3, transition: Effect.Transitions.sinoidal,
+ afterFinish: this.onHighlightFinish});
+ }
}
}
- }
-
- // todayControl select mode
- if (this.todayControlMode=='select')
- if (updateflag && !noUpdate && this.submitFunction)
- {
- this.afterLoad = this.selectToday;
- }
- else this.selectToday();
+
+ // todayControl select mode
+ if (this.todayControlMode=='select')
+ if (updateflag && !noUpdate && this.submitFunction)
+ {
+ this.afterLoad = this.selectToday;
+ }
+ else this.selectToday();
},
@@ -1993,7 +2000,7 @@
},
showSelectedDate: function()
- {
+ {
if (!this.selectedDate) return;
if (this.currentDate.getMonth()!=this.selectedDate.getMonth() || this.currentDate.getFullYear()!=this.selectedDate.getFullYear())
{
@@ -2105,18 +2112,18 @@
else editor = $(this.EDITOR_ID);
if (!this.isDateEditorLayoutCreated) this.createDateEditorLayout(editor);
else this.updateDateEditor();
-
+
$(this.DATE_EDITOR_LAYOUT_ID).show();
-
+
var editor_shadow = $(this.EDITOR_SHADOW_ID);
-
+
this.setEditorPosition($(this.id), editor, editor_shadow);
-
+
editor_shadow.show();
editor.show();
-
+
Element.clonePosition(this.EDITOR_LAYOUT_SHADOW_ID, this.DATE_EDITOR_LAYOUT_ID, {offsetLeft: 3, offsetTop: 3});
-
+
this.isEditorVisible = true;
},
@@ -2146,8 +2153,13 @@
if (!calendar.selectedDate || calendar.showApplyButton) return "";
var text = Richfaces.Calendar.formatDate(calendar.selectedDate,(calendar.timeType ? calendar.datePattern : calendar.params.datePattern), calendar.params.monthLabels, calendar.params.monthLabelsShort);
-
- var markup = new E('div', {'class': 'rich-calendar-tool-btn', 'onclick': "Richfaces.getComponent('calendar',this).showSelectedDate(); return true;"}, [new ET(text)]);
+// TODO: version: 3.3.0
+// var onclick ="";
+// if(!calendar.params.disabled) {
+// onclick = "Richfaces.getComponent('calendar',this).showSelectedDate(); return true;"
+// }
+ var onclick = "Richfaces.getComponent('calendar',this).showSelectedDate(); return true;"
+ var markup = new E('div', {'class': 'rich-calendar-tool-btn', 'onclick': onclick}, [new ET(text)]);
return markup;
};
@@ -2158,9 +2170,18 @@
var text = Richfaces.Calendar.formatDate(calendar.selectedDate, calendar.timePattern, calendar.params.monthLabels, calendar.params.monthLabelsShort);
- var markup = new E('div', {'class': 'rich-calendar-tool-btn rich-calendar-tool-btn-hover rich-calendar-tool-btn-press', 'onclick': "Richfaces.getComponent('calendar',this).showTimeEditor();return true;",
- 'onmouseover': "Element.removeClassName(this, 'rich-calendar-tool-btn-press');",
- 'onmouseout' : "Element.addClassName(this, 'rich-calendar-tool-btn-press');"}, [new ET(text)]);
+ var onmouseover = "Element.removeClassName(this, 'rich-calendar-tool-btn-press');";
+ var onmouseout = "Element.addClassName(this, 'rich-calendar-tool-btn-press');";
+ var onclick = "Richfaces.getComponent('calendar',this).showTimeEditor();return true;";
+// TODO: version: 3.3.0
+// if(!calendar.params.disabled) {
+// onmouseover = "Element.removeClassName(this, 'rich-calendar-tool-btn-press');";
+// onmouseout = "Element.addClassName(this, 'rich-calendar-tool-btn-press');";
+// onclick = "Richfaces.getComponent('calendar',this).showTimeEditor();return true;";
+// }
+ var markup = new E('div', {'class': 'rich-calendar-tool-btn rich-calendar-tool-btn-hover rich-calendar-tool-btn-press', 'onclick': onclick,
+ 'onmouseover': + onmouseover ,
+ 'onmouseout' : + onmouseout}, [new ET(text)]);
return markup;
};
@@ -2170,15 +2191,50 @@
CalendarView.previousYearControl = CalendarView.getControl("<<", CalendarView.toolButtonAttributes, "prevYear");
CalendarView.nextMonthControl = CalendarView.getControl(">", CalendarView.toolButtonAttributes, "nextMonth");
CalendarView.previousMonthControl = CalendarView.getControl("<", CalendarView.toolButtonAttributes, "prevMonth");
-CalendarView.currentMonthControl = function (context) { return CalendarView.getControl(Richfaces.Calendar.formatDate(context.calendar.getCurrentDate(), "MMMM, yyyy", context.monthLabels, context.monthLabelsShort), CalendarView.toolButtonAttributes, "showDateEditor");};
-CalendarView.todayControl = function (context) { return (context.calendar.todayControlMode!='hidden' ? CalendarView.getControl(context.controlLabels.today, CalendarView.toolButtonAttributes, "today") : "");};
-CalendarView.selectedDateControl = function (context) { return CalendarView.getSelectedDateControl(context.calendar);};
-CalendarView.timeControl = function (context) { return CalendarView.getTimeControl(context.calendar);};
-CalendarView.closeControl = function (context) { return (context.calendar.params.popup ? CalendarView.getControl(context.controlLabels.close, CalendarView.toolButtonAttributes, "close", "false") : "");};
-CalendarView.applyControl = function (context) { return (context.calendar.showApplyButton ? CalendarView.getControl(context.controlLabels.apply, CalendarView.toolButtonAttributes, "close", "true") : "");};
-CalendarView.cleanControl = function (context) { return (context.calendar.selectedDate ? CalendarView.getControl(context.controlLabels.clean, CalendarView.toolButtonAttributes, "resetSelectedDate") : "");};
-CalendarView.timeEditorFields = function (context) { return context.calendar.timePatternHtml;};
+//TODO: version: 3.3.0
+//CalendarView.clearAttributesIfDisabled = function (calendar, attributes){
+// var disabled = calendar.params.disabled;
+// if (disabled && attributes) {
+// attributes.onmouseup = "";
+// attributes.onmousedown = "";
+// attributes.onmouseover = "";
+// attributes.onmouseout = "";
+// attributes.onclick = "";
+// }
+// return attributes;
+//}
+CalendarView.currentMonthControl = function (context) {
+// TODO: version: 3.3.0
+// var attributes = CalendarView.clearAttributesIfDisabled(context.calendar,CalendarView.toolButtonAttributes);
+ return CalendarView.getControl(Richfaces.Calendar.formatDate(context.calendar.getCurrentDate(), "MMMM, yyyy", context.monthLabels, context.monthLabelsShort), CalendarView.toolButtonAttributes, "showDateEditor");
+};
+CalendarView.todayControl = function (context) {
+// TODO: version: 3.3.0
+// var attributes = CalendarView.clearAttributesIfDisabled(context.calendar,CalendarView.toolButtonAttributes);
+ return (context.calendar.todayControlMode!='hidden' ? CalendarView.getControl(context.controlLabels.today, CalendarView.toolButtonAttributes, "today") : "");
+};
+
+CalendarView.closeControl = function (context) {
+// TODO: version: 3.3.0
+// var attributes = CalendarView.clearAttributesIfDisabled(context.calendar,CalendarView.toolButtonAttributes);
+ return (context.calendar.params.popup ? CalendarView.getControl(context.controlLabels.close, CalendarView.toolButtonAttributes, "close", "false") : "");
+};
+CalendarView.applyControl = function (context) {
+// TODO: version: 3.3.0
+// var attributes = CalendarView.clearAttributesIfDisabled(context.calendar,CalendarView.toolButtonAttributes);
+ return (context.calendar.showApplyButton ? CalendarView.getControl(context.controlLabels.apply, CalendarView.toolButtonAttributes, "close", "true") : "");
+};
+CalendarView.cleanControl = function (context) {
+// TODO: version: 3.3.0
+// var attributes = CalendarView.clearAttributesIfDisabled(context.calendar,CalendarView.toolButtonAttributes);
+ return (context.calendar.selectedDate ? CalendarView.getControl(context.controlLabels.clean, CalendarView.toolButtonAttributes, "resetSelectedDate") : "");
+};
+
+CalendarView.selectedDateControl = function (context) { return CalendarView.getSelectedDateControl(context.calendar);};
+CalendarView.timeControl = function (context) { return CalendarView.getTimeControl(context.calendar);};
+CalendarView.timeEditorFields = function (context) {return context.calendar.timePatternHtml;};
+
CalendarView.header = [
new E('table',{'border': '0', 'cellpadding': '0', 'cellspacing': '0', 'width': '100%'},
[
@@ -2302,8 +2358,28 @@
this.weekDayLabels=calendar.params.weekDayLabels;
this.weekDayLabelsShort=calendar.params.weekDayLabelsShort;
this.controlLabels=calendar.params.labels;
- },
-
+
+// TODO: remove onmouse over/up/out/down css classes and onclick listeners if component disabled (version 3.3.0)
+// if (this.nextYearControl) {
+// var attrs = this.nextYearControl.attrs;
+// CalendarView.clearAttributesIfDisabled(this.calendar, attrs);
+// }
+//
+// if (this.previousYearControl) {
+// var attrs = this.previousYearControl.attrs;
+// CalendarView.clearAttributesIfDisabled(this.calendar, attrs);
+// }
+//
+// if (this.previousMonthControl) {
+// var attrs = this.previousMonthControl.attrs;
+// CalendarView.clearAttributesIfDisabled(this.calendar, attrs);
+// }
+//
+// if (this.nextMonthControl) {
+// var attrs = this.nextMonthControl.attrs;
+// CalendarView.clearAttributesIfDisabled(this.calendar, attrs);
+// }
+ },
nextYearControl: CalendarView.nextYearControl,
previousYearControl: CalendarView.previousYearControl,
nextMonthControl: CalendarView.nextMonthControl,
16 years, 5 months
JBoss Rich Faces SVN: r9908 - trunk/test-applications/facelets/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-08-05 05:03:55 -0400 (Tue, 05 Aug 2008)
New Revision: 9908
Modified:
trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml
Log:
Modified: trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml 2008-08-05 09:03:27 UTC (rev 9907)
+++ trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml 2008-08-05 09:03:55 UTC (rev 9908)
@@ -18,7 +18,7 @@
<h:panelGrid columns="2" cellpadding="5px" cellspacing="5px">
<h:commandLink value="RichFaces" action="RichFaces"></h:commandLink>
<h:commandLink value="Div" action="TestDiv"></h:commandLink>
- <h:commandLink value="Select" action="Map"></h:commandLink>
+ <h:commandLink value="Select" action="Map" disabled="true"></h:commandLink>
<h:commandLink value="Customize page" action="CustomizePage"></h:commandLink>
<h:commandLink value="RichPanels" action="RichPanels"></h:commandLink>
</h:panelGrid>
16 years, 5 months
JBoss Rich Faces SVN: r9907 - in trunk/test-applications/jsp/src/main/webapp/pages: Select and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-08-05 05:03:27 -0400 (Tue, 05 Aug 2008)
New Revision: 9907
Modified:
trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp
trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp
trunk/test-applications/jsp/src/main/webapp/pages/main.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp 2008-08-05 08:46:31 UTC (rev 9906)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Select/Map.jsp 2008-08-05 09:03:27 UTC (rev 9907)
@@ -1,53 +1,78 @@
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
+<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
+<%@page contentType="text/html; charset=UTF-8" %>
+
+<html>
<f:view>
-<html>
-<head>
-<title></title>
- <script type="text/javascript">
- function showEvent(elementID, value) {
- var oldObject = window.document.getElementById(elementID);
- var newObject = window.document.createElement('input');
- newObject.type = "text";
- newObject.size = oldObject.size;
- newObject.value = value;
- newObject.id = oldObject.id;
- //if(oldObject.size) newObject.size = oldObject.size;
- //if(oldObject.value) newObject.value = value;
- //if(oldObject.id) newObject.id = oldObject.id;
- //if(oldObject.name) newObject.name = oldObject.name;
- //if(oldObject.className) newObject.className = oldObject.className;
- oldObject.parentNode.replaceChild(newObject,oldObject);
- }
- </script>
-<link rel="stylesheet" href="<%=request.getContextPath()%>/styles/styles.css" type="text/css" />
-</head>
-<body>
- <jsp:include page="/pages/RichMenu/RichMenu.jsp" />
- <div id="divID" style="position: absolute; top:60px; left: 10px; z-index: 1">
+ <head>
+ <f:loadBundle basename="message" var="msg"/>
+ <title></title>
+
+ <script type="text/javascript">
+ function showEvent(elementID, value) {
+ var oldObject = window.document.getElementById(elementID);
+ if (oldObject == null) return;
+ var newObject = window.document.createElement('input');
+ if (oldObject.type) newObject.type = oldObject.type;
+ if (oldObject.size) newObject.size = oldObject.size;
+ if (oldObject.value) newObject.value = value;
+ if (oldObject.id) newObject.id = oldObject.id;
+ oldObject.parentNode.replaceChild(newObject, oldObject);
+ }
+ </script>
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/styles/styles.css" type="text/css"/>
+ </head>
+ <body>
+ <h:form id="formID">
+ <div id="divOpthID" align="right" style="z-index: 200">
+ <jsp:include page="/pages/RichMenu/RichMenu.jsp"/>
+ </div>
+ <div id="divID" style="position: absolute; top:60px; left: 10px; z-index: -1">
<jsp:include page="SelectOneMenuPage.jsp" />
</div>
- <div id="divID" style="position: absolute; top:60px; left: 10px; z-index: 1">
- <jsp:include page="${richBean.pathComponent}" />
- </div>
- <h:form>
- <jsp:include page="${richBean.pathStraightforward}" />
- <jsp:include page="${richBean.pathProperty}" />
+ <rich:messages id="richMessagesID" ajaxRendered="true" showSummary="true">
+ <f:facet name="errorMarker">
+ <h:graphicImage url="/pics/error.gif" />
+ </f:facet>
+
+ <f:facet name="fatalMarker">
+ <h:graphicImage url="/pics/fatal.gif" />
+ </f:facet>
+
+ <f:facet name="infoMarker">
+ <h:graphicImage url="/pics/info.gif" />
+ </f:facet>
+
+ <f:facet name="warnMarker">
+ <h:graphicImage url="/pics/warn.gif" />
+ </f:facet>
+
+ <f:facet name="passedMarker">
+ <h:graphicImage url="/pics/passed.gif" />
+ </f:facet>
+ </rich:messages>
+ <h:messages id="hMessagesID" showDetail="true" showSummary="true"></h:messages>
+
+ <h:panelGrid id="richGridID" columns="1" width="100%" rendered="true">
+ <h:panelGroup rendered="#{option.reComponent}">
+ <jsp:include page="${richBean.pathComponent}"/>
+ </h:panelGroup>
+ <a4j:log popup="false" rendered="#{option.log}"></a4j:log>
+ <h:panelGroup rendered="#{option.reStraightforward}">
+ <jsp:include page="${richBean.pathStraightforward}"/>
+ </h:panelGroup>
+
+ <h:panelGroup rendered="#{option.reProperty}">
+ <jsp:include page="${richBean.pathProperty}"/>
+ </h:panelGroup>
+ </h:panelGrid>
+ </h:form>
+ <h:form id="infoFormID">
+ <jsp:include page="/pages/Info/Info.jsp"/>
</h:form>
- <rich:modalPanel id="eventInfoID" minHeight="550" minWidth="200" moveable="true" resizeable="true" style="overflow: true;">
- <f:facet name="header">
- <h:outputText value="Events ..." />
- </f:facet>
- <f:facet name="controls">
- <h:graphicImage value="/pics/error.gif" onclick="Richfaces.hideModalPanel('eventInfoID');"/>
- </f:facet>
-
- <jsp:include page="/pages/Action/EventInfo.jsp" />
-
- </rich:modalPanel>
- <a4j:commandButton value="Show event" onclick="Richfaces.showModalPanel('eventInfoID');return false;"></a4j:commandButton>
-</body>
+ </body>
+</f:view>
</html>
-</f:view>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp 2008-08-05 08:46:31 UTC (rev 9906)
+++ trunk/test-applications/jsp/src/main/webapp/pages/Select/SelectOneMenuPage.jsp 2008-08-05 09:03:27 UTC (rev 9907)
@@ -4,7 +4,7 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<f:subview id="selectOneMenuPage">
- <h:panelGrid columns="7" cellpadding="20px" cellspacing="30px">
+ <h:panelGrid columns="7" cellpadding="0px" cellspacing="0px">
<h:selectOneMenu value="selectItem" >
<f:selectItem itemLabel="selectItem" itemValue="test" />
</h:selectOneMenu>
Modified: trunk/test-applications/jsp/src/main/webapp/pages/main.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/main.jsp 2008-08-05 08:46:31 UTC (rev 9906)
+++ trunk/test-applications/jsp/src/main/webapp/pages/main.jsp 2008-08-05 09:03:27 UTC (rev 9907)
@@ -20,7 +20,7 @@
<h:panelGrid columns="2" cellpadding="5px" cellspacing="5px">
<h:commandLink value="RichFaces" action="RichFaces"></h:commandLink>
<h:commandLink value="Div" action="TestDiv"></h:commandLink>
- <h:commandLink value="Select" action="Map"></h:commandLink>
+ <h:commandLink value="Select" action="Map" disabled="true"></h:commandLink>
<h:commandLink value="Customize page" action="CustomizePage"></h:commandLink>
</h:panelGrid>
</rich:panel>
16 years, 5 months
JBoss Rich Faces SVN: r9906 - in trunk/sandbox/samples/extendedDataTable-sample/src/main: java/org/richfaces/samples/extdt/beans and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-08-05 04:46:31 -0400 (Tue, 05 Aug 2008)
New Revision: 9906
Added:
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java
trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/stateTestPage.jsp
Modified:
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages.properties
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableBB.java
trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java
trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
Log:
Improving extended data table's developer's demo
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages.properties
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages.properties 2008-08-04 23:37:51 UTC (rev 9905)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages.properties 2008-08-05 08:46:31 UTC (rev 9906)
@@ -3,3 +3,14 @@
patient.id=Id
patient.lastName=Last name
patient.admissionDate=Admission date
+table.width=Width
+table.height=Height
+table.update=Update values
+table.sortMode=Sort mode
+table.selectionMode=Selection mode
+table.patientsNumber=Number of patients
+table.testComponentState=Test component state
+table.back=Back
+demo.testPageTitle=Component state test page
+table.paginated=Enable paginator
+table.rowsNumber=Number of rows
Added: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties (rev 0)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/i18n/messages_pl.properties 2008-08-05 08:46:31 UTC (rev 9906)
@@ -0,0 +1,5 @@
+demo.title=Extended data table demonstration
+patient.firstName=First name
+patient.id=Id
+patient.lastName=Last name
+patient.admissionDate=Admission date
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableBB.java
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableBB.java 2008-08-04 23:37:51 UTC (rev 9905)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableBB.java 2008-08-05 08:46:31 UTC (rev 9906)
@@ -26,13 +26,14 @@
private Comparator<DemoPatient> dateComparator;
private String tableState = null;
private ExtendedTableDataModel<DemoPatient> dataModel;
+ private Integer patientsNumber = 100;
public ExtendedDataTableBB() {
}
public ExtendedTableDataModel<DemoPatient> getDataModel(){
if (dataModel == null){
- dataModel = new ExtendedTableDataModel<DemoPatient>(new DemoPatientProvider());
+ dataModel = new ExtendedTableDataModel<DemoPatient>(new DemoPatientProvider(patientsNumber));
}
return dataModel;
}
@@ -55,6 +56,17 @@
return null;
}
+ public Integer getPatientsNumber() {
+ return patientsNumber;
+ }
+
+ public void setPatientsNumber(Integer patientsNumber) {
+ if (patientsNumber != this.patientsNumber) {
+ dataModel = new ExtendedTableDataModel<DemoPatient>(new DemoPatientProvider(patientsNumber));
+ }
+ this.patientsNumber = patientsNumber;
+ }
+
public List<DemoPatient> getSelectedItems() {
if (selectedItems == null){
selectedItems = new ArrayList<DemoPatient>();
Added: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java (rev 0)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/beans/ExtendedDataTableControlBean.java 2008-08-05 08:46:31 UTC (rev 9906)
@@ -0,0 +1,94 @@
+package org.richfaces.samples.extdt.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+public class ExtendedDataTableControlBean {
+
+ String width = "500px";
+ String height = "500px";
+ List<SelectItem> sortModeSelectItems = new ArrayList<SelectItem>();
+ List<SelectItem> selectionModeSelectItems = new ArrayList<SelectItem>();
+ String sortMode;
+ String selectionMode;
+ Integer rowsNumber;
+ boolean paginated = false;
+
+ public ExtendedDataTableControlBean() {
+ sortModeSelectItems.add(new SelectItem("single", "single"));
+ sortModeSelectItems.add(new SelectItem("multi", "multi"));
+ selectionModeSelectItems.add(new SelectItem("single", "single"));
+ selectionModeSelectItems.add(new SelectItem("multi", "multi"));
+ selectionModeSelectItems.add(new SelectItem("none", "none"));
+ }
+
+ public boolean isPaginated() {
+ return paginated;
+ }
+
+ public void setPaginated(boolean paginated) {
+ this.paginated = paginated;
+ }
+
+ public Integer getRowsNumber() {
+ return rowsNumber;
+ }
+
+ public void setRowsNumber(Integer rowsNumber) {
+ this.rowsNumber = rowsNumber;
+ }
+
+ public List<SelectItem> getSelectionModeSelectItems() {
+ return selectionModeSelectItems;
+ }
+
+ public void setSelectionModeSelectItems(
+ List<SelectItem> selectionModeSelectItems) {
+ this.selectionModeSelectItems = selectionModeSelectItems;
+ }
+
+
+
+ public List<SelectItem> getSortModeSelectItems() {
+ return sortModeSelectItems;
+ }
+
+ public void setSortModeSelectItems(List<SelectItem> sortModeSelectItems) {
+ this.sortModeSelectItems = sortModeSelectItems;
+ }
+
+ public String getSortMode() {
+ return sortMode;
+ }
+
+ public void setSortMode(String sortMode) {
+ this.sortMode = sortMode;
+ }
+
+ public String getSelectionMode() {
+ return selectionMode;
+ }
+
+ public void setSelectionMode(String selectionMode) {
+ this.selectionMode = selectionMode;
+ }
+
+ public String getWidth() {
+ return width;
+ }
+
+ public void setWidth(String width) {
+ this.width = width;
+ }
+
+ public String getHeight() {
+ return height;
+ }
+
+ public void setHeight(String height) {
+ this.height = height;
+ }
+
+}
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java 2008-08-04 23:37:51 UTC (rev 9905)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/java/org/richfaces/samples/extdt/model/impl/DemoPatientProvider.java 2008-08-05 08:46:31 UTC (rev 9906)
@@ -42,13 +42,15 @@
};
private List<DemoPatient> items;
+ private Integer itemsNumber;
private Random random = new Random();
private long now = new Date().getTime();
- public DemoPatientProvider() {
+ public DemoPatientProvider(Integer itemsNumber) {
super();
+ this.itemsNumber = itemsNumber;
}
private Date generateRandomDate(){
@@ -80,7 +82,7 @@
protected List<DemoPatient> getItems() {
if (items == null){
- int l = 100;
+ int l = itemsNumber;
items = new ArrayList<DemoPatient>(l);
for (int i=0;i<l;i++) {
items.add(new DemoPatient(i,
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-08-04 23:37:51 UTC (rev 9905)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-08-05 08:46:31 UTC (rev 9906)
@@ -1,2 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<PROCESS model-entity="JSFProcess"/>
+<PROCESS model-entity="JSFProcess">
+ <PROCESS-ITEM NAME="rules:*" PATH="*" SHAPE="32,17,0,0" model-entity="JSFProcessGroup">
+ <PROCESS-ITEM ID="rules:*:0" NAME="item" PATH="*" model-entity="JSFProcessItem">
+ <PROCESS-ITEM-OUTPUT ID="stateTest::#pages#stateTestPage.jsp"
+ NAME="output" PATH="/pages/stateTestPage.jsp"
+ TARGET="rules:#pages#stateTestPage.jsp" TITLE="stateTest" model-entity="JSFProcessItemOutput"/>
+ <PROCESS-ITEM-OUTPUT ID="index::#pages#index.jsp" NAME="output1"
+ PATH="/pages/index.jsp" TARGET="rules:#pages#index.jsp"
+ TITLE="index" model-entity="JSFProcessItemOutput"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+ <PROCESS-ITEM NAME="rules:#pages#stateTestPage.jsp"
+ PATH="/pages/stateTestPage.jsp" SHAPE="32,465,0,0" model-entity="JSFProcessGroup"/>
+ <PROCESS-ITEM NAME="rules:#pages#index.jsp" PATH="/pages/index.jsp"
+ SHAPE="32,577,0,0" model-entity="JSFProcessGroup"/>
+</PROCESS>
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-08-04 23:37:51 UTC (rev 9905)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-08-05 08:46:31 UTC (rev 9906)
@@ -1,21 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
- <managed-bean>
- <managed-bean-name>extendedDataTableBean</managed-bean-name>
- <managed-bean-class>org.richfaces.samples.extdt.beans.ExtendedDataTableBB</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
- <application>
- <locale-config>
- <default-locale>pl</default-locale>
- <supported-locale>de</supported-locale>
- <supported-locale>en</supported-locale>
- </locale-config>
- <resource-bundle>
- <base-name>i18n.messages</base-name>
- <var>msg</var>
- </resource-bundle>
- </application>
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <managed-bean-name>extendedDataTableBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.samples.extdt.beans.ExtendedDataTableBB</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>extendedDataTableControlBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.samples.extdt.beans.ExtendedDataTableControlBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+ <display-name>all</display-name>
+ <from-view-id>*</from-view-id>
+ <navigation-case>
+ <from-outcome>stateTest</from-outcome>
+ <to-view-id>/pages/stateTestPage.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>index</from-outcome>
+ <to-view-id>/pages/index.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <locale-config>
+ <default-locale>pl</default-locale>
+ <supported-locale>de</supported-locale>
+ <supported-locale>en</supported-locale>
+ </locale-config>
+ <resource-bundle>
+ <base-name>i18n.messages</base-name>
+ <var>msg</var>
+ </resource-bundle>
+ </application>
</faces-config>
Modified: trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-08-04 23:37:51 UTC (rev 9905)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-08-05 08:46:31 UTC (rev 9906)
@@ -11,19 +11,49 @@
<h:outputText value="#{msg['demo.title']}">
</h:outputText>
</title>
+ <style type="text/css">
+
+ .leftColumn {
+ width: 50%;
+ height: 100%;
+ }
+
+ .rightColumn {
+ width: 50%;
+ height: 100%;
+ }
+
+ #mainPanel {
+ width: 100%;
+ height: 100%;
+ }
+
+ #leftPanel {
+ width: 100%;
+ height: 100%;
+ }
+
+ #rightPanel {
+ width: 100%;
+ height: 100%;
+ }
+ </style>
</head>
<body>
+ <h:panelGrid columns="2" id="mainPanel" columnClasses="leftColumn, rightColumn">
+ <rich:panel id="leftPanel">
<h:form>
<extdt:extendedDataTable id="demoTable"
value="#{extendedDataTableBean.dataModel}"
var="patient"
- width="500px"
- height="500px"
+ rows="#{extendedDataTableControlBean.rowsNumber}"
+ width="#{extendedDataTableControlBean.width}"
+ height="#{extendedDataTableControlBean.height}"
selectedClass="dataTableSelectedRow"
footerClass="demo-footer"
- sortMode="single"
- selectionMode="multi"
+ sortMode="#{extendedDataTableControlBean.sortMode}"
+ selectionMode="#{extendedDataTableControlBean.selectionMode}"
selection="#{extendedDataTableBean.selection}"
rowKeyVar="rkvar"
tableState="#{extendedDataTableBean.tableState}">
@@ -65,7 +95,62 @@
<h:outputText value="#{patient.admissionDate}" />
</rich:column>
</extdt:extendedDataTable>
+ <rich:datascroller
+ style="width: #{extendedDataTableControlBean.width}"
+ rendered="#{extendedDataTableControlBean.paginated}"
+ for="demoTable">
+ </rich:datascroller>
</h:form>
+ </rich:panel>
+ <rich:panel id="rightPanel">
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputLabel value="#{msg['table.width']}" for="tableWidthInput" />
+ <h:inputText
+ id="tableWidthInput"
+ value="#{extendedDataTableControlBean.width}" />
+ <h:outputLabel value="#{msg['table.height']}" for="tableHeightInput" />
+ <h:inputText
+ id="tableHeightInput"
+ value="#{extendedDataTableControlBean.height}" />
+ <h:outputLabel value="#{msg['table.patientsNumber']}" for="tablePatientsNumberInput" />
+ <h:inputText
+ id="tablePatientsNumberInput"
+ value="#{extendedDataTableBean.patientsNumber}" />
+ <h:outputLabel value="#{msg['table.sortMode']}" for="tableSortModeSelect" />
+ <h:selectOneMenu
+ id="tableSortModeSelect"
+ value="#{extendedDataTableControlBean.sortMode}"
+ >
+ <f:selectItems value="#{extendedDataTableControlBean.sortModeSelectItems}"/>
+ </h:selectOneMenu>
+ <h:outputLabel value="#{msg['table.selectionMode']}" for="tableSelectionModeSelect" />
+ <h:selectOneMenu
+ id="tableSelectionModeSelect"
+ value="#{extendedDataTableControlBean.selectionMode}"
+ >
+ <f:selectItems value="#{extendedDataTableControlBean.selectionModeSelectItems}"/>
+ </h:selectOneMenu>
+ <h:outputLabel value="#{msg['table.paginated']}" for="paginatedChecxbox" />
+ <h:selectBooleanCheckbox
+ id="paginatedCheckbox"
+ value="#{extendedDataTableControlBean.paginated}" />
+ <h:outputLabel value="#{msg['table.rowsNumber']}" for="tableRowsNumberInput" />
+ <h:inputText
+ id="tableRowsNumberInput"
+ value="#{extendedDataTableControlBean.rowsNumber}" />
+ </h:panelGrid>
+ <a4j:commandButton value="#{msg['table.update']}" reRender="mainPanel">
+ </a4j:commandButton>
+ <a4j:commandButton value="#{msg['table.testComponentState']}"
+ action="stateTest"
+ >
+ </a4j:commandButton>
+ <rich:messages>
+ </rich:messages>
+ </h:form>
+ </rich:panel>
+ </h:panelGrid>
</body>
</html>
</f:view>
\ No newline at end of file
Added: trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/stateTestPage.jsp
===================================================================
--- trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/stateTestPage.jsp (rev 0)
+++ trunk/sandbox/samples/extendedDataTable-sample/src/main/webapp/pages/stateTestPage.jsp 2008-08-05 08:46:31 UTC (rev 9906)
@@ -0,0 +1,24 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<f:view>
+ <html>
+ <head>
+ <title>
+ <h:outputText value="#{msg['demo.testPageTitle']}">
+ </h:outputText>
+ </title>
+
+ </head>
+
+<body>
+ <h:form>
+ <a4j:commandButton value="#{msg['table.back']}"
+ action="index"
+ >
+ </a4j:commandButton>
+ </h:form>
+</body>
+</html>
+</f:view>
\ No newline at end of file
16 years, 5 months
JBoss Rich Faces SVN: r9905 - in trunk: samples/beanValidatorSample/src/main/java/org/richfaces and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-08-04 19:37:51 -0400 (Mon, 04 Aug 2008)
New Revision: 9905
Added:
trunk/samples/seamEAR/ejbs/src/main/resources/seamEAR-ds.xml
trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorHandler.java
trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorTag.java
Removed:
trunk/samples/seamEAR/ear/src/main/application/META-INF/seamEAR-ds.xml
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/LengthBean.java
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinBean.java
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinMaxBean.java
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotEmptyBean.java
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotNullBean.java
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/Validable.java
trunk/samples/beanValidatorSample/src/main/webapp/pages/index.jsp
trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml
trunk/samples/seamEAR/ejbs/src/main/java/org/richfaces/seam/StatelessBean.java
trunk/samples/seamEAR/projects/logging/src/main/java/org/richfaces/demo/Log.java
trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorHandler.java
trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorTagBase.java
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java
Log:
https://jira.jboss.org/jira/browse/RF-3547 Implement "summary" attribute for an bean/ajavValidator.
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/validatorTag.vm 2008-08-04 23:37:51 UTC (rev 9905)
@@ -8,12 +8,11 @@
import $import ;
#end
import javax.faces.component.UIComponent;
-import javax.faces.webapp.UIComponentTag;
import javax.faces.validator.Validator;
import org.apache.commons.beanutils.ConvertUtils;
import javax.faces.context.FacesContext;
import javax.servlet.jsp.JspException;
-import javax.faces.el.ValueBinding;
+import javax.el.ValueExpression;
import ${validator.classname};
public class $tag.simpleClassName extends $tag.superclass {
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/LengthBean.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/LengthBean.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/LengthBean.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -51,8 +51,15 @@
}
public String getIntDescription() {
- // TODO Auto-generated method stub
return "Integer Value, no restrictions";
}
+ public String getIntSummary() {
+ return "Invalid user name";
+ }
+
+ public String getTextSummary() {
+ return "Invalid user name";
+ }
+
}
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -59,4 +59,14 @@
return "Integer Value, less then 10";
}
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid number of items";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid payment card";
+ }
+
}
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinBean.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinBean.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinBean.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -56,4 +56,14 @@
return "Integer Value, more then 1";
}
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid rooms qty";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinMaxBean.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinMaxBean.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MinMaxBean.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -58,4 +58,14 @@
return "Integer Value, valid values from 2 to 10";
}
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid price";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotEmptyBean.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotEmptyBean.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotEmptyBean.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -54,4 +54,14 @@
return "Integer Value, no restrictions";
}
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid password";
+ }
+
}
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotNullBean.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotNullBean.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/NotNullBean.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -53,4 +53,14 @@
return "Integer Value, no restrictions";
}
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid address";
+ }
+
}
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/Validable.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/Validable.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/Validable.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -13,7 +13,9 @@
public String getTextDescription();
+ public String getTextSummary();
+
public int getIntValue();
- public String getIntDescription();
+ public String getIntSummary();
}
Modified: trunk/samples/beanValidatorSample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/beanValidatorSample/src/main/webapp/pages/index.jsp 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/webapp/pages/index.jsp 2008-08-04 23:37:51 UTC (rev 9905)
@@ -59,6 +59,46 @@
</rich:dataTable>
</v:graphValidator>
</h:form>
+ <h:form id="form2">
+ <h2>Input fields with label and message in the JSF dataTable.
+ Same as above, but fields validated by form submit only.</h2>
+
+ <rich:dataTable value="#{data.beans}" var="bean" id="table2">
+ <f:facet name="header">
+ <h:outputText
+ value="Validate values in the data table." />
+ </f:facet>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="text field" />
+ </f:facet>
+ <h:outputLabel for="text" value="#{bean.textDescription}" />
+ <h:inputText id="text" value="#{bean.text}">
+ <v:beanValidator summary="#{bean.textSummary}"/>
+ </h:inputText>
+ <rich:message for="text" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="integer field" />
+ </f:facet>
+ <h:outputLabel for="intValue" value="#{bean.intDescription}" />
+ <h:inputText id="intValue" value="#{bean.intValue}">
+ <v:beanValidator summary="#{bean.intSummary}"/>
+ </h:inputText>
+ <rich:message for="intValue" />
+ </h:column>
+ <f:facet name="footer">
+ <h:panelGroup>
+ <h:outputText></h:outputText>
+ <h:commandButton value="Submit all fields"></h:commandButton>
+ </h:panelGroup>
+ </f:facet>
+ </rich:dataTable>
+
+ </h:form>
+
<rich:messages />
</f:view>
</body>
Modified: trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/beanValidatorSample/src/main/webapp/pages/index.xhtml 2008-08-04 23:37:51 UTC (rev 9905)
@@ -1,13 +1,12 @@
<!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:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
- xmlns:c="http://java.sun.com/jsp/jstl/core"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:v="http://labs.jboss.com/jbossrichfaces/ui/beanValidator"
- >
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:v="http://labs.jboss.com/jbossrichfaces/ui/beanValidator">
<head>
<title>Hibernate validator test</title>
</head>
@@ -15,32 +14,74 @@
<h1>Using Hibernate validator annotations in the JSF beans</h1>
<f:view>
<h:form id="form">
- <rich:panel>
- <f:facet name="header">
- <h:outputText>Single input field with label and message. Validated by AJAX on every char.</h:outputText>
- </f:facet>
- <h:outputLabel for="ltext" value="#{lengthBean.textDescription}" />
- <h:inputText id="ltext" value="#{lengthBean.text}">
- <v:ajaxValidator event="onkeyup" />
- </h:inputText>
- <rich:message for="ltext" showDetail="true" showSummary="true" />
- </rich:panel>
- <h2>Input fields with label and message in the JSF dataTable. Each field validated by AJAX on 'onblur' event</h2>
- <v:graphValidator value="#{data}" >
- <rich:dataTable value="#{data.beans}" var="bean" id="table">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText>Single input field with label and message. Validated by AJAX on every char.</h:outputText>
+ </f:facet>
+ <h:outputLabel for="ltext" value="#{lengthBean.textDescription}" />
+ <h:inputText id="ltext" value="#{lengthBean.text}">
+ <v:ajaxValidator event="onkeyup" summary="Invalid Id"/>
+ </h:inputText>
+ <rich:message for="ltext" showDetail="true" showSummary="true" />
+ </rich:panel>
+ <h2>Input fields with label and message in the JSF dataTable.
+ Each field validated by AJAX on 'onblur' event</h2>
+ <v:graphValidator value="#{data}">
+ <rich:dataTable value="#{data.beans}" var="bean" id="table">
<f:facet name="header">
- <h:outputText value="Validate values in the data table. Total sum for an all integer values validated for a value less then 20" />
+ <h:outputText
+ value="Validate values in the data table. Total sum for an all integer values validated for a value less then 20" />
</f:facet>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="text field" />
+ </f:facet>
+ <h:outputLabel for="text" value="#{bean.textDescription}" />
+ <h:inputText id="text" value="#{bean.text}">
+ <v:ajaxValidator event="onblur"
+ ajaxListener="#{data.ajaxListener}" summary="#{bean.textSummary}"/>
+ </h:inputText>
+ <rich:message for="text" showDetail="true" showSummary="true" />
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="integer field" />
+ </f:facet>
+ <h:outputLabel for="intValue" value="#{bean.intDescription}" />
+ <h:inputText id="intValue" value="#{bean.intValue}">
+ <v:ajaxValidator event="onblur" summary="#{bean.intSummary}"/>
+ </h:inputText>
+ <rich:message for="intValue" showDetail="true" showSummary="true" />
+ </h:column>
+ <f:facet name="footer">
+ <h:panelGroup>
+ <h:outputText>in addition to fields validation, total sum for an all integer values validated for a value less then 20.</h:outputText>
+ <h:commandButton value="Submit all fields"></h:commandButton>
+ </h:panelGroup>
+ </f:facet>
+ </rich:dataTable>
+ </v:graphValidator>
+ </h:form>
+ <h:form id="form2">
+ <h2>Input fields with label and message in the JSF dataTable.
+ Same as above, but fields validated by form submit only.</h2>
+
+ <rich:dataTable value="#{data.beans}" var="bean" id="table2">
+ <f:facet name="header">
+ <h:outputText
+ value="Validate values in the data table." />
+ </f:facet>
+
<h:column>
<f:facet name="header">
<h:outputText value="text field" />
</f:facet>
<h:outputLabel for="text" value="#{bean.textDescription}" />
<h:inputText id="text" value="#{bean.text}">
- <v:ajaxValidator event="onblur" ajaxListener="#{data.ajaxListener}" />
+ <v:beanValidator summary="Invalid text"/>
</h:inputText>
- <rich:message for="text" showDetail="true" showSummary="true" />
+ <rich:message for="text" />
</h:column>
<h:column>
<f:facet name="header">
@@ -48,20 +89,20 @@
</f:facet>
<h:outputLabel for="intValue" value="#{bean.intDescription}" />
<h:inputText id="intValue" value="#{bean.intValue}">
- <v:ajaxValidator event="onblur" />
+ <v:beanValidator summary="Invalid number"/>
</h:inputText>
- <rich:message for="intValue" showDetail="true" showSummary="true" />
+ <rich:message for="intValue" />
</h:column>
<f:facet name="footer">
<h:panelGroup>
- <h:outputText>in addition to fields validation, total sum for an all integer values validated for a value less then 20.</h:outputText>
- <h:commandButton value="Submit all fields"></h:commandButton>
+ <h:outputText></h:outputText>
+ <h:commandButton value="Submit all fields"></h:commandButton>
</h:panelGroup>
</f:facet>
</rich:dataTable>
- </v:graphValidator>
+
</h:form>
- <rich:messages />
+ <rich:messages />
</f:view>
</body>
</html>
Deleted: trunk/samples/seamEAR/ear/src/main/application/META-INF/seamEAR-ds.xml
===================================================================
--- trunk/samples/seamEAR/ear/src/main/application/META-INF/seamEAR-ds.xml 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/seamEAR/ear/src/main/application/META-INF/seamEAR-ds.xml 2008-08-04 23:37:51 UTC (rev 9905)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE datasources
- PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
-
-<datasources>
-
- <local-tx-datasource>
- <jndi-name>seamEARDatasource</jndi-name>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- <password></password>
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
- <metadata>
- <type-mapping>Hypersonic SQL</type-mapping>
- </metadata>
-<!--
- <exception-sorter-class-name>
- org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
- </exception-sorter-class-name>
- <metadata>
- <type-mapping>mySQL</type-mapping>
- </metadata>
--->
- </local-tx-datasource>
-
-</datasources>
-
Modified: trunk/samples/seamEAR/ejbs/src/main/java/org/richfaces/seam/StatelessBean.java
===================================================================
--- trunk/samples/seamEAR/ejbs/src/main/java/org/richfaces/seam/StatelessBean.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/seamEAR/ejbs/src/main/java/org/richfaces/seam/StatelessBean.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -3,15 +3,22 @@
*/
package org.richfaces.seam;
-import javax.ejb.Stateless;
-import org.jboss.seam.annotations.Name;
-
/**
* @author asmirnov
*
*/
public class StatelessBean {
+
+ private String text;
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
}
Copied: trunk/samples/seamEAR/ejbs/src/main/resources/seamEAR-ds.xml (from rev 9818, trunk/samples/seamEAR/ear/src/main/application/META-INF/seamEAR-ds.xml)
===================================================================
--- trunk/samples/seamEAR/ejbs/src/main/resources/seamEAR-ds.xml (rev 0)
+++ trunk/samples/seamEAR/ejbs/src/main/resources/seamEAR-ds.xml 2008-08-04 23:37:51 UTC (rev 9905)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE datasources
+ PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+
+<datasources>
+
+ <local-tx-datasource>
+ <jndi-name>seamEARDatasource</jndi-name>
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>Hypersonic SQL</type-mapping>
+ </metadata>
+<!--
+ <exception-sorter-class-name>
+ org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+ </exception-sorter-class-name>
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+-->
+ </local-tx-datasource>
+
+</datasources>
+
Property changes on: trunk/samples/seamEAR/ejbs/src/main/resources/seamEAR-ds.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author
Modified: trunk/samples/seamEAR/projects/logging/src/main/java/org/richfaces/demo/Log.java
===================================================================
--- trunk/samples/seamEAR/projects/logging/src/main/java/org/richfaces/demo/Log.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/samples/seamEAR/projects/logging/src/main/java/org/richfaces/demo/Log.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -1,5 +1,29 @@
package org.richfaces.demo;
+/**
+ * @author asmirnov
+ *
+ */
public class Log {
+ /**
+ * @param message
+ */
+ public void debug(String message) {
+
+ }
+
+ /**
+ * @param message
+ */
+ public void info(String message) {
+
+ }
+
+ /**
+ * @param message
+ */
+ public void error(String message) {
+
+ }
}
Modified: trunk/ui/beanValidator/src/main/config/component/beanValidator.xml
===================================================================
--- trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/ui/beanValidator/src/main/config/component/beanValidator.xml 2008-08-04 23:37:51 UTC (rev 9905)
@@ -35,6 +35,13 @@
</description>
<defaultvalue><![CDATA["onblur"]]></defaultvalue>
</property>
+ <property exist="true" existintag="true">
+ <name>summary</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Summary message for a validation errors.
+ </description>
+ </property>
<property>
<name>onsubmit</name>
<classname>java.lang.String</classname>
@@ -97,10 +104,19 @@
<description>
<![CDATA[Validate Input by the Bean/Hibernate validator annotations]]>
</description>
- <tag>
+ <tag generate="false">
<name>beanValidator</name>
<classname>org.richfaces.taglib.BeanValidatorTag</classname>
- <superclass>javax.faces.webapp.ValidatorELTag</superclass>
</tag>
+ <taghandler>
+ <classname>org.richfaces.taglib.BeanValidatorHandler</classname>
+ </taghandler>
+ <property exist="true">
+ <name>summary</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Summary message for a validation errors.
+ </description>
+ </property>
</validator>
</components>
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorHandler.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorHandler.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorHandler.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -43,6 +43,7 @@
}
private TagAttribute _event;
+ private TagAttribute _summary;
private AjaxComponentHandler _validatorHandler;
/**
@@ -51,6 +52,7 @@
public AjaxValidatorHandler(ComponentConfig config) {
super(config);
_event = getAttribute("event");
+ _summary = getAttribute("summary");
_validatorHandler = new AjaxComponentHandler(config);
}
@@ -73,6 +75,9 @@
FacesBeanValidator validator = (FacesBeanValidator) facesContext
.getApplication().createValidator(
FacesBeanValidator.BEAN_VALIDATOR_TYPE);
+ if (null != _summary) {
+ validator.setSummary(_summary.getValueExpression(ctx, String.class));
+ }
((EditableValueHolder) parent).addValidator(validator);
}
if (null != this._event) {
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorTagBase.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorTagBase.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/AjaxValidatorTagBase.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -3,6 +3,7 @@
*/
package org.richfaces.taglib;
+import javax.el.ValueExpression;
import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -16,16 +17,20 @@
/**
* @author asmirnov
- *
+ *
*/
public class AjaxValidatorTagBase extends UIComponentTagBase {
- /**
- * Generate script for given event ( onclick, onenter ... )
- */
- private String event = null;
+ /**
+ * Generate script for given event ( onclick, onenter ... )
+ */
+ private String event = null;
- /* (non-Javadoc)
+ private ValueExpression summary = null;
+
+ /*
+ * (non-Javadoc)
+ *
* @see javax.faces.webapp.UIComponentTagBase#getComponentType()
*/
@Override
@@ -34,54 +39,72 @@
}
/**
- * @param event the event to set
+ * @param event
+ * the event to set
*/
public void setEvent(String event) {
this.event = event;
}
-
+
+ /**
+ * @param summary
+ * the summary to set
+ */
+ public void setSummary(ValueExpression summary) {
+ this.summary = summary;
+ }
+
@Override
public int doStartTag() throws JspException {
- // Locate our parent UIComponentTag
- UIComponentClassicTagBase tag =
- UIComponentClassicTagBase.getParentUIComponentClassicTagBase(pageContext);
- if (tag == null) {
- //PENDING i18n
- throw new JspException("Not nested in a UIComponentTag Error for tag with handler class:"+
- this.getClass().getName());
- }
+ // Locate our parent UIComponentTag
+ UIComponentClassicTagBase tag = UIComponentClassicTagBase
+ .getParentUIComponentClassicTagBase(pageContext);
+ if (tag == null) {
+ // PENDING i18n
+ throw new JspException(
+ "Not nested in a UIComponentTag Error for tag with handler class:"
+ + this.getClass().getName());
+ }
UIComponent component = tag.getComponentInstance();
- if( !(component instanceof EditableValueHolder)){
- //PENDING i18n
- throw new JspException("Not nested in a UIInput component. Error for tag with handler class:"+
- this.getClass().getName());
-
+ if (!(component instanceof EditableValueHolder)) {
+ // PENDING i18n
+ throw new JspException(
+ "Not nested in a UIInput component. Error for tag with handler class:"
+ + this.getClass().getName());
+
}
- // Nothing to do unless this tag created a component
- if (tag.getCreated()) {
+ // Nothing to do unless this tag created a component
+ if (tag.getCreated()) {
// New created component, add validator.
FacesContext facesContext = FacesContext.getCurrentInstance();
FacesBeanValidator validator = (FacesBeanValidator) facesContext
.getApplication().createValidator(
FacesBeanValidator.BEAN_VALIDATOR_TYPE);
+ if (null != summary) {
+ validator.setSummary(summary);
+ }
((EditableValueHolder) component).addValidator(validator);
- }
+ }
return super.doStartTag();
}
@Override
protected void setProperties(UIComponent component) {
super.setProperties(component);
- setStringProperty(component, "event", event);
+ setStringProperty(component, "event", event);
}
-
+
@Override
public void release() {
super.release();
event = null;
+ summary = null;
}
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
+ *
* @see javax.faces.webapp.UIComponentTagBase#getRendererType()
*/
@Override
@@ -91,6 +114,7 @@
@Override
protected String getFacetName() {
- return UIBeanValidator.BEAN_VALIDATOR_FACET + (null == event?"":event);
+ return UIBeanValidator.BEAN_VALIDATOR_FACET
+ + (null == event ? "" : event);
}
}
Added: trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorHandler.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorHandler.java (rev 0)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorHandler.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package org.richfaces.taglib;
+
+import javax.faces.validator.Validator;
+
+import org.richfaces.validator.FacesBeanValidator;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.jsf.ValidateHandler;
+import com.sun.facelets.tag.jsf.ValidatorConfig;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class BeanValidatorHandler extends ValidateHandler {
+
+ private TagAttribute _summary;
+
+ /**
+ * @param config
+ */
+ public BeanValidatorHandler(TagConfig config) {
+ super(config);
+ _summary = getAttribute("summary");
+ }
+
+ @Override
+ protected Validator createValidator(FaceletContext ctx) {
+ FacesBeanValidator validator = (FacesBeanValidator) ctx.getFacesContext()
+ .getApplication().createValidator(
+ FacesBeanValidator.BEAN_VALIDATOR_TYPE);
+ if (null != _summary) {
+ validator
+ .setSummary(_summary.getValueExpression(ctx, String.class));
+ }
+ return validator;
+ }
+
+}
Property changes on: trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorTag.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorTag.java (rev 0)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorTag.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -0,0 +1,57 @@
+/**
+ *
+ */
+package org.richfaces.taglib;
+
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.servlet.jsp.JspException;
+
+import org.richfaces.validator.FacesBeanValidator;
+
+public class BeanValidatorTag extends javax.faces.webapp.ValidatorELTag {
+
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5230299574915210593L;
+ // Fields
+
+ /*
+ * summary
+ * Summary message for a validation errors.
+ */
+ private ValueExpression _summary;
+ /**
+ * Summary message for a validation errors.
+ * Setter for summary
+ * @param summary - new value
+ */
+ public void setSummary( ValueExpression __summary ){
+ this._summary = __summary;
+ }
+
+
+
+
+ protected Validator createValidator() throws JspException
+ {
+ FacesBeanValidator validator = (FacesBeanValidator) FacesContext.getCurrentInstance().getApplication().createValidator("org.richfaces.BeanValidator");
+ _setProperties(validator);
+ return validator;
+ }
+
+ // Support method to wire in properties
+ private void _setProperties(FacesBeanValidator validator) throws JspException
+ {
+ if (_summary != null)
+ {
+ if (_summary instanceof ValueExpression)
+ {
+ validator.setSummary(_summary);
+ }
+ }
+ }
+}
Property changes on: trunk/ui/beanValidator/src/main/java/org/richfaces/taglib/BeanValidatorTag.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java 2008-08-04 23:15:16 UTC (rev 9904)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/validator/FacesBeanValidator.java 2008-08-04 23:37:51 UTC (rev 9905)
@@ -3,6 +3,8 @@
*/
package org.richfaces.validator;
+import java.io.Serializable;
+
import javax.el.ELException;
import javax.el.ValueExpression;
import javax.faces.FacesException;
@@ -20,10 +22,44 @@
* @author asmirnov
*
*/
-public class FacesBeanValidator implements Validator {
+public class FacesBeanValidator implements Validator,Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -264568176252121853L;
public static final String BEAN_VALIDATOR_TYPE = "org.richfaces.BeanValidator";
+ private ValueExpression summary = null;
+
+ private String summaryString = null;
+ /**
+ * @return the summary
+ */
+ public String getSummary() {
+ String summaryString = null;
+ if(null != summary){
+ summaryString = (String) summary.getValue(FacesContext.getCurrentInstance().getELContext());
+ }else {
+ summaryString = this.summaryString;
+ }
+ return summaryString;
+ }
+
+ /**
+ * @param summary the summary to set
+ */
+ public void setSummary(ValueExpression summary) {
+ this.summary = summary;
+ }
+
+
+ /**
+ * @param summary the summary to set
+ */
+ public void setSummary(String summary) {
+ this.summaryString = summary;
+ }
/*
* (non-Javadoc)
*
@@ -48,7 +84,7 @@
for (String msg : messages) {
// TODO - create Summary message ?
context.addMessage(component.getClientId(context), new FacesMessage(
- FacesMessage.SEVERITY_ERROR, "", msg));
+ FacesMessage.SEVERITY_ERROR, getSummary(), msg));
}
}
}
16 years, 5 months