JBoss Rich Faces SVN: r1967 - in trunk: framework/impl/src/main/javascript/ajaxjsf and 6 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: alexsmirnov
Date: 2007-07-31 19:22:14 -0400 (Tue, 31 Jul 2007)
New Revision: 1967
Added:
   trunk/samples/seamIntegration/src/main/webapp/META-INF/
   trunk/samples/seamIntegration/src/main/webapp/META-INF/MANIFEST.MF
   trunk/samples/useCases/src/main/webapp/pages/replaceTD.xhtml
Modified:
   trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
   trunk/framework/pom.xml
   trunk/samples/seamIntegration/pom.xml
   trunk/samples/seamIntegration/src/main/resources/logging.properties
   trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
   trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
Log:
Fix AJSF-80
Attempt to restore seam application sample.
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js	2007-07-31 17:25:44 UTC (rev 1966)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js	2007-07-31 23:22:14 UTC (rev 1967)
@@ -290,7 +290,7 @@
 			var anchor = oldnode.parentNode ;
     // need to check for firstChild due to opera 8 bug with hasChildNodes
 			Sarissa.clearChildNodes(oldnode);
-			if(oldnode.outerHTML){
+			if(oldnode.outerHTML && !oldnode.tagName.match( /(tbody|thead|tfoot|tr|th|td)/i ) ){
    		        LOG.debug("Replace content of node by outerHTML()");
 				oldnode.outerHTML = new XMLSerializer().serializeToString(newnode); 
 			} else {
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml	2007-07-31 17:25:44 UTC (rev 1966)
+++ trunk/framework/pom.xml	2007-07-31 23:22:14 UTC (rev 1967)
@@ -1,24 +1,77 @@
-<?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">
-	<parent>
-		<artifactId>root</artifactId>
-		<groupId>org.richfaces</groupId>
-		<version>3.1.0-SNAPSHOT</version>
-	</parent>
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.richfaces</groupId>
-	<artifactId>framework</artifactId>
+<?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">
+	<parent>
+		<artifactId>root</artifactId>
+		<groupId>org.richfaces</groupId>
+		<version>3.1.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.richfaces</groupId>
+	<artifactId>framework</artifactId>
 	<version>3.1.0-SNAPSHOT</version>
-	<packaging>pom</packaging>
-	<name>Java Server Faces AJAX framework</name>
-	<dependencies />
+	<packaging>pom</packaging>
+	<name>Java Server Faces AJAX framework</name>
+	<dependencies />
 	<build>
-	</build>
-	<modules>
-		<module>api-parent</module>
-		<module>api</module>
-		<module>impl-parent</module>
-		<module>impl</module>
-		<module>test</module>
-  </modules>
+		<plugins>
+			<plugin>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-javadoc</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-source</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-jar-plugin</artifactId>
+					<configuration>
+						<archive>
+							<index>true</index>
+							<manifest>
+								<addDefaultSpecificationEntries>
+									true
+								</addDefaultSpecificationEntries>
+								<addDefaultImplementationEntries>
+									true
+								</addDefaultImplementationEntries>
+							</manifest>
+							<manifestEntries>
+								<mode>development</mode>
+								<Build-Number>
+									${buildNumber}
+								</Build-Number>
+							</manifestEntries>
+						</archive>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+	<modules>
+		<module>api-parent</module>
+		<module>api</module>
+		<module>impl-parent</module>
+		<module>impl</module>
+		<module>test</module>
+	</modules>
 </project>
\ No newline at end of file
Modified: trunk/samples/seamIntegration/pom.xml
===================================================================
--- trunk/samples/seamIntegration/pom.xml	2007-07-31 17:25:44 UTC (rev 1966)
+++ trunk/samples/seamIntegration/pom.xml	2007-07-31 23:22:14 UTC (rev 1967)
@@ -4,11 +4,11 @@
 	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.ajax4jsf</groupId>
-		<version>1.1.1-SNAPSHOT</version>
+		<groupId>org.richfaces</groupId>
+		<version>3.1.0-SNAPSHOT</version>
 	</parent>
 	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.ajax4jsf</groupId>
+	<groupId>org.richfaces.samples</groupId>
 	<artifactId>seamIntegration</artifactId>
 	<packaging>war</packaging>
 	<name>seamIntegration Maven Webapp</name>
@@ -28,43 +28,72 @@
 	<dependencies>
 		<dependency>
 			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-commons-annotations</artifactId>
+			<version>3.3.0.ga</version>
+		</dependency>
+		<!--
+			<dependency>
+			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-annotations</artifactId>
-			<version>3.2.1.ga</version>
-		</dependency>
+			<version>3.3.0.ga</version>
+			</dependency>
+			<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate</artifactId>
+			<version>3.2.4.ga</version>
+			</dependency>
+		-->
 		<dependency>
 			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate</artifactId>
-			<version>3.2.3.ga</version>
+			<artifactId>hibernate-validator</artifactId>
+			<version>3.0.0.ga</version>
 		</dependency>
 		<dependency>
-			<groupId>org.jboss</groupId>
-			<artifactId>seam</artifactId>
-			<version>1.2.1.ga</version>
+			<groupId>jboss</groupId>
+			<artifactId>seam-core</artifactId>
+			<version>2.0.0.BETA</version>
 			<systemPath>${seamHome}/jboss-seam.jar</systemPath>
 			<scope>system</scope>
 		</dependency>
 		<dependency>
-			<groupId>org.jboss</groupId>
+			<groupId>jboss</groupId>
 			<artifactId>seam-ui</artifactId>
-			<version>1.2.1.ga</version>
+			<version>2.0.0.BETA</version>
 			<systemPath>${seamHome}/jboss-seam-ui.jar</systemPath>
 			<scope>system</scope>
 		</dependency>
 		<dependency>
 			<groupId>jboss</groupId>
+			<artifactId>jboss-el</artifactId>
+			<version>2.0.0.BETA</version>
+			<systemPath>${seamHome}/lib/jboss-el.jar</systemPath>
+			<scope>system</scope>
+		</dependency>
+		<!--
+			<dependency>
+			<groupId>jboss</groupId>
+			<artifactId>seam-debug</artifactId>
+			<version>2.0.0.BETA</version>
+			<systemPath>${seamHome}/jboss-seam-debug.jar</systemPath>
+			<scope>system</scope>
+			</dependency>
+			<dependency>
+			<groupId>jboss</groupId>
+			<artifactId>seam-ioc</artifactId>
+			<version>2.0.0.BETA</version>
+			<systemPath>${seamHome}/jboss-seam-ioc.jar</systemPath>
+			<scope>system</scope>
+			</dependency>
+		-->
+		<dependency>
+			<groupId>jboss</groupId>
 			<artifactId>javassist</artifactId>
 			<version>3.4.ga</version>
 		</dependency>
 		<dependency>
-			<groupId>javax.el</groupId>
-			<artifactId>el-api</artifactId>
-			<version>1.0</version>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2</version>
 		</dependency>
-		<dependency>
-			<groupId>el-impl</groupId>
-			<artifactId>el-impl</artifactId>
-			<version>1.0</version>
-			<scope>runtime</scope>
-		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file
Modified: trunk/samples/seamIntegration/src/main/resources/logging.properties
===================================================================
--- trunk/samples/seamIntegration/src/main/resources/logging.properties	2007-07-31 17:25:44 UTC (rev 1966)
+++ trunk/samples/seamIntegration/src/main/resources/logging.properties	2007-07-31 23:22:14 UTC (rev 1967)
@@ -5,17 +5,15 @@
 # Describes specific configuration info for Handlers.
 ############################################################
 
-org.apache.juli.FileHandler.level ALL
-org.apache.juli.FileHandler.directory ${catalina.base}/logs
-org.apache.juli.FileHandler.prefix ajax4jsf.
 
 java.util.logging.ConsoleHandler.level ALL
 java.util.logging.ConsoleHandler.formatter java.util.logging.SimpleFormatter
 
 facelets.level=ALL
-com.sun.faces.level=INFO
+com.sun.faces.level=FINE
 org.apache.myfaces.level=ALL
 org.ajax4jsf.level=ALL
+org.richfaces.level=ALL
 javax.enterprise.resource.webcontainer.jsf.level=INFO
 com.exadel.level=ALL
 org.jboss.seam.level=FINE
Added: trunk/samples/seamIntegration/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/META-INF/MANIFEST.MF	                        (rev 0)
+++ trunk/samples/seamIntegration/src/main/webapp/META-INF/MANIFEST.MF	2007-07-31 23:22:14 UTC (rev 1967)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Property changes on: trunk/samples/seamIntegration/src/main/webapp/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml	2007-07-31 17:25:44 UTC (rev 1966)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/components.xml	2007-07-31 23:22:14 UTC (rev 1967)
@@ -1,20 +1,35 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <components xmlns="http://jboss.com/products/seam/components"
 	xmlns:core="http://jboss.com/products/seam/core"
+	xmlns:persistence="http://jboss.com/products/seam/persistence"
+	xmlns:transaction="http://jboss.com/products/seam/transaction"
 	xmlns:security="http://jboss.com/products/seam/security"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.2.xsd
-                 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
-                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd">
+	xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
+                 http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
+                 http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
+                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
 
-	<core:init debug="true" />
 
+	<core:init debug="false" />
+
+	<core:microcontainer installed="false" />
+	
 	<core:manager conversation-timeout="120000"
-		concurrent-request-timeout="500" conversation-id-parameter="cid"
-		conversation-is-long-running-parameter="clr" />
+		concurrent-request-timeout="500" conversation-id-parameter="cid" />
+
+	<transaction:no-transaction/>
 	<!--
-		<core:hibernate-session-factory name="hibernateSessionFactory"/>
+		
+		<persistence:hibernate-session-factory name="hibernateSessionFactory"/>
+		
+		<persistence:managed-hibernate-session name="seamDatabase"
+		session-factory="#{hibernateSessionFactory}"
+		auto-create="true"/>
+		
+		
+		<transaction:hibernate-transaction session="#{seamDatabase}"/>
+		
+		
 	-->
-	<core:microcontainer installed="false" />
-
 </components>
Modified: trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml	2007-07-31 17:25:44 UTC (rev 1966)
+++ trunk/samples/seamIntegration/src/main/webapp/WEB-INF/web.xml	2007-07-31 23:22:14 UTC (rev 1967)
@@ -9,7 +9,7 @@
 	</context-param>
 	<context-param>
 		<param-name>facelets.DEVELOPMENT</param-name>
-		<param-value>true</param-value>
+		<param-value>false</param-value>
 	</context-param>
 	<context-param>
 		<param-name>com.sun.faces.validateXml</param-name>
@@ -36,7 +36,6 @@
 		<param-value>false</param-value>
 	</context-param>
 	<!-- 
-	-->
 	<filter>
 		<display-name>Ajax4jsf Filter</display-name>
 		<filter-name>ajax4jsf</filter-name>
@@ -49,21 +48,23 @@
 		<dispatcher>FORWARD</dispatcher>
 		<dispatcher>INCLUDE</dispatcher>
 	</filter-mapping>
-	<filter>
-		<filter-name>Seam Filter</filter-name>
-		<filter-class>org.jboss.seam.web.SeamFilter</filter-class>
-	</filter>
+	-->
+    <!-- Seam -->
 
-	<filter-mapping>
-		<filter-name>Seam Filter</filter-name>
-		<url-pattern>/*</url-pattern>
-	</filter-mapping>
+    <listener>
+        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+    </listener>
 
-	<listener>
-		<listener-class>
-			org.jboss.seam.servlet.SeamListener
-		</listener-class>
-	</listener>
+    <filter>
+      <filter-name>Seam Filter</filter-name>
+      <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+    </filter>
+
+    <filter-mapping>
+      <filter-name>Seam Filter</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
 	<servlet>
 		<servlet-name>Faces Servlet</servlet-name>
 		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
@@ -77,17 +78,6 @@
 		<servlet-name>Faces Servlet</servlet-name>
 		<url-pattern>*.jsf</url-pattern>
 	</servlet-mapping>
-	<servlet>
-		<servlet-name>Seam Resource Servlet</servlet-name>
-		<servlet-class>
-			org.jboss.seam.servlet.ResourceServlet
-		</servlet-class>
-	</servlet>
-
-	<servlet-mapping>
-		<servlet-name>Seam Resource Servlet</servlet-name>
-		<url-pattern>/seam/resource/*</url-pattern>
-	</servlet-mapping>
 	<login-config>
 		<auth-method>BASIC</auth-method>
 	</login-config>
Added: trunk/samples/useCases/src/main/webapp/pages/replaceTD.xhtml
===================================================================
--- trunk/samples/useCases/src/main/webapp/pages/replaceTD.xhtml	                        (rev 0)
+++ trunk/samples/useCases/src/main/webapp/pages/replaceTD.xhtml	2007-07-31 23:22:14 UTC (rev 1967)
@@ -0,0 +1,25 @@
+<!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:h="http://java.sun.com/jsf/html"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:c="http://java.sun.com/jsp/jstl/core">
+	<head>
+	<title>Replace table cell content</title>
+	</head>
+<body>
+<f:view>
+	<h:form>
+		<h:dataTable value="#{repeatData.data}" var="row" id="r">
+			<h:column id="col">
+				<h:inputText value="#{row.text}"></h:inputText>
+				<h:outputText id="text0" value="#{row.text}"></h:outputText>
+				<a4j:commandButton value="Up" reRender="col"></a4j:commandButton>
+			</h:column>
+		</h:dataTable>
+	</h:form>
+	<a4j:log hotkey="M"/>
+</f:view>
+</body>
+</html>
Property changes on: trunk/samples/useCases/src/main/webapp/pages/replaceTD.xhtml
___________________________________________________________________
Name: svn:mime-type
   + text/plain
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1966 - trunk/framework/impl/src/main/resources/META-INF/skins.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: sergeyhalipov
Date: 2007-07-31 13:25:44 -0400 (Tue, 31 Jul 2007)
New Revision: 1966
Modified:
   trunk/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties
Log:
http://jira.jboss.com/jira/browse/RF-517
Modified: trunk/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties
===================================================================
--- trunk/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties	2007-07-31 17:22:52 UTC (rev 1965)
+++ trunk/framework/impl/src/main/resources/META-INF/skins/DEFAULT.skin.properties	2007-07-31 17:25:44 UTC (rev 1966)
@@ -48,3 +48,4 @@
 tableFooterBackgroundColor=#cccccc
 tableSubfooterBackgroundColor=#f1f1f1
 tableBorderColor=#C4C0C9
+tableBorderWidth=1px
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1965 - trunk/samples/skins/src/main/java/org/richfaces.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: sergeyhalipov
Date: 2007-07-31 13:22:52 -0400 (Tue, 31 Jul 2007)
New Revision: 1965
Modified:
   trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java
Log:
Fix 'DEFAULT' skin name in sample
Modified: trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java
===================================================================
--- trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java	2007-07-31 17:07:00 UTC (rev 1964)
+++ trunk/samples/skins/src/main/java/org/richfaces/SkinBean.java	2007-07-31 17:22:52 UTC (rev 1965)
@@ -39,7 +39,7 @@
 		"blueSky",
 		"classic",
 		"deepMarine",
-		"default",
+		"DEFAULT",
 		"emeraldTown",
 		"japanCherry",
 		"ruby",
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1964 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: vkorluzhenko
Date: 2007-07-31 13:07:00 -0400 (Tue, 31 Jul 2007)
New Revision: 1964
Modified:
   trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml
   trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml
   trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml
   trunk/docs/userguide/en/src/main/resources/images/suggestionbox4.gif
Log:
http://jira.jboss.com/jira/browse/RF-451
Modified: trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml	2007-07-31 17:05:19 UTC (rev 1963)
+++ trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml	2007-07-31 17:07:00 UTC (rev 1964)
@@ -276,7 +276,7 @@
   </section>
 
   <section>
-    <title> Redefinition of Skin Parameters</title>
+    <title> Skin parameters redefinition</title>
 
     <table>
       <title>Label Skin parameters redefinition</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml	2007-07-31 17:05:19 UTC (rev 1963)
+++ trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.desc.xml	2007-07-31 17:07:00 UTC (rev 1964)
@@ -42,6 +42,7 @@
         <listitem>Flexible list of components to update after AJAX request managed by attributes</listitem>
         <listitem>Setting restriction to AJAX request generation</listitem>
         <listitem>Easily setting action to collect suggestion data</listitem>   
+        <listitem>Keyboard navigation support</listitem>   
     </itemizedlist>
 	</section>
 </section>
\ No newline at end of file
Modified: trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml	2007-07-31 17:05:19 UTC (rev 1963)
+++ trunk/docs/userguide/en/src/main/docbook/included/suggestionBox.xml	2007-07-31 17:07:00 UTC (rev 1964)
@@ -189,7 +189,240 @@
             after which AJAX requests are called to perform suggestion.</para>
 
     </section>
+    
     <section>
+        <title>Look-and-Feel Customization</title>
+        
+        <para>For skinnability implementation, the components use a style class redefinition method.
+            Default style classes are mapped on skin parameters.</para>
+        
+        <para>There are two ways to redefine the appearance of all suggestionbox at once:</para>
+        
+        <itemizedlist>
+            <listitem>
+                <para>Redefine the corresponding skin parameters</para>
+            </listitem>
+            
+            <listitem>
+                <para>Add to a user's style sheets style classes used by a suggestionbox</para>
+            </listitem>
+        </itemizedlist>
+    </section>
+    
+    <section>
+        <title> Skin parameters redefinition</title>
+        
+        <table>
+            <title>General skin parameters redefinition for popup list</title>
+            
+            <tgroup cols="2">
+                <thead>
+                    <row>
+                        <entry>Parameters for popup list</entry>
+                        
+                        <entry>CSS properties</entry>
+                    </row>
+                </thead>
+                
+                <tbody>
+                    <row>
+                        <entry>additionalBackgroundColor</entry>
+                        
+                        <entry>background-color</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>panelBorderColor</entry>
+                        
+                        <entry>border-color</entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        
+        <table>
+            <title>Skin parameters redefinition for shadow element of the list</title>
+            
+            <tgroup cols="2">
+                <thead>
+                    <row>
+                        <entry>Parameters for shadow element of the list</entry>
+                        
+                        <entry>CSS properties</entry>
+                    </row>
+                </thead>
+                
+                <tbody>
+                    <row>
+                        <entry>shadowBackgroundColor</entry>
+                        
+                        <entry>background-color</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>shadowBackgroundColor</entry>
+                        
+                        <entry>border-color</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>shadowOpacity</entry>
+                        
+                        <entry>opacity</entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        
+        <table>
+            <title>Skin parameters redefinition for popup table rows</title>
+            
+            <tgroup cols="2">
+                <thead>
+                    <row>
+                        <entry>Parameters for popup table rows</entry>
+                        
+                        <entry>CSS properties</entry>
+                    </row>
+                </thead>
+                
+                <tbody>
+                    <row>
+                        <entry>generalSizeFont</entry>
+                        
+                        <entry>font-size</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>generalTextColor</entry>
+                        
+                        <entry>color</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>generalFamilyFont</entry>
+                        
+                        <entry>font-family</entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        
+        <table>
+            <title>Skin parameters redefinition for selected row</title>
+            
+            <tgroup cols="2">
+                <thead>
+                    <row>
+                        <entry>Parameters for selected row</entry>
+                        
+                        <entry>CSS properties</entry>
+                    </row>
+                </thead>
+                
+                <tbody>
+                    <row>
+                        <entry>headerBackgroundColor</entry>
+                        
+                        <entry>background-color</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>generalSizeFont</entry>
+                        
+                        <entry>font-size</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>generalFamilyFont</entry>
+                        
+                        <entry>font-family</entry>
+                    </row>
+                    <row>
+                        <entry>headerTextColor</entry>
+                    
+                        <entry>color</entry>
+                    </row>
+                    
+                </tbody>
+            </tgroup>
+        </table>
+    </section>
+    
+    <section>
+        <title>Definition of Custom Style Classes</title>
+        
+       <figure>
+            <title>Classes names</title>
+            
+            <mediaobject>
+                <imageobject>
+                    <imagedata fileref="images/suggestionbox4.gif"/>
+                </imageobject>
+            </mediaobject>
+        </figure>
+        
+        <para>On the screenshot, there are classes names defining specified elements.</para>
+        
+        <table>
+            <title>Component skin class</title>
+            
+            <tgroup cols="2">
+                <thead>
+                    <row>
+                        <entry>Class name</entry>
+                        
+                        <entry>Description</entry>
+                    </row>
+                </thead>
+                
+                <tbody>
+                    <row>
+                        <entry>rich-sb-overflow</entry>
+                        
+                        <entry>Defines the styles of outer div</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>rich-sb-int-decor-table</entry>
+                        
+                        <entry>Defines the styles for suggestion box table</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>rich-sb-int</entry>
+                        
+                        <entry>Defines the styles for suggestion box table rows (tr)</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>rich-sb-cell-padding</entry>
+                        
+                        <entry>Defines the styles for suggestion box table cells (td)</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>rich-sb-shadow</entry>
+                        
+                        <entry>Defines the styles for shadow</entry>
+                    </row>
+                    
+                    <row>
+                        <entry>rich-sb-int-sel</entry>
+                        
+                        <entry>Defines the styles for selected row</entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+        
+        <para>In order to redefine the style for all saggestionbox components on a page using CSS, it's enough to
+            create classes with the same names and define the necessary properties in them.</para>
+        
+        <para>To change the style of particular suggestionbox components define your own style classes in the corresponding suggestionbox attributes. </para>
+    </section>
+        
+    <section>
         <title>Relevant resources links</title>
         <para>
             <ulink
Modified: trunk/docs/userguide/en/src/main/resources/images/suggestionbox4.gif
===================================================================
(Binary files differ)
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1963 - trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: konstantin.mishin
Date: 2007-07-31 13:05:19 -0400 (Tue, 31 Jul 2007)
New Revision: 1963
Modified:
   trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
   trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RF-297
Modified: trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js	2007-07-31 16:49:11 UTC (rev 1962)
+++ trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js	2007-07-31 17:05:19 UTC (rev 1963)
@@ -740,5 +740,19 @@
 		for(var i=0; i<rows.length; i++) {
 			rows[i].removeChild(rows[i].cells[index]);
 		}
+	},
+	
+	showRow: function(rowIndex) {
+		var row = $(this.gridId + ":f:" + rowIndex);
+		var offsetTop = this.fTable.offsetTop + row.offsetTop;
+		if(this.frozenContentBox.getElement().scrollTop > offsetTop) {
+			this.setScrollPos(offsetTop);
+		} else {
+			offsetTop += row.offsetHeight;
+			offsetTop -= this.frozenContentBox.getElement().clientHeight;
+			if (this.frozenContentBox.getElement().scrollTop < offsetTop){
+				this.setScrollPos(offsetTop);			
+			}
+		}
 	}
 });
Modified: trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js	2007-07-31 16:49:11 UTC (rev 1962)
+++ trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js	2007-07-31 17:05:19 UTC (rev 1963)
@@ -219,6 +219,7 @@
  
 Object.extend(ClientUI.controls.grid.SelectionManager.prototype, {
 	initialize: function(grid) {
+		this.grid = grid;
 		this.selectionFlag;
 		this.firstIndex;
 		var gridElement = grid.getElement();
@@ -388,6 +389,7 @@
 				this.lostFocus();
 		}
 		if (noDefault) {
+			this.grid.getBody().showRow(this.activeRow);
 			this.selectionChanged(event);			
 			if (event.preventBubble) event.preventBubble();
 			Event.stop(event);
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1962 - in trunk/ui/panelmenu/src/main: java/org/richfaces/component and 1 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: dbiatenia
Date: 2007-07-31 12:49:11 -0400 (Tue, 31 Jul 2007)
New Revision: 1962
Modified:
   trunk/ui/panelmenu/src/main/config/component/panelMenu.xml
   trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
   trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
Log:
RF-512
Modified: trunk/ui/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/ui/panelmenu/src/main/config/component/panelMenu.xml	2007-07-31 16:49:04 UTC (rev 1961)
+++ trunk/ui/panelmenu/src/main/config/component/panelMenu.xml	2007-07-31 16:49:11 UTC (rev 1962)
@@ -336,7 +336,7 @@
 			<superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
 		</tag>
 		<property>
-	    	<name>mode</name>
+	    	<name>expandMode</name>
 	    	<classname>java.lang.String</classname>
 	    	<description>
 	    		Set the submission mode for all panel menu groups after expand/collapse 
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java	2007-07-31 16:49:04 UTC (rev 1961)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java	2007-07-31 16:49:11 UTC (rev 1962)
@@ -42,8 +42,8 @@
 	public abstract String getStyleClass();
 	public abstract void setStyleClass(String styleClass);
 
-	public abstract String getMode();
-	public abstract void setMode(String mode);
+	public abstract String getExpandMode();
+	public abstract void setExpandMode(String exapandMode);
 	public abstract String getIconExpanded();
 	public abstract void setIconExpanded(String expanded);
 	
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java	2007-07-31 16:49:04 UTC (rev 1961)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java	2007-07-31 16:49:11 UTC (rev 1962)
@@ -233,8 +233,8 @@
 		String mode = "none";
 		if (component instanceof UIPanelMenuGroup) {
 			UIPanelMenuGroup group = (UIPanelMenuGroup) component;
-			if (null != group.getMode() && ! "".equals(group.getMode()))
-				mode = group.getMode();
+			if (null != group.getExpandMode() && ! "".equals(group.getExpandMode()))
+				mode = group.getExpandMode();
 			else
 				mode = parentExpandMode;
 		} else if (component instanceof UIPanelMenuItem) {
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1961 - trunk/samples/panelmenu-sample/src/main/webapp/pages.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: dbiatenia
Date: 2007-07-31 12:49:04 -0400 (Tue, 31 Jul 2007)
New Revision: 1961
Modified:
   trunk/samples/panelmenu-sample/src/main/webapp/pages/index.jsp
Log:
RF-512
Modified: trunk/samples/panelmenu-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/panelmenu-sample/src/main/webapp/pages/index.jsp	2007-07-31 16:47:40 UTC (rev 1960)
+++ trunk/samples/panelmenu-sample/src/main/webapp/pages/index.jsp	2007-07-31 16:49:04 UTC (rev 1961)
@@ -1,7 +1,5 @@
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%--@ taglib uri="http://richfaces.ajax4jsf.org/panelmenu" prefix="pm" %>
-<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"--%>
 <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
 <%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/panelmenu" prefix="pm"%>
 
@@ -21,7 +19,7 @@
 							<pm:panelMenuItem value="Item 1" icon="chevronUp" name="thisChild">
 							</pm:panelMenuItem>
 							<pm:panelMenuItem value="Item" mode="server" action="ddd"/>
-							<pm:panelMenuGroup label="Group 2" mode="server" action="ddwd">
+							<pm:panelMenuGroup label="Group 2" expandMode="server" action="ddwd">
 								<pm:panelMenuItem icon="triangleDown">
 									<f:verbatim>Item 3</f:verbatim>
 								</pm:panelMenuItem>
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1960 - in trunk: framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json and 2 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: pyaschenko
Date: 2007-07-31 12:47:40 -0400 (Tue, 31 Jul 2007)
New Revision: 1960
Modified:
   trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
   trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
   trunk/sandbox/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
   trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
Log:
popup mode events added
InputSelectedDate field fixes
Date parsing fixes
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js	2007-07-31 16:05:01 UTC (rev 1959)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js	2007-07-31 16:47:40 UTC (rev 1960)
@@ -65,9 +65,9 @@
 		
 		if (typeof attrValue == "function")
 			attrValue = attrValue(context);
- 			
-		if (attrValue)
-  			html += " "+(i=='className'?'class':i)+'="'+this.xmlEscape(attrValue)+'"';
+		
+		if (attrValue) 
+			html += " "+(i=='className'?'class':i)+'="'+this.xmlEscape(attrValue)+'"';
 	}
 	if(inner == "") html+= "/>";
 	else html+= ">"+inner+"</"+this.tag+">";
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js	2007-07-31 16:05:01 UTC (rev 1959)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js	2007-07-31 16:47:40 UTC (rev 1960)
@@ -146,12 +146,12 @@
 	return value;
 }
 
-Richfaces.invokeOnComponent = function(componentType, element, functionName)
+Richfaces.invokeOnComponent = function(componentType, element, functionName, event)
 {
 	var attribute="richfacesComponent";
    	while (element.parentNode) {
    		if (element[attribute] && element[attribute]==componentType)
-   			return element.component[functionName]();
+   			return element.component[functionName](event);
 		else
 			element = element.parentNode;
    	}
Modified: trunk/sandbox/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/sandbox/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-07-31 16:05:01 UTC (rev 1959)
+++ trunk/sandbox/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js	2007-07-31 16:47:40 UTC (rev 1960)
@@ -358,7 +358,7 @@
 		
 		// POPUP description
 		// direction - [top-left, top-right, bottom-left, bottom-right, auto]
-		// jointPoint - [top-left, top-right, bottom-left, bottom-right, auto]
+		// jointPoint - [top-left, top-right, bottom-left, bottom-right]
 		// popup - true
 		// userClasses - inputClass, inputDisabledClass, inputInvalidClass, buttonClass, buttonDisabledClass
 		// id+PopupButton, id+PopupInput,  
@@ -368,7 +368,6 @@
 		this.params = parameters;
 		if (!this.params.showWeekDaysBar) this.params.showWeekDaysBar = true;
 		if (!this.params.showWeeksBar) this.params.showWeeksBar = true;
-		if (this.params.monthLabels) this.params.monthLabels.push(this.params.monthLabels[0]);
 		if (!this.params.datePattern) this.params.datePattern = "MMM d, y";
 		
 		// markups initialization
@@ -394,9 +393,11 @@
 		this.DATE_ELEMENT_ID = this.params.dayListTableId+'Cell';
 		this.POPUP_ID = this.id+'Popup';
 		this.POPUP_BUTTON_ID = this.id+'PopupButton';
-		this.POPUP_INPUT_ID = this.id+'PopupInput';
+		this.INPUT_DATE_ID = this.id+'InputDate';
 		this.IFRAME_ID = this.id+'IFrame';
 		
+		//this.popupIntervalId=null;
+		
 		this.firstDateIndex = 0;
 		
 		this.daysData = {startDate:null, days:[]};
@@ -404,7 +405,7 @@
 		
 		var obj=$(id);
 		
-		var htmlTextHeader = '<input id="'+this.id+'InputSelectedDate" name="'+this.id+'InputSelectedDate" type="hidden" style="display:none" value="'+this.getSelectedDateString(this.params.datePattern)+'"/>\n' +
+		var htmlTextHeader = (!this.params.popup ? '<input id="'+this.INPUT_DATE_ID+'" name="'+this.INPUT_DATE_ID+'" type="hidden" style="display:none" value="'+this.getSelectedDateString(this.params.datePattern)+'"/>\n' : '') +
 							 '<input id="'+this.id+'InputCurrentDate" name="'+this.id+'InputCurrentDate" type="hidden" style="display:none" value="'+this.getCurrentDate().format("MM/y")+'"/>\n' +
 							 '<table border="0" cellpadding="0" cellspacing="0" class="calendar_exterior"><tbody>\n';
 		var colspan = (this.params.showWeeksBar ? "8" : "7");
@@ -495,6 +496,10 @@
 	doCollapse: function() {
 		if (!this.params.popup || !this.isVisible) return;
 		
+		/*this.stopTimer();
+		this.stopPopupEvents($(this.id));
+		this.stopPopupEvents($(this.POPUP_ID));*/
+		
 		if (Richfaces.browser.isIE6) Element.hide(this.IFRAME_ID);
 		Element.hide(this.id);
 		this.isVisible = false;
@@ -502,8 +507,8 @@
 	
 	doExpand: function() {
 		if (!this.params.popup || this.isVisible) return;
-
-		var field = $(this.POPUP_INPUT_ID);
+		
+		var field = $(this.INPUT_DATE_ID);
 		if (field && field.value!=undefined)
 		{
 			this.selectDate(field.value, true);
@@ -512,6 +517,12 @@
 		var base = $(this.POPUP_ID);
 		var e = $(this.id);
 		var iframe = $(this.IFRAME_ID);
+		
+		var a = this;
+		setTimeout(function () { Event.observe(window.document, "click", a.eventOnCollapse, false); }, 50);
+		
+		/*this.setPopupEvents(e);
+		this.setPopupEvents(base);*/
 
 		Richfaces.Calendar.setElementPosition(e, base, this.params.jointPoint, this.params.direction);
 		if (Richfaces.browser.isIE6)
@@ -523,9 +534,11 @@
 			iframe.style.height = edim.height+'px';
 			Element.show(iframe);
 		}
+		
 		Element.show(e);
 		
 		this.isVisible = true;
+		
 	},
 	
 	doSwitch: function() {
@@ -599,8 +612,45 @@
 		this.eventCellOnClick = this.eventCellOnClick.bindAsEventListener(this);
 		this.eventCellOnMouseOver = this.eventCellOnMouseOver.bindAsEventListener(this);
 		this.eventCellOnMouseOut = this.eventCellOnMouseOut.bindAsEventListener(this);
+		this.eventOnCollapse = this.eventOnCollapse.bindAsEventListener(this);
+		//this.eventOnMouseOver = this.eventOnMouseOver.bindAsEventListener(this);
+		//this.eventOnMouseOut = this.eventOnMouseOut.bindAsEventListener(this);
 	},
 	
+	eventOnCollapse: function (e) {
+		Position.prepare();
+		if (Position.withinIncludingScrolloffsets($(this.id), Event.pointerX(e), Event.pointerY(e))) return;
+		Event.stopObserving(window.document, "click", this.eventOnCollapse, false);
+		this.doCollapse();
+	},
+	
+/*	setPopupEvents: function(obj) {
+		Event.observe(obj, "mouseover", this.eventOnMouseOver, false);
+		Event.observe(obj, "mouseout", this.eventOnMouseOut, false);
+	},
+
+	stopPopupEvents: function(obj) {
+		Event.stopObserving(obj, "mouseover", this.eventOnMouseOver, false);
+		Event.stopObserving(obj, "mouseout", this.eventOnMouseOut, false);
+	},
+	* 	
+	stopTimer: function()
+	{
+		if (this.popupIntervalId!=null) 
+		{
+			clearTimeout(this.popupIntervalId);
+			this.popupIntervalId=null;
+		}		
+	},
+	
+	eventOnMouseOver: function(e) {
+		this.stopTimer();
+	},
+	
+	eventOnMouseOut: function(e) {
+		if (this.popupIntervalId==null) this.popupIntervalId = setTimeout('$("'+this.id+'").component.doCollapse()',400);
+	},*/
+	
 	setCellEvents: function(obj) {
 		Event.observe(obj, "click", this.eventCellOnClick, false);
 		Event.observe(obj, "mouseover", this.eventCellOnMouseOver, false);
@@ -610,7 +660,7 @@
 		Event.stopObserving(obj, "click", this.eventCellOnClick, false);
 		Event.stopObserving(obj, "mouseover", this.eventCellOnMouseOver, false);
 		Event.stopObserving(obj, "mouseout", this.eventCellOnMouseOut, false);
-	},	
+	},
 	
 	eventCellOnClick: function (e) {
 		var obj = Event.findElementByAttr(e, "TD", "id", this.DATE_ELEMENT_ID, true);
@@ -625,17 +675,13 @@
 				this.selectedDateElement = obj;
 				Element.addClassName(obj, "Selecteddayclass");
 				
-				$(this.id+'InputSelectedDate').value=this.getSelectedDateString(this.params.datePattern);
+				$(this.INPUT_DATE_ID).value=this.getSelectedDateString(this.params.datePattern);
 				this.renderHeader();
 				this.renderFooter();
 
 				// popup mode
-				if (this.params.popup)
-				{
-					var field = $(this.POPUP_INPUT_ID);
-					if (field && field.value!=undefined) field.value=$(this.id+'InputSelectedDate').value;
-					this.doCollapse();
-				}
+				if (this.params.popup) this.doCollapse();
+				
 			} else {
 				if (daydata._month==-1) this.prevMonth(); else this.nextMonth();
 			}
@@ -952,36 +998,50 @@
 			{
 				if (this.selectedDate!=null && this.selectedDate.toLocaleDateString()==date.toLocaleDateString()) return;
 				this.selectedDate = date;
-				var d = new Date(this.selectedDate);
-				d.setDate(1);
-				if (d.getMonth()==this.currentDate.getMonth() && d.getFullYear()==this.currentDate.getFullYear())
-				{
-					// find cell and call onklick event
-					var e = $(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1));
-					if (e) Richfaces.createEvent ('click', e).fire();
-					return;
-				} else {
-					// change currentDate and call this.onUpdate();
-					this.currentDate = d;
-					if (noUpdate) this.render(); else this.onUpdate();
-					return; 
-				}
 			}
 		}
