Author: nbelaevski
Date: 2007-07-19 18:34:53 -0400 (Thu, 19 Jul 2007)
New Revision: 1716
Added:
trunk/sandbox/ui/calendar/design/calendar/calendar_div.html
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/SortOrder.java
Modified:
trunk/sandbox/samples/calendar-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/calendar-sample/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/panelmenu-sample/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/scrollable-grid-demo/pom.xml
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/benchmark/RequestBenchMarkFilter.java
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/ui/
trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
trunk/sandbox/ui/scrollable-grid/generatescript.xml
trunk/sandbox/ui/scrollable-grid/src/main/config/component/scrollable-grid.xml
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/impl/PropertyResolverComparator.java
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
Log:
merged changes commit
Modified: trunk/sandbox/samples/calendar-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox/samples/calendar-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/samples/calendar-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-07-19
22:34:53 UTC (rev 1716)
@@ -7,4 +7,14 @@
<managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>calendarDataModel</managed-bean-name>
+
<managed-bean-class>org.richfaces.CalendarDataModelImpl</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>calendarBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.CalendarBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
</faces-config>
Modified: trunk/sandbox/samples/calendar-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/calendar-sample/src/main/webapp/pages/index.jsp 2007-07-19
22:20:58 UTC (rev 1715)
+++ trunk/sandbox/samples/calendar-sample/src/main/webapp/pages/index.jsp 2007-07-19
22:34:53 UTC (rev 1716)
@@ -7,24 +7,32 @@
</head>
<body>
<f:view>
- <f:verbatim>
- <script>
- window.test = "test var text";
- </script>
- </f:verbatim>
+ <h:form>
+ <calendar:calendar id="calendar" data="#{calendarDataModel}"
locale="#{calendarBean.locale}">
+ <f:facet name="header">
+ {nextMonthControl} | {previousMonthControl}
+ </f:facet>
+ <f:facet name="weekNumber">
+ <h:outputText style="font-weight: bold;" value="{weekNumber}"
/>
+ </f:facet>
+ <f:facet name="weekDay">
+ <h:outputText style="font-style: italic;"
value="{weekDayLabel}" />
+ </f:facet>
+
+ <h:panelGrid>
+ <h:outputText value="{data.enLabel}" />
+ <h:outputText value="{data.frLabel}" />
+ <h:outputText value="{data.deLabel}" />
+ </h:panelGrid>
- <f:verbatim><h3>HTML tidying test</h3></f:verbatim>
- <calendar:calendar>
+ <h:outputText value="{day}" />
+ <h:inputText value="{test}" />
<h:outputText escape="false" value="<br
xmlns:test='urn:test' test:aaa='sss'> &<a
href='#' class='{test}'>end<div
xmlns:prefix='urn:urn'><p value='aaa'><p
value='bbb'></p></div>" />
</calendar:calendar>
- <f:verbatim><h3>Templating test</h3></f:verbatim>
- <calendar:calendar>
- <f:verbatim><input type="text" value="$ {test} $"
/><![CDATA[a<b]]>{test}</f:verbatim>
-
- <f:verbatim><input type="radio" checked="{test}"
/><input type="radio" checked="{test1}"
/></f:verbatim>
- </calendar:calendar>
+ <calendar:calendar id="calendar1" />
+ </h:form>
</f:view>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/sandbox/samples/panelmenu-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/panelmenu-sample/src/main/webapp/pages/index.jsp 2007-07-19
22:20:58 UTC (rev 1715)
+++ trunk/sandbox/samples/panelmenu-sample/src/main/webapp/pages/index.jsp 2007-07-19
22:34:53 UTC (rev 1716)
@@ -13,12 +13,12 @@
<h:selectOneRadio binding="#{skinBean.component}" />
<h:commandLink action="#{skinBean.change}" value="set skin"
/>
- <pm:panelMenu>
+ <pm:panelMenu selectedChild="thisChild">
<pm:panelMenuGroup label="Group 1" iconExpanded="disc"
iconCollapsed="chevron">
- <pm:panelMenuItem value="Item 1" icon="chevronUp">
+ <pm:panelMenuItem value="Item 1" icon="chevronUp"
name="thisChild">
</pm:panelMenuItem>
- <pm:panelMenuItem value="Item "/>
- <pm:panelMenuGroup label="Group 2" >
+ <pm:panelMenuItem value="Item" mode="server"
action="ddd"/>
+ <pm:panelMenuGroup label="Group 2" mode="server"
action="ddwd">
<pm:panelMenuItem icon="triangleDown">
<f:verbatim>Item 3</f:verbatim>
</pm:panelMenuItem>
Modified: trunk/sandbox/samples/scrollable-grid-demo/pom.xml
===================================================================
--- trunk/sandbox/samples/scrollable-grid-demo/pom.xml 2007-07-19 22:20:58 UTC (rev 1715)
+++ trunk/sandbox/samples/scrollable-grid-demo/pom.xml 2007-07-19 22:34:53 UTC (rev 1716)
@@ -23,59 +23,76 @@
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <version>3.0.2-SNAPSHOT</version>
</dependency>
-
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <version>0.9.5</version>
+ <scope>runtime</scope>
+ </dependency>
-
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_04</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_04</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.11</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>1.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <version>0.9.5</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.6.2</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
- <profiles>
- <profile>
- <id>jsf1_2</id>
- <activation>
- <activeByDefault></activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_03</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
+
<build>
<finalName>scrollable-grid-demo</finalName>
<plugins>
Modified:
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/benchmark/RequestBenchMarkFilter.java
===================================================================
---
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/benchmark/RequestBenchMarkFilter.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/benchmark/RequestBenchMarkFilter.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -40,15 +40,15 @@
long startTime = System.currentTimeMillis();
- log.debug("Request started " + ((HttpServletRequest)
request).getRequestURL());
+ log.info("Request started " + ((HttpServletRequest)
request).getRequestURL());
chain.doFilter(request, response);
long endTime = System.currentTimeMillis();
- log.debug("Request ended " + ((HttpServletRequest)
request).getRequestURL());
+ log.info("Request ended " + ((HttpServletRequest) request).getRequestURL());
- log.debug(requestType() +
+ log.info(requestType() +
((HttpServletRequest) request).getRequestURL() +
" took " +
(endTime - startTime) +
Modified:
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java
===================================================================
---
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Channel.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -20,6 +20,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.richfaces.model.SortField;
import org.richfaces.model.SortOrder;
@@ -255,26 +256,31 @@
protected Comparator <Issue> createComparator(SortOrder sortOrder) {
- int prop = sortOrder.getSortColumn();
- boolean asc = sortOrder.isAscending();
- switch (prop) {
- case 0:
- return asc ? byIdAsc : byIdDesc;
- case 1:
- return asc ? byKeyAsc : byKeyDesc;
- case 2:
- return asc ? bySummaryAsc : bySummaryDesc;
- case 3:
- return asc ? byAssigneeAsc : byAssigneeDesc;
- case 4:
- return asc ? byStatusAsc : byStatusDesc;
- case 5:
- return asc ? byReporterAsc : byReporterDesc;
- case 6:
- return asc ? byPriAsc: byPriDesc;
- case 7:
- return asc ? byResolutionAsc : byResolutionDesc;
+ SortField [] fields = sortOrder.getFields();
+ if (fields != null && fields.length > 0) {
+ SortField field = fields[0];
+ int prop = field.getIndex();
+ boolean asc = field.getAscending().booleanValue();
+
+ switch (prop) {
+ case 0:
+ return asc ? byIdAsc : byIdDesc;
+ case 1:
+ return asc ? byKeyAsc : byKeyDesc;
+ case 2:
+ return asc ? bySummaryAsc : bySummaryDesc;
+ case 3:
+ return asc ? byAssigneeAsc : byAssigneeDesc;
+ case 4:
+ return asc ? byStatusAsc : byStatusDesc;
+ case 5:
+ return asc ? byReporterAsc : byReporterDesc;
+ case 6:
+ return asc ? byPriAsc: byPriDesc;
+ case 7:
+ return asc ? byResolutionAsc : byResolutionDesc;
+ }
}
return null;
Modified: trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml 2007-07-19
22:20:58 UTC (rev 1715)
+++ trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/WEB-INF/web.xml 2007-07-19
22:34:53 UTC (rev 1716)
@@ -28,7 +28,7 @@
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
+ <filter-class>org.ajax4jsf.FastFilter</filter-class>
</filter>
<filter>
<display-name>Request Metrics</display-name>
Modified:
trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
===================================================================
---
trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-07-19
22:34:53 UTC (rev 1716)
@@ -35,12 +35,7 @@
width="800px"
height="500px">
- <f:facet name="splash">
- <h:panelGroup id="splash">
- <div style="background-color: #A0D1FF; border: 1px solid #0027C4; width:
200px; height: 50px; text-align: center; vertical-align: middle;"><font
size='4' color='white'>Loading...</font></div>
- </h:panelGroup>
- </f:facet>
-
+
<sg:column width="100px" sortable="false">
<f:facet name="header">
@@ -76,7 +71,7 @@
<h:outputText value="Summary"></h:outputText>
</f:facet>
- <h:inputText value="#{issues.summary}" style="width: 200px"
styleClass="inputStyle"></h:inputText>
+ <h:outputText value="#{issues.summary}"></h:outputText>
<f:facet name="footer">
<h:outputText value="footer2"></h:outputText>
Modified: trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
===================================================================
--- trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml 2007-07-19
22:20:58 UTC (rev 1715)
+++ trunk/sandbox/samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml 2007-07-19
22:34:53 UTC (rev 1716)
@@ -11,7 +11,7 @@
<h:selectOneMenu value="#{modelBuilder.grid}">
<f:selectItems value="#{modelBuilder.grids}" />
</h:selectOneMenu>
- <a4j:support event="onchange" reRender="panelGroup" />
+ <a4j:commandButton value="update" reRender="panelGroup" />
<h:panelGroup id="panelGroup">
<ui:include src="#{modelBuilder.grid}" />
</h:panelGroup>
Modified: trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml 2007-07-19
22:20:58 UTC (rev 1715)
+++ trunk/sandbox/samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml 2007-07-19
22:34:53 UTC (rev 1716)
@@ -14,6 +14,11 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
+
+<!--context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param-->
<!--
-->
@@ -21,6 +26,11 @@
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>forceparser</param-name>
+ <param-value>true</param-value>
+ </init-param>
+
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
Property changes on: trunk/sandbox/ui
___________________________________________________________________
Name: svn:ignore
+ target
Added: trunk/sandbox/ui/calendar/design/calendar/calendar_div.html
===================================================================
--- trunk/sandbox/ui/calendar/design/calendar/calendar_div.html
(rev 0)
+++ trunk/sandbox/ui/calendar/design/calendar/calendar_div.html 2007-07-19 22:34:53 UTC
(rev 1716)
@@ -0,0 +1,370 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<title>calendar</title>
+<style>
+.calendar_exterior{
+ border : 1px solid #c0c0c0; /*panelBorderColor*/
+}
+.calendar_btn{
+ cursor : pointer;
+}
+.calendar_header{
+ border-bottom : 1px solid #c0c0c0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 7px;
+ height : 22px;
+}
+
+.cell_size{
+ width : 25px;
+ height : 22px;
+}
+
+.calendar_cell{
+ background-color : #FFFFFF; /*generalBackgroundColor*/
+ border-bottom : 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right : 1px solid #c0c0c0; /*panelBorderColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 0px;
+ vertical-align : middle;
+ text-align : center;
+}
+
+.calendar_tool{
+ border-bottom : 1px solid #c0c0c0; /*panelBorderColor*/
+ background-color : #224986; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ font-family : verdana; /*headerFamilyFont*/
+ color : #ffffff; /*headerTextColor*/
+ font-weight : bold;
+ vertical-align : middle;
+ text-align : center;
+ width : 25px;
+ height : 22px;
+}
+
+.calendar_month{
+ border-bottom : 1px solid #c0c0c0; /*panelBorderColor*/
+ background-color : #224986; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ font-family : verdana; /*headerFamilyFont*/
+ color : #ffffff; /*headerTextColor*/
+ font-weight : bold;
+ vertical-align : middle;
+ text-align : center;
+}
+
+.calendar_days{
+ border-bottom : 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right : 0px solid #c0c0c0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ vertical-align : middle;
+ text-align : center;
+ height : 22px;
+}
+
+.calendar_week{
+ border-bottom : 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right : 1px solid #c0c0c0; /*panelBorderColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ background-color : #f5f5f5; /*unknown parameter - need to add*/
+ vertical-align : middle;
+ text-align : center;
+ width : 25px;
+}
+
+.calendar_holly{
+ background-color : #ffebda; /*unknown parameter - need to add*/
+ color : #ff7800; /*unknown parameter - need to add*/
+}
+
+.calendar_current{
+ background-color : #ff7800; /*unknown parameter - need to add*/
+ color : #ffebda; /*unknown parameter - need to add*/
+ font-weight : bold;
+}
+
+.calendar_spec{
+ background-color : #e4f5e2; /*unknown parameter - need to add*/
+}
+
+.calendar_select{
+ background-color : #224986; /*headerBackgroundColor*/
+ color : #FFFFFF; /*headerTextColor*/
+ font-weight : bold;
+}
+
+
+.right_cell{
+ border-right : 0px;
+}
+
+.bottom_cell{
+ border-bottom : 0px;
+}
+
+.calendar_toolfooter{
+ border-top : 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right : 0px solid #c0c0c0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 0px 7px 0px 7px;
+ height : 22px;
+}
+
+.calendar_footer{
+ border-top : 1px solid #c0c0c0; /*panelBorderColor*/
+ border-right : 0px solid #c0c0c0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 7px;
+ height : 22px;
+}
+
+
+
+</style>
+
+</head>
+
+<body bgcolor="#ffffff">
+
+
+<div>
+<table border="0" cellpadding="0" cellspacing="0"
class="calendar_exterior">
+ <tr>
+ <td class="calendar_header" colspan="8">
+ Optional Header
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="8">
+ <table border="0" cellpadding="0" cellspacing="0"
width="100%">
+ <tr>
+ <td class="calendar_tool calendar_btn">
+ ««
+ </td>
+ <td class="calendar_tool calendar_btn">
+ «
+ </td>
+ <td class="calendar_month calendar_btn">
+ June, 2007
+ </td>
+ <td class="calendar_tool calendar_btn">
+ »
+ </td>
+ <td class="calendar_tool calendar_btn">
+ »»
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_days">
+ <br>
+ </td>
+ <td class="calendar_days">
+ Sun
+ </td>
+ <td class="calendar_days">
+ Mon
+ </td>
+ <td class="calendar_days">
+ Tue
+ </td>
+ <td class="calendar_days">
+ Wed
+ </td>
+ <td class="calendar_days">
+ Thu
+ </td>
+ <td class="calendar_days">
+ Fri
+ </td>
+ <td class="calendar_days right_cell">
+ Sat
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 1
+ </td>
+ <td class="cell_size calendar_cell calendar_holly">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 1<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 2<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 3<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 4<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell
calendar_btn">
+ 5<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 2
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 6<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 7<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_current calendar_btn">
+ 8<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 9<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 10<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 11<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell
calendar_btn">
+ 12<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 3
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 13<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 14<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 15<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 16<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 17<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 18<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell
calendar_btn">
+ 19<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 4
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 20<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 21<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 22<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 23<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_select calendar_btn">
+ 24<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 25<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell
calendar_btn">
+ 26<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week bottom_cell calendar_btn">
+ 5
+ </td>
+ <td class="cell_size calendar_cell calendar_holly bottom_cell
calendar_btn">
+ 27<br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell calendar_btn">
+ 28<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec bottom_cell
calendar_btn">
+ 29<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec bottom_cell
calendar_btn">
+ 30<br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell
bottom_cell">
+ <br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="8">
+ <table border="0" cellpadding="0" cellspacing="0"
width="100%">
+ <tr>
+ <td class="calendar_toolfooter calendar_btn">
+ 07/08/2007
+ </td>
+ <td class="calendar_toolfooter" width="100%">
+ <br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn"
align="right">
+ Today
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_footer" colspan="8">
+ Optional Footer
+ </td>
+ </tr>
+
+
+</table>
+
+</div>
+
+
+
+
+
+
+</body>
+</html>
Modified: trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml 2007-07-19 22:20:58
UTC (rev 1715)
+++ trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml 2007-07-19 22:34:53
UTC (rev 1716)
@@ -1,575 +1,593 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
-<components>
- <component>
- <name>org.richfaces.PanelMenu</name>
- <family>org.richfaces.PanelMenu</family>
- <description>Defines the menu on the page and the set of the child elements
properties in layout.</description>
- <superclass>org.richfaces.component.UIPanelMenu</superclass>
- <classname>org.richfaces.component.html.HtmlPanelMenu</classname>
- <renderer generate="true" override="true">
- <name>org.richfaces.PanelMenuRenderer</name>
- <template>org/richfaces/htmlPanelMenu.jspx</template>
- </renderer>
- <tag>
- <name>panelMenu</name>
- <classname>org.richfaces.taglib.PanelMenuTag</classname>
- <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
- </tag>
- <property>
- <name>event</name>
- <classname>java.lang.String</classname>
- <description>
- Defines the event on the representation element that
- triggers the submenu's expand/collapse. (default=onclick)
- </description>
- <defaultvalue><![CDATA["onclick"]]></defaultvalue>
- </property>
- <property>
- <name>mode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode for all panel menu items on the panel
- menu except ones where this attribute redefined. (ajax, server,(Default), none)
- </description>
- <defaultvalue><![CDATA["server"]]></defaultvalue>
- </property>
- <property>
- <name>width</name>
- <classname>java.lang.String</classname>
- <description>Set minimal width for the menu.</description>
- <defaultvalue><![CDATA["100%"]]></defaultvalue>
- </property>
- <property>
- <name>expandMode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode for all panel menu groups after
- expand/collapse except ones where this attribute redefined. (ajax, server,
none(Default))
- </description>
- <defaultvalue><![CDATA["none"]]></defaultvalue>
- </property>
- <property>
- <name>expandSingle</name>
- <classname>boolean</classname>
- <description>
- Whether only one panel menu node on top level can be opened at a time.
- If the value of this attribute is true, the previously opened
- node on the top level is closed. If the value is false, the node is left opened. The
default value is false.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- <property>
- <name>iconItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the enabled item
state</description>
- <defaultvalue><![CDATA["grid"]]></defaultvalue>
- </property>
- <property>
- <name>iconDisabledItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled item
state</description>
- <defaultvalue><![CDATA["grid"]]></defaultvalue>
- </property>
- <property>
- <name>iconTopItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the enabled top item
state</description>
- <defaultvalue><![CDATA["grid"]]></defaultvalue>
- </property>
- <property>
- <name>iconTopDisabledItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled top item
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconExpandedGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the expanded Group
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconCollapsedGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the collapsed Group
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconDisabledGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled group
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconExpandedTopGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the expanded top group
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconCollapsedTopGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the collapsed top group
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconTopDisableGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled top Group
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconItemPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the item
icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>iconItemTopPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the top
item icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>iconGroupPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the group
icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>iconGroupTopPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the top
group icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>style</name>
- <classname>java.lang.String</classname>
- <description>The CSS style for the panel menu.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>styleClass</name>
- <classname>java.lang.String</classname>
- <description>The CSS class for the panel menu.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>groupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>groupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topGroupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topGroupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>itemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>itemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topItemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topItemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledItemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-disabled-element
rich-pmenu-disabled-element"]]></defaultvalue>
- </property>
- <property>
- <name>disabledItemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledGroupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-disabled-element
rich-pmenu-disabled-element"]]></defaultvalue>
- </property>
- <property>
- <name>disabledGroupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoveredItemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-hovered-element
rich-pmenu-hovered-element"]]></defaultvalue>
- </property>
- <property>
- <name>hoveredItemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoveredGroupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoveredGroupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-hovered-element
rich-pmenu-hovered-element"]]></defaultvalue>
- </property>
- &ui_component_attributes;
- &html_events;
-
- <property>
- <name>onclick</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>ondblclick</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onmouseout</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onmousemove</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onmouseover</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
-
-
-
- <property>
- <name>onitemhover</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>ongroupcollapse</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>ongroupexpand</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabled</name>
- <classname>boolean</classname>
- <description>
- If true sets state of the item to disabled state. false is default.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- </component>
-
- <component>
- <name>org.richfaces.PanelMenuGroup</name>
- <family>org.richfaces.PanelMenuGroup</family>
- <description>Defines expandable group of items inside the panel menu or other
group.</description>
- <superclass>org.richfaces.component.UIPanelMenuGroup</superclass>
- <classname>org.richfaces.component.html.HtmlPanelMenuGroup</classname>
- <renderer generate="true" override="true">
- <name>org.richfaces.PanelMenuGroupRenderer</name>
- <template>org/richfaces/htmlPanelMenuGroup.jspx</template>
- </renderer>
- <tag>
- <name>panelMenuGroup</name>
- <classname>org.richfaces.taglib.PanelMenuGroupTag</classname>
- <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
- </tag>
- <property>
- <name>mode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode for all panel menu groups after expand/collapse
- except ones where this attribute redefined. (ajax, server, none(Default))
- </description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconExpanded</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the expanded item
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconCollapsed</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the collapsed item
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>expanded</name>
- <classname>boolean</classname>
- <description>If “true” group will be displayed expanded
initially.</description>
- <defaultvalue>false</defaultvalue>
- </property>
- <property>
- <name>iconDisabled</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled item
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabled</name>
- <classname>boolean</classname>
- <description>
- If “true” sets state of the item to disabled state. “false” is default.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- <!--property>
- <name>value</name>
- <classname>java.lang.Object</classname>
- <description>Defines representation text for menuItem.</description>
- </property-->
- &listeners;
- <!--property>
- <name>action</name>
- <classname>java.lang.String</classname>
- <description>The action method binding expression.</description>
- </property-->
- <property>
- <name>target</name>
- <classname>java.lang.String</classname>
- <description>Target frame for action to execute.</description>
- </property>
- <property>
- <name>immediate</name>
- <classname>boolean</classname>
- <description>A flag indicating that this component value must be converted and
validated immediately (that is, during Apply Request Values phase), rather than waiting
until a Process Validations phase.
- </description>
- </property>
- &ui_component_attributes;
- &html_input_attributes;
- &html_input_events;
- &ui_input_attributes;
- &html_events;
- <property>
- <name>oncollapse</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onexpand</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoverClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to hovered items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoverStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to hovered
items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to disabled items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to disabled
items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>styleClass</name>
- <classname>java.lang.String</classname>
- <description>Corresponds to the HTML class attribute.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>style</name>
- <classname>java.lang.String</classname>
- <description>CSS style(s) to be applied when this component is
rendered.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to icon element.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>label</name>
- <classname>java.lang.String</classname>
- <description>Displayed node's text</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- </component>
-
- <component>
- <name>org.richfaces.PanelMenuItem</name>
- <family>org.richfaces.PanelMenuItem</family>
- <description>Defines single Item inside popup list.</description>
- <superclass>org.richfaces.component.UIPanelMenuItem</superclass>
- <classname>org.richfaces.component.html.HtmlPanelMenuItem</classname>
- <renderer generate="true" override="true">
- <name>org.richfaces.PanelMenuItemRenderer</name>
- <template>org/richfaces/htmlPanelMenuItem.jspx</template>
- </renderer>
- <tag>
- <name>panelMenuItem</name>
- <classname>org.richfaces.taglib.PanelMenuItemTag</classname>
- <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
- </tag>
- <property>
- <name>mode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode (ajax,server(Default),none)
- </description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>icon</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon or the default one name to be displayed for the
enabled item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconDisabled</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled item
state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabled</name>
- <classname>boolean</classname>
- <description>
- If “true” sets state of the item to disabled state. “false” is default.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- <property>
- <name>value</name>
- <classname>java.lang.Object</classname>
- <description>Defines representation text for menuItem.</description>
- </property>
- <property>
- <name>hoverClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to hovered items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoverStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to hovered
items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to disabled items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to disabled
items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>styleClass</name>
- <classname>java.lang.String</classname>
- <description>Corresponds to the HTML class attribute.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>style</name>
- <classname>java.lang.String</classname>
- <description>CSS style(s) to be applied when this component is
rendered.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to icon element.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- &ui_component_attributes;
- &ui_command_attributes;
- &html_style_attributes;
- &html_events;
- <property>
- <name>target</name>
- <classname>java.lang.String</classname>
- <description>Target frame for action to execute.</description>
- </property>
- </component>
-</components>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
"https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+ <component>
+ <name>org.richfaces.PanelMenu</name>
+ <family>org.richfaces.PanelMenu</family>
+ <description>Defines the menu on the page and the set of the child elements
properties in layout.</description>
+ <superclass>org.richfaces.component.UIPanelMenu</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenu</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuRenderer</name>
+ <template>org/richfaces/htmlPanelMenu.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenu</name>
+ <classname>org.richfaces.taglib.PanelMenuTag</classname>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>event</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines the event on the representation element that
+ triggers the submenu's expand/collapse. (default=onclick)
+ </description>
+ <defaultvalue><![CDATA["onclick"]]></defaultvalue>
+ </property>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu items on the panel
+ menu except ones where this attribute redefined. (ajax, server,(Default), none)
+ </description>
+ <defaultvalue><![CDATA["server"]]></defaultvalue>
+ </property>
+ <property>
+ <name>width</name>
+ <classname>java.lang.String</classname>
+ <description>Set minimal width for the menu.</description>
+ <defaultvalue><![CDATA["100%"]]></defaultvalue>
+ </property>
+ <property>
+ <name>expandMode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu groups after
+ expand/collapse except ones where this attribute redefined. (ajax, server,
none(Default))
+ </description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>expandSingle</name>
+ <classname>boolean</classname>
+ <description>
+ Whether only one panel menu node on top level can be opened at a time.
+ If the value of this attribute is true, the previously opened
+ node on the top level is closed. If the value is false, the node is left opened. The
default value is false.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>iconItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the enabled item
state</description>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconDisabledItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item
state</description>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconTopItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the enabled top item
state</description>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconTopDisabledItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled top item
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconExpandedGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded Group
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconCollapsedGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed Group
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconDisabledGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled group
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconExpandedTopGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded top group
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconCollapsedTopGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed top group
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconTopDisableGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled top Group
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconItemPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the item
icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconItemTopPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the top
item icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconGroupPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the group
icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconGroupTopPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the top
group icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>The CSS style for the panel menu.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>The CSS class for the panel menu.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>groupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>groupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>itemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>itemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-disabled-element
rich-pmenu-disabled-element"]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-disabled-element
rich-pmenu-disabled-element"]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-hovered-element
rich-pmenu-hovered-element"]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-hovered-element
rich-pmenu-hovered-element"]]></defaultvalue>
+ </property>
+ <property>
+ <name>selectedChild</name>
+ <classname>java.lang.String</classname>
+ <description>contain the name or the clientId of any of the item or group,
the child defined in this attribute should be highlighted on PanelMenu
rendering</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ &ui_component_attributes;
+ &html_events;
+
+ <property>
+ <name>onclick</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ondblclick</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseout</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmousemove</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onmouseover</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ <property>
+ <name>onitemhover</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ongroupcollapse</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ongroupexpand</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If true sets state of the item to disabled state. false is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ </component>
+
+ <component>
+ <name>org.richfaces.PanelMenuGroup</name>
+ <family>org.richfaces.PanelMenuGroup</family>
+ <description>Defines expandable group of items inside the panel menu or other
group.</description>
+ <superclass>org.richfaces.component.UIPanelMenuGroup</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenuGroup</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuGroupRenderer</name>
+ <template>org/richfaces/htmlPanelMenuGroup.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenuGroup</name>
+ <classname>org.richfaces.taglib.PanelMenuGroupTag</classname>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu groups after expand/collapse
+ except ones where this attribute redefined. (ajax, server, none(Default))
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconExpanded</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded item
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconCollapsed</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed item
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>expanded</name>
+ <classname>boolean</classname>
+ <description>If “true” group will be displayed expanded
initially.</description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>iconDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If “true” sets state of the item to disabled state. “false” is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>name</name>
+ <classname>java.lang.String</classname>
+ <description>'selectedChild' attribute of PanelMenu refers to
group/item with the same name</description>
+ <defaultvalue>getId()</defaultvalue>
+ </property>
+
+ <!--property>
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ <description>Defines representation text for menuItem.</description>
+ </property-->
+ &listeners;
+ <!--property>
+ <name>action</name>
+ <classname>java.lang.String</classname>
+ <description>The action method binding expression.</description>
+ </property-->
+ <property>
+ <name>target</name>
+ <classname>java.lang.String</classname>
+ <description>Target frame for action to execute.</description>
+ </property>
+ <property>
+ <name>immediate</name>
+ <classname>boolean</classname>
+ <description>A flag indicating that this component value must be converted and
validated immediately (that is, during Apply Request Values phase), rather than waiting
until a Process Validations phase.
+ </description>
+ </property>
+ &ui_component_attributes;
+ &html_input_attributes;
+ &html_input_events;
+ &ui_input_attributes;
+ &html_events;
+ <property>
+ <name>oncollapse</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onexpand</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to hovered
items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to disabled
items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style(s) to be applied when this component is
rendered.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to icon element.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>Displayed node's text</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ </component>
+
+ <component>
+ <name>org.richfaces.PanelMenuItem</name>
+ <family>org.richfaces.PanelMenuItem</family>
+ <description>Defines single Item inside popup list.</description>
+ <superclass>org.richfaces.component.UIPanelMenuItem</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenuItem</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuItemRenderer</name>
+ <template>org/richfaces/htmlPanelMenuItem.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenuItem</name>
+ <classname>org.richfaces.taglib.PanelMenuItemTag</classname>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode (ajax,server(Default),none)
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>icon</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon or the default one name to be displayed for the
enabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item
state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If “true” sets state of the item to disabled state. “false” is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ <description>Defines representation text for menuItem.</description>
+ </property>
+ <property>
+ <name>name</name>
+ <classname>java.lang.String</classname>
+ <description>'selectedChild' attribute of PanelMenu refers to
group/item with the same name</description>
+ <defaultvalue>getId()</defaultvalue>
+ </property>
+ <property>
+ <name>hoverClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to hovered
items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to disabled
items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style(s) to be applied when this component is
rendered.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to icon element.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ &ui_component_attributes;
+ &ui_command_attributes;
+ &html_style_attributes;
+ &html_events;
+ <property>
+ <name>target</name>
+ <classname>java.lang.String</classname>
+ <description>Target frame for action to execute.</description>
+ </property>
+ </component>
+</components>
Modified:
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenu.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -1,11 +1,14 @@
package org.richfaces.component;
-import javax.faces.component.UIComponentBase;
+import javax.faces.component.UIInput;
-public abstract class UIPanelMenu extends UIComponentBase{
+public abstract class UIPanelMenu extends UIInput{
public static final String COMPONENT_TYPE = "org.richfaces.panelMenu";
+ public static final String DEFAULT_SELECTED_CLASS = "dr-pmenu-selected-item";
+ public static final String USER_DEFINED_SELECTED_CLASS =
"rich-pmenu-item-selected";
+
public abstract String getEvent();
public abstract void setEvent(String event);
public abstract String getMode();
@@ -104,6 +107,10 @@
public abstract void setOnmouseover(String string);
public abstract String getOnmouseover();
+ public abstract void setSelectedChild(String string);
+ public abstract String getSelectedChild();
-
+ public String getSelectedName(){
+ return getValue() != null ? getValue().toString() : getSelectedChild();
+ }
}
Modified:
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuGroup.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -79,7 +79,10 @@
public abstract boolean isExpanded();
public abstract void setExpanded(boolean expanded);
+ public abstract void setName(String string);
+ public abstract String getName();
+
public UIPanelMenuGroup(){
setConverter(new BooleanConverter());
}
Modified:
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -57,4 +57,7 @@
public abstract String getTarget();
public abstract void setTarget(String target);
+ public abstract void setName(String string);
+ public abstract String getName();
+
}
Modified:
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -23,15 +23,16 @@
import java.io.IOException;
import java.util.Map;
+
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.convert.ConverterException;
import javax.faces.event.ActionEvent;
+
import org.ajax4jsf.event.AjaxEvent;
import org.richfaces.component.UIPanelMenu;
import org.richfaces.component.UIPanelMenuGroup;
-import org.richfaces.component.UISwitchablePanel;
import org.richfaces.renderkit.PanelMenuRendererBase;
public class PanelMenuGroupRenderer extends PanelMenuRendererBase {
@@ -56,7 +57,7 @@
}
if(isSubmitted(context, component)){
new ActionEvent(component).queue();
- if (UISwitchablePanel.AJAX_METHOD.equals(getItemMode(component))) {
+ if ("ajax".equals(getItemMode(component))) {
new AjaxEvent(component).queue();
}
}
@@ -243,12 +244,16 @@
public String getLabelClass(FacesContext context, UIComponent component) {
UIPanelMenuGroup group = (UIPanelMenuGroup)component;
UIPanelMenu parentMenu = findMenu(group);
+ StringBuffer resClass = new StringBuffer();
if(!group.isDisabled() && !parentMenu.isDisabled()){
if(isTopLevel(component)){
- return "rich-pmenu-group-self-label rich-pmenu-top-group-self-label";
- } else return "rich-pmenu-group-self-label";
+ resClass.append("rich-pmenu-group-self-label
rich-pmenu-top-group-self-label");
+ } else resClass.append("rich-pmenu-group-self-label");
}
- return "";
+ if(isSelected(context, component)){
+ resClass.append("
").append(UIPanelMenu.DEFAULT_SELECTED_CLASS).append("
").append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
+ }
+ return resClass.toString();
}
public String getIconClass(FacesContext context, UIComponent component) {
@@ -277,4 +282,11 @@
result = "dr-pmenu-group";
return result;
}
+
+ public boolean isSelected(FacesContext context, UIComponent component){
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+ UIPanelMenu parentMenu = findMenu(group);
+ return group.getName().equals(parentMenu.getSelectedName());
+ }
+
}
Modified:
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -43,11 +43,10 @@
}
protected void doDecode(FacesContext context, UIComponent component) {
if(isSubmitted(context, component)) {
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
new ActionEvent(component).queue();
if ("ajax".equals(getItemMode(component))) {
new AjaxEvent(component).queue();
- } else {
-
}
}
}
@@ -56,12 +55,6 @@
}
- /*
- public String getOnClick(FacesContext context, UIComponent component) {
- String clientId = component.getClientId(context);
- return ";PanelMenuStorage['" + clientId +
"'].trigger(event);";
- }
- */
public void insertImage(FacesContext context, UIComponent component, Object data) throws
IOException {
String from = (String)data;
UIPanelMenu panelMenu = findMenu(component);
@@ -169,14 +162,19 @@
}
public String getLabelClass(FacesContext context, UIComponent component) {
+ StringBuffer resClass = new StringBuffer();
UIPanelMenuItem item = (UIPanelMenuItem)component;
UIPanelMenu parentMenu = findMenu(item);
if(!item.isDisabled() && !parentMenu.isDisabled()){
if(isTopLevel(component)){
- return "rich-pmenu-item-label rich-pmenu-top-item-label";
- } else return "rich-pmenu-item-label";
+ resClass.append("rich-pmenu-item-label rich-pmenu-top-item-label");
+
+ } else resClass.append("rich-pmenu-item-label");
}
- return "";
+ if(isSelected(context, component)){
+ resClass.append("
").append(UIPanelMenu.DEFAULT_SELECTED_CLASS).append("
").append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
+ }
+ return resClass.toString();
}
public String getIconClass(FacesContext context, UIComponent component) {
@@ -189,4 +187,10 @@
}
return "";
}
+
+ public boolean isSelected(FacesContext context, UIComponent component){
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
+ UIPanelMenu parentMenu = findMenu(item);
+ return item.getName().equals(parentMenu.getSelectedName());
+ }
}
Modified:
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -23,13 +23,19 @@
import java.io.IOException;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Set;
+
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.component.UIPanelMenu;
@@ -40,7 +46,7 @@
public class PanelMenuRenderer extends PanelMenuRendererBase {
/* (non-Javadoc)
- * @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
+ * @see org.ajax4jsf.framework.renderer.RendererBase#getComponentClass()
*/
protected Class getComponentClass() {
return UIComponent.class;
@@ -54,15 +60,21 @@
List flatList = new LinkedList();
Map levels = new HashMap();
- boolean expandSingle = ((UIPanelMenu)component).isExpandSingle();
+ Set itemNames = new HashSet();
+ UIPanelMenu parentMenu = (UIPanelMenu)component;
+
+ boolean expandSingle = parentMenu.isExpandSingle();
+
+ String selectedChild = parentMenu.getSelectedName();
+
flatten(component.getChildren(), flatList, levels, 0);
- panelMenu
- .append("new PanelMenu('")
+ panelMenu.append("new PanelMenu('")
.append(component.getClientId(context).toString())
.append("',")
.append(new Boolean(expandSingle).toString())
+ .append(",").append("'").append(selectedChild).append("'")
.append(");\n");
for (Iterator iter = flatList.iterator(); iter.hasNext();) {
@@ -81,7 +93,7 @@
child.getAttributes().put("rendered",Boolean.FALSE);
}
- UIPanelMenu parentMenu = findMenu(child);
+ //UIPanelMenu parentMenu = findMenu(child);
String event = parentMenu.getEvent();
if ("".equals(event))
@@ -112,10 +124,21 @@
else
targetString = target.toString();
-
-
if (childRendered && parentRendered){
if ( !isParentDisabled(child) ){
+ String childName;
+ if(child instanceof UIPanelMenuGroup){
+ childName = ((UIPanelMenuGroup)child).getName();
+ } else {
+ childName = ((UIPanelMenuItem)child).getName();
+ }
+
+ if(itemNames.contains(childName)){
+ throw new RuntimeException("Attibute \"name\" with value
\"" + childName + "\" is already used in PanelMenu. It must be unique
for every group/item.");
+ } else {
+ itemNames.add(childName);
+ }
+
buffer
.append("new PanelMenuItem({myId:'")
.append((String) child.getClientId(context))
@@ -126,11 +149,11 @@
.append(",event:\"" + event + "\"")
.append(",mode:\"" + mode + "\"")
.append(",target:\"" + targetString + "\"")
- .append(",disabled:" +
- new Boolean(childDisabled).toString())
+ .append(",disabled:" + new Boolean(childDisabled).toString())
+ .append(",target:\"" + targetString + "\"")
+ .append(",name:\"" + childName + "\"")
.append("},{");
-
for (int i = 0; i < hoveredStyles.length; i++)
if (!"".equals(hoveredStyles[i])) {
String [] temp = hoveredStyles[i].split(":");
@@ -273,8 +296,6 @@
try {
isNodeOpened = r.isOpened(context, child);
} catch (IOException e) {
- // TODO Auto-generated catch block
-// e.printStackTrace();
isNodeOpened = false;
}
buffer.append(",").append(String.valueOf(isNodeOpened));
@@ -329,7 +350,6 @@
defaultItemIconSrc = getIconByType(defaultItemIcon, isTopLevel,context, component);
}
-
customItemIcon = item.isDisabled() ? item.getIconDisabled() : item.getIcon();
if(customItemIcon != null && customItemIcon.equals("none")){
customIconSource = PANEL_MENU_SPACER_ICON;
@@ -433,5 +453,16 @@
}
buffer.append("\"");
}
+
+ public void doDecode(FacesContext context, UIComponent component) {
+ Map requestMap = context.getExternalContext().getRequestParameterMap();
+ String menuClientId = component.getClientId(context);
+ UIPanelMenu menu = ((UIPanelMenu)component);
+ Object selectedItemName = requestMap.get(menuClientId + "selectedItemName");
+ if(selectedItemName != null){
+ menu.setSubmittedValue(selectedItemName);
+ }
+ }
+
}
Modified:
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-07-19
22:34:53 UTC (rev 1716)
@@ -83,7 +83,9 @@
.dr-pmenu-disabled-element {
cursor: default;
}
-
+ .dr-pmenu-selected-item {
+ font-style : italic;
+ }
</f:verbatim>
</f:template>
\ No newline at end of file
Modified:
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
---
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-07-19
22:34:53 UTC (rev 1716)
@@ -6,17 +6,20 @@
window.Richfaces = {};
}
-//TODO by nick - dima - better not to use global object to track panels
var PanelMenuStorage = new Object();
PanelMenu = Class.create();
PanelMenu.prototype = {
- initialize: function(myId,so){
+ initialize: function(myId, so, selectedChild){
this.childObj = new Array();
this.expandSingle = so;
this.lastExpanded = null;
- this.is = 'panelMenu';
+ this.selectedChild = selectedChild;
+ this.defaultSelectedClass = 'dr-pmenu-selected-item';
+ this.userDefinedSelectedClass = 'dr-pmenu-selected-item';
+ this.is = 'panelMenu';
+ this.selectedNameInput = $(myId + 'selectedItemName');
PanelMenuStorage[myId] = this;
}
};
@@ -31,6 +34,7 @@
this.onclose = options.onclose;
this.event = options.event;
this.disabled = options.disabled;
+ this.name = options.name;
this.mode = options.mode;
if (!this.mode)
@@ -58,6 +62,15 @@
}
parent = parent.parentObj;
}
+ // parent - root menu object
+ this.rootMenu = parent;
+
+ if(this.rootMenu.selectedChild == this.name){
+ this.selected = true;
+ } else {
+ this.selected = false;
+ }
+ this.clientId = ids.myId;
this.obj = $("tdhide" + ids.myId);
this.leftIcon = $('leftIcon' + ids.myId);
this.rightIcon = $('rightIcon' + ids.myId);
@@ -183,7 +196,8 @@
},
preTrigger: function(e){
- this.inputAction.setAttribute('value', this.obj.id);
+ //this.inputAction.setAttribute('value', this.obj.id);
+ this.inputAction.setAttribute('value', this.clientId);
},
postTrigger: function(e){
@@ -212,6 +226,11 @@
},
itemClicked: function(e){
+ this.globalClearSelection();
+ this.setSelectedClass();
+
+ this.rootMenu.selectedNameInput.value = this.name;
+
if(this.action){
if (this.action=='panelMenuNodeAction'){
if (this.expanded){
@@ -283,31 +302,55 @@
}
},
+ globalClearSelection: function(e) {
+ for(var key in PanelMenuStorage){
+ if(PanelMenuStorage.hasOwnProperty(key)){
+ if(PanelMenuStorage[key].type == 'node' || PanelMenuStorage[key].type ==
'item'){
+ PanelMenuStorage[key].removeSelectedClass();
+ }
+ }
+ }
+ },
+
+
+
+ setSelectedClass: function(e){
+ this.labelArea.addClassName(this.rootMenu.defaultSelectedClass);
+ this.labelArea.addClassName(this.rootMenu.userDefinedSelectedClass);
+ },
+ removeSelectedClass: function(e){
+ this.labelArea.removeClassName(this.rootMenu.defaultSelectedClass);
+ this.labelArea.removeClassName(this.rootMenu.userDefinedSelectedClass);
+ },
+
+
addHoverStyles: function(e) {
- if(!this.hasInitialSylesChecked){
- this.initialStyles = this.tablehider.style.cssText;
- this.hasInitialSylesChecked = true;
- }
- if (this.hoveredStyles) {
- Element.setStyle(this.tablehider, this.hoveredStyles);
- }
- if (this.hoveredClasses)
- for (i = 0; i < this.hoveredClasses.length; i++) {
- this.tablehider.addClassName(this.hoveredClasses[i]);
+ if(!this.selected){
+ if(!this.hasInitialSylesChecked){
+ this.initialStyles = this.tablehider.style.cssText;
+ this.hasInitialSylesChecked = true;
}
-
+ if (this.hoveredStyles) {
+ Element.setStyle(this.tablehider, this.hoveredStyles);
+ }
+ if (this.hoveredClasses)
+ for (i = 0; i < this.hoveredClasses.length; i++) {
+ this.tablehider.addClassName(this.hoveredClasses[i]);
+ }
+ }
},
removeHoverStyles: function(e) {
- if (this.hoveredStyles && this.hasInitialSylesChecked) {
- this.tablehider.style.cssText = this.initialStyles;
- }
-
- if (this.hoveredClasses)
- for (var i = 0; i < this.hoveredClasses.length; i++){
- this.tablehider.removeClassName(this.hoveredClasses[i]);
+ if(!this.selected){
+ if (this.hoveredStyles && this.hasInitialSylesChecked) {
+ this.tablehider.style.cssText = this.initialStyles;
}
-
+
+ if (this.hoveredClasses)
+ for (var i = 0; i < this.hoveredClasses.length; i++){
+ this.tablehider.removeClassName(this.hoveredClasses[i]);
+ }
+ }
},
_getDirectChildrenByTag: function(e, tagName) {
Modified: trunk/sandbox/ui/scrollable-grid/generatescript.xml
===================================================================
--- trunk/sandbox/ui/scrollable-grid/generatescript.xml 2007-07-19 22:20:58 UTC (rev
1715)
+++ trunk/sandbox/ui/scrollable-grid/generatescript.xml 2007-07-19 22:34:53 UTC (rev
1716)
@@ -14,7 +14,42 @@
<description>
Assemble all javaScript library files to one scrollable-grid.js
</description>
-
+
+ <target name="merge-scripts-eclipse-3.3">
+ <property name="script-path"
value="org/richfaces/renderkit/html/scripts"></property>
+ <property name="gen-script-name"
value="scrollable-grid.js"></property>
+ <property name="gen-script-full-name"
value="${target-dir}/${script-path}/${gen-script-name}"></property>
+ <concat append="false" binary="false"
destfile="${gen-script-full-name}">
+ <filelist dir="${resources-dir}">
+ <file name="${resources-dir}/common/prototype/ext/extend.js"/>
+ <file name="${resources-dir}/ClientUILib.js"/>
+ <file name="${resources-dir}/ClientUI/common/utils/Utils.js"/>
+ <file
name="${resources-dir}/ClientUI/common/utils/StringBuilder.js"/>
+ <file
name="${resources-dir}/ClientUI/common/utils/Validators.js"/>
+ <file name="${resources-dir}/ClientUI/common/box/Box.js"/>
+ <file name="${resources-dir}/ClientUI/common/box/InlineBox.js"/>
+ <file
name="${resources-dir}/ClientUI/common/utils/CustomEvent.js"/>
+ <file
name="${resources-dir}/ClientUI/common/box/ScrollableBox.js"/>
+ <file
name="${resources-dir}/ClientUI/controls/grid/DataModel.js"/>
+ <file
name="${resources-dir}/ClientUI/controls/grid/ArrayDataModel.js"/>
+ <file
name="${resources-dir}/ClientUI/controls/grid/FakeArrayDataModel.js"/>
+ <file name="${resources-dir}/ClientUI/layouts/LayoutManager.js"/>
+ <file name="${resources-dir}/ClientUI/common/box/Substrate.js"/>
+ <file name="${resources-dir}/ClientUI/layouts/VLayoutManager.js"/>
+ <file
name="${resources-dir}/ClientUI/layouts/GridLayoutManager.js"/>
+ <file
name="${resources-dir}/ClientUI/controls/grid/GridHeader.js"/>
+ <file name="${resources-dir}/ClientUI/common/box/SplashBox.js"/>
+ <file name="${resources-dir}/ClientUI/controls/grid/DataCash.js"/>
+ <file name="${resources-dir}/ClientUI/controls/grid/GridBody.js"/>
+ <file
name="${resources-dir}/ClientUI/controls/grid/GridFooter.js"/>
+ <file name="${resources-dir}/ClientUI/controls/grid/Grid.js"/>
+ <file
name="${resources-dir}/ClientUI/controls/grid/Selection.js"/>
+ <file
name="${resources-dir}/ClientUI/controls/grid/ScrollableGrid.js"/>
+ </filelist>
+ </concat>
+ </target>
+
+
<target name="merge-scripts">
<property name="script-path"
value="org/richfaces/renderkit/html/scripts"></property>
<property name="gen-script-name"
value="scrollable-grid.js"></property>
Modified: trunk/sandbox/ui/scrollable-grid/src/main/config/component/scrollable-grid.xml
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-07-19
22:34:53 UTC (rev 1716)
@@ -172,8 +172,18 @@
<property>
<name>styleClass</name>
<classname>java.lang.String</classname>
- </property>
+ </property>
+ <property>
+ <name>cellStyle</name>
+ <classname>java.lang.String</classname>
+ </property>
+
+ <property>
+ <name>cellClass </name>
+ <classname>java.lang.String</classname>
+ </property>
+
&ui_component_attributes;
&html_style_attributes;
</component>
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -16,19 +16,22 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
-import org.ajax4jsf.model.DataComponentState;
-import org.ajax4jsf.model.DataVisitor;
-import org.ajax4jsf.model.ExtendedDataModel;
-import org.ajax4jsf.model.Range;
-import org.ajax4jsf.component.UIDataAdaptor;
-import org.ajax4jsf.component.AjaxComponent;
-import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.ajax.repeat.DataComponentState;
+import org.ajax4jsf.ajax.repeat.DataVisitor;
+import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
+import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.apache.commons.collections.iterators.IteratorChain;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.event.scroll.ScrollEvent;
+import org.richfaces.event.sort.MultiColumnSortListener;
+import org.richfaces.event.sort.SingleColumnSortListener;
import org.richfaces.event.sort.SortEvent;
+import org.richfaces.event.sort.SortListener;
import org.richfaces.model.DataModelCache;
import org.richfaces.model.GridDataModel;
import org.richfaces.model.ScrollableGridRange;
@@ -46,7 +49,10 @@
public static final String COMPONENT_TYPE =
"org.richfaces.component.ScrollableGrid";
+ public static final String SORT_SINGLE = "single";
+ public static final String SORT_MULTI = "multi";
+
private boolean MODEL_RANGE = false;
private final static Log log = LogFactory.getLog(UIScrollableGrid.class);
@@ -59,6 +65,10 @@
private int reqRowsCount = -1;
+ private String scrollPos;
+
+ private SortListener sortListener;
+
public int getReqRowsCount() {
return reqRowsCount;
}
@@ -200,10 +210,12 @@
public Object saveState(FacesContext context) {
- Object values[] = new Object[2];
+ Object values[] = new Object[4];
values[0] = super.saveState(context);
values[1] = getRanges();
-
+ values[2] = scrollPos;
+ values[3] = saveAttachedState(context, sortListener);
+
return (Object)values;
}
@@ -212,7 +224,8 @@
Object values[] = (Object[])state;
super.restoreState(context, values[0]);
setRanges((List)values[1]);
-
+ scrollPos = (String)values[2];
+ sortListener = (SortListener) restoreAttachedState(context, values[3]);
}
protected Iterator dataChildren() {
@@ -287,19 +300,10 @@
public void processSortingChange(FacesEvent event){
SortEvent e = (SortEvent)event;
- int sortColumn = e.getSortColumn();
- boolean asc = true;
+ getSortListener().processSort(e);
- SortOrder sortOrder = getSortOrder();
-
- if (sortOrder != null) {
- if (sortOrder.getSortColumn() == sortColumn) {
- asc = !sortOrder.isAscending();
- }
- }
- SortOrder newSortOrder = new SortOrder(sortColumn,asc);
- setSortOrder(newSortOrder);
+
resetDataModel();
getFacesContext().renderResponse();
}
@@ -355,4 +359,30 @@
public void setRanges(List ranges) {
this.ranges = ranges;
}
+
+ public String getScrollPos() {
+ return scrollPos;
+ }
+
+ public void setScrollPos(String scrollPos) {
+ this.scrollPos = scrollPos;
+ }
+
+ public SortListener getSortListener() {
+ if (sortListener != null) return sortListener;
+ if (SORT_MULTI.equals(getSortMode())) {
+ return MultiColumnSortListener.INSTANCE;
+ } else {
+ return SingleColumnSortListener.INSTANCE;
+ }
+ }
+
+ public void setSortListener(SortListener sortListener) {
+ this.sortListener = sortListener;
+ }
+
+ public abstract String getSortMode();
+ public abstract void setSortMode(String mode);
+
+
}
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -8,15 +8,12 @@
import org.richfaces.event.sort.SortListener;
import org.richfaces.event.sort.SortSource;
-import javax.faces.UIColumn;
-
/**
* @author Anton Belevich
*
*/
public abstract class UIScrollableGridColumn extends UIColumn implements SortSource{
-
public Iterator getChildIterator(){
return getChildren().iterator();
}
@@ -40,5 +37,9 @@
public abstract boolean isSortable();
public abstract void setSortable(boolean sortable);
+
+ public abstract String getName();
+ public abstract void setName(String name);
+
}
Added: trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/SortOrder.java
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/SortOrder.java
(rev 0)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/SortOrder.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -0,0 +1,70 @@
+package org.richfaces.model;
+
+import java.io.Serializable;
+import java.util.Arrays;
+/**
+ *
+ * @author Maksim Kaszynski
+ *
+ *
+ */
+public class SortOrder implements Serializable {
+
+ private static int hashCode(Object[] array) {
+ final int prime = 31;
+ if (array == null)
+ return 0;
+ int result = 1;
+ for (int index = 0; index < array.length; index++) {
+ result = prime * result
+ + (array[index] == null ? 0 : array[index].hashCode());
+ }
+ return result;
+ }
+
+ private static final long serialVersionUID = 2423450561570551363L;
+
+ private SortField [] fields;
+
+ public SortOrder() {
+
+ }
+
+ public SortOrder(SortField[] fields) {
+ super();
+ this.fields = fields;
+ }
+
+
+
+ public SortField[] getFields() {
+ return fields;
+ }
+
+ public void setFields(SortField[] fields) {
+ this.fields = fields;
+ }
+
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + SortOrder.hashCode(fields);
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final SortOrder other = (SortOrder) obj;
+ if (!Arrays.equals(fields, other.fields))
+ return false;
+ return true;
+ }
+
+
+
+}
\ No newline at end of file
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/impl/PropertyResolverComparator.java
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/impl/PropertyResolverComparator.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/model/impl/PropertyResolverComparator.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -18,6 +18,7 @@
import javax.faces.el.EvaluationException;
import javax.faces.el.PropertyResolver;
+import org.richfaces.model.SortField;
import org.richfaces.model.SortOrder;
@@ -41,8 +42,11 @@
public int compare(Object arg0, Object arg1) {
int result = 0;
- Object prop1 = null;
+ /*Object prop1 = null;
+ SortField [ sortOrder.getFields();
+ while (result == 0 && )
+
try {
prop1 = resolver.getValue(arg0, sortOrder.getSortColumn());
} catch (EvaluationException e) {
@@ -77,7 +81,7 @@
}
if (!sortOrder.isAscending()) {
result = -result;
- }
+ }*/
return result;
}
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -15,7 +15,7 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.framework.ajax.AjaxContext;
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.richfaces.component.UIScrollableGrid;
/**
@@ -35,11 +35,11 @@
private HashSet ids = new HashSet();
- private Object rowClasses[];
+ private String rowClasses[];
private int rowClassesSize;
- private Object columnClasses[];
+ private String columnClasses[];
private int columnClassesSize;
@@ -112,8 +112,8 @@
}
GridRendererState oldState = getRendererState(context);
GridRendererState state = new GridRendererState(context,oldState,grid);
- state.setColumnClasses(AjaxRendererUtils.asSet(grid.getAttributes().get("columnClasses")));
- state.setRowClasses(AjaxRendererUtils.asSet(grid.getAttributes().get("rowClasses")));
+ state.setColumnClasses(grid.getAttributes().get("columnClasses"));
+ state.setRowClasses(grid.getAttributes().get("rowClasses"));
context.getExternalContext().getRequestMap().put(DATA_GRID_RENDERER_STATE,state);
return state;
}
@@ -394,30 +394,30 @@
public String getColumnClass(int index) {
if(columnClasses != null) {
- return (String)columnClasses[index % columnClassesSize];
+ return columnClasses[index % columnClassesSize];
} else {
return "";
}
}
- public void setColumnClasses(Set columnClasses) {
+ public void setColumnClasses(Object columnClasses) {
if(columnClasses != null) {
- this.columnClasses = columnClasses.toArray();
+ this.columnClasses = ((String)columnClasses).split(",");
columnClassesSize = this.columnClasses.length;
}
}
public String getRowClass(int index) {
if(rowClasses != null) {
- return (String)rowClasses[index % rowClassesSize];
+ return rowClasses[index % rowClassesSize];
} else {
return "";
}
}
- public void setRowClasses(Set rowClasses) {
+ public void setRowClasses(Object rowClasses) {
if(rowClasses != null) {
- this.rowClasses = rowClasses.toArray();
+ this.rowClasses = ((String)rowClasses).split(",");
rowClassesSize = this.rowClasses.length;
}
}
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-07-19
22:34:53 UTC (rev 1716)
@@ -1,10 +1,8 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import javax.faces.component.UIComponent;
@@ -14,11 +12,11 @@
import org.ajax4jsf.ajax.repeat.DataVisitor;
import org.ajax4jsf.framework.ajax.AjaxContext;
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.renderkit.ComponentVariables;
-import org.ajax4jsf.renderkit.ComponentsVariableResolver;
-import org.ajax4jsf.renderkit.RendererBase;
-import org.ajax4jsf.renderkit.RendererUtils.HTML;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.ComponentVariables;
+import org.ajax4jsf.framework.renderer.ComponentsVariableResolver;
+import org.ajax4jsf.framework.renderer.RendererBase;
+import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
import org.ajax4jsf.framework.util.javascript.JSFunction;
import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
import org.ajax4jsf.framework.util.javascript.JSReference;
@@ -45,9 +43,9 @@
public final String PARTIAL_UPDATE= "partialUpdate";
- private final String FOOTER_PART = "footer";
+ public final String FOOTER_PART = "footer";
- private final String HEADER_PART = "header";
+ public final String HEADER_PART = "header";
private final String COLUMN_FROZEN_TYPE = "frozen";
@@ -87,6 +85,11 @@
public void renderContent(FacesContext context, UIScrollableGridColumn column,
ResponseWriter writer, GridRendererState state) throws IOException {
writer.startElement("col", column);
getUtils().writeAttribute(writer, "width",
column.getAttributes().get("width"));
+ getUtils().writeAttribute(writer, "style",
column.getAttributes().get("style"));
+ int cell_index = state.getCellIndex();
+ Object columnClass = state.getColumnClass(cell_index);
+ if(columnClass!=null) getUtils().writeAttribute(writer, "class",
columnClass);
+
writer.endElement("col");
}
};
@@ -141,13 +144,13 @@
variables.setVariable("client_id", client_id);
variables.setVariable("cell_index", new Integer(cell_index));
- footerCellTemplate.encodeBegin(context, column);
+
UIComponent component = column.getFacet(FOOTER_PART);
if(component != null){
+ footerCellTemplate.encodeBegin(context, column);
renderChild(context, component);
+ footerCellTemplate.encodeEnd(context, column);
}
- footerCellTemplate.encodeEnd(context, column);
-
}
};
@@ -551,6 +554,13 @@
boolean sorted = false;
Map parameters = externalContext.getRequestParameterMap();
+ String s_id = clientId + ":si";
+ if(parameters.containsKey(s_id)){
+ String options = (String)parameters.get(s_id);
+ grid.setScrollPos(options);
+ }
+
+
if(parameters.containsKey(clientId + ":sortColumn") &&
parameters.containsKey(clientId + ":sortStartRow") &&
parameters.containsKey(clientId + ":sortIndex") &&
@@ -618,6 +628,8 @@
}
}
}
+
+
}
@@ -626,6 +638,7 @@
public void renderAjaxChildren(FacesContext context, UIComponent component)throws
IOException{
UIScrollableGrid grid = (UIScrollableGrid)component;
+
GridRendererState state = GridRendererState.createState(context, grid);
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
@@ -654,6 +667,7 @@
grid.setRowKey(null);
ajaxContext.setResponseData(grid.getResponseData());
+
ajaxContext.getAjaxRenderedAreas().remove(grid.getClientId(context));
GridScrollSettings options = createOptions(grid);
ajaxContext.getResponseDataMap().put("options", options);
@@ -746,6 +760,21 @@
return footerCellTemplate;
}
+ public void renderHiddenScrollInput(FacesContext context, UIScrollableGrid grid) throws
IOException{
+
+ ResponseWriter writer = context.getResponseWriter();
+ String id = grid.getClientId(context) + ":si";
+ writer.startElement("input", grid);
+
+ getUtils().writeAttribute(writer, "type", "hidden");
+ getUtils().writeAttribute(writer, "name", id);
+ getUtils().writeAttribute(writer, "id", id);
+ getUtils().writeAttribute(writer, "value", grid.getScrollPos());
+
+ writer.endElement("input");
+
+ }
+
public void contributorsEncodeHere(FacesContext context, UIScrollableGrid grid) throws
IOException {
RendererContributor [] contribs = getContributors();
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-07-19
22:34:53 UTC (rev 1716)
@@ -55,13 +55,22 @@
var tdSrc, tdNode, subNode;
var childs = src.childNodes;
var ccount = childs.length;
+<<<<<<< .working
var tcount = target.childNodes.length;
for(var k=0; k<tcount; k++) {
tdSrc = k<ccount ? childs[k] : null;
tdNode = theDoc.createElement( "TD" );
//Utils.DOM.copyAttributes(tdNode, tdSrc);
tdNode.className = "ClientUI_Grid_BC";
+=======
+ var tcount = target.childNodes.length;
+ for(var k=0; k<tcount; k++) {
+ tdSrc = k<ccount ? childs[k] : null;
+ tdNode = theDoc.createElement( "TD" );
+ tdNode.className = target.childNodes[k].className;
+>>>>>>> .merge-right.r1635
+<<<<<<< .working
if(tdSrc) {
if(tdSrc.innerHTML) {
tdNode.innerHTML = tdSrc.innerHTML;
@@ -75,6 +84,16 @@
}
tdNode.innerHTML = innerHTML.join("");
}
+=======
+ if(tdSrc) {
+ innerHTML = [];
+ innerCount = tdSrc.childNodes.length;
+ for(j=0; j<innerCount; j++) {
+ subNode = tdSrc.childNodes[j];
+ innerHTML.push(subNode.xml);
+ }
+ tdNode.innerHTML = innerHTML.join("");
+>>>>>>> .merge-right.r1635
}
row.insertBefore(tdNode, null);
}
@@ -83,13 +102,35 @@
return row;
/*} else {
- Element.hide(target);
- Utils.DOM.Event.removeListeners(target);
-
+ var theDoc = document;
+
Utils.DOM._clearAttributes(target);
- target.innerHTML = src.innerHTML;
Utils.DOM.copyAttributes(target, src);
- Element.show(target);
+
+ var tdSrc, tdNode, subNode;
+ var childs = src.childNodes;
+ var ccount = childs.length;
+ var tcount = target.childNodes.length;
+ var innerHTML = [];
+ var k;
+ for(k=0, l=0; k<tcount; k++, l++) {
+
+ if(childs[l]){
+ if(!childs[l].tagName) {
+ l++;
+ }
+ }
+
+
+ tdSrc = l<ccount ? childs[l] : null;
+ innerHTML.push("<td class='");
+ innerHTML.push(target.childNodes[k].className);
+ innerHTML.push("'>");
+ innerHTML.push(tdSrc?tdSrc.innerHTML:"");
+ innerHTML.push("</td>");
+ }
+
+ target.innerHTML = innerHTML.join("");
return target;
}*/
}
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/FakeArrayDataModel.js 2007-07-19
22:34:53 UTC (rev 1716)
@@ -51,9 +51,9 @@
var state_input = $(this.gridId + "_state_input");
var submit_input = $(this.gridId + "_submit_input");
// var options_input = $(this.gridId + "_options_input");
- var submit_values = state_options.count + "," + state_options.index +
"," + state_options.startRow;
+ var submit_values = state_options.count + "," + state_options.index +
"," + state_options.startRow;
state_input.value = submit_values;
-// options_input.value = options;
+// options_input.value = options;
this.curr_options = options;
submit_input.click();
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-07-19
22:34:53 UTC (rev 1716)
@@ -118,12 +118,9 @@
//this.defaultWidth -= this.getBorderWidth("lr") +
this.getPadding("lr");
}
- if(ClientUILib.isIE) {
- this.frozenSubstrate = new ClientUI.common.box.Substrate(null, this.getElement());
- this.frozenSubstrate.getElement().name = this.getElement().id + "FRFrm";
- Element.addClassName(this.frozenSubstrate.getElement(), "ClientUI_HRFrm");
- this.frozenSubstrate.setHeight(this.defaultHeight);
- }
+ this.frozenSubstrate = new ClientUI.common.box.Box(this.grid.getElement().id +
":fs", this.getElement());
+ this.frozenSubstrate.getElement().name = this.getElement().id + "FRFrm";
+ this.frozenSubstrate.setHeight(this.defaultHeight);
return true;
},
updateSize: function() {
@@ -157,8 +154,7 @@
var viewWidth = this.grid.getBody().scrollBox.getViewportWidth();
this.container.setWidth(viewWidth);
this.setWidth(viewWidth);
- if(ClientUILib.isIE)
- this.frozenSubstrate.setWidth(frozenContentWidth);
+ this.frozenSubstrate.setWidth(frozenContentWidth);
},
adjustScrollPosition: function(pos) {
this.contentBox.moveToX(this.grid.getColumnsFrozenWidth()-pos);
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-19
22:34:53 UTC (rev 1716)
@@ -28,7 +28,7 @@
// constructor
initialize: function(template, grid) {
this.grid = grid;
-
+ this.gridId = this.grid.getElement().id;
ClientUI.controls.grid.GridHeader.parentClass.constructor().call(this, template);
// register event handlers
@@ -169,12 +169,8 @@
sep.setStyle({cursor: 'auto'});
}
// sort icons
- columns[j].sortDesc = details[1];
- columns[j].sortAsc = details[2];
- if(ClientUILib.isIE && columns[j].sortDesc) {
- Element.setStyle(columns[j].sortDesc, {left: "-10px"});
- Element.setStyle(columns[j].sortAsc, {left: "-10px"});
- }
+ columns[j].sortDesc = new ClientUI.common.box.Box(details[1], null, true);
+ columns[j].sortAsc = new ClientUI.common.box.Box(details[2], null, true);
j++;
}
@@ -209,22 +205,20 @@
var details = this._getCellElements(j);
// separator
- columns[j].sep = new ClientUI.common.box.InlineBox(details[0], null, true);
- columns[j].sep.getElement().columnIndex = j;
- if(!columns[j].fixedWidth) {
- Event.observe(columns[j].sep.getElement(), 'dblclick',
this.eventSepDblClick);
- Event.observe(columns[j].sep.getElement(), 'mousedown',
this.eventSepMouseDown);
- }
- else {
- sep.setStyle({cursor: 'auto'});
+ if (details[0]) {
+ columns[j].sep = new ClientUI.common.box.InlineBox(details[0], null, true);
+ columns[j].sep.getElement().columnIndex = j;
+ if(!columns[j].fixedWidth) {
+ Event.observe(columns[j].sep.getElement(), 'dblclick',
this.eventSepDblClick);
+ Event.observe(columns[j].sep.getElement(), 'mousedown',
this.eventSepMouseDown);
+ }
+ else {
+ sep.setStyle({cursor: 'auto'});
+ }
+ // sort icons
+ columns[j].sortDesc = new ClientUI.common.box.Box(details[1], null, true);
+ columns[j].sortAsc = new ClientUI.common.box.Box(details[2], null, true);
}
- // sort icons
- columns[j].sortDesc = details[1];
- columns[j].sortAsc = details[2];
- if(ClientUILib.isIE && columns[j].sortDesc) {
- Element.setStyle(columns[j].sortDesc, {left: "-10px"});
- Element.setStyle(columns[j].sortAsc, {left: "-10px"});
- }
j++;
}
@@ -238,12 +232,9 @@
this.agjustSeparators();
- if(ClientUILib.isIE) {
- this.frozenSubstrate = new ClientUI.common.box.Substrate(null, this.getElement());
- this.frozenSubstrate.getElement().name = this.getElement().id + "HRFrm";
- Element.addClassName(this.frozenSubstrate.getElement(), "ClientUI_HRFrm");
- this.frozenSubstrate.setHeight(this.headerRow.getViewportHeight());
- }
+ this.frozenSubstrate = new ClientUI.common.box.Box(this.gridId + ":hs",
this.getElement());
+ this.frozenSubstrate.getElement().name = this.getElement().id + "HRFrm";
+ this.frozenSubstrate.setHeight(this.headerRow.getViewportHeight());
return true;
},
@@ -319,8 +310,7 @@
this.frozenContentBox.setHeight(height);
this.frozenContentBox.moveTo(0, 0);
this.headerFrozenRow.setHeight(height);
- if(ClientUILib.isIE)
- this.frozenSubstrate.setWidth(frozenContentWidth);
+ this.frozenSubstrate.setWidth(frozenContentWidth);
},
getColumns: function() {
return this._columns;
@@ -392,12 +382,9 @@
}
},
_createSplitter: function() {
- this.columnSplitter = new ClientUI.common.box.Box(null, this.grid.getElement());
+ this.columnSplitter = new ClientUI.common.box.Box(this.gridId +":cs",
this.grid.getElement());
this.columnSplitter.makeAbsolute();
- this.columnSplitter.getElement().addClassName("ClientUI_Grid_HSplit");
this.columnSplitter.setWidth(10);
- this.columnSplitter.getElement().setStyle({backgroundColor: ''});
- this.columnSplitter.getElement().setStyle({zIndex: '100'});
this.columnSplitter.hide();
},
adjustScrollPosition: function(pos) {
@@ -420,11 +407,13 @@
var h = this.getColumns()[i];
if(h.sortDesc && h.sortAsc) {
if(i != index) {
- Element.setStyle(h.sortDesc, {display: 'none'});
- Element.setStyle(h.sortAsc, {display: 'none'});
+ Element.setStyle(h.sortDesc.getElement(), {display: 'none'});
+ Element.setStyle(h.sortAsc.getElement(), {display: 'none'});
} else{
- Element.setStyle(h.sortDesc, {display: (dir == 'desc' ? 'block' :
'none')});
- Element.setStyle(h.sortAsc, {display: (dir == 'asc' ? 'block' :
'none')});
+ h.sortDesc.moveTo(h.object.getWidth() - 16, 4);
+ h.sortAsc.moveTo(h.object.getWidth() - 16, 4);
+ Element.setStyle(h.sortDesc.getElement(), {display: (dir == 'desc' ?
'block' : 'none')});
+ Element.setStyle(h.sortAsc.getElement(), {display: (dir == 'asc' ?
'block' : 'none')});
}
}
}
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-07-19
22:34:53 UTC (rev 1716)
@@ -48,11 +48,9 @@
this.registerEvents();
},
registerEvents: function() {
- if(this.container)
Event.observe(window, "resize", this.eventContainerResize);
},
destroy: function() {
- if(this.container)
Event.stopObserving(window, "resize", this.eventContainerResize);
},
containerResize: function(event) {
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-07-19
22:34:53 UTC (rev 1716)
@@ -52,7 +52,7 @@
this.panels[align] = pane;
this.panels[align].makeAbsolute();
- this.panels[align].setParent(this);
+ //this.panels[align].setParent(this);
},
getPane: function(align) {
return this.panels[align];
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-07-19
22:34:53 UTC (rev 1716)
@@ -11,11 +11,9 @@
component="javax.faces.component.UIComponent"
- <td class="ClientUI_Grid_BC Idg-column-cell #{columnClass}
#{component.attributes['styleClass']}"
id="#{client_id}:c_#{cell_id}">
- <div id="#{client_id}:bc_#{cell_index}"
class="ClientUI_Grid_BCBody1">
- <div class="ClientUI_Grid_BCBody"
id="#{client_id}:bc_#{cell_id}">
- <vcp:body/>
- </div>
+ <td class="ClientUI_Grid_BC Idg-column-cell
#{component.attributes['styleClass']}"
id="#{client_id}:c_#{cell_id}">
+ <div id="#{client_id}:bc_#{cell_id}" class="ClientUI_Grid_BCBody
#{component.attributes['cellClass']}"
style="#{component.attributes['cellStyle']}">
+ <vcp:body/>
</div>
</td>
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-07-19
22:34:53 UTC (rev 1716)
@@ -13,26 +13,12 @@
<td class="ClientUI_Grid_HC Idg-header-cell
#{component.attributes['headerClass']}"
id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}"
sortable="#{component.attributes['sortable']}">
- <span id="#{client_id}:hcc_#{cell_index}"
class="ClientUI_Grid_HCBody1">
- <span id="#{clientId}:hcb_#{cell_index}"
- class="ClientUI_Grid_HCBody">
- <table width="100%" cellspacing="0" cellpadding="0"
border="0" align="center">
- <tbody>
- <tr>
- <td width="100%">
- <span style="width: 100%;">
- <vcp:body/>
- </span>
- </td>
- <td>
- <span id="#{client_id}:hsortd_#{cell_index}"
class="sort-desc" />
- <span id="#{client_id}:hsorta_#{cell_index}"
class="sort-asc" />
- </td>
- </tr>
- </tbody>
- </table>
- </span>
- </span>
+ <div id="#{clientId}:hcb_#{cell_index}"
+ class="ClientUI_Grid_HCBody">
+ <vcp:body/>
+ <div align="right"
id="#{client_id}:hsortd_#{cell_index}" class="sort-desc" />
+ <div align="right"
id="#{client_id}:hsorta_#{cell_index}" class="sort-asc" />
+ </div>
<jsp:scriptlet>
int offset = ((Integer)variables.getVariable("sepOffset")).intValue() - 3;
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-07-19
22:20:58 UTC (rev 1715)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-07-19
22:34:53 UTC (rev 1716)
@@ -11,14 +11,14 @@
baseclass="org.richfaces.renderkit.html.ScrollableGridBaseRenderer"
component="org.richfaces.component.UIScrollableGrid"
- <jsp:directive.page
import="javax.faces.component.UIComponent"/>
+ <jsp:directive.page import="javax.faces.component.UIComponent, java.util.List,
java.util.Iterator, org.richfaces.component.UIScrollableGridColumn"/>
<h:styles>
/org/richfaces/renderkit/html/css/grid.xcss
</h:styles>
<h:scripts>
- new org.ajax4jsf.javascript.PrototypeScript(),
- new org.ajax4jsf.javascript.AjaxScript(),
+ new org.ajax4jsf.framework.resource.PrototypeScript(),
+ new org.ajax4jsf.framework.ajax.AjaxScript(),
/org/richfaces/renderkit/html/scripts/scrollable-grid.js
</h:scripts>
@@ -26,10 +26,50 @@
<f:call name="setUpColumnsWidth"/>
+ <jsp:scriptlet>
+ <![CDATA[
+ List children = component.getChildren();
+ String hStyle, fStyle;
+ boolean footer = false;
+ boolean header = false;
+ for (Iterator iterator = children.iterator(); iterator.hasNext();) {
+ UIComponent column = (UIComponent) iterator.next();
+ if(column instanceof UIScrollableGridColumn){
+ UIComponent hFacet = column.getFacet(HEADER_PART);
+ UIComponent fFacet = column.getFacet(FOOTER_PART);
+ if(hFacet != null){
+ if(!header)
+ header = true;
+ }
+ if(fFacet != null){
+ if(!footer)
+ footer = true;
+ }
+ }
+ }
+
+ if(header){
+ hStyle = "";
+ }else{
+ hStyle = "display: none";
+ }
+ if(footer){
+ fStyle = "";
+ }else{;
+ fStyle = "display: none";
+ }
+
+ variables.setVariable("fStyle", fStyle);
+ variables.setVariable("hStyle", hStyle);
+ ]]>
+ </jsp:scriptlet>
+
+
<div id="#{clientId}" style="width:
#{component.attributes['width']};height:
#{component.attributes['height']};" class="ClientUI_Grid
#{component.attributes['styleClass']}" >
-
- <div id="#{clientId}_GridHeaderTemplate"
class="ClientUI_InlineBox" style="width:
#{component.attributes['width']};">
+ <div id="#{clientId}:cs" class="ClientUI_Grid_HSplit" />
+ <div id="#{clientId}_GridHeaderTemplate"
class="ClientUI_InlineBox" style="#{hStyle}; width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:hs" class="ClientUI_HRFrm
ClientUI_Substrate" src="" scrolling="no"
frameborder="0" > <br/> </iframe>
<div style="display: block; left: 0px; top: 0px; width:
#{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:header:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
@@ -76,8 +116,13 @@
</div>
</div>
+
+
<div id="#{clientId}_GridBodyTemplate"
class="ClientUI_InlineBox" style="overflow: auto; width:
#{component.attributes['width']}; height:
#{component.attributes['height']};">
- <div style="display: block; width: #{sumWidth}px;">
+ <div id="#{clientId}:scb" style="position: absolute; z-index:
0;">
+ <div id="#{clientId}:sb" style="position: absolute;"
><br/> </div>
+ </div>
+ <div id="#{clientId}:bc" style="display: block; width:
#{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:body:FrozenBox">
<table id="#{clientId}:f" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
@@ -94,6 +139,7 @@
</jsp:scriptlet>
</tbody>
</table>
+ <span class="ClientUI_Grid_HO" id="#{clientId}:fho"
><br/></span>
</span>
<span class="ClientUI_TmplBox ClientUI_NormalBox"
id="#{clientId}:body:NormalBox">
<table id="#{clientId}:n" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
@@ -112,11 +158,13 @@
</jsp:scriptlet>
</tbody>
</table>
+ <span class="ClientUI_Grid_HO" id="#{clientId}:nho"
><br/></span>
</span>
</div>
</div>
- <div id="#{clientId}_GridFooterTemplate"
class="ClientUI_InlineBox" style="width:
#{component.attributes['width']};">
+ <div id="#{clientId}_GridFooterTemplate"
class="ClientUI_InlineBox" style="#{fStyle}; width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:fs" class="ClientUI_FRFrm
ClientUI_Substrate" src="" scrolling="no"
frameborder="0" > <br/></iframe>
<div style="display: block; width: width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:footer:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
@@ -167,6 +215,11 @@
<input type="hidden" name="#{clientId}_options_input"
id="#{clientId}_options_input"/>
<input type="hidden" name="#{clienId}_rows_input"
id="#{clientId}_rows_input" value="#{rows_count}"/>
<input type="button" name="#{clientId}_submit_input"
id="#{clientId}_submit_input"
onclick="#{this:getRowsAjaxUpdate(context,component)}"
style="display:none"/>
+ <jsp:scriptlet>
+ <![CDATA[
+ renderHiddenScrollInput(context, component);
+ ]]>
+ </jsp:scriptlet>
<f:call name="contributorsEncodeHere"/>
@@ -188,8 +241,6 @@
#{this:getJavaScriptVarName(context, component)} =
#{this:createClientScrollableGrid(context, component)};
#{this:getScriptContributions(context, component)};
- Event.observe(window, 'load', #{this:getJavaScriptVarName(context,
component)}.init2 );
-
// ]]>
</script>
<f:call name="tearDownState"/>
Modified: trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml 2007-07-19 22:20:58 UTC
(rev 1715)
+++ trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml 2007-07-19 22:34:53 UTC
(rev 1716)
@@ -148,4 +148,4 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
</component>
-</components>
\ No newline at end of file
+</components>