JBoss Rich Faces SVN: r9763 - in trunk/test-applications/facelets/src/main/webapp/pages: Rich and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-07-24 07:30:15 -0400 (Thu, 24 Jul 2008)
New Revision: 9763
Modified:
trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml
trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
Log:
1) Delete html definition from Info.xhtml
2) Delete nested form from Rich.xhtml
Modified: trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml 2008-07-24 11:07:36 UTC (rev 9762)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Info/Info.xhtml 2008-07-24 11:30:15 UTC (rev 9763)
@@ -1,9 +1,6 @@
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
+<f:subview id="infoSubview" xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
-
-<f:subview id="infoSubview">
<h:panelGrid binding="#{info.panelEvent}" columns="2">
</h:panelGrid>
<f:verbatim>
@@ -38,5 +35,4 @@
</h:column>
</h:dataTable>
</h:panelGrid>
-</f:subview>
-</html>
\ No newline at end of file
+</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-07-24 11:07:36 UTC (rev 9762)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Rich/Rich.xhtml 2008-07-24 11:30:15 UTC (rev 9763)
@@ -5,7 +5,7 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
-<f:view>
+<f:view contentType="text/html" >
<head>
<f:loadBundle basename="message" var="msg" />
<title></title>
@@ -68,9 +68,7 @@
</h:panelGrid>
- <h:form id="infoFormID">
<ui:include src="/pages/Info/Info.xhtml" />
- </h:form>
</h:form>
</body>
15 years, 10 months
JBoss Rich Faces SVN: r9762 - trunk/samples/state-sample.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-07-24 07:07:36 -0400 (Thu, 24 Jul 2008)
New Revision: 9762
Modified:
trunk/samples/state-sample/pom.xml
Log:
core dependency added.
Modified: trunk/samples/state-sample/pom.xml
===================================================================
--- trunk/samples/state-sample/pom.xml 2008-07-24 08:31:09 UTC (rev 9761)
+++ trunk/samples/state-sample/pom.xml 2008-07-24 11:07:36 UTC (rev 9762)
@@ -1,27 +1,32 @@
-<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">
- <parent>
- <artifactId>samples</artifactId>
- <groupId>org.richfaces</groupId>
- <version>3.2.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>state-sample</artifactId>
- <packaging>war</packaging>
- <name>webapp Maven Webapp</name>
- <build>
- <finalName>state-sample</finalName>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>state</artifactId>
- <version>3.2.2-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.samples</groupId>
- <artifactId>skins</artifactId>
- <version>3.2.2-SNAPSHOT</version>
- </dependency>
- </dependencies>
+<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">
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.2.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>state-sample</artifactId>
+ <packaging>war</packaging>
+ <name>webapp Maven Webapp</name>
+ <build>
+ <finalName>state-sample</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>state</artifactId>
+ <version>3.2.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.2.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>skins</artifactId>
+ <version>3.2.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
15 years, 10 months
JBoss Rich Faces SVN: r9761 - in trunk/sandbox/ui/extendedDataTable/src/main: javascript/ClientUI/controls/datatable and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-07-24 04:31:09 -0400 (Thu, 24 Jul 2008)
New Revision: 9761
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
Log:
Changing the way of displaying splashScreen on load to prevent constant CPU load
Modified: trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java 2008-07-23 23:42:07 UTC (rev 9760)
+++ trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedRowsRenderer.java 2008-07-24 08:31:09 UTC (rev 9761)
@@ -202,6 +202,7 @@
public void encodeCaption(FacesContext context, SequenceDataAdaptor table)
throws IOException {
ResponseWriter writer = context.getResponseWriter();
+ String clientId = table.getClientId(context);
UIComponent caption = table.getFacet("caption");
if (caption != null) {
String captionClass = (String) table.getAttributes().get(
@@ -219,6 +220,8 @@
if (captionStyle != null) {
writer.writeAttribute("style", captionStyle, "captionStyle");
}
+ writer.writeAttribute(HTML.id_ATTRIBUTE, clientId + ":caption",
+ null);
renderChild(context, caption);
writer.endElement("caption");
}
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-23 23:42:07 UTC (rev 9760)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-24 08:31:09 UTC (rev 9761)
@@ -31,7 +31,7 @@
function(){
grid.update(true);
},
- Utils.Condition.ElementPresent(id+':header'), 5);
+ Utils.Condition.ElementPresent(id+':od'), 5);
},
destroy: function() {
@@ -124,8 +124,8 @@
this.mainDiv.setStyle({display:'none'});
}
this.table.setStyle({visibility:'hidden'});
- this.mainDiv.getElement().removeClassName('extdt-splscr-hddn');
- this.mainDiv.getElement().addClassName('extdt-splscr-vsbl');
+ var splshscr = this.splashScreen;
+ splshscr.className = 'extdt-ss-vsbl';
},
hideSplashScreen: function(){
@@ -133,8 +133,7 @@
this.mainDiv.setStyle({display:''});
}
this.table.setStyle({visibility:'visible'});
- this.mainDiv.getElement().removeClassName('extdt-splscr-vsbl');
- this.mainDiv.getElement().addClassName('extdt-splscr-hddn');
+ this.splashScreen.className = 'extdt-ss-hdn';
},
OnWindowResize: function(event) {
@@ -217,6 +216,7 @@
var id = this.id;
this.table = new ClientUI.common.box.Box(this.id +":tu",null,true);
var table = this.table;
+ this.splashScreen = $(this.id+":splashscreen");
this.mainDiv = new ClientUI.common.box.Box(this.id,null,true);
this.outerDiv = new ClientUI.common.box.Box(this.id +":od",null,true);
this.tableB = $(this.id +":n")
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-23 23:42:07 UTC (rev 9760)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-24 08:31:09 UTC (rev 9761)
@@ -78,6 +78,7 @@
}
this.headerRow = new ClientUI.common.box.Box(this.extDtId +":headerRow",this.getElement(),true);
this.filterRow = new ClientUI.common.box.Box(this.extDtId +":filterRow",this.getElement(),true);
+ this.caption = new ClientUI.common.box.Box(this.extDtId +":caption",this.getElement(),true);
var colgroup = $(this.extDtId +":colgroup:header");
this.cols = colgroup.getElementsByTagName("col");
this.columnsNumber = this.cols.length;
@@ -123,6 +124,14 @@
return this.headerRow.getHeight() + this.filterRow.getHeight();
},
+ getTotalHeight: function() {
+ var ret = this.headerRow.getHeight() + this.filterRow.getHeight();
+ if (this.caption) {
+ ret += this.caption.getHeight();
+ }
+ return ret;
+ },
+
OnMenuImageMouseDown: function(event) {
var el = this.extDt._findParentElement(event, "th");
var columnId = (el) ? el.id : null;
Modified: trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-23 23:42:07 UTC (rev 9760)
+++ trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-24 08:31:09 UTC (rev 9761)
@@ -64,8 +64,6 @@
}
.extdt-maindiv {
- background-repeat:no-repeat;
- background-position:center;
}
.extdt-menu-div-out {
@@ -90,6 +88,23 @@
margin-left: 10px;
}
+ .extdt-ss-hdn {
+ display: none;
+ position: absolute;
+ }
+
+ .extdt-ss-vsbl {
+ position: absolute;
+ display: block;
+ width: 100%;
+ height: 100%;
+ top: 0px;
+ left: 0px;
+ background-color: white;
+ background-repeat:no-repeat;
+ background-position:center;
+ }
+
.extdt-group-cell {
height: 15px;
background-color: #eeeeee;
@@ -283,12 +298,6 @@
overflow-y:auto;
}
- .extdt-splscr-hddn{
- }
-
- .extdt-splscr-vsbl{
- }
-
</f:verbatim>
<u:selector name=".extdt-menu-div-on" >
@@ -310,11 +319,18 @@
</u:style>
</u:selector>
-<u:selector name=".extdt-splscr-vsbl" >
- <u:style name="border" value="solid"> <!--tableBorderColor-->
+<u:selector name=".extdt-ss-vsbl" >
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
<f:verbatim skin="tableBorderWidth" />
<f:verbatim skin="tableBorderColor" />
- </u:style>
+ </u:style>
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
+ </u:style>
+ <u:style name="background-image">
+ <f:resource f:key="/org/richfaces/renderkit/html/images/loading.gif"/>
+ </u:style>
</u:selector>
<u:selector name=".extdt-dr-table" >
@@ -329,9 +345,6 @@
<f:verbatim skin="tableBorderWidth" />
<f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="background-image">
- <f:resource f:key="/org/richfaces/renderkit/html/images/loading.gif"/>
- </u:style>
</u:selector>
<u:selector name=".extdt-group-image-expanded">
Modified: trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-07-23 23:42:07 UTC (rev 9760)
+++ trunk/sandbox/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-07-24 08:31:09 UTC (rev 9761)
@@ -67,7 +67,7 @@
<div
id="#{clientId}"
- class="extdt-maindiv extdt-splscr-vsbl"
+ class="extdt-maindiv"
style="width:#{component.attributes['width']}; height:#{component.attributes['height']}"
>
@@ -91,7 +91,8 @@
<td colspan="#{columnsCount}" style="padding: 0px;">
<div id="#{clientId}:sd" class="extdt-content" style="height:50px;width:100%;">
<table id="#{clientId}:n" width="100%"
- class="extdt-dr-table rich-table #{component.attributes['styleClass']}" style="#{component.attributes['style']}"
+ class="extdt-dr-table rich-table #{component.attributes['styleClass']}"
+ style="#{component.attributes['style']}"
>
<f:call name="utils.encodePassThruWithExclusions">
<f:parameter value="height,value,name,type,id,class,rows,style,width" />
@@ -113,6 +114,9 @@
</table>
<f:call name="contributorsEncodeHere" />
</div>
+ <f:clientid var="clientId"/>
+ <div id="#{clientId}:splashscreen" class=".extdt-ss-vsbl">
+ </div>
<script type="text/javascript">
//<![CDATA[
delete #{this:getJavaScriptVarName(context, component)};
15 years, 10 months
JBoss Rich Faces SVN: r9760 - in trunk: samples/beanValidatorSample/src/main/java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-07-23 19:42:07 -0400 (Wed, 23 Jul 2008)
New Revision: 9760
Modified:
trunk/framework/impl/pom.xml
trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java
trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java
Log:
Some JDK-5 code corrections
Modified: trunk/framework/impl/pom.xml
===================================================================
--- trunk/framework/impl/pom.xml 2008-07-23 21:35:42 UTC (rev 9759)
+++ trunk/framework/impl/pom.xml 2008-07-23 23:42:07 UTC (rev 9760)
@@ -1,165 +1,166 @@
-<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">
- <parent>
- <artifactId>framework</artifactId>
- <groupId>org.richfaces</groupId>
- <version>3.2.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-impl</artifactId>
- <name>Java Server Faces AJAX framework implementation</name>
- <version>3.2.2-SNAPSHOT</version>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- <resource>
- <directory>target/javascript</directory>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javacc-maven-plugin</artifactId>
- <version>2.4</version>
- <executions>
- <execution>
- <goals>
- <goal>javacc</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>javascript</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="${basedir}/generatescript.xml" inheritRefs="true">
- <target name="assembly" />
- <property name="target-dir" value="${project.build.directory}/javascript" />
- </ant>
- </tasks>
- <resourceRoot>${project.build.directory}/javascript</resourceRoot>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-javascript-plugin</artifactId>
- <version>${project.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>compress</goal>
- </goals>
- <configuration>
- <nosuffix>false</nosuffix>
- <outputDirectory>${project.build.directory}/compressed/</outputDirectory>
- <aggregations>
- <aggregation>
- <insertNewLine>true</insertNewLine>
- <output>${project.build.outputDirectory}/org/ajax4jsf/framework.pack.js</output>
- <includes>
- <include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/prototype-min.js</include>
- <include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/AJAX-min.js</include>
- <include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous-min.js</include>
- <include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/jquery/jquery-min.js</include>
- <include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/dnd-min.js</include>
- <include>**/*-min.js</include>
- </includes>
- <excludes>
- <exclude>**/*.pack.js</exclude>
- <exclude>**/scriptaculous/*.js</exclude>
- <exclude>**/extend-min.js</exclude>
- <exclude>**/jquery.jcarousel-min.js</exclude>
- <exclude>**/compressed.css</exclude>
- </excludes>
- </aggregation>
- </aggregations>
- <resources>
- <resource>
- <directory>target/javascript</directory>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>jslint</id>
- <phase>test</phase>
- <goals>
- <goal>jslint</goal>
- </goals>
- <configuration>
- <includes>
- <include>**/framework.pack.js</include>
- </includes>
- <resources>
- <resource>
- <directory>${project.build.outputDirectory}</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>clover</id>
- <build>
- <plugins>
- <plugin>
- <groupId>com.atlassian.maven.plugins</groupId>
- <artifactId>maven-clover-plugin</artifactId>
- <configuration>
- <includesAllSourceRoots>false</includesAllSourceRoots>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- <dependencies>
- <dependency>
- <groupId>opensymphony</groupId>
- <artifactId>oscache</artifactId>
- <version>2.3</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>nekohtml</groupId>
- <artifactId>nekohtml</artifactId>
- <version>0.9.5</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>commons-digester</groupId>
- <artifactId>commons-digester</artifactId>
- <version>1.8</version>
- <exclusions>
- <exclusion>
- <artifactId>commons-logging</artifactId>
- <groupId>commons-logging</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-api</artifactId>
- <version>3.2.2-SNAPSHOT</version>
- </dependency>
- </dependencies>
+<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">
+ <parent>
+ <artifactId>framework</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.2.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <name>Java Server Faces AJAX framework implementation</name>
+ <version>3.2.2-SNAPSHOT</version>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>target/javascript</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>javacc-maven-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>javacc</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>javascript</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="${basedir}/generatescript.xml" inheritRefs="true">
+ <target name="assembly" />
+ <property name="target-dir" value="${project.build.directory}/javascript" />
+ </ant>
+ </tasks>
+ <resourceRoot>${project.build.directory}/javascript</resourceRoot>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-javascript-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compress</goal>
+ </goals>
+ <configuration>
+ <nosuffix>false</nosuffix>
+ <outputDirectory>${project.build.directory}/compressed/</outputDirectory>
+ <aggregations>
+ <aggregation>
+ <insertNewLine>true</insertNewLine>
+ <output>${project.build.outputDirectory}/org/ajax4jsf/framework.pack.js</output>
+ <includes>
+ <include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/prototype-min.js</include>
+ <include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/AJAX-min.js</include>
+ <include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous-min.js</include>
+ <include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/jquery/jquery-min.js</include>
+ <include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/dnd-min.js</include>
+ <include>**/*-min.js</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.pack.js</exclude>
+ <exclude>**/scriptaculous/*.js</exclude>
+ <exclude>**/extend-min.js</exclude>
+ <exclude>**/jquery.jcarousel-min.js</exclude>
+ <exclude>**/compressed.css</exclude>
+ </excludes>
+ </aggregation>
+ </aggregations>
+ <resources>
+ <resource>
+ <directory>target/javascript</directory>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>jslint</id>
+ <phase>test</phase>
+ <goals>
+ <goal>jslint</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>**/framework.pack.js</include>
+ </includes>
+ <resources>
+ <resource>
+ <directory>${project.build.outputDirectory}</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>clover</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.atlassian.maven.plugins</groupId>
+ <artifactId>maven-clover-plugin</artifactId>
+ <configuration>
+ <includesAllSourceRoots>false</includesAllSourceRoots>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>oscache</artifactId>
+ <version>2.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <version>0.9.5</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.8</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>commons-logging</artifactId>
+ <groupId>commons-logging</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-api</artifactId>
+ <version>3.2.2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java
===================================================================
--- trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java 2008-07-23 21:35:42 UTC (rev 9759)
+++ trunk/samples/beanValidatorSample/src/main/java/org/richfaces/MaxBean.java 2008-07-23 23:42:07 UTC (rev 9760)
@@ -3,6 +3,7 @@
*/
package org.richfaces;
+import org.hibernate.validator.CreditCardNumber;
import org.hibernate.validator.Length;
import org.hibernate.validator.Max;
import org.hibernate.validator.Min;
@@ -23,6 +24,7 @@
/**
* @return the text
*/
+ @CreditCardNumber
public String getText() {
return text;
}
@@ -49,7 +51,7 @@
}
public String getTextDescription() {
- return "Text value, no restrictions";
+ return "Text value, should be correct credit card number";
}
public String getIntDescription() {
Modified: trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java
===================================================================
--- trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java 2008-07-23 21:35:42 UTC (rev 9759)
+++ trunk/ui/core/src/main/java/org/ajax4jsf/renderkit/html/AjaxOutputPanelRenderer.java 2008-07-23 23:42:07 UTC (rev 9760)
@@ -54,9 +54,8 @@
if (component.getChildCount() > 0) {
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
boolean ajaxRequest = ajaxContext.isAjaxRequest();
- Set ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();
- for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
- UIComponent child = (UIComponent) it.next();
+ Set<String> ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();
+ for (UIComponent child : component.getChildren()) {
String childId = child.getClientId(context);
if (child.isRendered()) {
renderChild(context, child);
@@ -84,15 +83,13 @@
* @see javax.faces.render.Renderer#getRendersChildren()
*/
public boolean getRendersChildren() {
- // TODO Auto-generated method stub
return true;
}
/* (non-Javadoc)
* @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
*/
- protected Class getComponentClass() {
- // TODO Auto-generated method stub
+ protected Class<? extends UIComponent> getComponentClass() {
return UIAjaxOutputPanel.class;
}
@@ -114,7 +111,6 @@
* @return
*/
private String getTag(UIAjaxOutputPanel panel) {
- // TODO Auto-generated method stub
return "block".equals(panel.getLayout())?HTML.DIV_ELEM:HTML.SPAN_ELEM;
}
@@ -136,8 +132,8 @@
* @param component
*/
private void markNoTransient(UIComponent component) {
- for (Iterator iter = component.getFacetsAndChildren(); iter.hasNext();) {
- UIComponent element = (UIComponent) iter.next();
+ for (Iterator<UIComponent> iter = component.getFacetsAndChildren(); iter.hasNext();) {
+ UIComponent element = iter.next();
markNoTransient(element);
element.setTransient(false);
}
15 years, 10 months
JBoss Rich Faces SVN: r9759 - trunk/ui/beanValidator/src/main/java/org/richfaces/validator.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-07-23 17:35:42 -0400 (Wed, 23 Jul 2008)
New Revision: 9759
Modified:
trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
Log:
https://jira.jboss.org/jira/browse/RF-3992
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java 2008-07-23 16:52:48 UTC (rev 9758)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/validator/BeanValidator.java 2008-07-23 21:35:42 UTC (rev 9759)
@@ -104,25 +104,30 @@
public String[] validate(FacesContext context, ValueExpression target,
Object value) {
// TODO - check null parameters.
- checkInputParameters(context, target, value);
- ELContext elContext = context.getELContext();
- ValidationResolver validationResolver = new ValidationResolver(
- elContext.getELResolver());
- ELContextWrapper wrappedElContext = new ELContextWrapper(elContext,
- validationResolver);
- Locale locale = calculateLocale(context);
- wrappedElContext.setLocale(locale);
- // TODO - handle ELExceptions ?
- try {
- target.setValue(wrappedElContext, value);
- } catch (ELException e) {
- throw new FacesException(e);
+ if (null == context) {
+ throw new FacesException(INPUT_PARAMETERS_IS_NOT_CORRECT);
}
- if (validationResolver.isValid()) {
- return null;
- } else {
- return validationResolver.getValidationMessages();
+ String[] validationMessages = null;
+ if (null != target) {
+ ELContext elContext = context.getELContext();
+ ValidationResolver validationResolver = new ValidationResolver(
+ elContext.getELResolver());
+ ELContextWrapper wrappedElContext = new ELContextWrapper(elContext,
+ validationResolver);
+ Locale locale = calculateLocale(context);
+ wrappedElContext.setLocale(locale);
+ // TODO - handle ELExceptions ?
+ try {
+ target.setValue(wrappedElContext, value);
+ } catch (ELException e) {
+ throw new FacesException(e);
+ }
+ if (!validationResolver.isValid()) {
+ validationMessages = validationResolver.getValidationMessages();
+ }
+
}
+ return validationMessages;
}
protected Locale calculateLocale(FacesContext context) {
@@ -137,8 +142,8 @@
// Method for checking input parameters for prevent NPE
private void checkInputParameters(FacesContext context,
- ValueExpression target, Object value) {
- if (null == context || null == target || null == value) {
+ ValueExpression target) {
+ if (null == context || null == target ) {
throw new FacesException(INPUT_PARAMETERS_IS_NOT_CORRECT);
}
}
@@ -172,19 +177,27 @@
}
@SuppressWarnings("unchecked")
- public String[] validateGraph(FacesContext context, Object value, Set<String> profiles) {
+ public String[] validateGraph(FacesContext context, Object value,
+ Set<String> profiles) {
+ if (null == context) {
+ throw new FacesException(INPUT_PARAMETERS_IS_NOT_CORRECT);
+ }
String validationMessages[] = null;
- ClassValidator<Object> validator = (ClassValidator<Object>) getValidator(value
- .getClass(), calculateLocale(context));
- if (validator.hasValidationRules()) {
- InvalidValue[] invalidValues = validator.getInvalidValues(value);
- if(null != invalidValues && invalidValues.length >0){
- validationMessages = new String[invalidValues.length];
- for (int i = 0; i < invalidValues.length; i++) {
- InvalidValue invalidValue = invalidValues[i];
- validationMessages[i] = invalidValue.getMessage();
+ if (null != value) {
+ ClassValidator<Object> validator = (ClassValidator<Object>) getValidator(
+ value.getClass(), calculateLocale(context));
+ if (validator.hasValidationRules()) {
+ InvalidValue[] invalidValues = validator
+ .getInvalidValues(value);
+ if (null != invalidValues && invalidValues.length > 0) {
+ validationMessages = new String[invalidValues.length];
+ for (int i = 0; i < invalidValues.length; i++) {
+ InvalidValue invalidValue = invalidValues[i];
+ validationMessages[i] = invalidValue.getMessage();
+ }
}
}
+
}
return validationMessages;
}
15 years, 10 months
JBoss Rich Faces SVN: r9758 - trunk/samples/scrollableDataTableDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-07-23 12:52:48 -0400 (Wed, 23 Jul 2008)
New Revision: 9758
Added:
trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/RF-3425.xhtml
Log:
RF-3425
Added: trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/RF-3425.xhtml
===================================================================
--- trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/RF-3425.xhtml (rev 0)
+++ trunk/samples/scrollableDataTableDemo/src/main/webapp/pages/RF-3425.xhtml 2008-07-23 16:52:48 UTC (rev 9758)
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:sg="http://labs.jboss.com/jbossrichfaces/ui/scrollableDataTable"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:cl="http://labs.jboss.com/jbossrichfaces/ui/columns"
+ xmlns:dt="http://labs.jboss.com/jbossrichfaces/ui/dataTable"
+ >
+ <body>
+ <f:view>
+ <h:form>
+ <sg:scrollableDataTable value="#{modelBuilder.model1}" var="issues"
+ frozenColCount="1" first="0" rows="30" width="1000px" height="200px">
+ <dt:column width="300px">
+ <f:facet name="header">
+ <h:outputText value="issue"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell1}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </dt:column>
+ <dt:column width="200px">
+ <f:facet name="header">
+ <h:outputText value="data"></h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ <h:outputText value="data"></h:outputText>
+ </dt:column>
+ </sg:scrollableDataTable>
+ <sg:scrollableDataTable value="#{modelBuilder.model1}" var="issues"
+ frozenColCount="1" first="0" rows="30" width="1000px" height="200px">
+ <dt:column width="100px">
+ <f:facet name="header">
+ <h:outputText value="issue"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.cell1}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ </dt:column>
+ <dt:column width="400px">
+ <f:facet name="header">
+ <h:outputText value="data"></h:outputText>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="footer"></h:outputText>
+ </f:facet>
+ <h:outputText value="data"></h:outputText>
+ </dt:column>
+ </sg:scrollableDataTable>
+ </h:form>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
15 years, 10 months
JBoss Rich Faces SVN: r9757 - in trunk/ui/scrollableDataTable/src/main: javascript/ClientUI/common/utils and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-07-23 12:52:24 -0400 (Wed, 23 Jul 2008)
New Revision: 9757
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
Log:
RF-3425
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-07-23 16:37:37 UTC (rev 9756)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-07-23 16:52:24 UTC (rev 9757)
@@ -182,7 +182,7 @@
widthPx = getFormattedWidth(widthPx);
int width = Integer.parseInt(widthPx);
- writer.writeText(".dr-sdt-c-" + cell_index + " {", "width");
+ writer.writeText("#" + getNormalizedId(context, state.getGrid())+ " .dr-sdt-c-" + cell_index + " {", "width");
writer.writeText("width: " + width + "px;", "width");
writer.writeText("}", "width");
return 0;
@@ -488,10 +488,15 @@
return "window." + name;
}
+ public static String getNormalizedId(FacesContext context, UIScrollableDataTable grid) {
+ return grid.getBaseClientId(context).replaceAll("[^A-Za-z0-9_]", "_");
+ }
+
public String createClientScrollableGrid(FacesContext context, UIScrollableDataTable grid) {
ScrollableDataTableOptions options = new ScrollableDataTableOptions(grid);
+ options.addOption("normalizedId", getNormalizedId(context, grid));
composite.mergeScriptOptions(options, context, grid);
@@ -562,6 +567,10 @@
public void renderStyle(FacesContext context, UIScrollableDataTable grid) throws IOException {
ScrollableDataTableRendererState state = ScrollableDataTableRendererState.getRendererState(context);
ColumnWalker.iterateOverColumns(context, grid, styleRenderer, context.getResponseWriter(), state);
+ ResponseWriter writer = context.getResponseWriter();
+ writer.writeText("#" + getNormalizedId(context, state.getGrid()) + " .dr-sdt-c-f {", "width");
+ writer.writeText("width: 0px;", "width");
+ writer.writeText("}", "width");
}
public void renderFooters(FacesContext context, UIScrollableDataTable grid, boolean isFrozen) throws IOException{
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2008-07-23 16:37:37 UTC (rev 9756)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2008-07-23 16:52:24 UTC (rev 9757)
@@ -319,7 +319,7 @@
for (var j = 0; !rule && j < sheets.length; j++) {
var rules = sheets[j].cssRules ? sheets[j].cssRules: sheets[j].rules;
for (var i = 0; !rule && i < rules.length; i++) {
- if (rules[i].selectorText.toLowerCase() == ("." + className.toLowerCase())) {
+ if (rules[i].selectorText.toLowerCase() == (className.toLowerCase())) {
rule = rules[i];
}
}
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-07-23 16:37:37 UTC (rev 9756)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-07-23 16:52:24 UTC (rev 9757)
@@ -17,6 +17,7 @@
initialize: function($super, template, grid) {
this.grid = grid;
this.gridId = this.grid.getElement().id;
+ this.normalizedId = this.grid.options.normalizedId;
$super(template);
// register event handlers
@@ -127,7 +128,7 @@
fixedWidth: Validators.getBoolean(cell.getAttribute("fixedWidth"), false),
sortable: Validators.getBoolean(cell.getAttribute("sortable"), false),
sorted: Validators.getBoolean(cell.getAttribute("sorted"), "desc"),
- style : Utils.getRule("dr-sdt-c-" + j).style
+ style : Utils.getRule("#"+ this.normalizedId + " .dr-sdt-c-" + j).style
};
if(columns[j].sortable)
Event.observe(cell, 'click', eventCellMouseDown);
@@ -167,7 +168,7 @@
fixedWidth: Validators.getBoolean(cell.getAttribute("fixedWidth"), false),
sortable: Validators.getBoolean(cell.getAttribute("sortable"), false),
sorted: null,
- style : Utils.getRule("dr-sdt-c-" + (( i < count - 1 ) ? j : "f")).style
+ style : Utils.getRule("#"+ this.normalizedId + " .dr-sdt-c-" + (( i < count - 1 ) ? j : "f")).style
};
if(columns[j].sortable)
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2008-07-23 16:37:37 UTC (rev 9756)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table.jspx 2008-07-23 16:52:24 UTC (rev 9757)
@@ -62,6 +62,7 @@
variables.setVariable("fStyle", fStyle);
variables.setVariable("hStyle", hStyle);
+ variables.setVariable("normalizedId", getNormalizedId(context, component));
]]>
</jsp:scriptlet>
@@ -84,7 +85,7 @@
]]>
</jsp:scriptlet>
<tr>
- <td style="height: 100%;">
+ <td id="#{normalizedId}" style="height: 100%;">
<div id="#{clientId}:c" style="height: 100%; position: relative;">
<div id="#{clientId}:cs" class="dr-sdt-hsplit" style="display: none;"/>
<div id="#{clientId}_GridHeaderTemplate" class="dr-sdt-inlinebox" style="#{hStyle}; width: #{component.attributes['width']};">
@@ -92,9 +93,6 @@
<div style="display: block; left: 0px; top: 0px; width: #{sumWidth}px;">
<style>
<f:call name="renderStyle" />
- .dr-sdt-c-f {
- width: 0px;
- }
</style>
<span class="dr-sdt-tmplbox dr-sdt-fb" id="#{clientId}:header:FrozenBox">
<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
15 years, 10 months
JBoss Rich Faces SVN: r9756 - trunk/docs/cdkguide/en/src/main/docbook/includes.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-07-23 12:37:37 -0400 (Wed, 23 Jul 2008)
New Revision: 9756
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - Templating creation
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml 2008-07-23 16:34:59 UTC (rev 9755)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/ccreate.xml 2008-07-23 16:37:37 UTC (rev 9756)
@@ -39,6 +39,5 @@
<para>
If you want to rebuild the component you could use the following command:
</para>
- <programlisting role="XML"><![CDATA[mvn clean install]]>
- </programlisting>
+ <programlisting role="XML"><![CDATA[mvn clean install]]></programlisting>
</section>
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-07-23 16:34:59 UTC (rev 9755)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/template.xml 2008-07-23 16:37:37 UTC (rev 9756)
@@ -14,7 +14,7 @@
<property>templates</property> for generation <property>Renderer</property> class. </para>
<para> Templates are JSP-like markup pages with special tags that are converted into
<property>Renderer</property> by a build script. </para>
- <para> It's possible to use evaluated expressions in components templates.
+ <para> It's possible to use evaluated expressions in components templates with the help of <property>scriptlets</property>.
It's also possible to create the <property>base class</property> for a template to
implement additional functions in it, so as the functions could be called from the template.
Hence, in the generated <property>Renderer</property> class there are corresponding function
@@ -43,8 +43,79 @@
</f:root>
]]></programlisting>
<para> According to the created <property>UI prototype</property> you need to extend
- <property>Template Skeleton</property> with proper elements. Here is a full example for
+ <property>Template Skeleton</property> with proper elements:
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold"><property><div></property></emphasis>-wrapper element with
+ <emphasis><property>"title"</property></emphasis>,
+<emphasis><property>"value"</property></emphasis>,
+<emphasis><property>"name"</property></emphasis>,
+<emphasis><property>"type"</property></emphasis>,
+<emphasis><property>"id"</property></emphasis> attributes and with
+the<emphasis><property>"caption"</property></emphasis> facet
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold"><property><input></property></emphasis> element with
+<emphasis><property>"id"</property></emphasis>,
+<emphasis><property>"value"</property></emphasis>,
+<emphasis><property>"name"</property></emphasis>,
+<emphasis><property>"type"</property></emphasis>,
+<emphasis><property>"class"</property></emphasis>,
+<emphasis><property>"style"</property></emphasis> attributes and with
+the <emphasis><property>"icon"</property></emphasis> facet used to define an icon of the component.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold"><property><img></property></emphasis> element with
+<emphasis><property>"src"</property></emphasis>,
+<emphasis><property>"class"</property></emphasis>,
+<emphasis><property>"style"</property></emphasis> attributes.
+ </para>
+ </listitem>
+</itemizedlist>
+<para>
+ The <emphasis role="bold"><property><inputDate></property></emphasis> component uses styles and scripts that should
+ be defined in the template with the help of <emphasis role="bold"><property><h:styles></property></emphasis> and
+ <emphasis role="bold"><property><h:scripts></property></emphasis> tags. How to register all resources is explained in the
+ <property>"Component resources registration"</property> chapter.
+</para>
+<important>
+ <title>Important:</title>
+ <para>
+ Don't forget to add namespace <code>xmlns:h=" http://ajax4jsf.org/cdk/h"</code> to the
+ <emphasis role="bold"><property><f:root></property></emphasis> element:
+ </para>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ ...
+ xmlns:h=" http://ajax4jsf.org/cdk/h"
+ ...
+ >
+ ...
+</f:root>]]></programlisting>
+</important>
+<para>
+Here is a full example of the template for
the <emphasis role="bold">
<property><inputDate></property>
- </emphasis> component: </para>
- <ulink url="jspx/htmlInputDate.jspx">htmlInputDate.jspx</ulink>. </section>
+ </emphasis> component:
+ <ulink url="jspx/htmlInputDate.jspx">htmlInputDate.jspx</ulink>.
+ </para>
+ <note>
+ <title>Note:</title>
+ <para>
+ In the <property>Template Skeleton</property> Renderer Baseclass is <code>org.ajax4jsf.renderkit.AjaxComponentRendererBase</code>, but
+ you need to define Renderer Baseclass special for <emphasis role="bold"><property><inputDate></property></emphasis> component.
+ In the next section <link linkend="rendererbase">"Creating a Renderer Base class"</link> we will define Renderer Baseclass <code>org.mycompany.renderkit.InputDateRendererBase</code>.
+ </para>
+ </note>
+ <para>
+ All the Template tags you could find in the <property>"Template tags overview"</property> chapter.
+ </para>
+ </section>
15 years, 10 months
JBoss Rich Faces SVN: r9755 - trunk/ui/pickList/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-07-23 12:34:59 -0400 (Wed, 23 Jul 2008)
New Revision: 9755
Modified:
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-3932
Modified: trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-07-23 15:22:59 UTC (rev 9754)
+++ trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-07-23 16:34:59 UTC (rev 9755)
@@ -473,10 +473,10 @@
if (!useFacet) {
writer.endElement(HTML.DIV_ELEM);
- writer.endElement(HTML.DIV_ELEM);
if (helper.enable) {
writer.endElement(HTML.a_ELEMENT);
}
+ writer.endElement(HTML.DIV_ELEM);
}
writer.endElement(HTML.DIV_ELEM);
}
15 years, 10 months
JBoss Rich Faces SVN: r9754 - in trunk/ui/datascroller/src/main/java/org/richfaces: renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-07-23 11:22:59 -0400 (Wed, 23 Jul 2008)
New Revision: 9754
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-3971
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-07-23 15:12:09 UTC (rev 9753)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2008-07-23 15:22:59 UTC (rev 9754)
@@ -38,6 +38,7 @@
import org.ajax4jsf.Messages;
import org.ajax4jsf.component.AjaxActionComponent;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils;
import org.apache.commons.logging.Log;
@@ -110,16 +111,19 @@
updateModel(dataScrollerEvent.getPage());
- FacesContext context = FacesContext.getCurrentInstance();
- AjaxRendererUtils.addRegionByName(context, this, this.getId());
- AjaxRendererUtils.addRegionByName(context, this, this.getFor());
+ FacesContext context = getFacesContext();
- setupReRender(context);
-
MethodExpression scrollerListener = getScrollerListener();
if (scrollerListener != null) {
scrollerListener.invoke(context.getELContext(), new Object[]{event});
}
+ } else if (event instanceof AjaxEvent) {
+ FacesContext context = getFacesContext();
+
+ AjaxRendererUtils.addRegionByName(context, this, this.getId());
+ AjaxRendererUtils.addRegionByName(context, this, this.getFor());
+
+ setupReRender(context);
}
}
Modified: trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
--- trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2008-07-23 15:12:09 UTC (rev 9753)
+++ trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2008-07-23 15:22:59 UTC (rev 9754)
@@ -33,6 +33,7 @@
import javax.faces.context.ResponseWriter;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSLiteral;
@@ -49,25 +50,27 @@
}
public void doDecode(FacesContext context, UIComponent component) {
- Map paramMap = getParamMap(context);
- String clientId = component.getClientId(context);
- String param = (String) paramMap.get(clientId);
- if (param != null) {
- UIDatascroller scroller = (UIDatascroller) component;
- int newPage = scroller.getPageForFacet(param);
- int page = scroller.getPage();
- if (newPage != 0 && newPage != page) {
- DataScrollerEvent event = new DataScrollerEvent(scroller,
- String.valueOf(page), param, newPage);
- if (scroller.isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
+ Map paramMap = getParamMap(context);
+ String clientId = component.getClientId(context);
+ String param = (String) paramMap.get(clientId);
+ if (param != null) {
+ UIDatascroller scroller = (UIDatascroller) component;
+ int newPage = scroller.getPageForFacet(param);
+ int page = scroller.getPage();
+ if (newPage != 0 && newPage != page) {
+ DataScrollerEvent event = new DataScrollerEvent(scroller,
+ String.valueOf(page), param, newPage);
+ if (scroller.isImmediate()) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else {
+ event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
- component.queueEvent(event);
- }
- }
+ event.queue();
+ }
+
+ new AjaxEvent(component).queue();
+ }
}
public ControlsState getControlsState(FacesContext context,
15 years, 10 months