-		if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "Selecteddayclass");
-		this.selectedDate=null;
-		this.today(noUpdate);
+
+		if (this.selectedDate!=null)
+		{
+			var d = new Date(this.selectedDate);
+			d.setDate(1);
+			if (d.getMonth()==this.currentDate.getMonth() && d.getFullYear()==this.currentDate.getFullYear())
+			{
+				// find cell and call onklick event
+				var e = $(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1));
+				if (e) Richfaces.createEvent ('click', e).fire();
+				return;
+			} else {
+				// change currentDate and call this.onUpdate();
+				this.currentDate = d;
+				if (noUpdate) this.render(); else this.onUpdate();
+				return; 
+			}
+		}
+		else
+		{
+			if (this.selectedDateElement) Element.removeClassName(this.selectedDateElement, "Selecteddayclass");
+			this.selectedDate=null;
+			this.today(noUpdate);
+		}
 	}
 	
 });
 
+/*CalendarEventContainer = {};
+CalendarEventContainer.invokeToday = function (e) 
+{
+	alert("today");
+	//Richfaces.invokeOnComponent('richfaces:calendar',this,'today',e);
+	return false;
+};*/
+
 CalendarView = {};
-
 CalendarView.getControl = function(text, functionName) {
 	var attr = {
 		onclick: (functionName ? "Richfaces.invokeOnComponent('richfaces:calendar',this,'"+functionName+"');" : "")+"return false;"
 	};
-
+	
 	return new E('span',attr,[new T(text)]);
 };
 
