JBoss Rich Faces SVN: r12633 - in trunk/ui/dataFilterSlider/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-11 15:30:56 -0500 (Wed, 11 Feb 2009)
New Revision: 12633
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-6144
Modified: trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java
===================================================================
--- trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java 2009-02-11 18:19:42 UTC (rev 12632)
+++ trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java 2009-02-11 20:30:56 UTC (rev 12633)
@@ -26,7 +26,6 @@
import java.util.List;
import java.util.Map;
-import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIData;
import javax.faces.context.FacesContext;
@@ -35,7 +34,7 @@
import javax.faces.event.FacesEvent;
import javax.faces.model.ListDataModel;
-import org.ajax4jsf.component.AjaxComponent;
+import org.ajax4jsf.component.AjaxActionComponent;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils;
import org.richfaces.event.DataFilterSliderAdapter;
@@ -46,7 +45,7 @@
/**
* JSF component class
*/
-public abstract class UIDataFltrSlider extends UICommand implements DataFilterSliderSource, AjaxComponent {
+public abstract class UIDataFltrSlider extends AjaxActionComponent implements DataFilterSliderSource {
/**
* The component type for this component.
@@ -74,26 +73,30 @@
}
public void broadcast(FacesEvent event) throws AbortProcessingException {
- if (event instanceof DataFilterSliderEvent){
-
- FacesContext context = FacesContext.getCurrentInstance();
- AjaxRendererUtils.addRegionByName(context, this, this.getId());
- String forAttr = this.getFor();
- RendererUtils rendUtil = RendererUtils.getInstance();
-
- if(forAttr != null) {
- AjaxRendererUtils.addRegionByName(context, this, rendUtil.correctForIdReference(forAttr, this));
- }
-
- if(getSliderListeners().length < 1){
- addSliderListener(new DataFilterSliderAdapter(getSliderListener()));
- }
- }
+ if (event instanceof DataFilterSliderEvent) {
- super.broadcast(event);
+ if (getSliderListeners().length < 1) {
+ addSliderListener(new DataFilterSliderAdapter(getSliderListener()));
+ }
+ }
+ super.broadcast(event);
+
}
+ protected void setupReRender(FacesContext context) {
+ super.setupReRender(context);
+ //add data slider itself to rendered list of components
+ AjaxRendererUtils.addRegionByName(context, this, this.getId());
+
+ String forAttr = this.getFor();
+ RendererUtils rendUtil = RendererUtils.getInstance();
+
+ if (forAttr != null) {
+ AjaxRendererUtils.addRegionByName(context, this, rendUtil.correctForIdReference(forAttr, this));
+ }
+ }
+
public void processDecodes(FacesContext context) {
if (context == null)
throw new NullPointerException();
Modified: trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java
===================================================================
--- trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2009-02-11 18:19:42 UTC (rev 12632)
+++ trunk/ui/dataFilterSlider/src/main/java/org/richfaces/renderkit/DataFilterSliderRendererBase.java 2009-02-11 20:30:56 UTC (rev 12633)
@@ -30,6 +30,7 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.convert.ConverterException;
+import javax.faces.event.ActionEvent;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
@@ -184,10 +185,10 @@
//ajaxSlider.setHandleValue(ajaxSlider.getStartRange());
} else {
dataFilterSlider.setHandleValue(newSliderVal);
-
- DataFilterSliderEvent event = new DataFilterSliderEvent(dataFilterSlider, oldSliderVal, newSliderVal);
-// dataFilterSlider.queueEvent(event);
- event.queue();
+
+ new DataFilterSliderEvent(dataFilterSlider, oldSliderVal, newSliderVal).queue();
+ new ActionEvent(dataFilterSlider).queue();
+
if (dataFilterSlider.isStoreResults()) {
dataFilterSlider.filterDataTable(newSliderVal.intValue());
}
15 years, 10 months
JBoss Rich Faces SVN: r12632 - in trunk/ui/modal-panel/src/main: java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-02-11 13:19:42 -0500 (Wed, 11 Feb 2009)
New Revision: 12632
Modified:
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
https://jira.jboss.org/jira/browse/RF-6078
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2009-02-11 17:08:54 UTC (rev 12631)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2009-02-11 18:19:42 UTC (rev 12632)
@@ -188,6 +188,12 @@
<description> If "true" modalPanel should be autosizeable. Default value is "false". </description>
<defaultvalue>false</defaultvalue>
</property>
+ <property>
+ <name>overlapEmbedObjects</name>
+ <classname>boolean</classname>
+ <description> If "true" modalPanel creates iframe to overlap embed objects like PDF on a page. Default value is "false". </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
<property hidden="true" >
<name>requiredMessage</name>
<classname>java.lang.String</classname>
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2009-02-11 17:08:54 UTC (rev 12631)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2009-02-11 18:19:42 UTC (rev 12632)
@@ -93,6 +93,9 @@
public abstract String getDomElementAttachment();
public abstract void setDomElementAttachment(String domElementAttachment);
+ public abstract boolean isOverlapEmbedObjects();
+ public abstract void setOverlapEmbedObjects(boolean overlapEmbedObjects);
+
public boolean getRendersChildren() {
return true;
}
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 2009-02-11 17:08:54 UTC (rev 12631)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2009-02-11 18:19:42 UTC (rev 12632)
@@ -540,7 +540,7 @@
}
var eIframe;
- if (ModalPanel.disableSelects && !this.iframe) {
+ if ((ModalPanel.disableSelects || this.options.overlapEmbedObjects) && !this.iframe) {
this.iframe = this.id.id + "IFrame";
new Insertion.Top(eCdiv,
"<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.iframe + "\" " +
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2009-02-11 17:08:54 UTC (rev 12631)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2009-02-11 18:19:42 UTC (rev 12632)
@@ -197,7 +197,8 @@
showWhenRendered: #{component.showWhenRendered},
selectBehavior: "#{component.tridentIVEngineSelectBehavior}",
- autosized: #{component.autosized}
+ autosized: #{component.autosized},
+ overlapEmbedObjects: #{component.overlapEmbedObjects}
<f:call name="writeVisualOptions" />
});
15 years, 10 months
JBoss Rich Faces SVN: r12631 - in trunk/docs: faq and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-02-11 12:08:54 -0500 (Wed, 11 Feb 2009)
New Revision: 12631
Modified:
trunk/docs/cdkguide/en/src/main/docbook/master.xml
trunk/docs/faq/en/src/main/docbook/master.xml
trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
trunk/docs/faq/pom.xml
trunk/docs/migrationguide/en/src/main/docbook/master.xml
trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml
trunk/docs/userguide/en/src/main/docbook/master.xml
trunk/docs/userguide/pom.xml
Log:
https://jira.jboss.org/jira/browse/RF-4643 - spellChecker improvement
Modified: trunk/docs/cdkguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/master.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/cdkguide/en/src/main/docbook/master.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3CR3/docbookx.dtd"
[
<!ENTITY intro SYSTEM "modules/intro.xml">
<!ENTITY roadmap SYSTEM "modules/roadmap.xml">
Modified: trunk/docs/faq/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/master.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/faq/en/src/main/docbook/master.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3CR3/docbookx.dtd"
[
<!ENTITY rfcFAQ SYSTEM "module/RFCfaq.xml">
]>
@@ -13,11 +13,11 @@
<year>2008</year>
<holder>Red Hat</holder>
</copyright>
-<abstract>
+<!--abstract>
<title/>
- <!--para>
+ <para>
<ulink url="#">PDF version</ulink>
- </para-->
-</abstract>
+ </para>
+</abstract-->
</bookinfo>
<toc/> &rfcFAQ; </book>
Modified: trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -1,11 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<chapter id="FAQ" xreflabel="FAQ">
<?dbhtml filename="FAQ.html"?>
- <sectioninfo>
+ <chapterinfo>
<keywordset>
<keyword>RichFaces</keyword>
</keywordset>
- </sectioninfo>
+ </chapterinfo>
<title>FAQ</title>
<section>
<?dbhtml filename="WherecouldIfindadditionalinformationonRichFaces.html"?>
@@ -23,23 +23,28 @@
What you see in the richfaces-ui-3.1.0-src.zip is a truly source, i.e. a source for CDK.
To the debug purpose, you need the source code that is generated by CDK before it is compiled into the binary.
-->
- There are two places where you can find binary/source distribution: <itemizedlist>
- <listitem> JBoss RichFaces Downloads area which can be found
- <ulink
- url="http://labs.jboss.com/jbossrichfaces/downloads/"
- >here</ulink>. Source distribution you
- can see in the
+ There are two places where you can find binary/source distribution:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ JBoss RichFaces Downloads area which can be found
+ <ulink url="http://labs.jboss.com/jbossrichfaces/downloads/">here</ulink>.
+ Source distribution you can see in the
<code>richfaces-ui-3.3.0-src.zip</code>. Binary
- stored in <code>richfaces-ui-3.3.0-bin.zip</code>
+ stored in <code>richfaces-ui-3.3.0-bin.zip</code>
+ </para>
</listitem>
- <listitem> If you use Maven, Maven knows the place where all
+ <listitem>
+ <para>
+ If you use Maven, Maven knows the place where all
distributions are stored. Actual links to the
- Maven repository can be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575"
- >here</ulink>
+ Maven repository can be found
+ <ulink url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104575">here</ulink>
+ </para>
</listitem>
</itemizedlist>
- </para>
+
</section>
<section>
Modified: trunk/docs/faq/pom.xml
===================================================================
--- trunk/docs/faq/pom.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/faq/pom.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -10,7 +10,26 @@
<packaging>pom</packaging>
<version>3.3.1-SNAPSHOT</version>
<name>FAQ</name>
- <description>Frequently asked questions</description>
+ <description>Frequently asked questions</description>
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>repository.jboss.com</id>
+ <name>Jboss Repository for Maven</name>
+ <url>http://repository.jboss.com/maven2/</url>
+ <layout>default</layout>
+ </repository>
+ <repository>
+ <id>eclipse</id>
+ <url>http://repo1.maven.org/eclipse/</url>
+ </repository>
+ </repositories>
<pluginRepositories>
<pluginRepository>
<releases>
@@ -136,12 +155,12 @@
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossorg-docbook-xslt</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.0-200803311754</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossorg-jdocbook-style</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.0-200803311754</version>
<type>jdocbook-style</type>
</dependency>
<dependency>
Modified: trunk/docs/migrationguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/migrationguide/en/src/main/docbook/master.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/migrationguide/en/src/main/docbook/master.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd" [
+"http://www.docbook.org/xml/4.3CR3/docbookx.dtd" [
<!ENTITY intro SYSTEM "modules/intro.xml">
<!ENTITY scope SYSTEM "modules/scope.xml">
<!ENTITY req SYSTEM "modules/req.xml">
Modified: trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd" [
+"http://www.docbook.org/xml/4.3CR3/docbookx.dtd" [
<!ENTITY intro SYSTEM "modules/intro.xml">
<!ENTITY getting_started SYSTEM "modules/getting_started.xml">
<!ENTITY rw_itself SYSTEM "modules/rw_itself.xml">
Modified: trunk/docs/userguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/master.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/userguide/en/src/main/docbook/master.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd" [
+"http://www.docbook.org/xml/4.3CR3/docbookx.dtd" [
<!ENTITY rfcintro SYSTEM "modules/RFCintro.xml">
<!ENTITY rfctechreqs SYSTEM "modules/RFCtechreqs.xml">
<!ENTITY rfcGettingStarted SYSTEM "modules/RFCGettingStarted.xml">
Modified: trunk/docs/userguide/pom.xml
===================================================================
--- trunk/docs/userguide/pom.xml 2009-02-11 14:25:56 UTC (rev 12630)
+++ trunk/docs/userguide/pom.xml 2009-02-11 17:08:54 UTC (rev 12631)
@@ -821,7 +821,7 @@
</sourceDocumentName>
<formats>
- <format>
+ <!--format>
<formatName>pdf</formatName>
<stylesheetResource>
classpath:/xslt/org/jboss/pdf.xsl
@@ -832,7 +832,7 @@
<imagePathSettingRequired>
true
</imagePathSettingRequired>
- </format>
+ </format-->
<format>
<formatName>html</formatName>
<stylesheetResource>
@@ -847,7 +847,7 @@
</imagePathSettingRequired>
</format>
- <format>
+ <!--format>
<formatName>html_single</formatName>
<stylesheetResource>
${xsl_html_single}
@@ -861,7 +861,7 @@
<finalName>
index.html
</finalName>
- </format>
+ </format-->
</formats>
<xincludeSupported>true</xincludeSupported>
<options>
@@ -909,4 +909,4 @@
<module>en</module>
</modules>
-</project>
\ No newline at end of file
+</project>
15 years, 10 months
JBoss Rich Faces SVN: r12630 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-02-11 09:25:56 -0500 (Wed, 11 Feb 2009)
New Revision: 12630
Added:
trunk/docs/userguide/en/src/main/resources/images/treeXML.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
https://jira.jboss.org/jira/browse/RF-5083 - Information about XmlTreeDataBuilder class was added to the Guide
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-11 14:24:11 UTC (rev 12629)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2009-02-11 14:25:56 UTC (rev 12630)
@@ -44,33 +44,15 @@
<section>
<title>Creating the Component with a Page Tag</title>
- <para>There are two ways to set up a tree: 1) with <emphasis role="bold">
- <property><rich:recursiveTreeNodesAdaptor></property>
- </emphasis> or <emphasis role="bold">
- <property><rich:treeNodesAdaptor></property>
- </emphasis> 2) and without them. The first method allows to omit<emphasis>
- <property>"value"</property>
- </emphasis> and <emphasis>
- <property>"var"</property>
- </emphasis> attributes definition as follows: </para>
-
+ <para>There are two ways to set up a tree</para>
+ <itemizedlist>
+ <listitem>
+ <para>Using model (<code>org.richfaces.model.TreeNode</code> or <code>javax.swing.tree.TreeNode</code>)
+</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
-
<programlisting role="XML"><![CDATA[...
-<rich:tree>
- <rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
-</rich:tree>
-...]]></programlisting>
-
- <para> The second way requires defining some attributes, as it's shown
- in the example: </para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[...
<rich:tree value="#{library.data}" var="item" >
<rich:treeNode icon="/images/tree/singer.png" >
<h:outputText value="#{item.name}" />
@@ -78,6 +60,23 @@
...
</rich:tree>
...]]></programlisting>
+
+ </listitem>
+ <listitem>
+ <para>
+ Using model tags <emphasis role="bold"><property><rich:recursiveTreeNodesAdaptor></property></emphasis>,
+ <emphasis role="bold"><property><rich:treeNodesAdaptor></property></emphasis>.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:tree>
+ <rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
+</rich:tree>
+...]]></programlisting>
+ </listitem>
+ </itemizedlist>
</section>
<section>
<title>Creating the Component Dynamically Using Java</title>
@@ -90,271 +89,103 @@
HtmlTree myTree = new HtmlTree();
...]]></programlisting>
</section>
- <!--section>
- <title>Details of Usage</title>
- <para>As it has been mentioned <link linkend="tree">above</link> the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component allows rendering any tree-like structure of data.</para>
- <para>A bean property is passed into a tree <emphasis>
- <property>"value"</property>
- </emphasis> attribute. The property keeps a structure of
- <property>"TreeNode"</property> type instances.</para>
- <para>There is a default class <property>"TreeNodeImpl"</property>, which is a
- default implementation for TreeNode interface. TreeNode has attribute <emphasis>
- <property>"data"</property>
- </emphasis> which value is available as a request scope variable with a name that is defined
- by <emphasis>
- <property>"var"</property>
- </emphasis> attribute of a <property>tree</property> component. <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >"XmlTreeDataBuilder" class</ulink> allows transforming XML into
- structures of objects containing <property>"XmlNodeData"</property>
- instances as data, which could be represented by the <property>tree</property> component. </para>
-
- <para>For particular visual representation of data <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> selects one of the children <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> components by type. The type is defined with the <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute that corresponds to a value of <emphasis>
- <property>"type"</property>
- </emphasis> attribute for <property>treeNode</property>. An example of definition is placed
- below: </para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="JAVA"><![CDATA[...
- <h:form>
- <rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
- <rich:treeNode type="artist" iconLeaf="/images/tree/singer.png" icon="/images/tree/singer.png">
- <h:outputText value="#{item.name}" />
- </rich:treeNode>
- <rich:treeNode type="album" iconLeaf="/images/tree/disc.png" icon="/images/tree/disc.png">
- <h:outputText value="#{item.title}" />
- </rich:treeNode>
- <rich:treeNode type="song" iconLeaf="/images/tree/song.png" icon="/images/tree/song.png">
- <h:outputText value="#{item.title}" />
- </rich:treeNode>
- </rich:tree>
-</h:form>
-...]]></programlisting>
-
- <para>This is a result: </para>
-
- <figure>
- <title>Expanded tree with child elements</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tree2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In case when <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute isn't defined or defined but its value isn't equal to
- any type of all children <property>treeNode</property> components or this value is equal to
- some type, but the value of <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute for this <property>treeNode</property> is
- <property>"false"</property> then default <property>treeNode</property> is
- used. </para>
-
- <para>Default <property>treeNode</property> is the first node (with not defined <emphasis>
- <property>"type"</property>
- </emphasis> attribute and defined <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute) from all children nodes of the tree component. If such
- <property>treeNode</property> wasn't found, the following default interior
- presentation is used: </para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="JAVA"><![CDATA[<h: outputText value="#{varAttributeName}">]]></programlisting>
-
- <para>
- <property>"varAttributeName"</property> is a value for <emphasis>
- <property>"var"</property>
- </emphasis> attribute. </para>
-
- <para> It's possible to define several <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> components with the equal values of <emphasis>
- <property>"type"</property>
- </emphasis> attribute and different values of <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute. It provides the possibility to define different markup for the same
- <emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> components type. An example is placed below. </para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="JAVA"><![CDATA[...
- <h:form>
- <rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
- <rich:treeNode type="artist" iconLeaf="/images/tree/singer.png" icon="/images/tree/singer.png"
- rendered="#{item.exist}">
- <h:outputText value="#{item.name}" />
- </rich:treeNode>
- <rich:treeNode type="artist" iconLeaf="/images/tree/singer.png" icon="/images/tree/singer_absent.png"
- rendered="#{not item.exist}">
- <h:outputText value="#{item.name}" />
- </rich:treeNode>
+
+ <section>
+ <title>Details of Usage</title>
+ <para>
+ As it has been mentioned
+ <link linkend="tree">above</link>
+ the
+ <emphasis role="bold">
+ <property><rich:tree></property></emphasis> component
+ allows rendering any tree-like data model.
+ </para>
+ <para>
+ You can build your <emphasis role="bold"><property><rich:tree></property></emphasis>
+ using model (<code>org.richfaces.model.TreeNode</code> or <code>javax.swing.tree.TreeNode</code>).
+ In this case the <emphasis role="bold"><property><rich:tree></property></emphasis> component
+ interacts with data model via <code>"TreeNode"</code> interface
+(<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
+org.richfaces.model.TreeNode
+</ulink>) that is used for the <emphasis role="bold"><property><rich:tree></property></emphasis> nodes representation.
+ </para>
+ <para>
+ Actually you can develop and use your own implementation of the <code>"TreeNode"</code> interface or use a
+ default one, which is defined with a default class <code>"TreeNodeImpl"</code>
+(<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
+org.richfaces.model.TreeNodeImpl
+</ulink>).
+ </para>
+ <para>
+ The <emphasis><property>"value"</property></emphasis> attribute
+ of the <emphasis role="bold"><property><rich:tree></property></emphasis> component
+ contains a nodes structure defined in a bean property.
+ </para>
+ <para>
+ When the <emphasis role="bold"><property><rich:tree></property></emphasis> component is being rendered
+ it iterates through model nodes and renders them using one of its <property>immediate</property>
+ <emphasis role="bold"><property><rich:treeNode></property></emphasis> children.
+ Data property of the current model <code>TreeNode</code> is exposed using
+ <emphasis><property>"var"</property></emphasis> attribute,
+ so if <code>var="itemData"</code> you can refer to that data using <code>#{itemData}</code> syntax.
+ </para>
+<para>There is a <code>"XmlTreeDataBuilder"</code> class
+ (<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
+ org.richfaces.component.xml.XmlTreeDataBuilder
+ </ulink>) that allows transforming XML into structures of objects containing <code>"XmlNodeData"</code>
+ (<ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">
+ org.richfaces.component.xml.XmlNodeData
+ </ulink>) instances as data, which could be represented by the
+ <emphasis role="bold"><property><rich:tree></property></emphasis> component.
+</para>
+<para>
+ Let's try to build a simple <emphasis role="bold"><property><rich:tree></property></emphasis> from a local XML file.
+ In the following example a simple XML file (stations.xml) is used as a radio station playlist:
+</para>
+ <programlisting role="XML"><![CDATA[<?xml version="1.0"?>
+<station name="KickRadio">
+ <feed date="today">
+ <song time="07:00">Hall & Oates - Kiss On My List</song>
+ <song time="07:03">David Bowie - Let's Dance</song>
+ <song time="07:06">Lyn Collins - Think (About It)</song>
+ <song time="07:10">Kim Carnes - Bette Davis Eyes</song>
+ <song time="07:15">KC & the Sunshine Band - Give It Up</song>
+ </feed>
+</station>]]></programlisting>
+<para>
+ Now you need a bean that holds a model nodes:
+</para>
+<programlisting role="JAVA"><![CDATA[...
+private TreeNode data;
...
- </rich:tree>
-</h:form>
+FacesContext context = FacesContext.getCurrentInstance();
+data = XmlTreeDataBuilder.build(new InputSource(getClass().getResourceAsStream("stations.xml")));
...]]></programlisting>
-
- <para> The example represents definition of two different <emphasis role="bold">
- <property> <rich:treeNode></property>
- </emphasis> components. The first specifies the album that's available for sale, the
- other specifies the album that is not available. The result is shown on the following
- screenshot: </para>
-
- <figure>
- <title> Using the <emphasis>
- <property>"type"</property>
- </emphasis> and the <emphasis>
- <property>"rendered"</property>
- </emphasis> attributes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tree4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can define an EL-expression for <emphasis>
- <property>"nodeFace"</property>
- </emphasis> attribute. See an example: </para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="JAVA"><![CDATA[nodeFace="#{data.name != 'param-value' ? 'artist' : 'album'}" ]]></programlisting>
-
- <para>Switching on treeNode could be performed in three modes. Modes could be specified with <emphasis>
- <property>"switchType"</property>
- </emphasis> attribute. </para>
-
- <itemizedlist>
- <listitem>Ajax - Ajax submission is used for switching </listitem>
- <listitem>Server - regular form submission request is used</listitem>
- <listitem>Client - switching is done as a whole on a client, no interaction with the server
- presents</listitem>
- </itemizedlist>
-
- <para>If <emphasis>
- <property>"ajaxSubmitSelection"</property>
- </emphasis> attribute value set to <emphasis>
- <property>"true"</property>
- </emphasis> than any change in selection initiates an Ajax request to the server.</para>
-
- <para> The <emphasis>
- <property>"icon"</property>
- </emphasis>, <emphasis>
- <property>"iconCollapsed"</property>
- </emphasis>, <emphasis>
- <property>"iconExpanded"</property>
- </emphasis>, <emphasis>
- <property>"iconLeaf"</property>
- </emphasis> attributes define icons for the component. Also you can define icons using facets
- with the same names. If the facets are defined, the corresponding attributes are ignored and
- facets contents are used as icons. By default the width of a rendered facet area is 16px. </para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
-
- <programlisting role="XML"><![CDATA[...
- <rich:tree ....>
- ...
- <f:facet name="icon">
- <h:graphicImage value="/images/tree/singer.png "/>
- </f:facet>
- <f:facet name="iconCollapsed">
- <h:graphicImage value="/images/tree/singer.png" />
- </f:facet>
- <f:facet name="iconExpanded">
- <h:graphicImage value="/images/tree/singer.png" />
- </f:facet>
- <f:facet name="iconLeaf">
- <h:graphicImage value="/images/tree/song.png" />
- </f:facet>
- ...
- </rich:tree>
+<para>
+ Finally you should set the <emphasis><property>"value"</property></emphasis> attribute to the
+ <code>data</code> bean property and define the <emphasis><property>"var"</property></emphasis> attribute in order to
+ refer to the data of nodes:
+</para>
+<programlisting role="XML"><![CDATA[...
+<rich:tree id="treeXML" value="#{stations.data}" var="vardata">
+ <rich:treeNode>
+ <h:outputText value="#{vardata.attributes['name']}" />
+ <h:outputText value="#{vardata.attributes['date']}" />
+ <h:outputText value="#{vardata.attributes['time']}" />
+ <h:outputText value=" #{vardata.text}" />
+ </rich:treeNode>
+</rich:tree>
...]]></programlisting>
-
- <para> The <emphasis role="bold">
- <property><rich: tree></property>
- </emphasis> component can be used together with <emphasis role="bold">
- <property><rich: treeNodeAdaptor></property>
- </emphasis>. In this case there is no need to specify the attributes <emphasis>
- <property>"value"</property>
- </emphasis> and <emphasis>
- <property>"var"</property>
- </emphasis>. Besides, visual representation shouldn't be defined right in the
- <property>tree</property>. In this case a tree tag is intended mainly for defining common
- attributes such as <emphasis>
- <property>"ajaxSubmitSelection"</property>
- </emphasis>, for instance. </para>
-
- </section-->
-
- <section>
- <title>Details of Usage</title>
- <para>As it has been mentioned <link linkend="tree">above</link> the <emphasis
- role="bold">
- <property><rich:tree></property>
- </emphasis> component allows rendering any tree-like data model.</para>
- <para>The component interacts with data model via
- <code>"TreeNode"</code> interface (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.model.TreeNode</ulink>) that is used for tree
- nodes representation. The <emphasis>
- <property>"value"</property>
- </emphasis> attribute of the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component contains a nodes structure defined in a bean
- property. The property keeps a structure of objects that implements
- <code>"TreeNode"</code> interface.</para>
- <para><emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> has a property
- <property>"data"</property> (see <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.model.TreeNode</ulink>). Data contained in
- the property is placed in a request scope variable, which name is
- defined with <emphasis>
- <property>"var"</property>
- </emphasis> attribute for the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component.</para>
- <para>You can develop and use your own pattern of the
- <code>"TreeNode"</code> interface or use a
- default implementation, which is defined with a default class
- <code>"TreeNodeImpl"</code> (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.model.TreeNodeImpl</ulink>).</para>
- <para>There is a <code>"XmlTreeDataBuilder"</code> class
- (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.component.xml.XmlTreeDataBuilder</ulink>)
- that allows transforming XML into structures of objects containing
- <code>"XmlNodeData"</code> (<ulink
- url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
- >org.richfaces.component.xml.XmlNodeData</ulink>) instances
- as data, which could be represented by the <emphasis role="bold">
- <property><rich:tree></property>
- </emphasis> component.</para>
+ <para>This is a result:</para>
+ <figure>
+ <title>A simple <emphasis role="bold"><property><rich:tree></property></emphasis> from a local XML file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/treeXML.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<para>It's possible to define a visual representation of a node data
model (to define a node icon) and its behavior in correspondence with
the data contained in this node (with a value of the <emphasis>
Added: trunk/docs/userguide/en/src/main/resources/images/treeXML.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/treeXML.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
15 years, 10 months
JBoss Rich Faces SVN: r12629 - trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-11 09:24:11 -0500 (Wed, 11 Feb 2009)
New Revision: 12629
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/components.xml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
Log:
Resolved A4J/Seam filters conflict: removed separate Richfaces filter from web.xml, Seam installs it automatically
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/components.xml 2009-02-11 11:30:52 UTC (rev 12628)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/components.xml 2009-02-11 14:24:11 UTC (rev 12629)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"
xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:web="http://jboss.com/products/seam/web"
xmlns:security="http://jboss.com/products/seam/security"
xmlns:transaction="http://jboss.com/products/seam/transaction"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -14,4 +15,6 @@
<transaction:no-transaction />
+ <web:ajax4jsf-filter force-parser="true" />
+
</components>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml 2009-02-11 11:30:52 UTC (rev 12628)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml 2009-02-11 14:24:11 UTC (rev 12629)
@@ -61,25 +61,6 @@
<param-name>org.richfaces.LoadScriptStrategy</param-name>
<param-value>#{configurator.loadScriptStrategy}</param-value>
</context-param>
- <!--
- -->
- <filter>
- <display-name>Ajax4jsf Filter</display-name>
- <filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- <init-param>
- <param-name>forceparser</param-name>
- <param-value>true</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>ajax4jsf</filter-name>
- <servlet-name>Faces Servlet</servlet-name>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- <dispatcher>ERROR</dispatcher>
- </filter-mapping>
<!-- Seam -->
15 years, 10 months
JBoss Rich Faces SVN: r12628 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/WEB-INF and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-02-11 06:30:52 -0500 (Wed, 11 Feb 2009)
New Revision: 12628
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxValidator/ajaxValidatorTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java
Log:
RF-5995 RF-5996
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java 2009-02-11 11:11:18 UTC (rev 12627)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/validation/ValidationBean.java 2009-02-11 11:30:52 UTC (rev 12628)
@@ -29,6 +29,10 @@
*/
public class ValidationBean {
+ public void init() {
+ this.rendered = true;
+ }
+
static final String INPUT_TEXT = "text";
public static final String STATUS_TEXT = "UPDATE_MODEL";
@@ -38,6 +42,8 @@
private String status;
private User user = new User();
+
+ private Boolean rendered;
public User getUser() {
return user;
@@ -108,4 +114,12 @@
public void setStatus(String status) {
this.status = status;
}
+
+ public void setRendered(Boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public Boolean getRendered() {
+ return rendered;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2009-02-11 11:11:18 UTC (rev 12627)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2009-02-11 11:30:52 UTC (rev 12628)
@@ -286,7 +286,7 @@
<managed-bean>
<managed-bean-name>validationBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.bean.validation.ValidationBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>dndBean</managed-bean-name>
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxValidator/ajaxValidatorTest.xhtml
===================================================================
(Binary files differ)
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-02-11 11:11:18 UTC (rev 12627)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxValidatorTest.java 2009-02-11 11:30:52 UTC (rev 12628)
@@ -20,6 +20,8 @@
*/
package org.richfaces.testng;
+import junit.framework.Assert;
+
import org.ajax4jsf.template.Template;
import org.richfaces.SeleniumTestBase;
import org.testng.annotations.Test;
@@ -34,9 +36,11 @@
private static final String ERR_MSG_POSTFIX = "_err_msg";
+ private static final String RESET_METHOD = "#{validationBean.init}";
+
@Test
public void testAjaxValidatorComponentWithStandartValidators(Template template) {
- renderPage(template);
+ renderPage(template, RESET_METHOD);
writeStatus("Check ajax validator component with standart validators. "
+ "Validation has to be occured by javascript event 'onblur'");
@@ -58,8 +62,7 @@
assertPresent(tfNameErrMsg);
writeStatus("Age must be greater than or equal to 18. Type less than that");
- type(tfAgeId, "3");
- selenium.fireEvent(tfAgeId, "blur");
+ selenium.type(tfAgeId, "3");
waitForAjaxCompletion();
assertPresent(tfAgeErrMsg);
@@ -70,16 +73,32 @@
waitForAjaxCompletion();
assertNotPresent(tfNameErrMsg);
- type(tfAgeId, "33");
- selenium.fireEvent(tfAgeId, "blur");
+ selenium.type(tfAgeId, "33");
waitForAjaxCompletion();
assertNotPresent(tfAgeErrMsg);
}
@Test
+ public void testRendered(Template template) {
+ renderPage(template, RESET_METHOD);
+
+ String rendered = getParentId() + "attrForm" + ":rendered";
+ String tfNameId = getParentId() + "_form:" + NAME;
+ String tfNameErrMsg = tfNameId + ERR_MSG_POSTFIX;
+ type(tfNameId, "Mi");
+ selenium.fireEvent(tfNameId, "blur");
+ waitForAjaxCompletion();
+ assertPresent(tfNameErrMsg);
+ clickAjaxCommandAndWait(rendered);
+ type(tfNameId, "Mi");
+ selenium.fireEvent(tfNameId, "blur");
+ assertNotPresent(tfNameErrMsg);
+ }
+
+ @Test
public void testAjaxValidatorComponentWithHibernateValidator(Template template) {
- renderPage(template);
+ renderPage(template, RESET_METHOD);
writeStatus("Check ajax validator component with hibernate validator. "
+ "Validation has to be occured by javascript event 'onblur'");
15 years, 10 months
JBoss Rich Faces SVN: r12627 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/progressBar and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-02-11 06:11:18 -0500 (Wed, 11 Feb 2009)
New Revision: 12627
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarRerenderOnCompleteTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
Log:
Progress bar selenium tests
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java 2009-02-11 09:17:30 UTC (rev 12626)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ProgressBarTestBean.java 2009-02-11 11:11:18 UTC (rev 12627)
@@ -31,6 +31,7 @@
private int content = 0;
private Long value = -5L;
+ private Long secondValue = -1L;
public String getDate() {
return String.valueOf(new Date().getTime());
@@ -40,8 +41,9 @@
return String.valueOf(new Date().getTime());
}
- public void reset(ActionEvent event) {
+ public void reset() {
this.value = -5L;
+ this.secondValue = -1L;
}
public void complete(ActionEvent event) {
@@ -95,6 +97,21 @@
this.content = 0;
}
}
+
+ /**
+ * @return the secondValue
+ */
+ public Long getSecondValue() {
+ secondValue++;
+ return secondValue;
+ }
+
+ /**
+ * @param secondValue the secondValue to set
+ */
+ public void setSecondValue(Long secondValue) {
+ this.secondValue = secondValue;
+ }
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarRerenderOnCompleteTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarRerenderOnCompleteTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/progressBar/progressBarTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java 2009-02-11 09:17:30 UTC (rev 12626)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java 2009-02-11 11:11:18 UTC (rev 12627)
@@ -33,19 +33,22 @@
private static Map<String, String> params = new HashMap<String, String>();
+ private final static String RESET_METHOD = "#{progressBarBean.reset}";
static {
params.put("parameter1", "value1");
params.put("parameter2", "value2");
params.put("parameter3", "value3");
}
+
+ private final static String RERENDER_AFTER_COMPLETE_TEST_URL = "pages/progressBar/progressBarRerenderOnCompleteTest.xhtml";
@Test
public void testProgressBarComponent(Template template) {
- renderPage(template);
+ renderPage(template, RESET_METHOD);
+
String parentId = getParentId() + "_form:";
-
String progressBarId = parentId + "progressBar1";
int value = getProgressBarValue(progressBarId);
Assert.assertTrue(value < 0, "Progress value should be negative");
@@ -93,7 +96,7 @@
Assert.assertTrue(text.startsWith("Process completed"), "Comlete facet does not appear");
// - Test client mode
-
+
writeStatus("Check value");
progressBarId = parentId + "progressBar2";
value = getProgressBarValue(progressBarId);
@@ -113,9 +116,6 @@
writeStatus("Check value");
Assert.assertTrue(value == 60, "Progress value should be 60");
- clickById(parentId + "_reset");
- waitForAjaxCompletion();
-
}
@Test
@@ -128,6 +128,14 @@
}
@Test
+ public void testActionListenersWithExternalValidationFailure(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test action listener attribute");
+ tester.testExtrenalValidationFailure();
+ }
+
+ @Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, null);
@@ -192,6 +200,30 @@
tester.testAjaxSingleWithInternalValidationFailed();
}
+ @Test
+ public void testAjaxSingleWithExternalProcessValidationFailed(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test ajaxSingle attribute in case of external validation failure");
+ tester.testAjaxSingleWithProcesExternalValidation(false);
+ }
+
+ @Test
+ public void testReRender(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test reRender attribute");
+ tester.testReRender();
+ }
+
+ @Test
+ public void testReRenderAfterComplete(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(RERENDER_AFTER_COMPLETE_TEST_URL, template, RESET_METHOD);
+ writeStatus("Test reRenderAfterComplete attribute");
+ tester.testReRender();
+ }
+
private void enableProgressBar(String id, boolean enable) {
invokeFromComponent(id, (enable ? "enable" : "disable"), null);
}
15 years, 10 months
JBoss Rich Faces SVN: r12626 - in trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces: testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-02-11 04:17:30 -0500 (Wed, 11 Feb 2009)
New Revision: 12626
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
Log:
RF-6046, RF-6042, RF-6047
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-02-11 00:30:21 UTC (rev 12625)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-02-11 09:17:30 UTC (rev 12626)
@@ -73,7 +73,7 @@
this.base = base;
}
- private void navigate() {
+ public void navigate() {
base.navigate();
base.waiteForCondition("document.getElementById('_auto_test_navigation') != null", 10000);
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2009-02-11 00:30:21 UTC (rev 12625)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2009-02-11 09:17:30 UTC (rev 12626)
@@ -79,6 +79,60 @@
}
@Test
+ public void testOutput(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+
+ String componentId = tester.getClientId(AutoTester.COMPONENT_ID);
+ if (!"Link".equals(getHTMLById(componentId))) {
+ Assert.fail("Command link should be output as link with text defined as value attribute");
+ }
+
+ int i = selenium.getXpathCount("//a[@id='"+componentId+"']").intValue();
+ if (i != 1) {
+ Assert.fail("Command link should be rendered as <a> tag");
+ }
+
+ }
+
+ @Test
+ public void testNavigationForAjaxSingle(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(TEST_NAVIGATION_URL, template, null);
+
+ // Set ajaxSingle mode
+ tester.reset();
+ tester.setupControl(AutoTester.TestSetupEntry.ajaxSingle, true);
+ tester.clickLoad();
+
+ tester.setExtrenalValidationFailed();
+ tester.navigate();
+
+ tester.checkAction(true);
+ tester.checkActionListener(true);
+ tester.checkNestedActionListener(true);
+ tester.checkUpdateModel(false);
+ }
+
+ @Test
+ public void testNavigationForImmediate(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(TEST_NAVIGATION_URL, template, null);
+
+ // Set immediate mode
+ tester.reset();
+ tester.setupControl(AutoTester.TestSetupEntry.immediate, true);
+ tester.clickLoad();
+
+ tester.navigate();
+
+ tester.checkAction(true);
+ tester.checkActionListener(true);
+ tester.checkNestedActionListener(true);
+ tester.checkUpdateModel(false);
+ }
+
+ @Test
public void testNavigation(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(TEST_NAVIGATION_URL, template, null);
@@ -139,7 +193,7 @@
@Test
public void testAjaxCommandLinkComponent(Template template) {
- renderPage(template);
+ renderPage(template, null);
String parentId = getParentId() + "_form:";
@@ -249,5 +303,7 @@
public void navigate() {
clickById(getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
}
+
+
}
15 years, 10 months
JBoss Rich Faces SVN: r12625 - trunk/sandbox/cdk.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-02-10 19:30:21 -0500 (Tue, 10 Feb 2009)
New Revision: 12625
Removed:
trunk/sandbox/cdk/maven-resource-dependency-plugin/
Modified:
trunk/sandbox/cdk/pom.xml
Log:
maven-resource-dependency-plugin moved to main build
Modified: trunk/sandbox/cdk/pom.xml
===================================================================
--- trunk/sandbox/cdk/pom.xml 2009-02-11 00:28:27 UTC (rev 12624)
+++ trunk/sandbox/cdk/pom.xml 2009-02-11 00:30:21 UTC (rev 12625)
@@ -27,6 +27,5 @@
</pluginManagement>
</build>
<modules>
- <module>maven-resource-dependency-plugin</module>
</modules>
</project>
\ No newline at end of file
15 years, 10 months
JBoss Rich Faces SVN: r12624 - in trunk/cdk: maven-resource-dependency-plugin and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-02-10 19:28:27 -0500 (Tue, 10 Feb 2009)
New Revision: 12624
Added:
trunk/cdk/maven-resource-dependency-plugin/
Modified:
trunk/cdk/maven-resource-dependency-plugin/pom.xml
trunk/cdk/pom.xml
Log:
maven-resource-dependency-plugin moved to main build
Copied: trunk/cdk/maven-resource-dependency-plugin (from rev 12609, trunk/sandbox/cdk/maven-resource-dependency-plugin)
Property changes on: trunk/cdk/maven-resource-dependency-plugin
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/cdk/maven-resource-dependency-plugin/pom.xml
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/pom.xml 2009-02-10 12:13:58 UTC (rev 12609)
+++ trunk/cdk/maven-resource-dependency-plugin/pom.xml 2009-02-11 00:28:27 UTC (rev 12624)
@@ -2,13 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>cdk</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
+ <groupId>org.richfaces</groupId>
<version>3.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.cdk.sandbox</groupId>
+ <groupId>org.richfaces.cdk</groupId>
<artifactId>maven-resource-dependency-plugin</artifactId>
<packaging>maven-plugin</packaging>
@@ -102,11 +102,6 @@
<artifactId>commons-beanutils</artifactId>
<version>1.8.0</version>
</dependency>
- <dependency>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>generator</artifactId>
- <version>3.3.1-SNAPSHOT</version>
- </dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
Modified: trunk/cdk/pom.xml
===================================================================
--- trunk/cdk/pom.xml 2009-02-10 23:58:31 UTC (rev 12623)
+++ trunk/cdk/pom.xml 2009-02-11 00:28:27 UTC (rev 12624)
@@ -33,7 +33,7 @@
<module>maven-archetype-jsf-component</module>
<module>maven-archetype-jsfwebapp</module>
<module>maven-archetype-plug-n-skin</module>
-
+ <module>maven-resource-dependency-plugin</module>
</modules>
15 years, 10 months