JBoss Rich Faces SVN: r462 - trunk/richfaces/simpleTogglePanel/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-04-20 03:15:55 -0400 (Fri, 20 Apr 2007)
New Revision: 462
Modified:
trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-108 fixed
Modified: trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-04-20 00:31:19 UTC (rev 461)
+++ trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-04-20 07:15:55 UTC (rev 462)
@@ -20,7 +20,7 @@
scripts/simpleTogglePanel.js
</h:scripts>
- <div id="#{clientId}" x:passThruWithExclusions="id,value,styleClass"
+ <div id="#{clientId}" x:passThruWithExclusions="id,value"
class="dr-stglpnl rich-stglpanel #{component.attributes['styleClass']}"
style="width: #{component.attributes['width']}; #{component.attributes['style']};">
19 years
JBoss Rich Faces SVN: r461 - in trunk: richfaces and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-04-19 20:31:19 -0400 (Thu, 19 Apr 2007)
New Revision: 461
Modified:
trunk/pom.xml
trunk/richfaces-samples/dataTableDemo/src/main/java/org/richfaces/Bean.java
trunk/richfaces-samples/dataTableDemo/src/main/webapp/pages/ajax.jsp
trunk/richfaces-samples/pom.xml
trunk/richfaces/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx
trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx
trunk/richfaces/pom.xml
Log:
fix site reports generation
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/pom.xml 2007-04-20 00:31:19 UTC (rev 461)
@@ -31,7 +31,7 @@
<uniqueVersion>true</uniqueVersion>
<url>${snapshotRepository}</url>
</snapshotRepository>
- </distributionManagement>
+ </distributionManagement>
<scm>
<connection>
scm:svn:http://anonsvn.jboss.org/repos/richfaces/
Modified: trunk/richfaces/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/richfaces/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/richfaces/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2007-04-20 00:31:19 UTC (rev 461)
@@ -166,6 +166,8 @@
UIComponent column = null;
while (iter.hasNext()) {
column = (UIComponent) iter.next();
+ // Clear clientId cache, for current row.
+ column.setId(column.getId());
// Start new row for first column - expect a case of the detail
// table, wich will be insert own row.
if (first && !(column instanceof Row)) {
@@ -204,7 +206,7 @@
} else if (column.isRendered()) {
// UIColumn don't have own renderer
writer.startElement(HTML.td_ELEM, table);
- getUtils().encodeId(context, column);
+// getUtils().encodeId(context, column);
String columnClass = holder.getColumnClass(currentColumn);
encodeStyleClass(writer, null, getCellSkinClass(), null,
columnClass);
Modified: trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx
===================================================================
--- trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColgroup.jspx 2007-04-20 00:31:19 UTC (rev 461)
@@ -11,8 +11,7 @@
component="org.richfaces.component.UIColumnGroup"
>
<f:clientid var="clientId"/>
- <tr id="#{clientId}"
- x:passThruWithExclusions="id"
+ <tr x:passThruWithExclusions="id"
>
<vcp:body />
</tr>
Modified: trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx
===================================================================
--- trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/richfaces/dataTable/src/main/templates/org/richfaces/htmlColumn.jspx 2007-04-20 00:31:19 UTC (rev 461)
@@ -13,8 +13,7 @@
component="org.richfaces.component.UIColumn"
>
<f:clientid var="clientId"/>
- <td id="#{clientId}"
- class="#{this:styleClass(context,component)}"
+ <td class="#{this:styleClass(context,component)}"
x:passThruWithExclusions="value,name,type,id,class"
>
<vcp:body/>
Modified: trunk/richfaces/pom.xml
===================================================================
--- trunk/richfaces/pom.xml 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/richfaces/pom.xml 2007-04-20 00:31:19 UTC (rev 461)
@@ -1,317 +1,340 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-parent</artifactId>
- <packaging>pom</packaging>
- <name>RichFaces Components</name>
- <version>3.0.1-SNAPSHOT</version>
- <url>http://richfaces.ajax4jsf.org</url>
- <properties>
- <maven.test.failure.ignore>true</maven.test.failure.ignore>
- </properties>
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.org/jira/browse/RF</url>
- </issueManagement>
- <ciManagement>
- <system>cruisecontrol</system>
- </ciManagement>
- <developers>
- <developer>
- <id>alexsmirnov</id>
- <name>Alexander Smirnov</name>
- <email>alexsmirnov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>ishabalov</id>
- <name>Igor Shabalov</name>
- <email>ishabalov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>+8</timezone>
- </developer>
- <developer>
- <id>sergeysmirnov</id>
- <name>Sergey Smirnov</name>
- <email>sergeysmirnov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>+8</timezone>
- </developer>
- <developer>
- <id>nbelayevsky</id>
- <name>Nik Belyaevsky</name>
- <email>nbelayevsky(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>-2</timezone>
- </developer>
- </developers>
- <licenses>
- <license>
- <name>LGPL 2.1</name>
- <url>http://www.gnu.org/licenses/lgpl.html</url>
- <distribution>repo</distribution>
- <comments>GNU LESSER GENERAL PUBLIC LICENSE Version 2.1</comments>
- </license>
- </licenses>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/trunk/richfaces/</developerConnection>
- <url>http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/</url>
- </scm>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-source</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <modules>
- <module>common</module>
- <module>drag-drop</module>
- <module>panel</module>
- <module>panelbar</module>
- <module>dataFilterSlider</module>
- <module>gmap</module>
- <module>separator</module>
- <module>spacer</module>
- <module>paint2D</module>
- <module>togglePanel</module>
- <module>tabPanel</module>
- <module>simpleTogglePanel</module>
- <module>toolBar</module>
- <module>inputnumber-slider</module>
- <module>inputnumber-spinner</module>
- <module>tree</module>
- <module>suggestionbox</module>
- <module>dataTable</module>
- <module>modal-panel</module>
- <module>datascroller</module>
- <module>menu-components</module>
- <module>dropdown-menu</module>
- <module>panelmenu</module>
- </modules>
- <repositories>
- <repository>
- <releases />
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>maven-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>https://maven-repository.dev.java.net/nonav/repository</url>
- <layout>legacy</layout>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </pluginRepository>
- </pluginRepositories>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.1_02</version>
- <exclusions>
- <exclusion>
- <artifactId>jsp-api</artifactId>
- <groupId>javax.servlet.jsp</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jstl</artifactId>
- <groupId>javax.servlet.jsp.jstl</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.1_02</version>
- <scope>runtime</scope>
- <exclusions>
- <exclusion>
- <artifactId>jsp-api</artifactId>
- <groupId>javax.servlet.jsp</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jstl</artifactId>
- <groupId>javax.servlet.jsp.jstl</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>ajax4jsf</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.ajax4jsf</groupId>
- <artifactId>test</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>htmlunit</groupId>
- <artifactId>htmlunit</artifactId>
- <version>1.10</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.0</version>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.11</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>el-impl</groupId>
- <artifactId>el-impl</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <quiet>true</quiet>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- <configuration>
- <aggregate>true</aggregate>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>changelog-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <xmlOutput>false</xmlOutput>
- <threshold>Normal</threshold>
- <effort>Max</effort>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
- <distributionManagement>
- <repository>
- <uniqueVersion>false</uniqueVersion>
- <id>release-repository</id>
- <url>${releaseRepository}</url>
- </repository>
- <snapshotRepository>
- <id>snap-repository</id>
- <url>${snapshotRepository}</url>
- </snapshotRepository>
- <site>
- <id>richfaces-site</id>
- <url>richfaces/</url>
- </site>
- <downloadUrl>http://labs.jboss.com/portal/jbossrichfaces/downloads</downloadUrl>
- </distributionManagement>
- <profiles>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <packaging>pom</packaging>
+ <name>RichFaces Components</name>
+ <version>3.0.1-SNAPSHOT</version>
+ <url>http://richfaces.ajax4jsf.org</url>
+ <properties>
+ <maven.test.failure.ignore>true</maven.test.failure.ignore>
+ </properties>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/jira/browse/RF</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ </ciManagement>
+ <developers>
+ <developer>
+ <id>alexsmirnov</id>
+ <name>Alexander Smirnov</name>
+ <email>alexsmirnov(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>-3</timezone>
+ </developer>
+ <developer>
+ <id>ishabalov</id>
+ <name>Igor Shabalov</name>
+ <email>ishabalov(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>+8</timezone>
+ </developer>
+ <developer>
+ <id>sergeysmirnov</id>
+ <name>Sergey Smirnov</name>
+ <email>sergeysmirnov(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>+8</timezone>
+ </developer>
+ <developer>
+ <id>nbelayevsky</id>
+ <name>Nik Belyaevsky</name>
+ <email>nbelayevsky(a)exadel.com</email>
+ <organization>Exadel Inc.</organization>
+ <organizationUrl>http://www.exadel.com</organizationUrl>
+ <roles>
+ <role>architect</role>
+ <role>developer</role>
+ </roles>
+ <timezone>-2</timezone>
+ </developer>
+ </developers>
+ <licenses>
+ <license>
+ <name>LGPL 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ <comments>
+ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
+ </comments>
+ </license>
+ </licenses>
+ <scm>
+ <connection>
+ scm:svn:http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/
+ </connection>
+ <developerConnection>
+ scm:svn:https://svn.jboss.org/repos/richfaces/trunk/richfaces/
+ </developerConnection>
+ <url>
+ http://anonsvn.jboss.org/repos/richfaces/trunk/richfaces/
+ </url>
+ </scm>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-source</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <modules>
+ <module>common</module>
+ <module>drag-drop</module>
+ <module>panel</module>
+ <module>panelbar</module>
+ <module>dataFilterSlider</module>
+ <module>gmap</module>
+ <module>separator</module>
+ <module>spacer</module>
+ <module>paint2D</module>
+ <module>togglePanel</module>
+ <module>tabPanel</module>
+ <module>simpleTogglePanel</module>
+ <module>toolBar</module>
+ <module>inputnumber-slider</module>
+ <module>inputnumber-spinner</module>
+ <module>tree</module>
+ <module>suggestionbox</module>
+ <module>dataTable</module>
+ <module>modal-panel</module>
+ <module>datascroller</module>
+ <module>menu-components</module>
+ <module>dropdown-menu</module>
+ <module>panelmenu</module>
+ </modules>
+ <repositories>
+ <repository>
+ <releases />
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>maven-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>
+ https://maven-repository.dev.java.net/nonav/repository
+ </url>
+ <layout>legacy</layout>
+ </repository>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.jboss.org</id>
+ <name>Jboss Repository for Maven Snapshots</name>
+ <url>http://snapshots.jboss.com/</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <updatePolicy>always</updatePolicy>
+ </snapshots>
+ <id>maven2-snapshots.jboss.org</id>
+ <name>Jboss Repository for Maven Snapshots</name>
+ <url>http://snapshots.jboss.com/</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.1_02</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>jsp-api</artifactId>
+ <groupId>javax.servlet.jsp</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.1_02</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>jsp-api</artifactId>
+ <groupId>javax.servlet.jsp</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jstl</artifactId>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>ajax4jsf</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ajax4jsf</groupId>
+ <artifactId>test</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>htmlunit</groupId>
+ <artifactId>htmlunit</artifactId>
+ <version>1.10</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.11</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>
+ maven-project-info-reports-plugin
+ </artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quiet>true</quiet>
+ </configuration>
+ </plugin>
+ <!--
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ --><!--
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ -->
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ </plugin>
+ <!--
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ </plugin>
+ -->
+ <!--
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>changelog-maven-plugin</artifactId>
+ </plugin>
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <configuration>
+ <xmlOutput>false</xmlOutput>
+ <threshold>Normal</threshold>
+ <effort>Max</effort>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+ <distributionManagement>
+ <repository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>release-repository</id>
+ <url>${releaseRepository}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snap-repository</id>
+ <url>${snapshotRepository}</url>
+ </snapshotRepository>
+ <site>
+ <id>richfaces-site</id>
+ <url>richfaces/</url>
+ </site>
+ <downloadUrl>
+ http://labs.jboss.com/portal/jbossrichfaces/downloads
+ </downloadUrl>
+ </distributionManagement>
+ <profiles>
<profile>
<id>clover</id>
<build>
@@ -346,16 +369,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clover-plugin</artifactId>
- <!--
- <configuration>
- <licenseLocation>${clover.license.path}</licenseLocation>
- <jdk>1.5</jdk>
- </configuration>
+ <!--
+ <configuration>
+ <licenseLocation>${clover.license.path}</licenseLocation>
+ <jdk>1.5</jdk>
+ </configuration>
-->
</plugin>
</plugins>
</reporting>
</profile>
- </profiles>
+ </profiles>
</project>
Modified: trunk/richfaces-samples/dataTableDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/richfaces-samples/dataTableDemo/src/main/java/org/richfaces/Bean.java 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/richfaces-samples/dataTableDemo/src/main/java/org/richfaces/Bean.java 2007-04-20 00:31:19 UTC (rev 461)
@@ -36,6 +36,8 @@
private String mounth;
private int total;
+
+ private int price;
private boolean checked=true;
/**
@@ -112,4 +114,18 @@
public void checkChanged(ValueChangeEvent event) {
System.out.println("Checked changed for mounth "+getMounth());
}
+
+ /**
+ * @return the price
+ */
+ public int getPrice() {
+ return price;
+ }
+
+ /**
+ * @param price the price to set
+ */
+ public void setPrice(int price) {
+ this.price = price;
+ }
}
\ No newline at end of file
Modified: trunk/richfaces-samples/dataTableDemo/src/main/webapp/pages/ajax.jsp
===================================================================
--- trunk/richfaces-samples/dataTableDemo/src/main/webapp/pages/ajax.jsp 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/richfaces-samples/dataTableDemo/src/main/webapp/pages/ajax.jsp 2007-04-20 00:31:19 UTC (rev 461)
@@ -25,7 +25,6 @@
styleClass="table" captionClass="caption" rowClasses="rowa,rowb,rowc rowcc"
headerClass="header" footerClass="footer">
<a4j:support event="onRowClick" action="#{master.check}" reRender="checked">
- <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" />
</a4j:support>
<f:facet name="caption"><h:outputText value="caption" /></f:facet>
<f:facet name="header">
Modified: trunk/richfaces-samples/pom.xml
===================================================================
--- trunk/richfaces-samples/pom.xml 2007-04-19 18:10:50 UTC (rev 460)
+++ trunk/richfaces-samples/pom.xml 2007-04-20 00:31:19 UTC (rev 461)
@@ -106,6 +106,10 @@
<uniqueVersion>true</uniqueVersion>
<url>${snapshotRepository}</url>
</snapshotRepository>
+ <site>
+ <id>richfaces-samples-site</id>
+ <url>richfaces-samples/</url>
+ </site>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
19 years
JBoss Rich Faces SVN: r460 - in trunk/richfaces-samples/datascroller-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-04-19 14:10:50 -0400 (Thu, 19 Apr 2007)
New Revision: 460
Modified:
trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java
trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp
Log:
ActionListener added to sample app
Modified: trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java
===================================================================
--- trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java 2007-04-19 18:10:20 UTC (rev 459)
+++ trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java 2007-04-19 18:10:50 UTC (rev 460)
@@ -22,6 +22,8 @@
package org.richfaces;
import java.util.ArrayList;
+import javax.faces.event.ActionEvent;
+
import org.richfaces.event.DataScrollerEvent;
public class TestBean {
@@ -97,7 +99,10 @@
return this.maxpage;
}
-
+ public void onAction(ActionEvent actionEvent) {
+ System.out.println("TestBean.onAction() " + actionEvent);
+ }
+
public void doScroll(DataScrollerEvent event) {
Modified: trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp 2007-04-19 18:10:20 UTC (rev 459)
+++ trunk/richfaces-samples/datascroller-sample/src/main/webapp/pages/index.jsp 2007-04-19 18:10:50 UTC (rev 460)
@@ -58,7 +58,7 @@
</f:facet>
</h:column>
<f:facet name="footer">
- <ds:datascroller for="master" rendered="true" renderIfSinglePage="#{testBean.renderIfSinglePage}" scrollerListener="#{testBean.doScroll}" maxPages="#{testBean.maxpage}"/>
+ <ds:datascroller for="master" rendered="true" actionListener="#{testBean.onAction}" renderIfSinglePage="#{testBean.renderIfSinglePage}" scrollerListener="#{testBean.doScroll}" maxPages="#{testBean.maxpage}"/>
</f:facet>
</h:dataTable>
19 years
JBoss Rich Faces SVN: r459 - in trunk/richfaces/datascroller/src: main/java/org/richfaces/event and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-04-19 14:10:20 -0400 (Thu, 19 Apr 2007)
New Revision: 459
Removed:
trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerAdapter.java
Modified:
trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerEvent.java
trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
trunk/richfaces/datascroller/src/test/java/org/richfaces/event/DataScrollerEventTest.java
Log:
DataScroller code aligned and optimized. ActionListener support added
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-04-19 18:01:31 UTC (rev 458)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-04-19 18:10:20 UTC (rev 459)
@@ -21,27 +21,23 @@
package org.richfaces.component;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxSource;
-import org.richfaces.event.DataScrollerAdapter;
-import org.richfaces.event.DataScrollerEvent;
-import org.richfaces.event.DataScrollerListener;
-import org.richfaces.event.DataScrollerSource;
-
import javax.faces.FacesException;
import javax.faces.component.ActionSource;
-
-import javax.faces.component.UIComponent;
import javax.faces.component.UICommand;
-import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIData;
import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
-import javax.faces.event.ActionListener;
+import javax.faces.event.PhaseId;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.richfaces.event.DataScrollerEvent;
+import org.richfaces.event.DataScrollerListener;
+import org.richfaces.event.DataScrollerSource;
+
/**
* JSF component class
*/
@@ -65,9 +61,6 @@
public static final String FAST_REWIND_FACET_NAME = "fastrewind";
- private transient UIData _UIData;
- private transient boolean allowCache;
-
public void addScrollerListener(DataScrollerListener listener) {
addFacesListener(listener);
}
@@ -83,10 +76,16 @@
public void broadcast(FacesEvent event) throws AbortProcessingException {
super.broadcast(event);
if (event instanceof DataScrollerEvent) {
+ DataScrollerEvent dataScrollerEvent = (DataScrollerEvent) event;
+ setPage(dataScrollerEvent.getNewScrolVal());
- if (getScrollerListeners().length < 1) {
- addScrollerListener(new DataScrollerAdapter(getScrollerListener()));
- event.queue();
+ FacesContext context = FacesContext.getCurrentInstance();
+ AjaxRendererUtils.addRegionByName(context, this, this.getId());
+ AjaxRendererUtils.addRegionByName(context, this, this.getFor());
+
+ MethodBinding scrollerListener = getScrollerListener();
+ if (scrollerListener != null) {
+ scrollerListener.invoke(context, new Object[] {event});
}
}
}
@@ -147,76 +146,12 @@
public abstract void setStyle(String styleClass);
- public abstract String getHandleValue();
-
- public abstract void setHandleValue(String handleValue);
-
- //TODO nick -> alex - it's better not to cache reference here - the component can be encoded
- //with different "for" values. we can cache it, but than we should set it on phase start and
- //reset it to null on phase end:
- //public processUpdates(...) {
- // try { allowCache = true; ... } finally { allowCache = false; _UIData = null; }
- //}
-
- public void processUpdates(FacesContext context) {
- try {
-
- } catch (RuntimeException e) {
- context.renderResponse();
- throw e;
- } finally {
- allowCache = false;
- _UIData = null;
- }
- }
-
- public void processValidators(FacesContext context) {
- try {
-
- } catch (RuntimeException e) {
- context.renderResponse();
- throw e;
- } finally {
- allowCache = false;
- _UIData = null;
- }
- }
-
- public void processDecodes(FacesContext context) {
- try {
- decode(context);
-
- } catch (RuntimeException e) {
- context.renderResponse();
- throw e;
- } finally {
- allowCache = false;
- _UIData = null;
- }
- }
-
-// private UIData getUIData() {
-// if (_UIData == null) {
-// _UIData = getDataTable();
-// }
-// return _UIData;
-// }
-
- private UIData getUIData() {
- if (!allowCache) {
- _UIData = getDataTable();
- allowCache = true;
- }
- return _UIData;
- }
-
-
/**
* Finds the dataTable which id is mapped to the "for" property
*
* @return the dataTable component
*/
- protected UIData getDataTable() {
+ public UIData getDataTable() {
String forAttribute = getFor();
UIComponent forComp;
if (forAttribute == null) {
@@ -242,15 +177,9 @@
return (UIData) forComp;
}
- /**
- * Gets the index of the current page
- *
- * @return the page index
- */
- public int getPageIndex() {
- UIData uiData = getUIData();
+ public int getPageIndex(UIData uiData) {
//xxxx nick -> alex - suppose this.getRows() would be better here
- int rows = getRows();
+ int rows = getRows(uiData);
if (0 == rows) {
throw new FacesException("Missing 'rows' attribute on component '"
+ uiData.getId() + "'");
@@ -259,16 +188,26 @@
int pageIndex;
if (rows > 0) {
//xxxx nick -> alex - suppose this.getFirst() would be better here
- pageIndex = getFirstRow() / rows + 1;
+ pageIndex = getFirstRow(uiData) / rows + 1;
} else {
//TODO nick -> nick - is it valid if under 0?
pageIndex = 0;
}
- if (getFirstRow() % rows > 0) {
+ if (getFirstRow(uiData) % rows > 0) {
pageIndex++;
}
return pageIndex;
}
+
+ /**
+ * Gets the index of the current page
+ *
+ * @return the page index
+ */
+ public int getPageIndex() {
+ UIData uiData = getDataTable();
+ return getPageIndex(uiData);
+ }
/**
* Sets the page number according to the parameter recived from the
@@ -278,18 +217,18 @@
*/
public void setPage(String facetName) {
- UIData dataTable = getUIData();
+ UIData dataTable = getDataTable();
// check if facet is selected
if (FIRST_FACET_NAME.equals(facetName)) {
dataTable.setFirst(0);
} else if (PREVIOUS_FACET_NAME.equals(facetName)) {
- int previous = dataTable.getFirst() - getRows();
+ int previous = dataTable.getFirst() - getRows(dataTable);
if (previous >= 0) dataTable.setFirst(previous);
} else if (NEXT_FACET_NAME.equals(facetName)) {
- int rows = getRows();
+ int rows = getRows(dataTable);
int next = dataTable.getFirst() + rows;
- if (next < getRowCount()) dataTable.setFirst(next);
+ if (next < getRowCount(dataTable)) dataTable.setFirst(next);
//if (rows>0){
// if (((next+rows)/rows)>getMaxPages()){
// next=getMaxPages()*rows-rows;;
@@ -297,10 +236,10 @@
//}
} else if (FAST_FORWARD_FACET_NAME.equals(facetName)) {
int fastStep = getFastStep();
- int rows = getRows();
+ int rows = getRows(dataTable);
if (fastStep <= 0) fastStep = 1;
int next = dataTable.getFirst() + rows * fastStep;
- int rowcount = getRowCount();
+ int rowcount = getRowCount(dataTable);
if (next >= rowcount)
next = (rowcount - 1) - ((rowcount - 1) % rows);
//if (rows>0){
@@ -312,12 +251,12 @@
} else if (FAST_REWIND_FACET_NAME.equals(facetName)) {
int fastStep = getFastStep();
if (fastStep <= 0) fastStep = 1;
- int previous = dataTable.getFirst() - getRows() * fastStep;
+ int previous = dataTable.getFirst() - getRows(dataTable) * fastStep;
if (previous < 0) previous = 0;
dataTable.setFirst(previous);
} else if (LAST_FACET_NAME.equals(facetName)) {
- int rowcount = getRowCount();
- int rows = getRows();
+ int rowcount = getRowCount(dataTable);
+ int rows = getRows(dataTable);
int delta = rowcount % rows;
int first = delta > 0 && delta < rows ? rowcount - delta : rowcount
- rows;
@@ -335,13 +274,13 @@
// the paginator is selected
else {
int pageindex = Integer.parseInt(facetName);
- int pageCount = getPageCount();
+ int pageCount = getPageCount(dataTable);
if (pageindex > pageCount) {
pageindex = pageCount;
} else if (pageindex <= 0) {
pageindex = 1;
}
- dataTable.setFirst(getRows() * (pageindex - 1));
+ dataTable.setFirst(getRows(dataTable) * (pageindex - 1));
}
}
@@ -352,8 +291,8 @@
* @param page number
*/
public void setPageIndex(int page) {
- UIData uiData = getUIData();
- int rows = getRows();
+ UIData uiData = getDataTable();
+ int rows = getRows(uiData);
if (0 == rows) {
throw new FacesException("Missing 'rows' attribute on component '"
+ uiData.getId() + "'");
@@ -363,16 +302,13 @@
}
}
- /**
- * @return the page count of the uidata
- */
- public int getPageCount() {
- //UIData uiData = getUIData();
- int rows = getRows();
+ public int getPageCount(UIData data) {
+ int rows = getRows(data);
int pageCount;
if (rows > 0) {
- pageCount = rows <= 0 ? 1 : getRowCount() / rows;
- if (getRowCount() % rows > 0) {
+ int rowCount = getRowCount(data);
+ pageCount = rows <= 0 ? 1 : rowCount / rows;
+ if (rowCount % rows > 0) {
pageCount++;
}
if (pageCount == 0) {
@@ -384,7 +320,23 @@
}
return pageCount;
}
+
+ /**
+ * @return the page count of the uidata
+ */
+ public int getPageCount() {
+ return getPageCount(getDataTable());
+ }
+ public int getRowCount(UIData data) {
+ int rowCount = data.getRowCount();
+ if (rowCount >= 0) {
+ return rowCount;
+ }
+
+ return BinarySearch.search(data);
+ }
+
/**
* @return int
*/
@@ -395,21 +347,25 @@
// setPage() { setRowIndex(pageIdx * rows); }
// isPageAvailable() { return isRowAvailable() }
//return getUIData().getRowCount();
- return new BinarySearch().search(getUIData());
+ return getRowCount(getDataTable());
}
- /**
- * @return int
- */
- public int getRows() {
+ public int getRows(UIData data) {
int row = 0;
- row = getUIData().getRows();
+ row = data.getRows();
if (row == 0) {
- row = getRowCount();
+ row = getRowCount(data);
}
return row;
}
+
+ /**
+ * @return int
+ */
+ public int getRows() {
+ return getRows(getDataTable());
+ }
// facet getter methods
public UIComponent getFirst() {
@@ -436,15 +392,19 @@
return getFacet(PREVIOUS_FACET_NAME);
}
+ public int getFirstRow(UIData data) {
+ return data.getFirst();
+ }
+
/**
* @return int
*/
public int getFirstRow() {
- return getUIData().getFirst();
+ return getFirstRow(getDataTable());
}
public void setFirstRow(int rows) {
- getUIData().setFirst(rows);
+ getDataTable().setFirst(rows);
}
public String getFamily() {
@@ -452,35 +412,40 @@
}
static class BinarySearch {
- public int search(UIData data) {
- int n = 1;
- int k = 2;
- for (; ;) {
- data.setRowIndex(k - 1);
- if (data.isRowAvailable()) {
- n = k;
- k = k * 2;
- } else {
- break;
+ public static int search(UIData data) {
+ int rowIndex = data.getRowIndex();
+ try {
+ int n = 1;
+ int k = 2;
+ for (; ;) {
+ data.setRowIndex(k - 1);
+ if (data.isRowAvailable()) {
+ n = k;
+ k = k * 2;
+ } else {
+ break;
+ }
}
- }
- while (n < k) {
- int kk = Math.round((n + k) / 2) + 1;
- data.setRowIndex(kk - 1);
+ while (n < k) {
+ int kk = Math.round((n + k) / 2) + 1;
+ data.setRowIndex(kk - 1);
+ if (data.isRowAvailable()) {
+ n = kk;
+ } else {
+ k = kk - 1;
+ }
+ }
+
+ data.setRowIndex(k - 1);
if (data.isRowAvailable()) {
- n = kk;
+ return k;
} else {
- k = kk - 1;
+ return 0;
}
+ } finally {
+ data.setRowIndex(rowIndex);
}
-
- data.setRowIndex(k - 1);
- if (data.isRowAvailable()) {
- return k;
- } else {
- return 0;
- }
}
}
}
Deleted: trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerAdapter.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerAdapter.java 2007-04-19 18:01:31 UTC (rev 458)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerAdapter.java 2007-04-19 18:10:20 UTC (rev 459)
@@ -1,109 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.event;
-
-import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponentBase;
-import javax.faces.el.MethodBinding;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.component.UIDatascroller;
-
-
-public class DataScrollerAdapter implements DataScrollerListener, StateHolder {
-
- public static Class[] SIGNATURE = new Class[] { DataScrollerEvent.class };
-
- private MethodBinding scrollerMethod;
- private boolean scrolerTransient;
-
- /**
- * empty constructor needed.
- *
- */
- public DataScrollerAdapter() {
- }
-
-
- public DataScrollerAdapter(MethodBinding myScrollerMethod) {
- scrollerMethod = myScrollerMethod;
- }
-
- /**
- * Processes a SliderEvent.
- *
- * @param event the slider event
- */
- public void processScroller(DataScrollerEvent event) {
- FacesContext context = FacesContext.getCurrentInstance();
- if (scrollerMethod!=null){
- scrollerMethod.invoke(context, new Object[]{event});
- }
- UIDatascroller scroller = ((UIDatascroller)event.getComponent());
- scroller.setPage(event.getNewScrolVal());
- scroller.setHandleValue(event.getNewScrolVal());
- }
-
- /**
- * Saves the internal state of this DataFilterSliderAdapter.
- *
- * @param context the Faces context
- *
- * @return the saved state
- */
- public Object saveState(FacesContext context) {
- return UIComponentBase.saveAttachedState(context, scrollerMethod);
- }
-
- /**
- * Restores the internal state of this DataFilterSliderAdapter.
- *
- * @param context the Faces context
- * @param object the state to restore
- */
- public void restoreState(FacesContext context, Object object){
- scrollerMethod = (MethodBinding) UIComponentBase.restoreAttachedState(context, object);
- }
-
- /**
- * Returns true if this DataFilterSliderAdapter is transient and should
- * not be state saved, otherwise false.
- *
- * @return the value of transient
- */
- public boolean isTransient() {
- return scrolerTransient;
- }
-
- /**
- * Indicates whether or not this DataFilterSliderAdapter is transient and should
- * not be state saved.
- *
- * @param isTransient the new value for transient
- */
- public void setTransient(
-
- boolean isTransient) {
- scrolerTransient = isTransient;
- }
-
-}
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerEvent.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerEvent.java 2007-04-19 18:01:31 UTC (rev 458)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/event/DataScrollerEvent.java 2007-04-19 18:10:20 UTC (rev 459)
@@ -22,16 +22,19 @@
package org.richfaces.event;
import javax.faces.component.UIComponent;
-import javax.faces.event.PhaseId;
+import javax.faces.event.ActionEvent;
import javax.faces.event.FacesListener;
-import javax.faces.event.FacesEvent;
/**
* @author Wesley Hales
*/
-public class DataScrollerEvent extends FacesEvent {
+public class DataScrollerEvent extends ActionEvent {
- private String oldScrolVal;
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2657353903701932561L;
+ private String oldScrolVal;
private String newScrolVal;
/**
@@ -43,7 +46,6 @@
*/
public DataScrollerEvent(UIComponent component, String thisOldScrolVal, String thisNewScrolVal) {
super(component);
- setPhaseId(PhaseId.INVOKE_APPLICATION);
oldScrolVal = thisOldScrolVal;
newScrolVal = thisNewScrolVal;
}
@@ -57,7 +59,7 @@
}
public boolean isAppropriateListener(FacesListener listener){
- return (listener instanceof DataScrollerListener);
+ return super.isAppropriateListener(listener) || (listener instanceof DataScrollerListener);
}
/**
@@ -66,6 +68,13 @@
* @param listener the slider listener
*/
public void processListener(FacesListener listener){
- ((DataScrollerListener) listener).processScroller(this);
+ if (listener instanceof DataScrollerListener) {
+ DataScrollerListener dataScrollerListener = (DataScrollerListener) listener;
+ dataScrollerListener.processScroller(this);
+ }
+
+ if (super.isAppropriateListener(listener)) {
+ super.processListener(listener);
+ }
}
}
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-04-19 18:01:31 UTC (rev 458)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-04-19 18:10:20 UTC (rev 459)
@@ -25,11 +25,13 @@
import java.util.Map;
import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import javax.faces.event.ActionEvent;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.ComponentVariables;
+import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
import org.ajax4jsf.framework.util.javascript.JSFunction;
import org.richfaces.component.UIDatascroller;
@@ -47,93 +49,63 @@
UIDatascroller scroller = (UIDatascroller) component;
- //if ((scroller.getRowCount()-scroller.getFirstRow())<scroller.getRows() && scroller.getRowCount()>=scroller.getRows()){
- // scroller.setFirstRow(scroller.getRowCount()-scroller.getRows()+1);
- //}
-
- if (scroller.getHandleValue() == null) {
- scroller.setHandleValue("1");
- }
-
- if (scroller.getPageCount() < Integer.parseInt(scroller.getHandleValue()))
+ UIData dataTable = scroller.getDataTable();
+
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ variables.setVariable("dataTable", dataTable);
+
+ if (!(scroller.getPageCount(dataTable) == 1) || (scroller.isRenderIfSinglePage()))
{
-
- scroller.setPageIndex(scroller.getPageCount() - 1);
- scroller.setHandleValue(Integer.toString(scroller.getPageCount()));
- } else {
-
- scroller.setPageIndex(Integer.parseInt(scroller.getHandleValue()) - 1);
- }
-
-
- if (!(scroller.getPageCount() == 1) || (scroller.isRenderIfSinglePage()))
- {
+ variables.setVariable("rendered", Boolean.TRUE);
super.encodeBegin(context, component);
}
}
public void encodeEnd(FacesContext context, UIComponent component)
throws IOException {
- UIDatascroller scroller = (UIDatascroller) component;
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
- if (!(scroller.getPageCount() == 1) || (scroller.isRenderIfSinglePage()))
+ if (Boolean.TRUE.equals(variables.getVariable("rendered")))
{
super.encodeEnd(context, component);
}
}
- private static final String PARAM_SUFFIX = "_parameter";
-
public void decode(FacesContext context, UIComponent component) {
String param = (String) getParamMap(context).get(
- component.getClientId(context) + PARAM_SUFFIX);
+ component.getClientId(context));
UIDatascroller scroller = (UIDatascroller) component;
- if (scroller.getHandleValue() == null) {
- scroller.setHandleValue("1");
- }
+
if (param != null) {
-
- scroller.setPage(param);
-
- String oldScrolVal = scroller.getHandleValue();
- String newScrolVal = Integer.toString(scroller.getPageIndex());
- scroller.setPage(oldScrolVal);
- if (!newScrolVal.equals(oldScrolVal)) {
-
- DataScrollerEvent event = new DataScrollerEvent(scroller, oldScrolVal, newScrolVal);
- event.queue();
- ActionEvent actionEvent = new ActionEvent(scroller);
- scroller.queueEvent(actionEvent);
-
- //TODO nick - ? - should be invoked in broadcast
- AjaxRendererUtils.addRegionByName(context, component, component.getId());
- AjaxRendererUtils.addRegionByName(context, component, scroller.getFor());
- }
+ new DataScrollerEvent(scroller, String.valueOf(scroller.getPageIndex()), param).queue();
}
}
public void renderPager(FacesContext context, UIComponent component) throws IOException {
- ResponseWriter out = context.getResponseWriter();
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ UIData data = (UIData) variables.getVariable("dataTable");
+
+ ResponseWriter out = context.getResponseWriter();
UIDatascroller scroller = (UIDatascroller) component;
- int currentPage = scroller.getPageIndex();
+ int currentPage = scroller.getPageIndex(data);
int maxPages = scroller.getMaxPages();
if (maxPages <= 1) {
maxPages = 1;
}
- int pageCount = scroller.getPageCount();
+ int pageCount = scroller.getPageCount(data);
if (pageCount <= 1) {
return;
}
- int pageIndex = scroller.getPageIndex();
+
int delta = maxPages / 2;
int pages;
int start;
- if (pageCount > maxPages && pageIndex > delta) {
+ if (pageCount > maxPages && currentPage > delta) {
pages = maxPages;
- start = pageIndex - pages / 2 - 1;
+ start = currentPage - pages / 2 - 1;
if (start + pages > pageCount) {
start = pageCount - pages;
}
@@ -196,7 +168,7 @@
UIDatascroller scroller = (UIDatascroller) component;
Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component);
Map parameters = (Map) eventOptions.get("parameters");
- parameters.put(scroller.getClientId(context) + PARAM_SUFFIX, value);
+ parameters.put(scroller.getClientId(context), value);
function.addParameter(eventOptions);
StringBuffer buffer = new StringBuffer();
function.appendScript(buffer);
Modified: trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java
===================================================================
--- trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-04-19 18:01:31 UTC (rev 458)
+++ trunk/richfaces/datascroller/src/test/java/org/richfaces/component/DatascrollerComponentTest.java 2007-04-19 18:10:20 UTC (rev 459)
@@ -21,14 +21,11 @@
package org.richfaces.component;
-import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlScript;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.apache.commons.lang.StringUtils;
-import org.richfaces.event.DataScrollerAdapter;
-import org.richfaces.event.DataScrollerEvent;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
import javax.faces.application.FacesMessage;
import javax.faces.component.UICommand;
@@ -43,390 +40,393 @@
import javax.faces.el.MethodBinding;
import javax.faces.el.MethodNotFoundException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.ArrayList;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.lang.StringUtils;
+import org.richfaces.event.DataScrollerEvent;
+import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlScript;
+
/**
* Unit test for Datascroller component.
*/
public class DatascrollerComponentTest extends AbstractAjax4JsfTestCase {
- private static Set javaScripts = new HashSet();
+ private static Set javaScripts = new HashSet();
- static {
- javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
- javaScripts.add("prototype.js");
- }
+ static {
+ javaScripts.add("org.ajax4jsf.framework.ajax.AjaxScript");
+ javaScripts.add("prototype.js");
+ }
- private UIDatascroller scroller;
- private UIComponent form;
- private UIData data;
- private UIOutput first;
- private UIOutput fastrewind;
- private UIOutput previous;
- private UIOutput fastforward;
- private UIOutput next;
- private UIOutput last;
- private UICommand command = null;
+ private UIDatascroller scroller;
+ private UIComponent form;
+ private UIData data;
+ private UIOutput first;
+ private UIOutput fastrewind;
+ private UIOutput previous;
+ private UIOutput fastforward;
+ private UIOutput next;
+ private UIOutput last;
+ private UICommand command = null;
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public DatascrollerComponentTest(String testName) {
- super(testName);
- }
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public DatascrollerComponentTest(String testName) {
+ super(testName);
+ }
- /* (non-Javadoc)
- * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
- */
- public void setUp() throws Exception {
- super.setUp();
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
- form = new HtmlForm();
- form.setId("form");
- facesContext.getViewRoot().getChildren().add(form);
- ArrayList dat = new ArrayList();
- for (int i=0;i<20;i++){
- dat.add(new Integer(i));
- }
- data = (UIData) application.createComponent(HtmlDataTable.COMPONENT_TYPE);
- data.setValue(dat);
- data.setId("data");
- data.setRows(5);
- form.getChildren().add(data);
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+ ArrayList dat = new ArrayList();
+ for (int i=0;i<20;i++){
+ dat.add(new Integer(i));
+ }
+ data = (UIData) application.createComponent(HtmlDataTable.COMPONENT_TYPE);
+ data.setValue(dat);
+ data.setId("data");
+ data.setRows(5);
+ form.getChildren().add(data);
- scroller = (UIDatascroller) application.createComponent("org.richfaces.Datascroller");
- scroller.setId("dataScroller");
- scroller.setFor(data.getId());
+ scroller = (UIDatascroller) application.createComponent("org.richfaces.Datascroller");
+ scroller.setId("dataScroller");
+ scroller.setFor(data.getId());
- first = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
- first.setId("first");
- first.setValue("first");
- fastrewind = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
- fastrewind.setId("fastrewind");
- fastrewind.setValue("fastrewind");
- previous = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
- previous.setId("previous");
- previous.setValue("previous");
- fastforward = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
- fastforward.setId("fastforward");
- fastforward.setValue("fastforward");
- next = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
- next.setId("next");
- next.setValue("next");
- last = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
- last.setId("last");
- last.setValue("last");
+ first = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ first.setId("first");
+ first.setValue("first");
+ fastrewind = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ fastrewind.setId("fastrewind");
+ fastrewind.setValue("fastrewind");
+ previous = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ previous.setId("previous");
+ previous.setValue("previous");
+ fastforward = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ fastforward.setId("fastforward");
+ fastforward.setValue("fastforward");
+ next = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ next.setId("next");
+ next.setValue("next");
+ last = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
+ last.setId("last");
+ last.setValue("last");
- scroller.getFacets().put(first.getId(), first);
- scroller.getFacets().put(fastrewind.getId(), fastrewind);
- scroller.getFacets().put(previous.getId(), previous);
- scroller.getFacets().put(fastforward.getId(), fastforward);
- scroller.getFacets().put(next.getId(), next);
- scroller.getFacets().put(last.getId(), last);
+ scroller.getFacets().put(first.getId(), first);
+ scroller.getFacets().put(fastrewind.getId(), fastrewind);
+ scroller.getFacets().put(previous.getId(), previous);
+ scroller.getFacets().put(fastforward.getId(), fastforward);
+ scroller.getFacets().put(next.getId(), next);
+ scroller.getFacets().put(last.getId(), last);
- form.getChildren().add(scroller);
+ form.getChildren().add(scroller);
- command = new HtmlCommandLink();
- command.setId("command");
- form.getChildren().add(command);
-
- }
+ command = new HtmlCommandLink();
+ command.setId("command");
+ form.getChildren().add(command);
- /* (non-Javadoc)
- * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
- */
- public void tearDown() throws Exception {
- super.tearDown();
- scroller = null;
- form = null;
- data = null;
- first = null;
- fastrewind = null;
- previous = null;
- fastforward = null;
- next = null;
- last = null;
- }
+ }
- /**
- * Test component rendering
- *
- * @throws Exception
- */
- public void testRender() throws Exception {
- HtmlPage page = renderView();
- assertNotNull(page);
- System.out.println(page.asXml());
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ scroller = null;
+ form = null;
+ data = null;
+ first = null;
+ fastrewind = null;
+ previous = null;
+ fastforward = null;
+ next = null;
+ last = null;
+ }
- HtmlElement div = page.getHtmlElementById(scroller.getClientId(facesContext));
- assertNotNull(div);
- assertEquals("div", div.getNodeName());
+ /**
+ * Test component rendering
+ *
+ * @throws Exception
+ */
+ public void testRender() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
- HtmlElement f1 = page.getHtmlElementById(first.getClientId(facesContext));
- assertNotNull(f1);
- HtmlElement f2 = page.getHtmlElementById(last.getClientId(facesContext));
- assertNotNull(f2);
- HtmlElement f3 = page.getHtmlElementById(fastforward.getClientId(facesContext));
- assertNotNull(f3);
- HtmlElement f4 = page.getHtmlElementById(fastrewind.getClientId(facesContext));
- assertNotNull(f4);
- HtmlElement f5 = page.getHtmlElementById(next.getClientId(facesContext));
- assertNotNull(f5);
- HtmlElement f6 = page.getHtmlElementById(previous.getClientId(facesContext));
- assertNotNull(f6);
+ HtmlElement div = page.getHtmlElementById(scroller.getClientId(facesContext));
+ assertNotNull(div);
+ assertEquals("div", div.getNodeName());
- String classAttr = div.getAttributeValue("class");
- assertTrue(classAttr.contains("dr-dscr"));
- assertTrue(classAttr.contains("rich-datascr"));
+ HtmlElement f1 = page.getHtmlElementById(first.getClientId(facesContext));
+ assertNotNull(f1);
+ HtmlElement f2 = page.getHtmlElementById(last.getClientId(facesContext));
+ assertNotNull(f2);
+ HtmlElement f3 = page.getHtmlElementById(fastforward.getClientId(facesContext));
+ assertNotNull(f3);
+ HtmlElement f4 = page.getHtmlElementById(fastrewind.getClientId(facesContext));
+ assertNotNull(f4);
+ HtmlElement f5 = page.getHtmlElementById(next.getClientId(facesContext));
+ assertNotNull(f5);
+ HtmlElement f6 = page.getHtmlElementById(previous.getClientId(facesContext));
+ assertNotNull(f6);
-
- scroller.processDecodes(facesContext);
- scroller.processValidators(facesContext);
- scroller.processUpdates(facesContext);
- scroller.setFor("xxx");
- try {
- page = renderView();
- assertTrue(false);
- } catch(Exception ex) {
- }
- scroller.processDecodes(facesContext);
- scroller.processValidators(facesContext);
- scroller.processUpdates(facesContext);
- scroller.setFor("form");
- try {
- page = renderView();
- assertTrue(false);
- } catch(Exception ex) {
- }
- scroller.processDecodes(facesContext);
- scroller.processValidators(facesContext);
- scroller.processUpdates(facesContext);
- scroller.setFor(data.getId());
- }
+ String classAttr = div.getAttributeValue("class");
+ assertTrue(classAttr.contains("dr-dscr"));
+ assertTrue(classAttr.contains("rich-datascr"));
- public void testNotRender() throws Exception {
- data.setRows(25);
- scroller.setRenderIfSinglePage(false);
-
- HtmlPage page = renderView();
- assertNotNull(page);
- System.out.println(page.asXml());
- try {
- page.getHtmlElementById(scroller.getClientId(facesContext));
- assertTrue(false);
- } catch(Exception ex) {
- }
- }
+ scroller.processDecodes(facesContext);
+ scroller.processValidators(facesContext);
+ scroller.processUpdates(facesContext);
+ scroller.setFor("xxx");
+ try {
+ page = renderView();
+ assertTrue(false);
+ } catch(Exception ex) {
+ }
+ scroller.processDecodes(facesContext);
+ scroller.processValidators(facesContext);
+ scroller.processUpdates(facesContext);
+ scroller.setFor("form");
+ try {
+ page = renderView();
+ assertTrue(false);
+ } catch(Exception ex) {
+ }
+ scroller.processDecodes(facesContext);
+ scroller.processValidators(facesContext);
+ scroller.processUpdates(facesContext);
+ scroller.setFor(data.getId());
+ }
- public void testNotFor() throws Exception {
- scroller.setFor(null);
- try {
- HtmlPage page = renderView();
- assertTrue(false);
- } catch(Exception ex) {
- }
+ public void testNotRender() throws Exception {
+ data.setRows(25);
+ scroller.setRenderIfSinglePage(false);
- }
-
-
- /**
- * Test style rendering
- *
- * @throws Exception
- */
- public void testRenderStyle() throws Exception {
- HtmlPage page = renderView();
- assertNotNull(page);
- List links = page.getDocumentElement().getHtmlElementsByTagName("link");
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+ try {
+ page.getHtmlElementById(scroller.getClientId(facesContext));
+ assertTrue(false);
+ } catch(Exception ex) {
+ }
- assertEquals(1, links.size());
- HtmlElement link = (HtmlElement) links.get(0);
- assertTrue(link.getAttributeValue("href").contains("org/richfaces/renderkit/html/css/datascroller.xcss"));
- }
+ }
- /**
- * Test script rendering
- *
- * @throws Exception
- */
- public void testRenderScript() throws Exception {
- HtmlPage page = renderView();
- assertNotNull(page);
- List scripts = page.getDocumentElement().getHtmlElementsByTagName("script");
+ public void testNotFor() throws Exception {
+ scroller.setFor(null);
+ try {
+ HtmlPage page = renderView();
+ assertTrue(false);
+ } catch(Exception ex) {
+ }
- for (Iterator it = scripts.iterator(); it.hasNext();) {
- HtmlScript item = (HtmlScript) it.next();
- String srcAttr = item.getSrcAttribute();
+ }
- if (StringUtils.isNotBlank(srcAttr)) {
- boolean found = false;
- for (Iterator srcIt = javaScripts.iterator(); srcIt.hasNext();)
- {
- String src = (String) srcIt.next();
- found = srcAttr.contains(src);
- if (found) {
- break;
- }
- }
+ /**
+ * Test style rendering
+ *
+ * @throws Exception
+ */
+ public void testRenderStyle() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List links = page.getDocumentElement().getHtmlElementsByTagName("link");
- assertTrue(found);
- }
- }
- }
+ assertEquals(1, links.size());
+ HtmlElement link = (HtmlElement) links.get(0);
+ assertTrue(link.getAttributeValue("href").contains("org/richfaces/renderkit/html/css/datascroller.xcss"));
+ }
- /**
- * Test binary search
- *
- * @throws Exception
- */
- public void testBinarySearch() throws Exception {
- class MockData extends UIData {
- private int rowIndex;
- private int minRow;
- private int maxRow;
+ /**
+ * Test script rendering
+ *
+ * @throws Exception
+ */
+ public void testRenderScript() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List scripts = page.getDocumentElement().getHtmlElementsByTagName("script");
- public int getMaxRow() {
- return maxRow;
- }
+ for (Iterator it = scripts.iterator(); it.hasNext();) {
+ HtmlScript item = (HtmlScript) it.next();
+ String srcAttr = item.getSrcAttribute();
- public void setMaxRow(int maxRow) {
- this.maxRow = maxRow;
- }
+ if (StringUtils.isNotBlank(srcAttr)) {
+ boolean found = false;
+ for (Iterator srcIt = javaScripts.iterator(); srcIt.hasNext();)
+ {
+ String src = (String) srcIt.next();
- public int getMinRow() {
- return minRow;
- }
+ found = srcAttr.contains(src);
+ if (found) {
+ break;
+ }
+ }
- public void setMinRow(int minRow) {
- this.minRow = minRow;
- }
+ assertTrue(found);
+ }
+ }
+ }
- public boolean isRowAvailable() {
- return rowIndex >= getMinRow() && rowIndex < getMaxRow();
- }
+ /**
+ * Test binary search
+ *
+ * @throws Exception
+ */
+ public void testBinarySearch() throws Exception {
+ class MockData extends UIData {
+ private int rowIndex;
+ private int minRow;
+ private int maxRow;
- public void setRowIndex(int rowIndex) {
- this.rowIndex = rowIndex;
- }
- }
+ public int getMaxRow() {
+ return maxRow;
+ }
- MockData data;
- UIDatascroller.BinarySearch bs = new UIDatascroller.BinarySearch();
+ public void setMaxRow(int maxRow) {
+ this.maxRow = maxRow;
+ }
- data = new MockData();
- data.setMaxRow(1);
- assertEquals(1, bs.search(data));
+ public int getMinRow() {
+ return minRow;
+ }
- data = new MockData();
- data.setMaxRow(2);
- assertEquals(2, bs.search(data));
+ public void setMinRow(int minRow) {
+ this.minRow = minRow;
+ }
- data = new MockData();
- data.setMaxRow(3);
- assertEquals(3, bs.search(data));
+ public boolean isRowAvailable() {
+ return rowIndex >= getMinRow() && rowIndex < getMaxRow();
+ }
- data = new MockData();
- data.setMaxRow(4);
- assertEquals(4, bs.search(data));
+ public void setRowIndex(int rowIndex) {
+ this.rowIndex = rowIndex;
+ }
+ }
- data = new MockData();
- data.setMaxRow(5);
- assertEquals(5, bs.search(data));
+ MockData data;
- data = new MockData();
- data.setMaxRow(6);
- assertEquals(6, bs.search(data));
+ data = new MockData();
+ data.setMaxRow(1);
+ assertEquals(1, UIDatascroller.BinarySearch.search(data));
- data = new MockData();
- data.setMaxRow(7);
- assertEquals(7, bs.search(data));
+ data = new MockData();
+ data.setMaxRow(2);
+ assertEquals(2, UIDatascroller.BinarySearch.search(data));
- data = new MockData();
- data.setMaxRow(8);
- assertEquals(8, bs.search(data));
+ data = new MockData();
+ data.setMaxRow(3);
+ assertEquals(3, UIDatascroller.BinarySearch.search(data));
- data = new MockData();
- data.setMaxRow(9);
- assertEquals(9, bs.search(data));
+ data = new MockData();
+ data.setMaxRow(4);
+ assertEquals(4, UIDatascroller.BinarySearch.search(data));
- data = new MockData();
- data.setMaxRow(10);
- assertEquals(10, bs.search(data));
+ data = new MockData();
+ data.setMaxRow(5);
+ assertEquals(5, UIDatascroller.BinarySearch.search(data));
- data = new MockData();
- data.setMaxRow(11);
- assertEquals(11, bs.search(data));
+ data = new MockData();
+ data.setMaxRow(6);
+ assertEquals(6, UIDatascroller.BinarySearch.search(data));
- data = new MockData();
- data.setMaxRow(12);
- assertEquals(12, bs.search(data));
+ data = new MockData();
+ data.setMaxRow(7);
+ assertEquals(7, UIDatascroller.BinarySearch.search(data));
- data = new MockData();
- data.setMaxRow(13);
- assertEquals(13, bs.search(data));
- }
+ data = new MockData();
+ data.setMaxRow(8);
+ assertEquals(8, UIDatascroller.BinarySearch.search(data));
- public void testSetPage() throws Exception {
- assertEquals(4,scroller.getPageCount());
- scroller.setPage("2");
- scroller.setFastStep(2);
- assertEquals(5,data.getFirst());
- scroller.setPage("next");
- assertEquals(10,data.getFirst());
- scroller.setPage("previous");
- assertEquals(5,data.getFirst());
- scroller.setPage("fastforward");
- assertEquals(15,data.getFirst());
- scroller.setPage("fastrewind");
- assertEquals(5,data.getFirst());
- scroller.setPage("first");
- assertEquals(0,data.getFirst());
- scroller.setPage("previous");
- assertEquals(0,data.getFirst());
- scroller.setPage("fastrewind");
- assertEquals(0,data.getFirst());
- scroller.setPage("last");
- assertEquals(15,data.getFirst());
- scroller.setPage("next");
- assertEquals(15,data.getFirst());
- scroller.setPage("fastforward");
- assertEquals(15,data.getFirst());
- scroller.setPage("5");
- assertEquals(15,data.getFirst());
- scroller.setPage("0");
- assertEquals(0,data.getFirst());
- data.setRows(0);
-
- }
-
- public void testListener() throws Exception{
- HtmlPage renderedView = renderView();
-
- HtmlAnchor htmlLink = (HtmlAnchor) renderedView.getHtmlElementById(command.getClientId(facesContext));
- htmlLink.click();
-
- MethodBinding binding = new MethodBinding(){
- public Object invoke(FacesContext context, Object[] params) throws EvaluationException, MethodNotFoundException {
- facesContext.addMessage(scroller.getClientId(facesContext), new FacesMessage("Method invoked!"));
- return "invoked";
- }
- public Class getType(FacesContext context) throws MethodNotFoundException {
- return String.class;
- }
- };
-
- DataScrollerEvent event = new DataScrollerEvent( ((UIComponent) scroller), "1", "2" );
- new DataScrollerAdapter(binding).processScroller(event);
+ data = new MockData();
+ data.setMaxRow(9);
+ assertEquals(9, UIDatascroller.BinarySearch.search(data));
- assertTrue(facesContext.getMessages().hasNext());
- }
-
-
+ data = new MockData();
+ data.setMaxRow(10);
+ assertEquals(10, UIDatascroller.BinarySearch.search(data));
+
+ data = new MockData();
+ data.setMaxRow(11);
+ assertEquals(11, UIDatascroller.BinarySearch.search(data));
+
+ data = new MockData();
+ data.setMaxRow(12);
+ assertEquals(12, UIDatascroller.BinarySearch.search(data));
+
+ data = new MockData();
+ data.setMaxRow(13);
+ assertEquals(13, UIDatascroller.BinarySearch.search(data));
+ }
+
+ public void testSetPage() throws Exception {
+ assertEquals(4,scroller.getPageCount());
+ scroller.setPage("2");
+ scroller.setFastStep(2);
+ assertEquals(5,data.getFirst());
+ scroller.setPage("next");
+ assertEquals(10,data.getFirst());
+ scroller.setPage("previous");
+ assertEquals(5,data.getFirst());
+ scroller.setPage("fastforward");
+ assertEquals(15,data.getFirst());
+ scroller.setPage("fastrewind");
+ assertEquals(5,data.getFirst());
+ scroller.setPage("first");
+ assertEquals(0,data.getFirst());
+ scroller.setPage("previous");
+ assertEquals(0,data.getFirst());
+ scroller.setPage("fastrewind");
+ assertEquals(0,data.getFirst());
+ scroller.setPage("last");
+ assertEquals(15,data.getFirst());
+ scroller.setPage("next");
+ assertEquals(15,data.getFirst());
+ scroller.setPage("fastforward");
+ assertEquals(15,data.getFirst());
+ scroller.setPage("5");
+ assertEquals(15,data.getFirst());
+ scroller.setPage("0");
+ assertEquals(0,data.getFirst());
+ data.setRows(0);
+
+ }
+
+ public void testListener() throws Exception{
+ HtmlPage renderedView = renderView();
+
+ HtmlAnchor htmlLink = (HtmlAnchor) renderedView.getHtmlElementById(command.getClientId(facesContext));
+ htmlLink.click();
+
+ MethodBinding binding = new MethodBinding(){
+ public Object invoke(FacesContext context, Object[] params) throws EvaluationException, MethodNotFoundException {
+ facesContext.addMessage(scroller.getClientId(facesContext), new FacesMessage("Method invoked!"));
+ return "invoked";
+ }
+ public Class getType(FacesContext context) throws MethodNotFoundException {
+ return String.class;
+ }
+ };
+
+ DataScrollerEvent event = new DataScrollerEvent( ((UIComponent) scroller), "1", "2" );
+ this.scroller.setScrollerListener(binding);
+ this.scroller.broadcast(event);
+
+ assertTrue(facesContext.getMessages().hasNext());
+ }
+
+
}
Modified: trunk/richfaces/datascroller/src/test/java/org/richfaces/event/DataScrollerEventTest.java
===================================================================
--- trunk/richfaces/datascroller/src/test/java/org/richfaces/event/DataScrollerEventTest.java 2007-04-19 18:01:31 UTC (rev 458)
+++ trunk/richfaces/datascroller/src/test/java/org/richfaces/event/DataScrollerEventTest.java 2007-04-19 18:10:20 UTC (rev 459)
@@ -21,13 +21,12 @@
package org.richfaces.event;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-
import javax.faces.component.UIData;
import javax.faces.component.html.HtmlDataTable;
import javax.faces.event.FacesListener;
-import javax.faces.event.PhaseId;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
/**
* Unit test for DataScrollerEvent.
*/
@@ -67,7 +66,6 @@
}
public void testEvent() throws Exception {
- assertEquals(PhaseId.INVOKE_APPLICATION, event.getPhaseId());
assertEquals("old", event.getOldScrolVal());
assertEquals("new", event.getNewScrolVal());
assertFalse(event.isAppropriateListener(new TestFacesListener()));
19 years
JBoss Rich Faces SVN: r458 - trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-04-19 14:01:31 -0400 (Thu, 19 Apr 2007)
New Revision: 458
Modified:
trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/Entry.java
trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java
Log:
Imports optimized
Modified: trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/Entry.java
===================================================================
--- trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/Entry.java 2007-04-19 17:43:57 UTC (rev 457)
+++ trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/Entry.java 2007-04-19 18:01:31 UTC (rev 458)
@@ -21,7 +21,6 @@
package org.richfaces;
-import java.util.ArrayList;
import java.util.Random;
Modified: trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java
===================================================================
--- trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java 2007-04-19 17:43:57 UTC (rev 457)
+++ trunk/richfaces-samples/datascroller-sample/src/main/java/org/richfaces/TestBean.java 2007-04-19 18:01:31 UTC (rev 458)
@@ -20,10 +20,10 @@
*/
package org.richfaces;
-import org.richfaces.event.DataScrollerEvent;
import java.util.ArrayList;
-import java.util.Random;
+import org.richfaces.event.DataScrollerEvent;
+
public class TestBean {
private ArrayList data;
19 years
JBoss Rich Faces SVN: r457 - in trunk/richfaces: tabPanel/src/main/config/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-04-19 13:43:57 -0400 (Thu, 19 Apr 2007)
New Revision: 457
Modified:
trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
Log:
Build broken by Doc Team fixed
Modified: trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-04-19 16:53:16 UTC (rev 456)
+++ trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-04-19 17:43:57 UTC (rev 457)
@@ -120,7 +120,6 @@
<description>
A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase
</description>
- <defaultvalue>"richfaces_suggestionEntry"</defaultvalue>
</property>
<property>
<name>selectedClass</name>
Modified: trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-04-19 16:53:16 UTC (rev 456)
+++ trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-04-19 17:43:57 UTC (rev 457)
@@ -59,7 +59,7 @@
</property>
<property>
<name>selectedTab</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Object</classname>
<description>Attribure defines name of selected tab.</description>
</property>
<property>
19 years
JBoss Rich Faces SVN: r456 - in trunk/richfaces: dataTable/src/main/config/component and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-04-19 12:53:16 -0400 (Thu, 19 Apr 2007)
New Revision: 456
Modified:
trunk/richfaces/dataFilterSlider/src/main/config/component/dataFilterSlider.xml
trunk/richfaces/dataTable/src/main/config/component/colgroup.xml
trunk/richfaces/dataTable/src/main/config/component/column.xml
trunk/richfaces/dataTable/src/main/config/component/dataGrid.xml
trunk/richfaces/dataTable/src/main/config/component/dataList.xml
trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml
trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml
trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml
trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml
trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
trunk/richfaces/tree/src/main/config/component/tree.xml
trunk/richfaces/tree/src/main/config/component/treeNode.xml
Log:
Modified: trunk/richfaces/dataFilterSlider/src/main/config/component/dataFilterSlider.xml
===================================================================
--- trunk/richfaces/dataFilterSlider/src/main/config/component/dataFilterSlider.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/dataFilterSlider/src/main/config/component/dataFilterSlider.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -151,6 +151,13 @@
</description>
</property>
<property>
+ <name>sliderListener</name>
+ <classname>java.lang.String</classname>
+ <description>
+ MethodBinding representing an action listener method that will be notified afrer changing of slider control position.
+ </description>
+ </property>
+ <property>
<name>onSlide</name>
<classname>boolean</classname>
<description>
Modified: trunk/richfaces/dataTable/src/main/config/component/colgroup.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/colgroup.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/dataTable/src/main/config/component/colgroup.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -30,15 +30,24 @@
&ui_component_attributes;
&html_universal_attributes;
<property>
+ <name>breakBefore</name>
+ <classname>java.lang.String</classname>
+ <description>if 'true' next column begins from the first row.</description>
+ </property>
+ <property>
<name>columnClasses</name>
<classname>java.lang.String</classname>
<description>
+ Comma-delimited list of CSS style classes that are be applied to the columns of this table.
+ A space separated list of classes may also be specified for any individual column.
+ If the number of elements in this list is less than the number of columns specified in the "columns" attribute, no "class" attribute is output for each column greater than the number of elements in the list. If the number of elements in the list is greater than the number of columns specified in the "columns" attribute, the elements at the posisiton in the list after the value of the "columns" attribute are ignored.
</description>
</property>
<property>
<name>rowClasses</name>
<classname>java.lang.String</classname>
<description>
+ A comma-delimited list of CSS style classes that is applied to popup table rows. A space separated list of classes may also be specified for any individual row. Thes styles are applied, in turn, to each row in the table. For example, if the list has two elements, the first style class in the list is applied to the first row, the second to the second row, the first to the third row, the second to the fourth row, etc. In other words, we keep iterating through the list until we reach the end, and then we start at the beginning again.
</description>
</property>
<!--
Modified: trunk/richfaces/dataTable/src/main/config/component/column.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/column.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/dataTable/src/main/config/component/column.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -38,32 +38,27 @@
<property>
<name>colspan</name>
<classname>int</classname>
- <description>
- </description>
+ <description>Corresponds to the HTML colspan attribute.</description>
</property>
<property>
<name>rowspan</name>
<classname>int</classname>
- <description>
- </description>
+ <description>Corresponds to the HTML rowspan attribute.</description>
</property>
<property>
<name>breakBefore</name>
<classname>boolean</classname>
- <description>
- </description>
+ <description>if 'true' next column begins from the first row.</description>
</property>
<property>
<name>headerClass</name>
<classname>java.lang.String</classname>
- <description>
- </description>
+ <description>Space-separated list of CSS style class(es) that are be applied to any header generated for this table.</description>
</property>
<property>
<name>footerClass</name>
<classname>java.lang.String</classname>
- <description>
- </description>
+ <description>Space-separated list of CSS style class(es) that are be applied to any footer generated for this table.</description>
</property>
<!--
<property>
Modified: trunk/richfaces/dataTable/src/main/config/component/dataGrid.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/dataGrid.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/dataTable/src/main/config/component/dataGrid.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -36,6 +36,11 @@
<name>rows</name>
</property>
<property>
+ <name>ajaxKeys</name>
+ <classname>java.lang.String</classname>
+ <description>This attribute defines strings that are updated after an AJAX request. </description>
+ </property>
+ <property>
<name>elements</name>
<classname>int</classname>
<description>Number of elements in grid
@@ -44,12 +49,13 @@
<property>
<name>columns</name>
<classname>int</classname>
- <description>
+ <description>Quantity of columns.
</description>
</property>
<property>
<name>border</name>
<classname>java.lang.String</classname>
+ <description>This attributes specifies the width of the frame around a component.</description>
<defaultvalue>"0"</defaultvalue>
</property>
<property>
@@ -60,30 +66,30 @@
<property>
<name>cellspacing</name>
<classname>java.lang.String</classname>
+ <description>This attribute specifies the amount of space between the border of the cell and its contents. The attribute also specifies the amount of space to leave between cells.
+ </description>
<defaultvalue>"0"</defaultvalue>
</property>
<property>
<name>captionClass</name>
<classname>java.lang.String</classname>
- <description>
- </description>
+ <description>Space-separated list of CSS style class(es) that are be applied to caption for this component.</description>
</property>
<property>
<name>captionStyle</name>
<classname>java.lang.String</classname>
- <description>
- </description>
+ <description>CSS style(s) is/are to be applied to caption when this component is rendered.</description>
</property>
<property>
<name>headerClass</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Space-separated list of CSS style class(es) that are be applied to header for this component.
</description>
</property>
<property>
<name>footerClass</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Space-separated list of CSS style class(es) that are be applied to footer for this component.
</description>
</property>
<!--
@@ -95,47 +101,69 @@
<defaultvalue>"default"</defaultvalue>
</property>
-->
+ <property>
+ <name>varState</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Attribute defines EL-variable for reference to visual state.
+ </description>
+ </property>
+ <property>
+ <name>rowKey</name>
+ <classname>java.lang.String</classname>
+ <description>
+ RowKey is a representation of an identifier for a specific data row.
+ </description>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ <description>
+ The current value for this component.
+ </description>
+ </property>
<!-- rows javascript events -->
<property>
<name>onRowClick</name>
<classname>java.lang.String</classname>
<description>
+ HTML: a script expression; a pointer button is clicked on row.
</description>
</property>
<property>
<name>onRowDblClick</name>
<classname>java.lang.String</classname>
- <description>
+ <description>HTML: a script expression; a pointer button is double-clicked on row.
</description>
</property>
<property>
<name>onRowMouseUp</name>
<classname>java.lang.String</classname>
- <description>
+ <description>HTML: script expression; a pointer button is released on row.
</description>
</property>
<property>
<name>onRowMouseDown</name>
<classname>java.lang.String</classname>
- <description>
+ <description>HTML: script expression; a pointer button is pressed down on row.
</description>
</property>
<property>
<name>onRowMouseOver</name>
<classname>java.lang.String</classname>
- <description>
+ <description>HTML: a script expression; a pointer is moved onto of row.
</description>
</property>
<property>
<name>onRowMouseOut</name>
<classname>java.lang.String</classname>
- <description>
+ <description>HTML: a script expression; a pointer is moved away of row.
</description>
</property>
<property>
<name>onRowMouseMove</name>
<classname>java.lang.String</classname>
- <description>
+ <description>HTML: a script expression; a pointer is moved within of row.
</description>
</property>
</component>
Modified: trunk/richfaces/dataTable/src/main/config/component/dataList.xml
===================================================================
--- trunk/richfaces/dataTable/src/main/config/component/dataList.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/dataTable/src/main/config/component/dataList.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -34,9 +34,29 @@
<property>
<name>type</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Corresponds to the HTML DL type attribute.
</description>
</property>
+ <property>
+ <name>ajaxKeys</name>
+ <classname>java.lang.String</classname>
+ <description>This attribute defines strings that are updated after an AJAX request. </description>
+ </property>
+ <property>
+ <name>rowKey</name>
+ <classname>java.lang.String</classname>
+ <description>RowKey is a representation of an identifier for a specific data row.</description>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ <description>The current value for this component.</description>
+ </property>
+ <property>
+ <name>varState</name>
+ <classname>java.lang.String</classname>
+ <description>Attribute defines EL-variable for reference to visual state.</description>
+ </property>
<!--
<property>
<name>param</name>
@@ -79,9 +99,29 @@
<property>
<name>type</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Corresponds to the HTML OL type attribute.
</description>
</property>
+ <property>
+ <name>ajaxKeys</name>
+ <classname>java.lang.String</classname>
+ <description>This attribute defines strings that are updated after an AJAX request. </description>
+ </property>
+ <property>
+ <name>rowKey</name>
+ <classname>java.lang.String</classname>
+ <description>RowKey is a representation of an identifier for a specific data row.</description>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ <description>The current value for this component.</description>
+ </property>
+ <property>
+ <name>varState</name>
+ <classname>java.lang.String</classname>
+ <description>Attribute defines EL-variable for reference to visual state.</description>
+ </property>
<!--
<property>
<name>param</name>
@@ -134,5 +174,25 @@
<defaultvalue>"default"</defaultvalue>
</property>
-->
+ <property>
+ <name>ajaxKeys</name>
+ <classname>java.lang.String</classname>
+ <description>This attribute defines strings that are updated after an AJAX request. </description>
+ </property>
+ <property>
+ <name>rowKey</name>
+ <classname>java.lang.String</classname>
+ <description>RowKey is a representation of an identifier for a specific data row.</description>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ <description>The current value for this component.</description>
+ </property>
+ <property>
+ <name>varState</name>
+ <classname>java.lang.String</classname>
+ <description>Attribute defines EL-variable for reference to visual state.</description>
+ </property>
</component>
</components>
Modified: trunk/richfaces/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/datascroller/src/main/config/component/datascroller.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -55,69 +55,96 @@
&html_event_handler_attributes;
&ui_component_attributes;
-
-
+
<property>
<name>id</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Every component may have a unique id that is automatically created if omitted.
</description>
</property>
-
+
<property>
+ <name>handleValue</name>
+ <classname>java.lang.String</classname>
+ <description>Current handle value.
+ </description>
+ </property>
+
+ <property>
<name>binding</name>
<classname>java.lang.String</classname>
- <description>
+ <description>The attribute takes a value-binding expression for a component property of a backing bean.
</description>
</property>
+
<property>
- <name>rendered</name>
+ <name>scrollerListener</name>
<classname>java.lang.String</classname>
+ <description>MethodBinding representing an action listener method that will be notified afrer scrolling.
+ </description>
+ </property>
+
+ <property>
+ <name>pageIndex</name>
+ <classname>java.lang.String</classname>
+ <description>Attribute defines index of initial page when this component is rendered.
+ </description>
+ </property>
+
+ <property>
+ <name>page</name>
+ <classname>java.lang.String</classname>
<description>
</description>
</property>
+
<property>
+ <name>rendered</name>
+ <classname>java.lang.String</classname>
+ <description>If "true", this component is rendered.</description>
+ </property>
+ <property>
<name>for</name>
<classname>java.lang.String</classname>
- <description>
+ <description>ID of the table component whose data is scrollled.
</description>
</property>
<property>
<name>selectedStyle</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Corresponds to the HTML style attribute for the selected cell on scroller.
</description>
</property>
<property>
<name>selectedStyleClass</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Corresponds to the HTML class attribute for the selected cell on scroller.
</description>
</property>
<property>
<name>tableStyleClass</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Space-separated list of CSS style class(es) that are be applied to outside table of this component.
</description>
</property>
<property>
<name>tableStyle</name>
<classname>java.lang.String</classname>
- <description>
+ <description>CSS style(s) is/are to be applied to outside table when this component is rendered.
</description>
</property>
<property>
<name>styleClass</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Corresponds to the HTML class attribute.
</description>
</property>
<property>
<name>style</name>
<classname>java.lang.String</classname>
- <description>
+ <description>CSS style(s) is/are to be applied when this component is rendered.
</description>
</property>
@@ -151,6 +178,7 @@
<name>fastStep</name>
<classname>int</classname>
<description>
+ The attribute indicates pages quantity to switch onto when fast scrolling is used.
</description>
<defaultvalue>0</defaultvalue>
</property>
@@ -158,9 +186,8 @@
<property>
<name>immediate</name>
<classname>boolean</classname>
- <description>
+ <description>A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase.
</description>
-
</property>
@@ -169,21 +196,21 @@
<property>
<name>ignoreDupResponses</name>
<classname>boolean</classname>
- <description>
+ <description>If true, unfinished request will be aborted on new event.
</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>eventsQueue</name>
<classname>java.lang.String</classname>
- <description>
+ <description>Name of requests queue to avoid send next request before complete other from same event. Can be used to reduce number of requests of frequently events (key press, mouse move etc.).
</description>
</property>
<property>
<name>ajaxSingle</name>
<classname>boolean</classname>
- <description>
+ <description>If ‘true’, submits ONLY one field/link, instead of all form controls.
</description>
<defaultvalue>true</defaultvalue>
</property>
Modified: trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/drag-drop/src/main/config/component/dndParam.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -32,12 +32,14 @@
<property required="true">
<name>name</name>
<classname>java.lang.String</classname>
- <description>
+ <description>A name of this parameter.
</description>
</property>
<property>
<name>type</name>
<classname>java.lang.String</classname>
+ <description>This attribute defines parameter functionality. Possible values are "drag", "drop" and "default".
+ </description>
<defaultvalue>"default"</defaultvalue>
</property>
</component>
Modified: trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/drag-drop/src/main/config/component/dragSupport.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -28,7 +28,9 @@
</taghandler>
&draggable_attributes;
- &ui_component_attributes;
+ &ui_command_attributes;
+ &ajax_component_attributes;
+
<!--
<property>
<name>param</name>
@@ -37,7 +39,34 @@
</description>
<defaultvalue>"default"</defaultvalue>
</property>
- -->
+ -->
+ <property>
+ <name>dragListener</name>
+ <classname>java.lang.String</classname>
+ <description>
+ MethodBinding representing an action listener method that will be notified afrer drag operation.
+ </description>
+ </property>
+ <property>
+ <name>disableDefault</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Disable default action for target event (append "return false;" to javascript ).
+ </description>
+ </property>
+ <property>
+ <name>onsubmit</name>
+ <classname>java.lang.String</classname>
+ <description>
+ JavaScript code for call before submission of ajax event
+ </description>
+ </property>
+ <property>
+ <name>parentProperties</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ </property>
</component>
Modified: trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml
===================================================================
--- trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/drag-drop/src/main/config/component/dropSupport.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -28,17 +28,37 @@
<classname>org.richfaces.taglib.DropSupportHandler</classname>
</taghandler>
- &ui_component_attributes;
+ &ui_command_attributes;
&dropzone_attributes;
+ &ajax_component_attributes;
-
<property>
- <name>ondropend</name>
+ <name>dropListener</name>
<classname>java.lang.String</classname>
<description>
+ MethodBinding representing an action listener method that will be notified afrer drop operation.
</description>
</property>
-
+ <property>
+ <name>disableDefault</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Disable default action for target event (append "return false;" to javascript ).
+ </description>
+ </property>
+ <property>
+ <name>onsubmit</name>
+ <classname>java.lang.String</classname>
+ <description>
+ JavaScript code for call before submission of ajax event
+ </description>
+ </property>
+ <property>
+ <name>parentProperties</name>
+ <classname>java.lang.String</classname>
+ <description>
+ </description>
+ </property>
<!--
<property>
<name>param</name>
Modified: trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -78,19 +78,19 @@
<property>
<name>onupclick</name>
<classname>java.lang.String</classname>
- <description>Up click event</description>
+ <description>HTML: a script expression; a button "Up" is clicked</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>ondownclick</name>
<classname>java.lang.String</classname>
- <description>Down click event</description>
+ <description>HTML: a script expression; a button "Down" is clicked</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onerror</name>
<classname>java.lang.String</classname>
- <description>Error event</description>
+ <description>HTML: a script expression; event fires whenever an JavaScript error occurs.</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
Modified: trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -44,7 +44,7 @@
<property>
<name>headerClass</name>
<classname>java.lang.String</classname>
- <description>
+ <description>CSS style(s) is/are to be applied to component header when this component is rendered.
</description>
<defaultvalue>""</defaultvalue>
</property>
@@ -52,7 +52,7 @@
<property>
<name>controlsClass</name>
<classname>java.lang.String</classname>
- <description>
+ <description>CSS style(s) is/are to be applied to component controls when this component is rendered.
</description>
<defaultvalue>""</defaultvalue>
</property>
@@ -61,13 +61,14 @@
<name>width</name>
<classname>int</classname>
<description>
+ Attribute defines width of component.
</description>
<defaultvalue>300</defaultvalue>
</property>
<property>
<name>height</name>
<classname>int</classname>
- <description>
+ <description>Attribute defines height of component.
</description>
<defaultvalue>200</defaultvalue>
</property>
@@ -76,6 +77,7 @@
<name>minWidth</name>
<classname>int</classname>
<description>
+ Attribute defines min width of component.
</description>
<defaultvalue>-1</defaultvalue>
</property>
@@ -83,6 +85,7 @@
<name>minHeight</name>
<classname>int</classname>
<description>
+ Attribute defines min height of component.
</description>
<defaultvalue>-1</defaultvalue>
</property>
@@ -91,6 +94,7 @@
<name>left</name>
<classname>java.lang.String</classname>
<description>
+ Attribute defines X position of component left-top corner.
</description>
<defaultvalue>"auto"</defaultvalue>
</property>
@@ -98,6 +102,7 @@
<name>top</name>
<classname>java.lang.String</classname>
<description>
+ Attribute defines Y position of component left-top corner.
</description>
<defaultvalue>"auto"</defaultvalue>
</property>
@@ -106,6 +111,7 @@
<name>resizeable</name>
<classname>boolean</classname>
<description>
+ if 'true' there is possibily to change component size.
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -113,6 +119,7 @@
<name>moveable</name>
<classname>boolean</classname>
<description>
+ if 'true' there is possibily to move component.
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -121,6 +128,7 @@
<name>zindex</name>
<classname>int</classname>
<description>
+ Attribute is similar to the standard HTML attribute and can specify window placement relative to the content.
</description>
<defaultvalue>100</defaultvalue>
</property>
Modified: trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -108,6 +108,21 @@
<defaultvalue>"richfaces_suggestionEntry"</defaultvalue>
</property>
<property>
+ <name>rowClasses</name>
+ <classname>java.lang.String</classname>
+ <description>
+ A comma-delimited list of CSS style classes that is applied to popup table rows. A space separated list of classes may also be specified for any individual row. Thes styles are applied, in turn, to each row in the table. For example, if the list has two elements, the first style class in the list is applied to the first row, the second to the second row, the first to the third row, the second to the fourth row, etc. In other words, we keep iterating through the list until we reach the end, and then we start at the beginning again.
+ </description>
+ </property>
+ <property>
+ <name>immediate</name>
+ <classname>boolean</classname>
+ <description>
+ A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase
+ </description>
+ <defaultvalue>"richfaces_suggestionEntry"</defaultvalue>
+ </property>
+ <property>
<name>selectedClass</name>
<classname>java.lang.String</classname>
<description>
Modified: trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml
===================================================================
--- trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/tabPanel/src/main/config/component/tabPanel.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -57,6 +57,11 @@
<classname>java.lang.String</classname>
<description>A CSS class to be applied to all tabs</description>
</property>
+ <property>
+ <name>selectedTab</name>
+ <classname>java.lang.String</classname>
+ <description>Attribure defines name of selected tab.</description>
+ </property>
<property>
<name>activeTabClass</name>
<classname>java.lang.String</classname>
@@ -140,6 +145,7 @@
<property>
<name>name</name>
<classname>java.lang.Object</classname>
+ <description>Attribute defines tab name.</description>
<defaultvalue>getId()</defaultvalue>
</property>
<property >
@@ -152,6 +158,11 @@
<classname>java.lang.String</classname>
<description>Text for the actual "tab" in a tab section.</description>
</property>
+ <property>
+ <name>title</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: An advisory title for this element. Often displayed as a tooltip.</description>
+ </property>
<property>
<name>labelWidth</name>
<classname>java.lang.String</classname>
Modified: trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml
===================================================================
--- trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/togglePanel/src/main/config/component/togglePanel.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -75,6 +75,7 @@
</taghandler>
-->
&ui_component_attributes;
+ &ui_input_attributes.ent;
<!--
<property>
<name>param</name>
@@ -156,8 +157,7 @@
<property required="false" el="true" elonly="true">
<name>panelId</name>
<classname>java.lang.String</classname>
- <description>
-
+ <description>Attribute defines Id for corresponding panel.
</description>
</property>
Modified: trunk/richfaces/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/tree.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/tree/src/main/config/component/tree.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -63,8 +63,32 @@
<classname>java.lang.String</classname>
<description>Node face facet name</description>
</property>
-
<property>
+ <name>changeExpandListener</name>
+ <classname>java.lang.String</classname>
+ <description>Listener called on expand/collapse event on the node.</description>
+ </property>
+ <property>
+ <name>dragListener</name>
+ <classname>java.lang.String</classname>
+ <description>MethodBinding representing an action listener method that will be notified after drag operation. </description>
+ </property>
+ <property>
+ <name>dropListener</name>
+ <classname>java.lang.String</classname>
+ <description>MethodBinding representing an action listener method that will be notified after drop operation. </description>
+ </property>
+ <property>
+ <name>nodeSelectListener</name>
+ <classname>java.lang.String</classname>
+ <description>MethodBinding representing an action listener method that will be notified after selection of node. </description>
+ </property>
+ <property>
+ <name>iconLeaf</name>
+ <classname>java.lang.String</classname>
+ <description>An icon for component leaves.</description>
+ </property>
+ <property>
<name>switchType</name>
<classname>java.lang.String</classname>
<description>Tree switch algorithm: "client", "server", "ajax"</description>
@@ -73,8 +97,19 @@
<property>
<name>dragIndicator</name>
<classname>java.lang.String</classname>
+ <description>An indicator component id.</description>
</property>
<property>
+ <name>value</name>
+ <classname>java.lang.String</classname>
+ <description>The current value for this component.</description>
+ </property>
+ <property>
+ <name>var</name>
+ <classname>java.lang.String</classname>
+ <description>Attribute contains a name providing an access to data defined with value.</description>
+ </property>
+ <property>
<name>onselected</name>
<classname>java.lang.String</classname>
<description>An action to be fired when selecting a node</description>
Modified: trunk/richfaces/tree/src/main/config/component/treeNode.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/treeNode.xml 2007-04-19 15:59:11 UTC (rev 455)
+++ trunk/richfaces/tree/src/main/config/component/treeNode.xml 2007-04-19 16:53:16 UTC (rev 456)
@@ -41,6 +41,8 @@
</taghandler>
&attributes;
+ &ui_component_attributes;
+
<property required="true">
<name>type</name>
<classname>java.lang.String</classname>
@@ -70,6 +72,31 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>changeExpandListener</name>
+ <classname>java.lang.String</classname>
+ <description>Listener called on expand/collapse event on the node.</description>
+ </property>
+ <property>
+ <name>dragListener</name>
+ <classname>java.lang.String</classname>
+ <description>MethodBinding representing an action listener method that will be notified after drag operation. </description>
+ </property>
+ <property>
+ <name>dropListener</name>
+ <classname>java.lang.String</classname>
+ <description>MethodBinding representing an action listener method that will be notified after drop operation. </description>
+ </property>
+ <property>
+ <name>nodeSelectListener</name>
+ <classname>java.lang.String</classname>
+ <description>MethodBinding representing an action listener method that will be notified after selection of node. </description>
+ </property>
+ <property>
+ <name>iconLeaf</name>
+ <classname>java.lang.String</classname>
+ <description>An icon for component leaves.</description>
+ </property>
<property hidden="true">
<name>dragValue</name>
</property>
19 years
JBoss Rich Faces SVN: r455 - trunk/richfaces/suggestionbox/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-04-19 11:59:11 -0400 (Thu, 19 Apr 2007)
New Revision: 455
Modified:
trunk/richfaces/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
Log:
Fixed default z-index for compatibility with modal-panel.
Modified: trunk/richfaces/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/richfaces/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-04-19 14:44:40 UTC (rev 454)
+++ trunk/richfaces/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2007-04-19 15:59:11 UTC (rev 455)
@@ -192,7 +192,7 @@
}
writer.writeAttribute("class", clazz, "popupClass");
- StringBuffer style = new StringBuffer("display:none;z-index:100;");
+ StringBuffer style = new StringBuffer("display:none; z-index: 200;");
style.append(getSizeForStyle(component, "width", null, false));
style.append(getSizeForStyle(component, "height", null, false));
19 years
JBoss Rich Faces SVN: r454 - trunk/richfaces/dataTable/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-04-19 10:44:40 -0400 (Thu, 19 Apr 2007)
New Revision: 454
Modified:
trunk/richfaces/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java
Log:
DataTable test cases development.
Modified: trunk/richfaces/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java
===================================================================
--- trunk/richfaces/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java 2007-04-19 14:43:06 UTC (rev 453)
+++ trunk/richfaces/dataTable/src/test/java/org/richfaces/component/DataTableComponentTest.java 2007-04-19 14:44:40 UTC (rev 454)
@@ -26,6 +26,7 @@
import java.util.Iterator;
import java.util.List;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
import javax.faces.component.html.HtmlOutputLink;
import javax.faces.component.html.HtmlOutputText;
@@ -35,7 +36,10 @@
import javax.faces.el.ValueBinding;
import javax.faces.model.ListDataModel;
+import org.ajax4jsf.ajax.UIAjaxSupport;
+import org.ajax4jsf.framework.ajax.AjaxSupport;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.collections.Predicate;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
@@ -171,7 +175,7 @@
UIColumn column3 = (UIColumn) application
.createComponent("org.richfaces.Column");
dataTable.getChildren().add(column3);
- HtmlOutputText text = (HtmlOutputText) createComponent(
+ UIOutput text = (UIOutput) createComponent(
HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
null, null, null);
text.setValue("Column");
@@ -181,7 +185,7 @@
UIColumn column4 = (UIColumn) application
.createComponent("org.richfaces.Column");
dataTable.getChildren().add(column4);
- HtmlOutputText text2 = (HtmlOutputText) createComponent(
+ UIOutput text2 = (UIOutput) createComponent(
HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
null, null, null);
text.setValue("Column2");
@@ -190,7 +194,7 @@
HtmlPage page = renderView();
assertNotNull(page);
- //System.out.println(page.asXml());
+ // System.out.println(page.asXml());
HtmlElement table = page.getHtmlElementById(dataTable
.getClientId(facesContext));
@@ -276,7 +280,7 @@
null, null, null);
dataTable.getFacets().put("footer", footer);
footer.setValue("Footer");
-
+
HtmlPage page = renderView();
assertNotNull(page);
// System.out.println(page.asXml());
@@ -403,24 +407,45 @@
subTable.setId("subTable");
dataTable.getChildren().add(subTable);
+ UIColumnGroup subTableColumnGroup = (UIColumnGroup) application
+ .createComponent("org.richfaces.ColumnGroup");
+
UIColumn column3 = (UIColumn) application
.createComponent("org.richfaces.Column");
- subTable.getChildren().add(column3);
- HtmlOutputText text = (HtmlOutputText) createComponent(
+ subTableColumnGroup.getChildren().add(column3);
+ UIOutput text = (UIOutput) createComponent(
HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
null, null, null);
- text.setValue("Column");
+ text.setValue("Column1");
column3.getChildren().add(text);
UIColumn column4 = (UIColumn) application
.createComponent("org.richfaces.Column");
- subTable.getChildren().add(column4);
- HtmlOutputText text2 = (HtmlOutputText) createComponent(
+ subTableColumnGroup.getChildren().add(column4);
+ UIOutput text2 = (UIOutput) createComponent(
HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
null, null, null);
text.setValue("Column2");
column4.getChildren().add(text2);
+ UIColumn headerColumn = (UIColumn) application
+ .createComponent("org.richfaces.Column");
+ UIOutput header = (UIOutput) createComponent(
+ HtmlOutputText.COMPONENT_TYPE, HtmlOutputText.class.getName(),
+ null, null, null);
+ header.setValue("Header");
+ headerColumn.getChildren().add(header);
+ subTable.getFacets().put("header", headerColumn);
+
+ column3.getFacets().put(
+ "header",
+ (UIOutput) createComponent(HtmlOutputText.COMPONENT_TYPE,
+ HtmlOutputText.class.getName(), null, null, null));
+ column4.getFacets().put(
+ "header",
+ (UIOutput) createComponent(HtmlOutputText.COMPONENT_TYPE,
+ HtmlOutputText.class.getName(), null, null, null));
+
subTable.getAttributes().put("columnClasses", "sub1,sub2");
assertTrue(subTable.isBreakBefore());
@@ -435,6 +460,7 @@
HtmlPage page = renderView();
assertNotNull(page);
// System.out.println(page.asXml());
+
}
/**
@@ -451,4 +477,33 @@
assertTrue(e instanceof IllegalStateException);
}
}
+
+ /**
+ * Test for Predicate classes of UIDataTable class.
+ *
+ * @throws Exception
+ */
+ public void testPredicates() throws Exception {
+
+ Predicate columnPredicate = UIDataTable.isColumn;
+ Predicate notColumnPredicate = UIDataTable.isNotColumn;
+ Predicate ajaxSupportPredicate = UIDataTable.isAjaxSupport;
+
+ UIComponent notColumn = createComponent(HtmlOutputText.COMPONENT_TYPE,
+ HtmlOutputText.class.getName(), null, null, null);
+ UIComponent column = column1;
+ UIComponent notAjaxSupport = notColumn;
+ UIComponent ajaxSupport = createComponent(UIAjaxSupport.COMPONENT_TYPE,
+ org.ajax4jsf.ajax.html.HtmlAjaxSupport.class.getName(), null,
+ null, null);
+
+ assertTrue(columnPredicate.evaluate(column));
+ assertTrue(!columnPredicate.evaluate(notColumn));
+
+ assertTrue(notColumnPredicate.evaluate(notColumn));
+ assertTrue(!notColumnPredicate.evaluate(column));
+
+ assertTrue(ajaxSupportPredicate.evaluate(ajaxSupport));
+ assertTrue(!ajaxSupportPredicate.evaluate(notAjaxSupport));
+ }
}
19 years
JBoss Rich Faces SVN: r453 - trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/separator/source.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-04-19 10:43:06 -0400 (Thu, 19 Apr 2007)
New Revision: 453
Modified:
trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/separator/source/usage.html
Log:
Modified: trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/separator/source/usage.html
===================================================================
--- trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/separator/source/usage.html 2007-04-19 14:42:14 UTC (rev 452)
+++ trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/separator/source/usage.html 2007-04-19 14:43:06 UTC (rev 453)
@@ -16,7 +16,7 @@
<span class="keyword"><rich:separator</span><span class="normal"> </span><span class="keyword">/></span>
<span class="normal">This is tick 50% beveled separator aligned to the right:</span>
-<span class="keyword"><rich:separator</span><span class="normal"> </span><span class="type">lineType</span><span class="symbol">=</span><span class="string">"</span><span class="string">beveled</span><span class="string">"</span><span class="normal"> </span><span class="type">height</span><span class="symbol">=</span><span class="string">"</span><span class="string">20</span><span class="string">"</span><span class="normal"> </span><span class="type">width</span><span class="symbol">=</span><span class="string">"</span><span class="string">50%</span><span class="string">"</span><span class="normal"> </span><span class="type">align</span><span class="symbol">=</span><span class="string">"</span><span class="string">right</span><span class="string">"</span><span class="keyword">/></span>
+<span class="keyword"><rich:separator</span><span class="normal"> </span><span class="type">lineType</span><span class="symbol">=</span><span class="string">"</span><span class="string">beveled</span><span class="string">"</span><span class="normal"> </span><span class="type">height</span><span class="symbol">=</span><span class="string">"</span><span class="string">20</span><span class="string">"</span><span class="normal"> </span><span class="type">width</span><span class="symbol">=</span><span class="string">"</span><span class="string">75%</span><span class="string">"</span><span class="normal"> </span><span class="type">align</span><span class="symbol">=</span><span class="string">"</span><span class="string">right</span><span class="string">"</span><span class="keyword">/></span>
<span class="normal">Here is more examples of different line types:</span>
<span class="keyword"><rich:separator</span><span class="normal"> </span><span class="type">height</span><span class="symbol">=</span><span class="string">"</span><span class="string">2</span><span class="string">"</span><span class="normal"> </span><span class="type">lineType</span><span class="symbol">=</span><span class="string">"</span><span class="string">dotted</span><span class="string">"</span><span class="keyword">/></span><span class="keyword"><br/></span>
19 years