Modified: trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx
===================================================================
--- trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx	2007-07-31 16:05:01 UTC (rev 1959)
+++ trunk/sandbox/ui/calendar/src/main/templates/org/richfaces/htmlCalendar.jspx	2007-07-31 16:47:40 UTC (rev 1960)
@@ -36,7 +36,7 @@
 				firstWeekDay: #{this:getFirstWeekDay(context, component)}, 
 				minDaysInFirstWeek: #{this:getMinDaysInFirstWeek(context, component)},
 				headerOptionalMarkup: [new E('b',{},[new T('User defined header')])],
-				footerOptionalMarkup: [new E('b',{},[new T('User defined header')])],
+				footerOptionalMarkup: [new E('b',{},[new T('User defined footer')])],
 				<jsp:scriptlet>/*<![CDATA[*/
 					if (component.getChildCount() != 0) {
 				/*]]>*/</jsp:scriptlet>
@@ -67,7 +67,7 @@
 			id="#{clientId}Popup"
 			> <input 
 				x:passThruWithExclusions="name"
-				id="#{clientId}PopupInput"
+				id="#{clientId}InputDate"
 				value="#{this:getInputValue(context,component)}" 
 				type="text"
 				readonly="#{component.attributes['readonly']}" 
@@ -86,7 +86,7 @@
 		<button id="#{clientId}PopupButton"
 				accesskey="#{component.attributes['accesskey']}"
 	 			name="#{clientId}"
-	 			onclick="$(this.form.id+':calendar').component.doSwitch();"
+	 			onclick="$(this.form.id+':calendar').component.doExpand();"
 	 			
 				style="#{component.attributes['style']}"
 				tabindex="#{component.attributes['tabindex']}"
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1959 - trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: akushunin
Date: 2007-07-31 12:05:01 -0400 (Tue, 31 Jul 2007)
New Revision: 1959
Modified:
   trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
TODO tasks were made
Some unused methods deleted
Modified: trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java	2007-07-31 15:58:47 UTC (rev 1958)
+++ trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java	2007-07-31 16:05:01 UTC (rev 1959)
@@ -139,7 +139,8 @@
 			ev.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
 			ev.queue();
 
-			//TODO nick - nick - queue this event when ValueChangeEvent is queued?
+			// TODO nick - nick - queue this event when ValueChangeEvent is
+			// queued?
 			new AjaxEvent(component).queue();
 		}
 
