JBoss Rich Faces SVN: r9230 - trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-25 13:31:41 -0400 (Wed, 25 Jun 2008)
New Revision: 9230
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
Minor modal panel script update
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-06-25 17:04:01 UTC (rev 9229)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-06-25 17:31:41 UTC (rev 9230)
@@ -158,22 +158,31 @@
},
width: function() {
- return this.getContentElement().parentNode.clientWidth;
+ return this.getSizedElement().clientWidth;
},
height: function() {
- return this.getContentElement().parentNode.clientHeight;
+ return this.getSizedElement().clientHeight;
},
- getContentElement: function() {
+ getSizedElement: function() {
if (!this._sizedElement) {
- this._sizedElement = this.options.autosized ? $(this.contentTable) : $(this.contentDiv);
+ this._sizedElement = $(this.cdiv);
}
return this._sizedElement;
},
+
+ getContentElement: function() {
+ if (!this._contentElement) {
+ this._contentElement = this.options.autosized ? $(this.contentTable) : $(this.contentDiv);
+ }
+
+ return this._contentElement;
+ },
destroy: function() {
+ this._contentElement = null;
this._sizedElement = null;
ModalPanel.panels = ModalPanel.panels.without(this);
15 years, 10 months
JBoss Rich Faces SVN: r9229 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-06-25 13:04:01 -0400 (Wed, 25 Jun 2008)
New Revision: 9229
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
http://jira.jboss.com/jira/browse/RF-2305
The API functions that are not implemented are marked with gray color and it's indicated in braces that the api will be implemented.
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-06-25 16:36:00 UTC (rev 9228)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-06-25 17:04:01 UTC (rev 9229)
@@ -357,7 +357,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>It's possible to handle events for fileUpload from JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
+ <para>It's possible to handle events for fileUpload using JavaScript code. A simplest example of usage JavaScript API is placed below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
@@ -365,6 +365,29 @@
<rich:fileUpload id="upload" disabled="false"/>
<h:commandButton onclick="${rich:component('upload')}.disable(event); return false;" value="Disable" />
...]]></programlisting>
+
+ <para>
+ <emphasis role="bold"><property><rich:fileUpload></property></emphasis>
+ component also provides a number of JavaScript property,
+ that can be used to process uploaded files, file states etc.
+ The given below example illustrates how the <property>entries[0].state</property> property can be used to get access to the file state.
+ Full list of JavaScript properties can be found <link linkend="objectProperties">below</link> .
+
+ </para>
+
+
+ <programlisting role="XML"><![CDATA[...
+<rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
+ maxFilesQuantity="#{fileUploadBean.uploadsAvailable}"
+ reRender="table" id="upload"
+ immediateUpload="#{fileUploadBean.autoUpload}"
+ acceptedTypes="jpg, gif, png, bmp">
+ <a4j:support event="onuploadcomplete" reRender="info" />
+</rich:fileUpload>
+<h:commandButton onclick="if($('j_id232:upload').component.entries[0].state == FileUploadEntry.UPLOAD_SUCCESS) alert ('DONE');" value="Check file state"/>
+...]]></programlisting>
+
+
<para>The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component allows to use internationalization method
to redefine and localize the labels. You could use application resource bundle and define
<code>RICH_FILE_UPLOAD_CANCEL_LABEL</code>,
@@ -380,6 +403,14 @@
<code>RICH_FILE_UPLOAD_ENTRY_CLEAR_LABEL</code>,
<code>RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL</code> there.
</para>
+
+
+ <para>
+
+
+
+
+ </para>
<para>
The <emphasis role="bold"><property><rich:fileUpload></property></emphasis> component could work together with Seam framework.
@@ -387,10 +418,12 @@
<emphasis role="bold"><property><rich:fileUpload></property></emphasis> requests.
</para>
+
+
</section>
<!-- JavaScript API-->
- <section>
+ <section >
<title>JavaScript API</title>
<table>
<title>JavaScript API</title>
@@ -416,42 +449,33 @@
</row>
<row>
<entry>clear()</entry>
- <entry>Clears list of files</entry>
+ <entry>Removes all files from the list. The function can also get the $('id').component.entries[0] as a parameter to remove a particular file. </entry>
</row>
- <row>
- <entry>$('id').component.entries</entry>
- <entry>Returns a array of all files in the listмассив всех файлов в списке
-
- $('id').component.entries.length --- количество файлов в списке
-
- $('id').component.entries[0].fileName --- имя файла
- </entry>
- </row>
+
+
</tbody>
</tgroup>
</table>
+
-
-
-
- <table>
+ <table d="objectProperties">
<title>Client side object properties</title>
<tgroup cols="2">
<thead>
<row>
- <entry>Objects</entry>
+ <entry>Property</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
- <entry>$('id').component.entries</entry>
- <entry>Returns a array of all files in the listмассив всех файлов в списке
+ <entry>entries</entry>
+ <entry>Returns a array of all files in the list
</entry>
</row>
@@ -459,30 +483,30 @@
<row>
- <entry>$('id').component.entries.length</entry>
+ <entry>entries.length</entry>
<entry>Returns the number of files in the list </entry>
</row>
<row>
- <entry>$('id').component.entries[0].fileName</entry>
+ <entry>entries[0].fileName</entry>
<entry>Returns the file name, that is retrieved by the array index </entry>
</row>
<row>
- <entry>$('id').component.entries[0].state </entry>
+ <entry>entries[0].state </entry>
<entry>Returns the file state. Possible states are
<itemizedlist>
- <listitem><para>"initialized" - the file is added</para> </listitem>
- <listitem><para>"progress" - the file is being uploaded</para> </listitem>
- <listitem><para>"ready" - uploading is in process. The file will be uploaded on queue order.</para> </listitem>
- <listitem><para>"canceled" - uploading of the file is canceled </para> </listitem>
- <listitem><para>"done" - the file is uploaded successfully</para> </listitem>
- <listitem><para>"transfer_error’ " - a file transfer error occurred </para> </listitem>
- <listitem><para>"size_error’ " - the file exceeded maximum size</para> </listitem>
+ <listitem><para>"initialized" - the file is added, corresponds to FileUploadEntry.INITIALIZED constant </para> </listitem>
+ <listitem><para>"progress" - the file is being uploaded, corresponds to FileUploadEntry.UPLOAD_IN_PROGRESS constant</para> </listitem>
+ <listitem><para>"ready" - uploading is in process, corresponds to FileUploadEntry.READY constant The file will be uploaded on queue order.</para> </listitem>
+ <listitem><para>"canceled" - uploading of the file is canceled, corresponds to FileUploadEntry.UPLOAD_CANCELED constant </para> </listitem>
+ <listitem><para>"done" - the file is uploaded successfully, corresponds to FileUploadEntry.UPLOAD_SUCCESS constant</para> </listitem>
+ <listitem><para>"transfer_error" - a file transfer error occurred, corresponds to FileUploadEntry.UPLOAD_TRANSFER_ERROR constant </para> </listitem>
+ <listitem><para>"size_error" - the file exceeded maximum size, corresponds to FileUploadEntry.UPLOAD_SIZE_ERROR constant</para> </listitem>
</itemizedlist>
15 years, 10 months
JBoss Rich Faces SVN: r9228 - in trunk/ui/modal-panel/src: main/templates/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-25 12:36:00 -0400 (Wed, 25 Jun 2008)
New Revision: 9228
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java
Log:
ModalPanel test updated
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2008-06-25 16:28:03 UTC (rev 9227)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2008-06-25 16:36:00 UTC (rev 9228)
@@ -23,6 +23,10 @@
opacity: 0.5;
}
+ .dr-mpnl-mask-div-transparent {
+ background-color: transparent;
+ }
+
.dr-mpnl-mask {
}
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-06-25 16:28:03 UTC (rev 9227)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-06-25 16:36:00 UTC (rev 9228)
@@ -153,8 +153,8 @@
</div>
</div>
</div>
- <div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}CursorDiv"
- style="z-index: -200; background-color: transparent;">
+ <div class="dr-mpnl-mask-div dr-mpnl-mask-div-transparent rich-mpnl-mask-div" id="#{clientId}CursorDiv"
+ style="z-index: -200;">
<button class="dr-mpnl-pnl-button" id="#{clientId}LastHref"></button>
</div>
Modified: trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java
===================================================================
--- trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java 2008-06-25 16:28:03 UTC (rev 9227)
+++ trunk/ui/modal-panel/src/test/java/org/richfaces/component/ModalPanelComponentTest.java 2008-06-25 16:36:00 UTC (rev 9228)
@@ -106,14 +106,13 @@
HtmlPage renderedView = renderView();
assertNotNull(renderedView);
-/*
+
HtmlElement htmlModalPanel = renderedView.getHtmlElementById(modalPanel.getClientId(facesContext));
assertNotNull(htmlModalPanel);
assertEquals("div", htmlModalPanel.getNodeName());
HtmlElement htmlModalPanelCDiv = renderedView.getHtmlElementById(modalPanel.getClientId(facesContext) + "CDiv");
assertNotNull(htmlModalPanelCDiv);
- assertTrue(htmlModalPanelCDiv.getAttributeValue("class").contains("dr-mpnl-panel rich-mpnl_panel"));
HtmlElement htmlContentDiv = renderedView.getHtmlElementById(modalPanel.getClientId(facesContext) + "ContentDiv");
assertNotNull(htmlContentDiv);
@@ -133,7 +132,7 @@
assertNotNull(resizer);
assertTrue(resizer.getAttributeValue("class").contains("dr-mpnl-resizer rich-mpnl-resizer"));
}
-*/
+
}
/**
15 years, 10 months
JBoss Rich Faces SVN: r9227 - in trunk/docs/cdkguide/en/src/main/docbook: includes and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-06-25 12:28:03 -0400 (Wed, 25 Jun 2008)
New Revision: 9227
Added:
trunk/docs/cdkguide/en/src/main/docbook/includes/rssubclass.xml
Removed:
trunk/docs/cdkguide/en/src/main/docbook/includes/csrenderer.xml
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/ui.xml
trunk/docs/cdkguide/en/src/main/docbook/master.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
Log:
http://jira.jboss.com/jira/browse/RF-3692 - TOC was fixed
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -13,20 +13,6 @@
<para>
Simple component (panel maybe) TBD
</para>
- <section id="skeleton" xreflabel="skeleton">
- <?dbhtml filename="skeleton.html"?>
- <title>Building the component skeleton</title>
- <para>
- TBD Skeleton
- </para>
- </section>
- <section id="structure" xreflabel="structure">
- <?dbhtml filename="structure.html"?>
- <title>Component project structure</title>
- <para>
- TBD structure
- </para>
- </section>
</section>
Deleted: trunk/docs/cdkguide/en/src/main/docbook/includes/csrenderer.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/csrenderer.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/csrenderer.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section id="csrenderer" xreflabel="csrenderer">
- <?dbhtml filename="csrenderer.html"?>
- <sectioninfo>
- <keywordset>
- <keyword>renderer</keyword>
- <keyword>UI</keyword>
- <keyword>CDK</keyword>
- <keyword>Guide</keyword>
- </keywordset>
- </sectioninfo>
- <title>Creating a client-specific Renderer</title>
- <para>
- client-specific Renderer
- </para>
-
-</section>
-
-
Added: trunk/docs/cdkguide/en/src/main/docbook/includes/rssubclass.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/rssubclass.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/rssubclass.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="rssubclass" xreflabel="rssubclass">
+ <?dbhtml filename="rssubclass.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>renderer</keyword>
+ <keyword>UI</keyword>
+ <keyword>CDK</keyword>
+ <keyword>Guide</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>Creating a renderer-specific subclass</title>
+ <para>
+ renderer-specific subclass
+ </para>
+</section>
+
+
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -18,5 +18,8 @@
<para>
XCSS
</para>
+ <para>
+ Dynamic images
+ </para>
</section>
</section>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/taghandler.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -9,7 +9,7 @@
<keyword>Guide</keyword>
</keywordset>
</sectioninfo>
- <title>Creating a JSP tag handler and TLD</title>
+ <title>Creating tag classes and descriptor for JSP and Facelets</title>
<para>
Creating a JSP tag handler and TLD
</para>
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -13,4 +13,7 @@
<para>
How to write your renderer with the help of template.
</para>
+ <para>
+ How to create base class
+ </para>
</section>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/ui.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/ui.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/ui.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -9,7 +9,7 @@
<keyword>Guide</keyword>
</keywordset>
</sectioninfo>
- <title>Configuration file creation</title>
+ <title>Configuring component</title>
<para>
UI Component generation
</para>
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -17,11 +17,11 @@
<!ENTITY ccreate SYSTEM "includes/ccreate.xml">
<!ENTITY ui SYSTEM "includes/ui.xml">
<!ENTITY protoui SYSTEM "includes/protoui.xml">
-<!ENTITY csrenderer SYSTEM "includes/csrenderer.xml">
<!ENTITY template SYSTEM "includes/template.xml">
<!ENTITY skin SYSTEM "includes/skin.xml">
<!ENTITY register SYSTEM "includes/register.xml">
<!ENTITY taghandler SYSTEM "includes/taghandler.xml">
+<!ENTITY rssubclass SYSTEM "includes/rssubclass.xml">
<!--Check the links page -->
<!ENTITY links SYSTEM "modules/links.xml">
]>
@@ -72,10 +72,9 @@
&pcreate;
&ccreate;
&protoui;
- &csrenderer;
-<section id="rssubclass" xreflabel="rssubclass">
- <?dbhtml filename="rssubclass.html"?>
+<section id="crenderer" xreflabel="crenderer">
+ <?dbhtml filename="crenderer.html"?>
<sectioninfo>
<keywordset>
<keyword>renderer</keyword>
@@ -84,14 +83,17 @@
<keyword>Guide</keyword>
</keywordset>
</sectioninfo>
- <title>Creating a renderer-specific subclass</title>
+ <title>Creating a Renderer</title>
<para>
- renderer-specific subclass
+ Renderer
</para>
-
&template;
&skin;
</section>
+
+
+
+ &rssubclass;
&ui;
®ister;
&taghandler;
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/ide.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -9,9 +9,9 @@
</keywordset>
</chapterinfo>
- <title>CDK usage and development in different IDEs</title>
+ <title>Creating projects in different IDEs</title>
<para>
- Integration with Eclipse, IDEA.
+ Eclipse, IDEA.
</para>
</chapter>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2008-06-25 15:46:05 UTC (rev 9226)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2008-06-25 16:28:03 UTC (rev 9227)
@@ -13,5 +13,8 @@
<para>
To start working with the project, it's necessary to have Maven installed.
</para>
+ <para>
+ JDK 1.5
+ </para>
</chapter>
\ No newline at end of file
15 years, 10 months
JBoss Rich Faces SVN: r9226 - in trunk/test-applications/seleniumTest/src: main/webapp/WEB-INF and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-06-25 11:46:05 -0400 (Wed, 25 Jun 2008)
New Revision: 9226
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRepeat/
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
Log:
Add a4j:repeat selenium test
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java 2008-06-25 15:46:05 UTC (rev 9226)
@@ -0,0 +1,106 @@
+/*
+ * A4JRepeatItemTestBean.java Date created: 24.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.ajax4jsf.bean;
+
+/**
+ * TODO Class description goes here.
+ * @author Alexandr Levkovsky
+ *
+ */
+public class A4JRepeatItemTestBean {
+
+ private Integer number;
+
+ private Integer output;
+
+ private Integer input;
+
+ private Integer rerenderedChangeCounter;
+
+ private Integer notRerenderedChangeCounter;
+
+ A4JRepeatItemTestBean(Integer index) {
+ this.number = index;
+ this.input = index;
+ this.output = index;
+ this.rerenderedChangeCounter = 0;
+ this.notRerenderedChangeCounter = 0;
+ }
+
+ /**
+ * @return the number
+ */
+ public Integer getNumber() {
+ return number;
+ }
+
+ /**
+ * @param number the number to set
+ */
+ public void setNumber(Integer number) {
+ this.number = number;
+ }
+
+ /**
+ * @return the output
+ */
+ public Integer getOutput() {
+ return output;
+ }
+
+ /**
+ * @param output the output to set
+ */
+ public void setOutput(Integer output) {
+ this.output = output;
+ }
+
+ /**
+ * @return the input
+ */
+ public Integer getInput() {
+ return input;
+ }
+
+ /**
+ * @param input the input to set
+ */
+ public void setInput(Integer input) {
+ this.input = input;
+ }
+
+ /**
+ * @return the rerenderedChangeCounter
+ */
+ public Integer getRerenderedChangeCounter() {
+ return rerenderedChangeCounter;
+ }
+
+ /**
+ * @param rerenderedChangeCounter the rerenderedChangeCounter to set
+ */
+ public void setRerenderedChangeCounter(Integer rerenderedChangeCounter) {
+ this.rerenderedChangeCounter = rerenderedChangeCounter;
+ }
+
+ /**
+ * @return the notRerenderedChangeCounter
+ */
+ public Integer getNotRerenderedChangeCounter() {
+ return notRerenderedChangeCounter;
+ }
+
+ /**
+ * @param notRerenderedChangeCounter the notRerenderedChangeCounter to set
+ */
+ public void setNotRerenderedChangeCounter(Integer notRerenderedChangeCounter) {
+ this.notRerenderedChangeCounter = notRerenderedChangeCounter;
+ }
+
+
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatItemTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2008-06-25 15:46:05 UTC (rev 9226)
@@ -0,0 +1,186 @@
+/*
+ * A4JRepeatTestBean.java Date created: 19.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.ajax4jsf.component.UIRepeat;
+
+/**
+ * a4j:repeat component test bean
+ * @author Alexandr Levkovsky
+ *
+ */
+public class A4JRepeatTestBean {
+
+ private Integer first = 0;
+
+ private Integer rows = 5;
+
+ private Integer visible = 0;
+
+ private List<A4JRepeatItemTestBean> items;
+
+ private UIRepeat repeater;
+
+ private Boolean rendered = true;
+
+ private Set<Integer> keys = null;
+
+ /**
+ * @return the first
+ */
+ public Integer getFirst() {
+ return first;
+ }
+
+ /**
+ * @param first the first to set
+ */
+ public void setFirst(Integer first) {
+ this.first = first;
+ }
+
+ /**
+ * @return the rows
+ */
+ public Integer getRows() {
+ return rows;
+ }
+
+ /**
+ * @param rows the rows to set
+ */
+ public void setRows(Integer rows) {
+ this.rows = rows;
+ }
+
+ /**
+ * @return the items
+ */
+ public List<A4JRepeatItemTestBean> getItems() {
+ if (items == null) {
+ generateItems(getRows());
+ }
+ return items;
+ }
+
+ /**
+ * @param items the items to set
+ */
+ public void setItems(List<A4JRepeatItemTestBean> items) {
+ this.items = items;
+ }
+
+ /**
+ * @return the repeater
+ */
+ public UIRepeat getRepeater() {
+ return repeater;
+ }
+
+ /**
+ * @param repeater the repeater to set
+ */
+ public void setRepeater(UIRepeat repeater) {
+ this.repeater = repeater;
+ }
+
+ /**
+ * @return the rendered
+ */
+ public Boolean getRendered() {
+ return rendered;
+ }
+
+ /**
+ * @param rendered the rendered to set
+ */
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+
+
+ /**
+ * @return the visible
+ */
+ public Integer getVisible() {
+ return visible;
+ }
+
+ /**
+ * @param visible the visible to set
+ */
+ public void setVisible(Integer visible) {
+ this.visible = visible;
+ }
+
+ private void generateItems(Integer rows) {
+ items = new ArrayList<A4JRepeatItemTestBean>(rows);
+ for (int i = 0; i < rows; i++) {
+ A4JRepeatItemTestBean item = new A4JRepeatItemTestBean(i);
+ items.add(item);
+
+ }
+ }
+
+ public String init(){
+ generateItems(getRows());
+ return null;
+ }
+
+ public String reset(){
+ setRows(5);
+ setRendered(true);
+ setVisible(0);
+ setFirst(0);
+ generateItems(getRows());
+ return null;
+ }
+
+ /**
+ * @return the keys
+ */
+ public Set<Integer> getKeys() {
+ return keys;
+ }
+
+ /**
+ * @param keys the keys to set
+ */
+ public void setKeys(Set<Integer> keys) {
+ this.keys = keys;
+ }
+
+ public String change() {
+ Set<Integer> keys = new HashSet<Integer>();
+ int rowKey = getRepeater().getRowIndex();
+ keys.add(rowKey);
+ setKeys(keys);
+ A4JRepeatItemTestBean item = items.get(rowKey);
+ item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
+ item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
+ //priceRef.processValidators(FacesContext.getCurrentInstance());
+ //priceRef.processUpdates(FacesContext.getCurrentInstance());
+ return null;
+ }
+
+ public String change2() {
+ int rowKey = getRepeater().getRowIndex();
+ A4JRepeatItemTestBean item = items.get(rowKey);
+ item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
+ item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
+ //priceRef.processValidators(FacesContext.getCurrentInstance());
+ //priceRef.processUpdates(FacesContext.getCurrentInstance());
+ return null;
+ }
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-06-25 15:44:37 UTC (rev 9225)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-06-25 15:46:05 UTC (rev 9226)
@@ -131,6 +131,11 @@
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
+ <managed-bean-name>a4jRepeatBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.A4JRepeatTestBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
<managed-bean-name>calendarBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.bean.CalendarTestBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-25 15:44:37 UTC (rev 9225)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-25 15:46:05 UTC (rev 9226)
@@ -467,6 +467,16 @@
/**
* Asserts DOM node is present
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertPresent(String id) {
+ Assert.assertTrue(isPresentById(id));
+ }
+
+ /**
+ * Asserts DOM node is present
* @param id - DOM element id
*/
public void AssertRendered(String id) {
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2008-06-25 15:46:05 UTC (rev 9226)
@@ -0,0 +1,194 @@
+/*
+ * AjaxRepeatTest.java Date created: 19.06.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * a4j:repeat component selenium test
+ * @author Alexandr Levkovsky
+ *
+ */
+public class AjaxRepeatTest extends SeleniumTestBase {
+
+ private final static Integer DEFAULT_ROWS_COUNT = 5;
+
+ private final static String FORM1_ID = "form1:";
+
+ private final static String FORM2_ID = "form2:";
+
+ private final static String FIRST_INPUT_ID = "first_input";
+
+ private final static String ROWS_INPUT_ID = "rows_input";
+
+ private final static String RESET_BUTTON_ID = "reset";
+
+ private final static String ROWS_COUNT_INPUT_ID = "rows_count_input";
+
+ private final static String TABLE_ID = "repeat_table";
+
+ private final static String REPEAT_ID = "repeat";
+
+ private final static String INPUT_ID = "input";
+
+ private final static String OUTPUT_ID = "output";
+
+ private final static String APPLY_BUTTON_ID = "apply";
+
+ private final static String RENDERED_CHECKBOX_ID = "rendered_checkbox";
+
+ private final static String LINK_ID = "link";
+
+ private final static String RERENDERED_COUNTER_ID = "rerendered_change_counter";
+
+ private final static String NOT_RERENDERED_COUNTER_ID = "not_rerendered_change_counter";
+
+ @Override
+ public String getTestUrl() {
+ return "pages/ajaxRepeat/ajaxRepeatTest.xhtml";
+ }
+
+ @Test(dataProvider = "templates")
+ public void testRenderedAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rendered attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ // repeat has rendered=true and should present on page as table with default 5 rows
+ assertRowsCount(5, TABLE_ID);
+
+ writeStatus("change rendered attribute to false");
+ // change rendered attribute to false
+ String checkboxId = getParentId() + FORM1_ID + RENDERED_CHECKBOX_ID;
+ selenium.click(checkboxId);
+ writeStatus("Click apply");
+ clickApply();
+
+ // repeat now has rendered=false and should not present on page as table with default 0 rows
+ assertRowsCount(0, TABLE_ID);
+ }
+
+ @Test(dataProvider = "templates")
+ public void testFirstAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing first attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ // repeat has rendered=true and should present on page as table with default 5 rows
+ assertRowsCount(5, TABLE_ID);
+ // first row default value 0
+ String fullInput0Id = getParentId() + FORM2_ID + REPEAT_ID + ":" + 0 + ":" + OUTPUT_ID;
+ String fullInput1Id = getParentId() + FORM2_ID + REPEAT_ID + ":" + 1 + ":" + OUTPUT_ID;
+ AssertPresent(fullInput0Id);
+ AssertPresent(fullInput1Id);
+ writeStatus("change first attribute to 1");
+
+ String inputId = getParentId() + FORM1_ID + FIRST_INPUT_ID;
+ type(inputId, "1");
+ writeStatus("Click apply");
+ clickApply();
+
+ // now first row value should be 1
+ AssertNotPresent(fullInput0Id);
+ AssertPresent(fullInput1Id);
+ }
+
+ @Test(dataProvider = "templates")
+ public void testRowsAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rows attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ // repeat has rows=0 and table with all default 5 rows should present on page
+ assertRowsCount(5, TABLE_ID);
+
+ writeStatus("change rendered attribute to false");
+ // change rows attribute to 3
+ String inputId = getParentId() + FORM1_ID + ROWS_INPUT_ID;
+ type(inputId, "3");
+ writeStatus("Click apply");
+ clickApply();
+
+ // repeat now has rendered=false and should not present on page as table with default 0 rows
+ assertRowsCount(3, TABLE_ID);
+ // last row should have value 2
+ assertInputValue(2, INPUT_ID, "2");
+ }
+
+ @Test(dataProvider = "templates")
+ public void testRowKeyVarAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rowKeyVar attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ String inputId = getParentId() + FORM1_ID + ROWS_COUNT_INPUT_ID;
+ Integer rowsCount = new Integer(getValueById(inputId));
+ // repeat has rows=0 and table with all default 5 rows should present on
+ // page
+ assertRowsCount(rowsCount, TABLE_ID);
+
+ // output text has value="#{rowKey % 2 == 0 ? '0' : '1'}"
+ for (int i = 0; i < rowsCount; i++) {
+ assertOutputText(i, OUTPUT_ID, i % 2 == 0 ? "0" : "1");
+ }
+ }
+
+ @Test(dataProvider = "templates")
+ public void testAjaxKeysAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing ajaxKeys attribute...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
+
+ for (int i = 0; i < DEFAULT_ROWS_COUNT; i++) {
+ String LinkId = getFullTableElementId(i, LINK_ID);
+ assertOutputText(i, RERENDERED_COUNTER_ID, "0");
+ assertOutputText(i, NOT_RERENDERED_COUNTER_ID, "0");
+ writeStatus("click link...");
+ clickAjaxCommandAndWait(LinkId);
+ assertOutputText(i, RERENDERED_COUNTER_ID, "1");
+ assertOutputText(i, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+ }
+
+ private void clickReset() {
+ String buttonId = getParentId() + FORM2_ID + RESET_BUTTON_ID;
+ writeStatus("Click reset button");
+ clickCommandAndWait(buttonId);
+ }
+
+ private void clickApply() {
+ String buttonId = getParentId() + FORM1_ID + APPLY_BUTTON_ID;
+ clickCommandAndWait(buttonId);
+ }
+
+ private void assertRowsCount(int i, String tableId) {
+ int count = selenium.getXpathCount("//table[@id='" + tableId + "']/tbody/tr").intValue();
+ Assert.assertEquals(count, i);
+ }
+
+ private void assertInputValue(int row, String inputId, String value) {
+ String fullInputId = getFullTableElementId(row, inputId);
+ String elementValue = getValueById(fullInputId);
+ Assert.assertEquals(elementValue, value);
+ }
+
+ private void assertOutputText(int row, String outputId, String value) {
+ String fullInputId = getFullTableElementId(row, outputId);
+ String elementValue = getTextById(fullInputId);
+ Assert.assertEquals(elementValue, value);
+ }
+
+ private String getFullTableElementId(int row, String elementId) {
+ return getParentId() + FORM2_ID + REPEAT_ID + ":" + row + ":" + elementId;
+ }
+
+}
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
15 years, 10 months
JBoss Rich Faces SVN: r9225 - trunk/ui/tree/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-06-25 11:44:37 -0400 (Wed, 25 Jun 2008)
New Revision: 9225
Modified:
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
Log:
Add check for nullable paren in addNode method
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-06-25 15:25:17 UTC (rev 9224)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-06-25 15:44:37 UTC (rev 9225)
@@ -1176,7 +1176,12 @@
Object storedKey = getRowKey();
try {
setRowKey(context, parentRowKey);
- TreeNode parentNode = getTreeNode();
+ TreeNode parentNode = parentRowKey != null ? getTreeNode() : null;
+ if (parentNode == null && getValue() != null && getValue() instanceof TreeNode) {
+ parentNode = (TreeNode) getValue();
+ } else {
+ throw new IllegalArgumentException("Parent node required!");
+ }
parentNode.addChild(id, newNode);
15 years, 10 months
JBoss Rich Faces SVN: r9224 - trunk/ui/suggestionbox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-06-25 11:25:17 -0400 (Wed, 25 Jun 2008)
New Revision: 9224
Modified:
trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
Log:
http://jira.jboss.com/jira/browse/RF-3763
Modified: trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-06-25 14:43:07 UTC (rev 9223)
+++ trunk/ui/suggestionbox/src/main/config/component/suggestionbox.xml 2008-06-25 15:25:17 UTC (rev 9224)
@@ -144,6 +144,12 @@
<description>JavaScript code for call before submission of ajax event</description>
</property>
+ <property hidden="true">
+ <name>focus</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+
<property>
<name>selectedClass</name>
<classname>java.lang.String</classname>
15 years, 10 months
JBoss Rich Faces SVN: r9223 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-06-25 10:43:07 -0400 (Wed, 25 Jun 2008)
New Revision: 9223
Added:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java
Log:
test annotation transformer added
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java (rev 0)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java 2008-06-25 14:43:07 UTC (rev 9223)
@@ -0,0 +1,28 @@
+package org.richfaces;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import org.testng.internal.annotations.IAnnotationTransformer;
+import org.testng.internal.annotations.ITest;
+import org.testng.internal.annotations.TestAnnotation;
+
+/**
+ * This transformer sets necessary data provider for each test method.
+ *
+ * @author carcasser
+ */
+public class TestAnnotationTransformer implements IAnnotationTransformer {
+
+ /**
+ * @see IAnnotationTransformer#transform(ITest, Class, Constructor, Method)
+ */
+ public void transform(ITest annotation, Class testClass, Constructor testConstructor, Method testMethod) {
+
+ if ((testClass == null || RichSeleniumTest.class.isAssignableFrom(testClass))
+ && (annotation instanceof TestAnnotation)) {
+ ((TestAnnotation) annotation).setDataProvider("templates");
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/TestAnnotationTransformer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
15 years, 10 months
JBoss Rich Faces SVN: r9222 - trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-06-25 09:48:09 -0400 (Wed, 25 Jun 2008)
New Revision: 9222
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
Log:
Modified: trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-06-25 13:47:58 UTC (rev 9221)
+++ trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-06-25 13:48:09 UTC (rev 9222)
@@ -83,6 +83,7 @@
>
<f:call name="encodeTableStructure"/>
<f:call name="encodeHeader"/>
+ <f:call name="encodeCaption"/>
<tbody>
<tr>
<td colspan="#{columnsCount}" style="padding: 0px;">
15 years, 10 months
JBoss Rich Faces SVN: r9221 - trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-06-25 09:47:58 -0400 (Wed, 25 Jun 2008)
New Revision: 9221
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
Fixes concerning rendering caption
Modified: trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-06-25 13:47:54 UTC (rev 9220)
+++ trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-06-25 13:47:58 UTC (rev 9221)
@@ -137,7 +137,6 @@
writer.writeAttribute("width", "1*", null);
writer.endElement("col");
// writer.endElement("colgroup");
- encodeCaption(context, table);
}
public void encodeHeader(FacesContext context, UIExtendedDataTable table)
@@ -403,7 +402,7 @@
HeaderEncodeStrategy strategy = (column instanceof UIColumn && "header"
.equals(facetName)) ? new G3HeaderEncodeStrategy()
- : new RichHeaderEncodeStrategy();
+ : new SimpleHeaderEncodeStrategy();
strategy.encodeBegin(context, writer, column, facetName,
sortableColumn);
15 years, 10 months