JBoss Rich Faces SVN: r13396 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-06 13:45:45 -0400 (Mon, 06 Apr 2009)
New Revision: 13396
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/BeanValidatorTest.java
Log:
Failed AjaxValidator and BeanValidator tests fixed
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java 2009-04-06 17:34:40 UTC (rev 13395)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java 2009-04-06 17:45:45 UTC (rev 13396)
@@ -54,7 +54,7 @@
assertNotPresent(tfAgeErrMsg);
writeStatus("Name must be between 3 and 12 at length. Type shorter one");
- type(tfNameId, "Mi");
+ selenium.type(tfNameId, "Mi");
selenium.fireEvent(tfNameId, "blur");
waitForAjaxCompletion();
assertPresent(tfNameErrMsg);
@@ -66,7 +66,7 @@
writeStatus("Correct the inputs and leave. Error messages have to disappear");
- type(tfNameId, "Mick");
+ selenium.type(tfNameId, "Mick");
selenium.fireEvent(tfNameId, "blur");
waitForAjaxCompletion();
assertNotPresent(tfNameErrMsg);
@@ -84,12 +84,12 @@
String rendered = getParentId() + "attrForm" + ":rendered";
String tfNameId = getParentId() + "_form:" + NAME;
String tfNameErrMsg = tfNameId + ERR_MSG_POSTFIX;
- type(tfNameId, "Mi");
+ selenium.type(tfNameId, "Mi");
selenium.fireEvent(tfNameId, "blur");
waitForAjaxCompletion();
assertPresent(tfNameErrMsg);
clickAjaxCommandAndWait(rendered);
- type(tfNameId, "Mi");
+ selenium.type(tfNameId, "Mi");
selenium.fireEvent(tfNameId, "blur");
assertNotPresent(tfNameErrMsg);
}
@@ -115,36 +115,36 @@
assertNotPresent(tfEmailErrMsg);
writeStatus("Name must be between 3 and 12 at length. Type shorter one");
- type(tfNameId, "Mi");
+ selenium.type(tfNameId, "Mi");
selenium.fireEvent(tfNameId, "blur");
waitForAjaxCompletion();
assertPresent(tfNameErrMsg);
writeStatus("Age must be between 18 and 100. Type less than that");
- type(tfAgeId, "3");
+ selenium.type(tfAgeId, "3");
selenium.fireEvent(tfAgeId, "blur");
waitForAjaxCompletion();
assertPresent(tfAgeErrMsg);
writeStatus("Email must be an email. Type not a well-formed email");
- type(tfEmailId, "notemail");
+ selenium.type(tfEmailId, "notemail");
selenium.fireEvent(tfEmailId, "blur");
waitForAjaxCompletion();
assertPresent(tfEmailErrMsg);
writeStatus("Correct the inputs and leave. Error messages have to disappear");
- type(tfNameId, "Mick");
+ selenium.type(tfNameId, "Mick");
selenium.fireEvent(tfNameId, "blur");
waitForAjaxCompletion();
assertNotPresent(tfNameErrMsg);
- type(tfAgeId, "33");
+ selenium.type(tfAgeId, "33");
selenium.fireEvent(tfAgeId, "blur");
waitForAjaxCompletion();
assertNotPresent(tfAgeErrMsg);
- type(tfEmailId, "email(a)ya.com");
+ selenium.type(tfEmailId, "email(a)ya.com");
selenium.fireEvent(tfEmailId, "blur");
waitForAjaxCompletion();
assertNotPresent(tfEmailErrMsg);
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/BeanValidatorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/BeanValidatorTest.java 2009-04-06 17:34:40 UTC (rev 13395)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/BeanValidatorTest.java 2009-04-06 17:45:45 UTC (rev 13396)
@@ -61,13 +61,13 @@
assertNotPresent(tfEmailErrMsg);
writeStatus("Name must be between 3 and 12 at length. Type shorter one");
- type(tfNameId, "Mi");
+ selenium.type(tfNameId, "Mi");
writeStatus("Age must be between 18 and 100. Type less than that");
- type(tfAgeId, "3");
+ selenium.type(tfAgeId, "3");
writeStatus("Email must be an email. Type not a well-formed email");
- type(tfEmailId, "notemail");
+ selenium.type(tfEmailId, "notemail");
submit();
@@ -79,9 +79,9 @@
writeStatus("Correct the inputs and resubmit form. Error messages have to disappear");
- type(tfNameId, "Mick");
- type(tfAgeId, "33");
- type(tfEmailId, "email(a)ya.com");
+ selenium.type(tfNameId, "Mick");
+ selenium.type(tfAgeId, "33");
+ selenium.type(tfEmailId, "email(a)ya.com");
submit();
15 years, 8 months
JBoss Rich Faces SVN: r13395 - trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-04-06 13:34:40 -0400 (Mon, 06 Apr 2009)
New Revision: 13395
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
Log:
Second point of RF-6498 has fixed.
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2009-04-06 17:07:29 UTC (rev 13394)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2009-04-06 17:34:40 UTC (rev 13395)
@@ -645,9 +645,6 @@
protected void doDecode(FacesContext context, UIComponent component) {
super.doDecode(context, component);
-
- component.getAttributes().remove(PARTIAL_UPDATE);
- component.getAttributes().remove(UPDATE_HEADER);
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
@@ -879,6 +876,9 @@
super.encodeEnd(context, table);
table.setRowKey(context, rowKey);
}
+
+ component.getAttributes().remove(PARTIAL_UPDATE);
+ component.getAttributes().remove(UPDATE_HEADER);
}
}
15 years, 8 months
JBoss Rich Faces SVN: r13394 - trunk/docs/cdkguide/en/src/main/docbook.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-04-06 13:07:29 -0400 (Mon, 06 Apr 2009)
New Revision: 13394
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-5969 - 'Creating projects in different IDEs' chapter
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2009-04-06 16:55:25 UTC (rev 13393)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2009-04-06 17:07:29 UTC (rev 13394)
@@ -182,7 +182,8 @@
</chapter>
&overview;
&devsample;
- &test;
+ &test;
+ &ide;
<chapter id="button" xreflabel="button">
<?dbhtml filename="button.html"?>
<chapterinfo>
@@ -196,7 +197,7 @@
<title>Button component development</title>
<para> Work in progress... </para>
- </chapter> &ide; &namingconv;
+ </chapter> &namingconv;
<chapter id="temptags" xreflabel="temptags">
<?dbhtml filename="temptags.html"?>
15 years, 8 months
JBoss Rich Faces SVN: r13393 - in trunk/docs/cdkguide/en/src/main: resources/examples and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-04-06 12:55:25 -0400 (Mon, 06 Apr 2009)
New Revision: 13393
Added:
trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.txt
trunk/docs/cdkguide/en/src/main/resources/images/addProject.png
trunk/docs/cdkguide/en/src/main/resources/images/javaEEModule.png
trunk/docs/cdkguide/en/src/main/resources/images/projects.png
trunk/docs/cdkguide/en/src/main/resources/images/removeItem.png
Removed:
trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx
Modified:
trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml
Log:
https://jira.jboss.org/jira/browse/RF-5969 - 'Creating projects in different IDEs' chapter
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml 2009-04-06 16:28:31 UTC (rev 13392)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml 2009-04-06 16:55:25 UTC (rev 13393)
@@ -26,9 +26,9 @@
is better secured to us than to any other people in the world.
</para>
<para>
- Eclipse IDE seems to be more preferable for the rapid component creation process.
+ <ulink url="http://www.eclipse.org/downloads">Eclipse IDE</ulink> seems to be more preferable for
+ the rapid component creation process.
</para>
-
<tip>
<title>Tip:</title>
<para>
@@ -37,4 +37,130 @@
and in <ulink url="http://www.jboss.org/tools">JBoss Tools</ulink>.
</para>
</tip>
+ <section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>eclipse</keyword>
+ <keyword>CDK</keyword>
+ <keyword>guide</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>Creating project in Eclipse IDE</title>
+ <para>
+ During the development process you could be confronted with some difficulties.
+ For example, it is necessary to rebuild component every time
+ you want to check your work on it in a developer sample.
+ It is also hard to debug JavaScript scenario without IDE's help.
+ </para>
+ <para>
+ First of all you need to download and install
+ <ulink url="http://www.eclipse.org/downloads">Eclipse IDE for Java EE Developers</ulink>.
+ </para>
+ <para>
+ After that you need to build <property><emphasis role="bold"><rich:inputDate></emphasis></property> component and
+ it's sample project for the import as existing Eclipse projects.
+ It is necessary to proceed to the <property>Sandbox/inputDate</property> and <property>Sandbox/inputDate-sample</property>
+ directories and launch the following command:
+ </para>
+ <programlisting role="XML"><![CDATA[mvn eclipse:eclipse -Dwtpversion=1.5]]></programlisting>
+ <para>
+ The command you've launched above creates files and folders necessary for the import. The <code>-Dwtpversion=1.5</code> key indicates
+ that you have Web application, so it should be possible to run it on a server.
+ </para>
+ <para>
+ Finally you need to make import. You can find the step-by-step tutorial at the
+ <ulink url="http://help.eclipse.org/ganymede/topic/org.eclipse.platform.doc.user/task...">Eclipse documentation</ulink> page
+ or simply in the <emphasis><property>Help</property></emphasis> > <emphasis><property>Help Contents</property></emphasis> of the Eclipse.
+ As the result two projects should appear in the workspace:
+ </para>
+ <figure>
+ <title>Projects in the workspace</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/projects.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Now it is necessary to define <property><emphasis role="bold"><rich:inputDate></emphasis></property> component JAR
+ you have imported on the build path of the <property>inputDate-sample</property> project.
+ </para>
+ <para>
+ You need to select <emphasis><property>Properties</property></emphasis> of the <property>inputDate-sample</property> project,
+ proceed to the <emphasis><property>Java Build Path</property></emphasis> > <emphasis><property>Libraries</property></emphasis> tab
+ and then remove "inputDate-1.0-SNAPSHOT.jar" item.
+ </para>
+ <figure>
+ <title>Remove inputDate item from the Library</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/removeItem.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ After that you need to proceed to the <emphasis><property>Java Build Path</property></emphasis> > <emphasis><property>Projects</property></emphasis> tab
+ and add already imported <property>inputDate</property> project.
+ </para>
+ <figure>
+ <title>Add imported inputDate project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/addProject.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Finally you should select <emphasis><property>Java EE Module Dependecies</property></emphasis>,
+ uncheck <property>var/M2_REPO/org/mycompany/inputDate/1.0-SNAPSHOT/inputDate-1.0-SNAPSHOT.jar</property>,
+ and check imported <property>inputDate</property> module.
+ </para>
+ <figure>
+ <title>Java EE Module Dependecies selection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/javaEEModule.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ That's all! Now it is possible to
+ create a server (<ulink url="http://help.eclipse.org/ganymede/topic/org.eclipse.jst.server.ui.doc.user...">Apache Tomcat</ulink>, for example)
+ and run <property>inputDate-sample</property>.
+ </para>
+ <para>
+ Actually you can build/rebuild your projects for the import
+ at any time you want.
+ </para>
+ <para>
+ In order to rebuild existing project for the import you should use
+ the following command:
+ </para>
+ <programlisting role="XML"><![CDATA[mvn eclipse:clean eclipse:eclipse -Dwtpversion=1.5]]></programlisting>
+ <para>
+ In conclusion it should be pointed out that binding <property><emphasis role="bold"><rich:inputDate></emphasis></property> component project and
+ developer sample give you more advantages such as editing any sources on-the-fly, debugging JavaScript, etc.
+ </para>
+ </section>
+ <section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>netbeans</keyword>
+ <keyword>CDK</keyword>
+ <keyword>guide</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>Creating project in NetBeans IDE</title>
+ <para>
+ NetBeans is another free, open-source IDE that provides plenty of features and tools
+ you need to create professional enterprise, web applications.
+ </para>
+ <para>
+ Once you have built your projects for Eclipse IDE
+ you can easily migrate to NetBeans IDE.
+ You can get all necessary information at
+ <ulink url="http://www.netbeans.org/kb/articles/import-eclipse.html">Automatically Import Your Projects From Eclipse to NetBeans IDE</ulink>
+ page.
+ </para>
+ </section>
</chapter>
Deleted: trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx 2009-04-06 16:28:31 UTC (rev 13392)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.jspx 2009-04-06 16:55:25 UTC (rev 13393)
@@ -1,52 +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:h=" http://ajax4jsf.org/cdk/h"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- xmlns:jsp=" http://ajax4jsf.org/cdk/jsp"
- class="org.mycompany.renderkit.html.InputDateRenderer"
- baseclass="org.mycompany.renderkit.InputDateRendererBase"
- component="org.mycompany.component.UIInputDate"
- >
- <f:clientid var="clientId"/>
- <h:styles>/org/mycompany/renderkit/html/css/inputDate.xcss</h:styles>
- <f:resource name="/org/mycompany/renderkit/html/images/inputDate.png" var="icon" />
- <jsp:scriptlet>
- <![CDATA[if(component.getFacet("caption")!=null && component.getFacet("caption").isRendered()) {]]>
- </jsp:scriptlet>
- <div id="#{clientId}_caption" class="my-inputDate-caption #{component.attributes['captionClass']}">
- <u:insertFacet name="caption" />
- </div>
- <jsp:scriptlet>
- <![CDATA[
- }
- ]]>
- </jsp:scriptlet>
- <div id="#{clientId}" title="#{value}" x:passThruWithExclusions="value,name,type,id">
- <input id="#{clientId}"
- name="#{clientId}"
- type="text"
- value="#{this:getValueAsString(context, component)}"
- class="my-inputDate-input #{component.attributes['inputClass']}"
- style="#{component.attributes['inputStyle']}"/>
-
- <jsp:scriptlet>
- <![CDATA[if(component.getFacet("icon")!=null && component.getFacet("icon").isRendered()) {]]>
- </jsp:scriptlet>
- <u:insertFacet name="icon" />
- <jsp:scriptlet>
- <![CDATA[
- }else{
- ]]>
- </jsp:scriptlet>
- <img src="#{icon}" class="my-inputDate-icon #{component.attributes['iconClass']}" style="#{component.attributes['iconStyle']}"/>
- <jsp:scriptlet>
- <![CDATA[
- }
- ]]>
- </jsp:scriptlet>
- </div>
-</f:root>
\ No newline at end of file
Added: trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.txt
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.txt (rev 0)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.txt 2009-04-06 16:55:25 UTC (rev 13393)
@@ -0,0 +1,54 @@
+<?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:h=" http://ajax4jsf.org/cdk/h"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ xmlns:jsp=" http://ajax4jsf.org/cdk/jsp"
+ class="org.mycompany.renderkit.html.InputDateRenderer"
+ baseclass="org.mycompany.renderkit.InputDateRendererBase"
+ component="org.mycompany.component.UIInputDate"
+ >
+ <f:clientid var="clientId"/>
+ <h:scripts>/org/richfaces/renderkit/html/scripts/jquery/jquery.js, org/richfaces/ui/renderkit/html/scripts/pngFix.js, org/richfaces/ui/renderkit/html/scripts/ui.core.js, org/richfaces/ui/renderkit/html/scripts/ui.colorpicker.js</h:scripts>
+
+ <h:styles>org/richfaces/ui/renderkit/html/css/colorPicker.xcss</h:styles>
+ <f:resource name="/org/mycompany/renderkit/html/images/inputDate.png" var="icon" />
+ <jsp:scriptlet>
+ <![CDATA[if(component.getFacet("caption")!=null && component.getFacet("caption").isRendered()) {]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}_caption" class="my-inputDate-caption #{component.attributes['captionClass']}">
+ <u:insertFacet name="caption" />
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}" title="#{value}" x:passThruWithExclusions="value,name,type,id">
+ <input id="#{clientId}"
+ name="#{clientId}"
+ type="text"
+ value="#{this:getValueAsString(context, component)}"
+ class="my-inputDate-input #{component.attributes['inputClass']}"
+ style="#{component.attributes['inputStyle']}"/>
+
+ <jsp:scriptlet>
+ <![CDATA[if(component.getFacet("icon")!=null && component.getFacet("icon").isRendered()) {]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="icon" />
+ <jsp:scriptlet>
+ <![CDATA[
+ }else{
+ ]]>
+ </jsp:scriptlet>
+ <img src="#{icon}" class="my-inputDate-icon #{component.attributes['iconClass']}" style="#{component.attributes['iconStyle']}"/>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
+ </div>
+</f:root>
\ No newline at end of file
Property changes on: trunk/docs/cdkguide/en/src/main/resources/examples/htmlInputDate.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/docs/cdkguide/en/src/main/resources/images/addProject.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/cdkguide/en/src/main/resources/images/addProject.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/cdkguide/en/src/main/resources/images/javaEEModule.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/cdkguide/en/src/main/resources/images/javaEEModule.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/cdkguide/en/src/main/resources/images/projects.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/cdkguide/en/src/main/resources/images/projects.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/cdkguide/en/src/main/resources/images/removeItem.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/cdkguide/en/src/main/resources/images/removeItem.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
15 years, 8 months
JBoss Rich Faces SVN: r13392 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-06 12:28:31 -0400 (Mon, 06 Apr 2009)
New Revision: 13392
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-6649
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-04-06 14:31:27 UTC (rev 13391)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-04-06 16:28:31 UTC (rev 13392)
@@ -218,7 +218,7 @@
}
private void encodeNBSP(ResponseWriter writer) throws IOException {
- writer.write(" ");
+ writer.write(" ");
}
private void encodeFilterRow(FacesContext context, ResponseWriter writer,
15 years, 8 months
JBoss Rich Faces SVN: r13391 - in trunk/test-applications/realworld2/ejb/src/main: java/org/richfaces/realworld/service and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-06 10:31:27 -0400 (Mon, 06 Apr 2009)
New Revision: 13391
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
Log:
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -33,8 +33,6 @@
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
@@ -48,7 +46,6 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Role;
import org.jboss.seam.annotations.Scope;
/**
@@ -171,7 +168,6 @@
return;
}
if (image.getAlbum() != null && !this.equals(image.getAlbum())) {
- //TODO nick - use removeImage()
image.getAlbum().removeImage(image);
}if(!image.isVisited()){
this.getShelf().getUnvisitedImages().add(image);
@@ -191,7 +187,6 @@
if (image == null) {
throw new IllegalArgumentException("Null image");
}
- //TODO nick - check if image is in the current album
if(image.getAlbum().equals(this)){
if(image.getAlbum().getUnvisitedImages().contains(image)){
image.getAlbum().getUnvisitedImages().remove(image);
@@ -224,9 +219,10 @@
}
public int getIndex(Image image) {
- //TODO nick - use indexOf
- //TODO nick - check images == null?
- return this.images.indexOf(image);
+ if(this.images.size() > 0){
+ return this.images.indexOf(image);
+ }
+ return -1;
}
public Image getCoveringImage() {
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -59,7 +59,6 @@
@ManyToOne(optional=false)
@JoinColumn(name = "IMAGE_ID", referencedColumnName = "IMAGE_ID")
- //TODO nick - add @NotNull
private Image image;
@ManyToOne(fetch = FetchType.LAZY)
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -241,7 +241,6 @@
if (comment == null) {
throw new IllegalArgumentException("Null comment");
}
- //TODO nick - check that comments belongs to "this" image
if(comment.getImage().equals(this)){
comment.setImage(null);
comments.remove(comment);
@@ -267,8 +266,6 @@
for (MetaTag tag : this.imageTags) {
s.append(tag.getTag()).append(", ");
}
-
- //TODO nick - changed by nick
if (s.length() >= 2) {
s.delete(s.length() - 2, s.length());
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -30,6 +30,7 @@
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
+import javax.persistence.UniqueConstraint;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
@@ -40,7 +41,9 @@
@Entity
@Name("metaTag")
-@Table(name = "metatags")
+@Table(name = "metatags", uniqueConstraints = {
+ @UniqueConstraint(columnNames = "tag"),
+ })
@Scope(ScopeType.EVENT)
public class MetaTag implements Serializable {
@@ -55,7 +58,6 @@
@NotNull
@NotEmpty
@Length(min = 3, max=50)
- //TODO nick - meta tags should not contain ',', add constraint
private String tag;
@ManyToMany(mappedBy = "imageTags")
@@ -67,6 +69,11 @@
public MetaTag(Long id) {
this.id = id;
}
+
+ public MetaTag(Long id, String tag) {
+ this.id = id;
+ this.tag = tag;
+ }
public Long getId() {
return id;
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -204,8 +204,7 @@
public void removeShelf(Shelf shelf) {
if (shelf == null) {
throw new IllegalArgumentException("Null shelf");
- }
- //TODO nick - check if owner is current user?
+ }
if(shelf.getOwner().getLogin().equals(this.getLogin())){
shelf.setOwner(null);
shelfs.remove(shelf);
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -20,10 +20,6 @@
*/
package org.richfaces.realworld.service;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
import java.util.List;
import javax.ejb.Stateless;
@@ -32,10 +28,8 @@
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.User;
@Name("albumAction")
@Stateless
@@ -73,15 +67,6 @@
}
public List<Image> getUnvisitedImages(Album album){
- //TODO nick - use Shelf/Album.unvisitedImages
- return (List<Image>)em.createQuery("from Image i where i.album=:album and i.uploaded > :date").setParameter("album", album).setParameter("date", getDate()).getResultList();
+ return (List<Image>)em.createQuery("from Image i where i.album=:album and i.uploaded > :date").setParameter("album", album).setParameter("date", ActionTools.getRecentlyDate()).getResultList();
}
-
- private Date getDate() {
- //TODO nick - use Calendar.getInstance()
- Calendar c = Calendar.getInstance();
- c.add(Calendar.DAY_OF_YEAR, -15);
- //TODO nick - return c.getTime()
- return c.getTime();
- }
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -70,14 +70,18 @@
//TODO nick - how about concurrent creation of meta tags with the same name?
removals.remove(t);
} else {
- t = new MetaTag();
- t.setTag(s);
- image.addMetaTag(t);
- }
+ t = getTagByName(s);
+ if(t != null){
+ image.addMetaTag(t);
+ }else{
+ t = new MetaTag();
+ t.setTag(s);
+ image.addMetaTag(t);
+ }
+ }
}
for (MetaTag tag : removals) {
image.removeMetaTag(tag);
- tag.removeImage(image);
}
if (image.isCovering()) {
if (!image.equals(image.getAlbum().getCoveringImage())) {
@@ -85,7 +89,12 @@
}
}
if (flushStrategy.isDatabaseStoreStrategy()) {
- em.flush();
+ try{
+ em.flush();
+ }catch(Exception e){
+ editImage(image);
+ }
+
}
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-04-06 14:31:27 UTC (rev 13391)
@@ -20,13 +20,7 @@
*/
package org.richfaces.realworld.service;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
-import java.util.Collection;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-04-06 14:31:17 UTC (rev 13390)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-04-06 14:31:27 UTC (rev 13391)
@@ -3,7 +3,7 @@
INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08', 1, 0);
INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (1, 'Nature', 'Nature pictures', 1, '2009-12-18', true);
-INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (2, 'Sport', 'Nature pictures', 1, '2009-12-18', false);
+INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (2, 'Sport', 'Nature pictures', 1, '2009-12-18', true);
INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (3, 'Water', 'Nature pictures', 2, '2009-12-18', true);
INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (4, 'Flowers', 'Nature pictures', 3, '2009-12-18', true);
15 years, 8 months
JBoss Rich Faces SVN: r13390 - in trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld: util and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-06 10:31:17 -0400 (Mon, 06 Apr 2009)
New Revision: 13390
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/RealworldException.java
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
Log:
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-06 12:22:40 UTC (rev 13389)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-06 14:31:17 UTC (rev 13390)
@@ -25,6 +25,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
@@ -140,6 +141,15 @@
model.setMainArea(NavigationEnum.ALBUM_IMAGE_PREVIEW);
}
+ @Observer("resetModel")
+ public void resetModel(){
+ if(user.getId() != null){
+ model.resetModel(NavigationEnum.ALL_SHELFS, user, null, null, null);
+ }else{
+ model.resetModel(NavigationEnum.ANONYM, user, null, null, null);
+ }
+ }
+
public void showShelf(Shelf shelf){
model.resetModel(NavigationEnum.SHELF_PREVIEW, shelf.getOwner(), shelf, null, null);
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java 2009-04-06 12:22:40 UTC (rev 13389)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java 2009-04-06 14:31:17 UTC (rev 13390)
@@ -26,6 +26,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Events;
@@ -85,6 +86,7 @@
this.selectedImage.getAlbum().visitImage(selectedImage, true);
}
+ @Observer("stopSlideshow")
public void stopSlideshow(){
active = false;
this.selectedImage = null;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java 2009-04-06 12:22:40 UTC (rev 13389)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/DirectLinkHelper.java 2009-04-06 14:31:17 UTC (rev 13390)
@@ -25,9 +25,13 @@
@In Identity identity;
public synchronized void paintImage(OutputStream out, Object data)
- throws IOException {
+ throws IOException, RealworldException {
Long id=Long.valueOf(data.toString());
Image im = em.find(Image.class, id);
+ if(im == null || im.getAlbum() == null || im.getAlbum().getShelf() == null){
+ imageLoader.paintImage(out, "default/noimage.jpg");
+ return;
+ }
//TODO nick - '&&' so only admins can see their own unshared images?
if(im.getAlbum().getShelf().isShared() || (identity.hasRole("admin") && im.getAlbum().getOwner().getLogin().equals(identity.getUsername()))){
imageLoader.paintImage(out, im.getPath());
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2009-04-06 12:22:40 UTC (rev 13389)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2009-04-06 14:31:17 UTC (rev 13390)
@@ -64,8 +64,9 @@
}else{
imageResource = fileManager.getFileByPath(data.toString());
}
- if (imageResource != null) {
+ if (imageResource != null && imageResource.exists()) {
FileInputStream fileInputStream = new FileInputStream(imageResource);
+
BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
InputStream paintData = bufferedInputStream;
try {
@@ -78,6 +79,10 @@
} finally {
bufferedInputStream.close();
}
+ }else{
+ Events.instance().raiseEvent("stopSlideshow");
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, "Images was deleted. Sorry");
+ Events.instance().raiseEvent("resetModel");
}
}
}
Added: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/RealworldException.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/RealworldException.java (rev 0)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/RealworldException.java 2009-04-06 14:31:17 UTC (rev 13390)
@@ -0,0 +1,11 @@
+package org.richfaces.realworld.util;
+
+public class RealworldException extends Exception {
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -5437284703541833879L;
+
+ public RealworldException(String message) {
+ super(message);
+ }
+}
Property changes on: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/RealworldException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
15 years, 8 months
JBoss Rich Faces SVN: r13389 - in trunk/test-applications/seamApp/web/src/main: webapp and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2009-04-06 08:22:40 -0400 (Mon, 06 Apr 2009)
New Revision: 13389
Added:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPickerConverter.java
trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/
trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPicker.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml
trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/images/
trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/images/colorPicker_ico.png
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java
trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml
Log:
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java 2009-04-06 12:15:57 UTC (rev 13388)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPicker.java 2009-04-06 12:22:40 UTC (rev 13389)
@@ -22,23 +22,33 @@
public class ColorPicker implements Validator, Converter {
private HtmlColorPicker htmlColorPicker;
private String colorMode;// hex, rgb
- private String converterMessage;
- private boolean disabled;
+ private String converterMessage;
private boolean flat;
private boolean immediate;
private boolean localValueSet;
private boolean rendered;
+ private boolean facets;
private boolean required;
private String requiredMessage;
private boolean valid;
private String validatorMessage;
private String value;
+ private String facetsValue;
private String bindLabel;
+ private String showEvent;
+ public String getShowEvent() {
+ return showEvent;
+ }
+
+ public void setShowEvent(String showEvent) {
+ this.showEvent = showEvent;
+ }
+
public ColorPicker() {
+ facets = false;
colorMode = "rgb";
- converterMessage = "custom converter message";
- disabled = false;
+ converterMessage = "custom converter message";
flat = false;
immediate = false;
localValueSet = true;
@@ -47,8 +57,10 @@
requiredMessage = "custom required message";
valid = true;
validatorMessage = "custom validator message";
- value = "rgb(255, 250, 240)";
+ value = new String();
+ facetsValue = new String();
bindLabel = "Click Binding";
+ showEvent = "onclick";
}
public void checkBinding(ActionEvent e){
@@ -76,9 +88,10 @@
public void validate(FacesContext context, UIComponent component,
Object value) throws ValidatorException {
+ System.out.println("<<<Color Picker Validator Works>>>");
String str = value.toString();
if (str.startsWith("rgb")) {
- if (str.indexOf("100") != -1)
+ if (str.indexOf("56") != -1)
throw new ValidatorException(new FacesMessage(
"Test validator: 100 is restricted!"));
}
@@ -96,8 +109,16 @@
if (value.toString().indexOf("100") != -1)
throw new ConverterException(new FacesMessage("Test converter(getAsString): 100 is restricted!"));
return value.toString();
- }
+ }
+ public HtmlColorPicker getHtmlColorPicker() {
+ return htmlColorPicker;
+ }
+
+ public void setHtmlColorPicker(HtmlColorPicker htmlColorPicker) {
+ this.htmlColorPicker = htmlColorPicker;
+ }
+
public String getColorMode() {
return colorMode;
}
@@ -112,16 +133,8 @@
public void setConverterMessage(String converterMessage) {
this.converterMessage = converterMessage;
- }
+ }
- public boolean isDisabled() {
- return disabled;
- }
-
- public void setDisabled(boolean disabled) {
- this.disabled = disabled;
- }
-
public boolean isFlat() {
return flat;
}
@@ -194,12 +207,19 @@
this.bindLabel = bindLabel;
}
- public HtmlColorPicker getHtmlColorPicker() {
- return htmlColorPicker;
+ public boolean isFacets() {
+ return facets;
}
- public void setHtmlColorPicker(HtmlColorPicker htmlColorPicker) {
- this.htmlColorPicker = htmlColorPicker;
+ public void setFacets(boolean facets) {
+ this.facets = facets;
}
-}
+ public String getFacetsValue() {
+ return facetsValue;
+ }
+
+ public void setFacetsValue(String facetsValue) {
+ this.facetsValue = facetsValue;
+ }
+}
\ No newline at end of file
Added: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPickerConverter.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPickerConverter.java (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/colorPicker/ColorPickerConverter.java 2009-04-06 12:22:40 UTC (rev 13389)
@@ -0,0 +1,31 @@
+package org.richfaces.helloworld.domain.colorPicker;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+
+public class ColorPickerConverter implements Converter {
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ System.out.println("<<<ColorPicker Converter getAsObject() Called>>>");
+ String str = value.toString();
+ return str;
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ System.out.println("<<<ColorPicker Converter getAsString() Called>>>");
+ if (value instanceof String) {
+ String str = value.toString();
+ return str;
+ } else if (value == null) {
+ value = new String();
+ String str = value.toString();
+ return str;
+ } else
+ throw new ConverterException(
+ "Error in custom converted colorPicker.ColorPickerConverter.java");
+ }
+}
\ No newline at end of file
Added: trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPicker.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPicker.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPicker.xhtml 2009-04-06 12:22:40 UTC (rev 13389)
@@ -0,0 +1,46 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="calendarSubviewID">
+ <rich:colorPicker binding="#{colorPicker.htmlColorPicker}"
+ colorMode="#{colorPicker.colorMode}" converter="colorPickerConverter"
+ converterMessage="#{colorPicker.converterMessage}"
+ flat="#{colorPicker.flat}" id="colorPickerID"
+ immediate="#{colorPicker.immediate}" onclick="#{event.onclick}"
+ ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
+ onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
+ onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
+ onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
+ onmouseup="#{event.onmouseup}"
+ rendered="#{colorPicker.rendered and !colorPicker.facets}"
+ showEvent="#{colorPicker.showEvent}"
+ validator="#{colorPicker.validate}"
+ validatorMessage="#{colorPicker.validatorMessage}"
+ value="#{colorPicker.value}"
+ valueChangeListener="#{colorPicker.changeValue}">
+ </rich:colorPicker>
+
+ <rich:colorPicker colorMode="#{colorPicker.colorMode}"
+ flat="#{colorPicker.flat}" id="colorPickerIDFacets"
+ onclick="#{event.onclick}" ondblclick="#{event.ondblclick}"
+ onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}"
+ onkeyup="#{event.onkeyup}" onmousedown="#{event.onmousedown}"
+ onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
+ rendered="#{colorPicker.rendered and colorPicker.facets}"
+ showEvent="#{colorPicker.showEvent}"
+ validator="#{colorPicker.validate}"
+ validatorMessage="#{colorPicker.validatorMessage}"
+ value="#{colorPicker.facetsValue}"
+ valueChangeListener="#{colorPicker.changeValue}">
+ <f:facet name="icon">
+ <h:graphicImage value="/ColorPicker/images/colorPicker_ico.png"
+ width="18px" height="18px"></h:graphicImage>
+ </f:facet>
+ <f:facet name="arrows">
+ <h:graphicImage value="/ColorPicker/images/colorPicker_ico.png"
+ width="30px" height="5px"></h:graphicImage>
+ </f:facet>
+ </rich:colorPicker>
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerProperty.xhtml 2009-04-06 12:22:40 UTC (rev 13389)
@@ -0,0 +1,68 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="calendarPropertySubviewID">
+ <h:commandButton value="add test"
+ action="#{colorPicker.addColorPicker}"></h:commandButton>
+ <h:panelGrid columns="2">
+ <h:outputText value="colorMode" />
+ <h:selectOneRadio value="#{colorPicker.colorMode}">
+ <f:selectItem itemLabel="rgb" itemValue="rgb" />
+ <f:selectItem itemLabel="hex" itemValue="hex" />
+ </h:selectOneRadio>
+
+ <h:outputText value="showEvent: "></h:outputText>
+ <h:inputText value="#{colorPicker.showEvent}">
+ </h:inputText>
+
+ <h:outputText value="converterMessage: "></h:outputText>
+ <h:inputText value="#{colorPicker.converterMessage}">
+ </h:inputText>
+
+ <h:outputText value="flat" />
+ <h:selectBooleanCheckbox value="#{colorPicker.flat}">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="immediate" />
+ <h:selectBooleanCheckbox value="#{colorPicker.immediate}">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="localValueSet" />
+ <h:selectBooleanCheckbox value="#{colorPicker.localValueSet}">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="rendered" />
+ <h:selectBooleanCheckbox value="#{colorPicker.rendered}">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="required" />
+ <h:selectBooleanCheckbox value="#{colorPicker.required}">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="facets" />
+ <h:selectBooleanCheckbox value="#{colorPicker.facets}">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="requiredMessage: "></h:outputText>
+ <h:inputText value="#{colorPicker.requiredMessage}">
+ </h:inputText>
+
+ <h:outputText value="valid" />
+ <h:selectBooleanCheckbox value="#{colorPicker.valid}">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="validatorMessage: "></h:outputText>
+ <h:inputText value="#{colorPicker.validatorMessage}">
+ </h:inputText>
+
+ <h:commandButton actionListener="#{colorPicker.checkBinding}"
+ value="Binding">
+ <a4j:support event="onclick" reRender="bindLabelID"></a4j:support>
+ </h:commandButton>
+ <h:outputText value="#{colorPicker.bindLabel}" id="bindLabelID" />
+
+ </h:panelGrid>
+
+
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml (rev 0)
+++ trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/ColorPickerStraightforward.xhtml 2009-04-06 12:22:40 UTC (rev 13389)
@@ -0,0 +1,8 @@
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ id="calendarStraightforwardSubviewID">
+
+</f:subview>
\ No newline at end of file
Added: trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/images/colorPicker_ico.png
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seamApp/web/src/main/webapp/ColorPicker/images/colorPicker_ico.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml 2009-04-06 12:15:57 UTC (rev 13388)
+++ trunk/test-applications/seamApp/web/src/main/webapp/WEB-INF/faces-config.xml 2009-04-06 12:22:40 UTC (rev 13389)
@@ -22,7 +22,9 @@
</converter>
<converter>
<converter-id>colorPickerConverter</converter-id>
- <converter-class>org.richfaces.helloworld.domain.colorPicker.ColorPicker</converter-class>
+ <converter-class>
+ org.richfaces.helloworld.domain.colorPicker.ColorPickerConverter
+ </converter-class>
</converter>
<validator>
<validator-id>CalendarValidator</validator-id>
15 years, 8 months
JBoss Rich Faces SVN: r13388 - in trunk/test-applications/facelets/src/main: webapp/ColorPicker and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2009-04-06 08:15:57 -0400 (Mon, 06 Apr 2009)
New Revision: 13388
Modified:
trunk/test-applications/facelets/src/main/java/colorPicker/ColorPickerConverter.java
trunk/test-applications/facelets/src/main/webapp/ColorPicker/ColorPicker.xhtml
Log:
Modified: trunk/test-applications/facelets/src/main/java/colorPicker/ColorPickerConverter.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/colorPicker/ColorPickerConverter.java 2009-04-06 12:15:38 UTC (rev 13387)
+++ trunk/test-applications/facelets/src/main/java/colorPicker/ColorPickerConverter.java 2009-04-06 12:15:57 UTC (rev 13388)
@@ -22,6 +22,10 @@
if (value instanceof String) {
String str = value.toString();
return str;
+ } else if (value == null) {
+ value = new String(" ");
+ String str = value.toString();
+ return str;
} else
throw new ConverterException(
"Test Application: Error in custom converted colorPicker.ColorPickerConverter.java");
Modified: trunk/test-applications/facelets/src/main/webapp/ColorPicker/ColorPicker.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ColorPicker/ColorPicker.xhtml 2009-04-06 12:15:38 UTC (rev 13387)
+++ trunk/test-applications/facelets/src/main/webapp/ColorPicker/ColorPicker.xhtml 2009-04-06 12:15:57 UTC (rev 13388)
@@ -2,7 +2,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich" id="calendarSubviewID">
+ xmlns:rich="http://richfaces.org/rich" id="calendarSubviewID" >
<rich:colorPicker binding="#{colorPicker.component}"
colorMode="#{colorPicker.colorMode}" converter="colorPickerConverter"
converterMessage="#{colorPicker.converterMessage}"
15 years, 8 months
JBoss Rich Faces SVN: r13387 - in trunk/test-applications/jsp/src/main: webapp/ColorPicker and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2009-04-06 08:15:38 -0400 (Mon, 06 Apr 2009)
New Revision: 13387
Modified:
trunk/test-applications/jsp/src/main/java/colorPicker/ColorPickerConverter.java
trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/java/colorPicker/ColorPickerConverter.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/colorPicker/ColorPickerConverter.java 2009-04-06 10:58:35 UTC (rev 13386)
+++ trunk/test-applications/jsp/src/main/java/colorPicker/ColorPickerConverter.java 2009-04-06 12:15:38 UTC (rev 13387)
@@ -22,9 +22,14 @@
if (value instanceof String) {
String str = value.toString();
return str;
+ } else if (value == null) {
+ value = new String();
+ String str = value.toString();
+ return str;
} else
throw new ConverterException(
- "Test Application: Error in custom converted colorPicker.ColorPickerConverter.java");
+ "Error in custom converted colorPicker.ColorPickerConverter.java");
+
}
}
Modified: trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp 2009-04-06 10:58:35 UTC (rev 13386)
+++ trunk/test-applications/jsp/src/main/webapp/ColorPicker/ColorPicker.jsp 2009-04-06 12:15:38 UTC (rev 13387)
@@ -3,6 +3,7 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
+
<f:subview id="colorPickerSubviewID">
<rich:colorPicker binding="#{colorPicker.component}"
colorMode="#{colorPicker.colorMode}" converter="colorPickerConverter"
15 years, 8 months