@@ -193,8 +194,7 @@
 		options.put("calendar", JSReference.THIS);
 		options.put("single", JSReference.TRUE);
 		// ajax single
-		// options.put("control", new JSReference(JSReference.THIS.toScript(),
-		// "id"));
+		// options.put("control", new JSReference(JSReference.THIS.toScript(),"id"));
 
 		String oncomplete = AjaxRendererUtils.getAjaxOncomplete(calendar);
 		JSFunctionDefinition oncompleteDefinition = new JSFunctionDefinition();
@@ -220,32 +220,33 @@
 
 	public String getInputValue(FacesContext context, UIComponent component) {
 		UICalendar input = (UICalendar) component;
-		//TODO nick - nick - can contain either Date or String instance
-		String value = (String) input.getSubmittedValue();
+		// XXX nick - nick - can contain either Date or String instance
+
+		Object value = input.getSubmittedValue();
+		Object curVal = input.getValue();
 		if (value == null) {
-			Object curVal = input.getValue();
+
 			DateTimeConverter converter = new DateTimeConverter();
 			converter.setPattern(input.getDatePattern());
 			converter.setLocale(input.getLocale());
-			// converter.setTimeZone(input.getTimeZone());
-			// Converter converter =
-			// SelectUtils.getConverterForProperty(context, input, "value");
+			converter.setTimeZone(input.getTimeZone());
+			return converter.getAsString(context, input, curVal);
+		}
+		if (value instanceof Date) {
 
-			//TODO nick - kaa - how could converter be null here?
-			if (converter != null) {
-				value = converter.getAsString(context, input, curVal);
-			} else {
-				if (curVal == null) {
-					value = "";
-				} else {
-					value = curVal.toString();
-				}
-			}
+			DateTimeConverter converter = new DateTimeConverter();
+			converter.setPattern(input.getDatePattern());
+			converter.setLocale(input.getLocale());
+			return converter.getAsString(context, input, value);
 		}
-		if (value == null) {
-			value = "";
+		if (value instanceof String) {
+
+			Converter converter = SelectUtils.getConverterForProperty(context,
+					input, "value");
+			return converter.getAsString(context, input, value);
+
 		}
-		return value;
+		return null;
 	}
 
 	public void writeSymbols(FacesContext facesContext, UICalendar calendar)
@@ -266,9 +267,9 @@
 		}
 	}
 
-	private static String[] shiftDates(int minimum,
+	private static String[] shiftDates(int firstDayOfWeek, int minimum,
 			int maximum, String[] labels) {
-		if (minimum == 0 && (maximum - minimum + 1 == labels.length)) {
+		if (minimum == 0) {
 			return labels;
 		}
 
@@ -286,15 +287,14 @@
 		Calendar cal = calendar.getCalendar();
 		int maximum = cal.getActualMaximum(Calendar.DAY_OF_WEEK);
 		int minimum = cal.getActualMinimum(Calendar.DAY_OF_WEEK);
-
-		// .getInstance(locale) changed to new DateFormatSymbols(locale) by
-		// Alexej Kushunin ;
+		int firstDayOfWeek = cal.getFirstDayOfWeek();
+	
 		DateFormatSymbols symbols = new DateFormatSymbols(locale);
 		String[] weekDayLabels = ComponentUtil.asArray(calendar
 				.getWeekDayLabels());
 		if (weekDayLabels == null) {
 			weekDayLabels = symbols.getWeekdays();
-			weekDayLabels = shiftDates(minimum, maximum,
+			weekDayLabels = shiftDates(firstDayOfWeek, minimum, maximum,
 					weekDayLabels);
 		}
 
@@ -302,26 +302,19 @@
 				.getWeekDayLabelsShort());
 		if (weekDayLabelsShort == null) {
 			weekDayLabelsShort = symbols.getShortWeekdays();
-			weekDayLabelsShort = shiftDates(minimum, maximum,
+			weekDayLabelsShort = shiftDates(firstDayOfWeek, minimum, maximum,
 					weekDayLabelsShort);
 		}
 
-		int monthMax = cal.getActualMaximum(Calendar.MONTH);
-		int monthMin = cal.getActualMinimum(Calendar.MONTH);
-
 		String[] monthLabels = ComponentUtil.asArray(calendar.getMonthLabels());
 		if (monthLabels == null) {
 			monthLabels = symbols.getMonths();
-			monthLabels = shiftDates(monthMin, monthMax,
-					monthLabels);
 		}
 
 		String[] monthLabelsShort = ComponentUtil.asArray(calendar
 				.getMonthLabelsShort());
 		if (monthLabelsShort == null) {
 			monthLabelsShort = symbols.getShortMonths();
-			monthLabelsShort = shiftDates(monthMin, monthMax,
-					monthLabelsShort);
 		}
 
 		map.put(WEEK_DAY_LABELS, weekDayLabels);
                                
                         
                        
                                
                                18 years, 3 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r1958 - trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: akushunin
Date: 2007-07-31 11:58:47 -0400 (Tue, 31 Jul 2007)
New Revision: 1958
Modified:
   trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
Log:
TODO tasks were made
Some unused methods deleted
Modified: trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java	2007-07-31 15:58:04 UTC (rev 1957)
+++ trunk/sandbox/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java	2007-07-31 15:58:47 UTC (rev 1958)
@@ -44,6 +44,8 @@
 
 import org.ajax4jsf.context.AjaxContext;
 import org.ajax4jsf.event.AjaxEvent;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.richfaces.model.CalendarDataModel;
 import org.richfaces.model.CalendarDataModelItem;
 import org.richfaces.renderkit.CalendarDataModelItemAdaptor;
@@ -60,6 +62,8 @@
 	public static final String COMPONENT_TYPE = "org.richfaces.Calendar";
 
 	private static final String COMPONENT_FAMILY = "org.richfaces.Calendar";
+	
+	private final static Log log = LogFactory.getLog(UICalendar.class);
 
 	public abstract Locale getLocale();
 
@@ -127,38 +131,29 @@
 
 	// currentDate processing -------------------------------------------------
 
-//	public String getValueAsString(FacesContext context, UIComponent component)
-//			throws IOException {
-//		UICalendar calendar = (UICalendar) component;
-//		Date valueString = calendar.getCurrentDate();
-//		return valueString.toString();
-//	}
-
 	public Calendar getCalendar() {
 		return Calendar.getInstance(getTimeZone(), getLocale());
 	}
 
-//	public Converter getDateConverter() {
-//		DateTimeConverter datetime = new DateTimeConverter();
-//		return datetime;
-//	}
-
 	public Date getConvertedValue(FacesContext context, String currentDateString)
 			throws ConverterException {
 
 		DateTimeConverter datetime = new DateTimeConverter();
-		datetime.setPattern(getDatePattern());
+		datetime.setPattern("m/y");
 		Date newCurrentDate = (Date) datetime.getAsObject(context, this,
 				currentDateString);
 		return newCurrentDate;
 	}
 
 	protected void validateValue(FacesContext context, Object newValue) {
-		//TODO nick - nick - do we need this?
-		//store converted value in submitted value to ease client-side code's life
-		//see org.richfaces.renderkit.CalendarRendererBase.getSelectedDate(FacesContext, UICalendar) for more
+		// TODO nick - nick - do we need this?
+		// store converted value in submitted value to ease client-side code's
+		// life
+		// see
+		// org.richfaces.renderkit.CalendarRendererBase.getSelectedDate(FacesContext,
+		// UICalendar) for more
 		setSubmittedValue(newValue);
-		
+
 		super.validateValue(context, newValue);
 	}
 
@@ -176,8 +171,11 @@
 				setCurrentDate(currentDate);
 			}
 		} catch (Exception e) {
-			//TODO nick - kaa - missed setValid(false) !
-			//TODO nick - kaa - add log.debug(...) 
+			setValid(false);
+			//XXX nick - kaa - add log.debug(...)
+			if (log.isDebugEnabled()) {
+				log.debug(" updateCurrentDate method throws exception: "+e.getMessage(),e);
+			}
 			String messageString = e.getMessage();
 			FacesMessage message = new FacesMessage(messageString);
 			message.setSeverity(FacesMessage.SEVERITY_ERROR);
@@ -266,24 +264,34 @@
 					// if currentDateString is not null then event cames from
 					// apply request phase
 					try {
-						//TODO nick - kaa - we should use datePattern attribute-based converter only for selectedDate
-						//					current date string always has predefined format: m/y
-						//					review org.richfaces.renderkit.CalendarRendererBase.convertCurrentDate(String) method
-						//					for more
+						// XXX nick - kaa - we should use datePattern
+						// attribute-based converter only for selectedDate
+						// current date string always has predefined format: m/y
+						// review
+						// org.richfaces.renderkit.CalendarRendererBase.convertCurrentDate(String)
+						// method
+						// for more
 						Date currentDate = getConvertedValue(facesContext,
 								currentDateString);
 						CurrentDateChangeEvent newDateChangeEvent = new CurrentDateChangeEvent(
 								this, currentDate);
 						newDateChangeEvent.queue();
 					} catch (Exception e) {
-						//TODO nick - kaa - add log.debug(...)
-						//TODO nick - kaa - we should stop processing on exc. setValid(false) and then call FacesContext.renderResponse(...)
-						//					update model phase shouldn't start
+						// XXX nick - kaa - add log.debug(...)
+						// XXX nick - kaa - we should stop processing on exc.
+						// setValid(false) and then call
+						// FacesContext.renderResponse(...)
+						// update model phase shouldn't start
+						if (log.isDebugEnabled()) {
+							log.debug(" currentDate convertion fails with following exception: "+e.getMessage(),e);
+						}
+						setValid(false);
 						String messageString = e.getMessage();
 						FacesMessage message = new FacesMessage(messageString);
 						message.setSeverity(FacesMessage.SEVERITY_ERROR);
 						facesContext.addMessage(getClientId(facesContext),
 								message);
+						facesContext.renderResponse();
 					}
 
 				} else {
@@ -352,15 +360,7 @@
 		return (Date[]) dates.toArray(new Date[dates.size()]);
 	}
 
-//	public void encodeAjaxChild(FacesContext context, String path, Set ids,
-//			Set renderedAreas) throws IOException {
-//
-//		Renderer renderer = this.getRenderer(context);
-//		if (renderer instanceof AjaxChildrenEncoder) {
-//			((AjaxChildrenEncoder) renderer).encodeAjaxChild(context, path,
-//					ids, renderedAreas);
-//		}
-//	}
+
 }
 
 class AdaptingCollection extends AbstractCollection {
                                
                         
                        
                                
                                18 years, 3 months