JBoss Rich Faces SVN: r2805 - in trunk: test-applications and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-09-06 19:57:14 -0400 (Thu, 06 Sep 2007)
New Revision: 2805
Modified:
trunk/samples/richfaces-demo/pom.xml
trunk/test-applications/
trunk/test-applications/pom.xml
Log:
myfaces profile updated to exclude javax.faces:*
Modified: trunk/samples/richfaces-demo/pom.xml
===================================================================
--- trunk/samples/richfaces-demo/pom.xml 2007-09-06 23:55:57 UTC (rev 2804)
+++ trunk/samples/richfaces-demo/pom.xml 2007-09-06 23:57:14 UTC (rev 2805)
@@ -133,4 +133,27 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>myfaces</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Property changes on: trunk/test-applications
___________________________________________________________________
Name: svn:ignore
- target
+ target
.project
Modified: trunk/test-applications/pom.xml
===================================================================
--- trunk/test-applications/pom.xml 2007-09-06 23:55:57 UTC (rev 2804)
+++ trunk/test-applications/pom.xml 2007-09-06 23:57:14 UTC (rev 2805)
@@ -47,7 +47,7 @@
<name>RichFaces Test Applications</name>
<properties>
- <rfVersion>3.1.0-rc4</rfVersion>
+ <rfVersion>3.1.0-SNAPSHOT</rfVersion>
</properties>
<modules>
@@ -82,4 +82,57 @@
<version>${rfVersion}</version>
</dependency>
</dependencies>
+
+ <profiles>
+ <profile>
+ <id>myfaces</id>
+ <dependencies>
+ <dependency>
+ <artifactId>richfaces-ui</artifactId>
+ <groupId>org.richfaces.ui</groupId>
+ <version>${rfVersion}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <artifactId>richfaces-impl</artifactId>
+ <groupId>org.richfaces.framework</groupId>
+ <version>${rfVersion}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <artifactId>richfaces-api</artifactId>
+ <groupId>org.richfaces.framework</groupId>
+ <version>${rfVersion}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
18 years, 8 months
JBoss Rich Faces SVN: r2804 - trunk/samples.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-09-06 19:55:57 -0400 (Thu, 06 Sep 2007)
New Revision: 2804
Modified:
trunk/samples/pom.xml
Log:
Jetty upgraded to 6.1.5
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-09-06 22:29:17 UTC (rev 2803)
+++ trunk/samples/pom.xml 2007-09-06 23:55:57 UTC (rev 2804)
@@ -23,7 +23,7 @@
<artifactId>maven-jetty-plugin</artifactId>
<!--
-->
- <version>6.1.3</version>
+ <version>6.1.5</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<connectors>
18 years, 8 months
JBoss Rich Faces SVN: r2802 - in trunk/test-applications/facelets/src/main: java/tabPanel and 30 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-09-06 14:30:12 -0400 (Thu, 06 Sep 2007)
New Revision: 2802
Added:
trunk/test-applications/facelets/src/main/webapp/pages/Div.xhtml
trunk/test-applications/facelets/src/main/webapp/pages/Test.xhtml
Removed:
trunk/test-applications/facelets/src/main/webapp/Div/
Modified:
trunk/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java
trunk/test-applications/facelets/src/main/java/tabPanel/TabPanel.java
trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml
trunk/test-applications/facelets/src/main/webapp/DradAndDrop/DragAndDrop.xhtml
trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml
trunk/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml
trunk/test-applications/facelets/src/main/webapp/Gmap/Gmap.xhtml
trunk/test-applications/facelets/src/main/webapp/Insert/Insert.xhtml
trunk/test-applications/facelets/src/main/webapp/Message/Message.xhtml
trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
trunk/test-applications/facelets/src/main/webapp/Paint2D/Paint2D.xhtml
trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml
trunk/test-applications/facelets/src/main/webapp/Panel/panel2.xhtml
trunk/test-applications/facelets/src/main/webapp/PanelBar/PanelBar.xhtml
trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml
trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml
trunk/test-applications/facelets/src/main/webapp/Separator/Separator.xhtml
trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml
trunk/test-applications/facelets/src/main/webapp/Spacer/Spacer.xhtml
trunk/test-applications/facelets/src/main/webapp/SuggestionBox/SuggestionBox.xhtml
trunk/test-applications/facelets/src/main/webapp/TabPanel/TabPanel.xhtml
trunk/test-applications/facelets/src/main/webapp/TogglePanel/TogglePanel.xhtml
trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBar.xhtml
trunk/test-applications/facelets/src/main/webapp/Tooltip/Tooltip.xhtml
trunk/test-applications/facelets/src/main/webapp/Tree/Tree.xhtml
trunk/test-applications/facelets/src/main/webapp/VirtualEarth/VirtualEarth.xhtml
trunk/test-applications/facelets/src/main/webapp/WEB-INF/
trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/facelets/src/main/webapp/inputNumberSlider/inputNumberSlider.xhtml
trunk/test-applications/facelets/src/main/webapp/inputNumberSpinner/inputNumberSpinner.xhtml
trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml
trunk/test-applications/facelets/src/main/webapp/styles/styles.css
Log:
Modified: trunk/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/java/scrollableDataTable/ScrollableDataTable.java 2007-09-06 18:30:12 UTC (rev 2802)
@@ -9,14 +9,15 @@
{
private ArrayList<Data> data;
private String [] priority = {"blocker", "critical", "major", "minor", "trivial"};
- private String [] priorityIcon = {"priority_blocker.gif", "priority_critical.gif", "priority_major.gif", "priority_minor.gif", "priority_trivial.gif"};
+ private String [] priorityIcon = {"/pics/sdt/priority_blocker.gif", "/pics/sdt/priority_critical.gif", "/pics/sdt/priority_major.gif", "/pics/sdt/priority_minor.gif", "/pics/sdt/priority_trivial.gif"};
public ScrollableDataTable() {
data = new ArrayList<Data>();
-
+ int k;
for(int i = 0; i < 10000; i++) {
- data.add(new Data("Bug " + new Random().nextInt(10 + i), i,priority[new Random().nextInt(5)], "fds"));
+ k = new Random().nextInt(5);
+ data.add(new Data("Bug " + new Random().nextInt(10 + i), i,priority[k], priorityIcon[k]));
}
}
Modified: trunk/test-applications/facelets/src/main/java/tabPanel/TabPanel.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/tabPanel/TabPanel.java 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/java/tabPanel/TabPanel.java 2007-09-06 18:30:12 UTC (rev 2802)
@@ -17,6 +17,7 @@
private String inactiveTabStyle;
private String contentStyle;
private String BtnLabel="ON";
+ private boolean immediate;
private boolean rendered;
@@ -37,6 +38,7 @@
inactiveTabStyle=null;
contentStyle=null;
+ immediate = false;
rendered=true;
disabledTab=false;
@@ -185,5 +187,13 @@
public void setBtnLabel(String btnLabel) {
BtnLabel = btnLabel;
}
+
+ public boolean isImmediate() {
+ return immediate;
+ }
+
+ public void setImmediate(boolean immediate) {
+ this.immediate = immediate;
+ }
}
Modified: trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,14 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:a4j="http://richfaces.org/a4j"
+<h:form xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich">
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html">
-<f:view>
- <head>
- <title></title>
- <style type="text/css">
+ <style type="text/css">
.smallText {
font-size: xx-small;
}
@@ -21,114 +16,116 @@
background-color: #0087FF;
}
</style>
- </head>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
- <body>
- <a4j:outputPanel ajaxRendered="true">
- <h:messages showDetail="true" showSummary="true"/>
- </a4j:outputPanel>
- <h:form>
- <br />
- <br />
- <rich:calendar
- id="calendar"
- dataModel="#{calendarDataModel}"
- locale="#{calendarBean.locale}"
- popup="#{calendarBean.popup}"
- datePattern="#{calendarBean.pattern}"
- weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
- value="#{calendarBean.selectedDate}"
- currentDate="#{calendarBean.currentDate}"
- jointPoint="#{calendarBean.jointPoint}"
- direction="#{calendarBean.direction}"
- buttonLabel="PopUp"
- enableManualInput="#{calendarBean.enableManualInput}"
- showInput="#{calendarBean.showInput}"
- boundaryDatesMode="#{calendarBean.boundary}">
- <f:facet name="optionalHeader">
- <h:outputText value="optionalHeader Facet" />
- </f:facet>
- <f:facet name="optionalFooter">
- <h:outputText value="optionalFooter Facet" />
- </f:facet>
- <f:validator validatorId="org.richfaces.CalendarValidator" />
-
- <h:panelGrid columns="2">
- <f:verbatim><span style="padding: 2px;" >{day}</span></f:verbatim>
-
- </h:panelGrid>
- </rich:calendar>
-
- <h:panelGrid columns="2">
- <h:outputText value="Select Locale:" />
- <h:selectOneRadio onchange="submit()" value="en/US" valueChangeListener="#{calendarBean.selectLocale}">
- <f:selectItem itemLabel="US" itemValue="en/US"/>
- <f:selectItem itemLabel="DE" itemValue="de/DE"/>
- <f:selectItem itemLabel="FR" itemValue="fr/FR"/>
- <f:selectItem itemLabel="RU" itemValue="ru/RU"/>
- </h:selectOneRadio>
- <h:outputText value="Popup Mode:" />
- <h:selectBooleanCheckbox value="#{calendarBean.popup}" onclick="submit()"/>
- <h:outputText value="Custom day labels:" />
- <h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}" onclick="submit()"/>
- <h:outputText value="Select Date Pattern:"/>
- <h:selectOneMenu value="MMM d, yyyy" onchange="submit()" valueChangeListener="#{calendarBean.selectPattern}">
- <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy"/>
- <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy"/>
- <f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y"/>
- <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy"/>
- </h:selectOneMenu>
- <h:inputText id="selectdate"/><h:commandButton type="button" value="Select Date" onclick="$(this.form.id+':calendar').component.selectDate(this.form[this.form.id+':selectdate'].value);"/>
- <h:outputText value="Select Popup Joint Point:" />
- <h:selectOneRadio onchange="submit()" value="#{calendarBean.jointPoint}" valueChangeListener="#{calendarBean.selectJointPoint}">
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right"/>
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left"/>
- <f:selectItem itemLabel="top-right" itemValue="top-right"/>
- <f:selectItem itemLabel="top-left" itemValue="top-left"/>
- </h:selectOneRadio>
- <h:outputText value="Select Popup Direction:" />
- <h:selectOneRadio onchange="submit()" value="#{calendarBean.direction}" valueChangeListener="#{calendarBean.selectDirection}">
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right"/>
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left"/>
- <f:selectItem itemLabel="top-right" itemValue="top-right"/>
- <f:selectItem itemLabel="top-left" itemValue="top-left"/>
- <f:selectItem itemLabel="auto" itemValue="auto"/>
- </h:selectOneRadio>
- <h:outputText value="BoundaryDatesMode:" />
- <h:selectOneRadio onclick="submit()" value="#{calendarBean.boundary}">
- <f:selectItem itemLabel="inactive" itemValue="inactive"/>
- <f:selectItem itemLabel="select" itemValue="select"/>
- <f:selectItem itemLabel="scroll" itemValue="scroll"/>
- </h:selectOneRadio>
- <h:outputText value="EnableManualInput:"></h:outputText>
- <h:selectBooleanCheckbox value="#{calendarBean.enableManualInput}"
- onclick="submit()">
- </h:selectBooleanCheckbox>
- <h:outputText value="ShowInput:"></h:outputText>
- <h:selectBooleanCheckbox value="#{calendarBean.showInput}"
- onclick="submit()">
- </h:selectBooleanCheckbox>
-
-
+ <rich:calendar id="calendar" dataModel="#{calendarDataModel}"
+ locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
+ datePattern="#{calendarBean.pattern}"
+ weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
+ value="#{calendarBean.selectedDate}"
+ currentDate="#{calendarBean.currentDate}"
+ jointPoint="#{calendarBean.jointPoint}"
+ direction="#{calendarBean.direction}" buttonLabel="PopUp"
+ enableManualInput="#{calendarBean.enableManualInput}"
+ showInput="#{calendarBean.showInput}"
+ boundaryDatesMode="#{calendarBean.boundary}">
+ <f:facet name="optionalHeader">
+ <h:outputText value="optionalHeader Facet" />
+ </f:facet>
+ <f:facet name="optionalFooter">
+ <h:outputText value="optionalFooter Facet" />
+ </f:facet>
+ <f:validator validatorId="org.richfaces.CalendarValidator" />
- </h:panelGrid>
-
- <h:outputText value="Current date: "/>
- <h:outputText value="#{calendarBean.currentDateAsText}" />
- <f:verbatim><br /></f:verbatim>
- <h:outputText value="Selected date: "/>
- <h:outputText value="#{calendarBean.selectedDate}" />
- <f:verbatim><br /></f:verbatim>
-
- <h:commandButton value="Submit"/>
-
-
-
- </h:form>
+ <h:panelGrid columns="2">
+ <f:verbatim>
+ <span style="padding: 2px;">{day}</span>
+ </f:verbatim>
- <h:form>
+ </h:panelGrid>
+ </rich:calendar>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Select Locale:" />
+ <h:selectOneRadio onchange="submit()" value="en/US"
+ valueChangeListener="#{calendarBean.selectLocale}">
+ <f:selectItem itemLabel="US" itemValue="en/US" />
+ <f:selectItem itemLabel="DE" itemValue="de/DE" />
+ <f:selectItem itemLabel="FR" itemValue="fr/FR" />
+ <f:selectItem itemLabel="RU" itemValue="ru/RU" />
+ </h:selectOneRadio>
+ <h:outputText value="Popup Mode:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.popup}"
+ onclick="submit()" />
+ <h:outputText value="Custom day labels:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}"
+ onclick="submit()" />
+ <h:outputText value="Select Date Pattern:" />
+ <h:selectOneMenu value="MMM d, yyyy" onchange="submit()"
+ valueChangeListener="#{calendarBean.selectPattern}">
+ <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy" />
+ <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy" />
+ <f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y" />
+ <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy" />
+ </h:selectOneMenu>
+ <h:inputText id="selectdate" />
+ <h:commandButton type="button" value="Select Date"
+ onclick="$(this.form.id+':calendar').component.selectDate(this.form[this.form.id+':selectdate'].value);" />
+ <h:outputText value="Select Popup Joint Point:" />
+ <h:selectOneRadio onchange="submit()"
+ value="#{calendarBean.jointPoint}"
+ valueChangeListener="#{calendarBean.selectJointPoint}">
+ <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
+ <f:selectItem itemLabel="top-right" itemValue="top-right" />
+ <f:selectItem itemLabel="top-left" itemValue="top-left" />
+ </h:selectOneRadio>
+ <h:outputText value="Select Popup Direction:" />
+ <h:selectOneRadio onchange="submit()"
+ value="#{calendarBean.direction}"
+ valueChangeListener="#{calendarBean.selectDirection}">
+ <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
+ <f:selectItem itemLabel="top-right" itemValue="top-right" />
+ <f:selectItem itemLabel="top-left" itemValue="top-left" />
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ </h:selectOneRadio>
+ <h:outputText value="BoundaryDatesMode:" />
+ <h:selectOneRadio onclick="submit()" value="#{calendarBean.boundary}">
+ <f:selectItem itemLabel="inactive" itemValue="inactive" />
+ <f:selectItem itemLabel="select" itemValue="select" />
+ <f:selectItem itemLabel="scroll" itemValue="scroll" />
+ </h:selectOneRadio>
+ <h:outputText value="EnableManualInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.enableManualInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+ <h:outputText value="ShowInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.showInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+
+
+
+ </h:panelGrid>
+
+ <h:outputText value="Current date: " />
+ <h:outputText value="#{calendarBean.currentDateAsText}" />
+ <f:verbatim>
+ <br />
+ </f:verbatim>
+ <h:outputText value="Selected date: " />
+ <h:outputText value="#{calendarBean.selectedDate}" />
+ <f:verbatim>
+ <br />
+ </f:verbatim>
+
+ <h:commandButton value="Submit" />
+ <f:verbatim>
+ <br />
+ </f:verbatim>
<h:commandLink value="Back" action="main"></h:commandLink>
- </h:form>
- </body>
-</f:view>
-</html>
+</h:form>
+
Modified: trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/DataFilterSlider/DataFilterSlider.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,12 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
+ <a4j:form id="form1" reRender="list-body" ajaxSubmit="true"
+ ignoreDupResponses="true" requestDelay="100"
+ xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- <title></title>
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
<style type="text/css">
body{
@@ -49,16 +47,8 @@
.list-table2{
border:1px solid #bed6f8;
}
-
-
-
</style>
-
- </head>
- <body>
- <a4j:form id="form1" reRender="list-body" ajaxSubmit="true"
- ignoreDupResponses="true" requestDelay="100">
-
+
<a4j:region id="stat1">
<a4j:outputPanel id="slider-body">
@@ -131,10 +121,5 @@
</h:dataTable>
</a4j:outputPanel>
</a4j:region>
+ <h:commandLink value="Back" action="main"></h:commandLink>
</a4j:form>
- <h:form>
- <h:commandLink value="Back" action="main"></h:commandLink>
- </h:form>
- </body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/DradAndDrop/DragAndDrop.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DradAndDrop/DragAndDrop.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/DradAndDrop/DragAndDrop.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,13 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form id="form"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html">
-<f:view>
- <head>
- <title></title>
- <style type="text/css">
+ <style type="text/css">
.dropzoneDecoration {
width: 70px; height: 70px; border: 2px dotted navy;
}
@@ -22,13 +18,6 @@
padding: 10px;
}
</style>
- </head>
- <body>
- <h:form id="form">
- <rich:panel>
- <h:selectOneRadio binding="#{skinBean.component}" />
- <h:commandLink action="#{skinBean.change}" value="set skin" />
- </rich:panel>
<h:panelGroup id="dragValueText">
<h:outputText value="#{dndBean.dragValue}" />
@@ -199,6 +188,4 @@
<h:messages />
</a4j:outputPanel>
</h:form>
- </body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/DropDownMenu/DDMenu.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,21 +1,15 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jsp/jstl/core">
-<f:view>
- <head>
<style>
.mousemove {
border: 3px dotted green;
padding: 5px;
}
</style>
- </head>
- <body>
- <h:form>
<h:panelGrid columns="3">
<h:panelGrid columns="2">
<h:outputText value="HideDelay (ms):" />
@@ -163,6 +157,4 @@
<a4j:log></a4j:log>
</h:form>
- </body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Effect/Effect.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,15 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
+ <h:form xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
- xmlns:a4j="http://richfaces.org/a4j">
-
-<f:view contentType="text/html">
-
- <body onload="hideFrm1(),hideFrm2(),hideFrm3(),hideFrm4(),hideFrm5()">
- <h:messages />
- <h:form id="indexID">
+ xmlns:a4j="http://richfaces.org/a4j" onsubmit="hideFrm1(),hideFrm2(),hideFrm3(),hideFrm4(),hideFrm5()">
+ <rich:panel id="indexID">
<h:outputText value="Menu:" />
<h:panelGrid columns="2">
<h:outputText value="1." />
@@ -42,9 +35,9 @@
Components.</font></span>
</f:verbatim>
</h:panelGrid>
- </h:form>
+ </rich:panel>
- <h:form id="frm1">
+ <rich:panel id="frm1">
<h:outputText value="JSF Components:" />
<h:panelGrid id="panGrID" columns="2">
@@ -109,9 +102,9 @@
<br />
<span onclick="hideFrm1(),showIndexID()"><font color="blue">Close</font></span>
</f:verbatim>
- </h:form>
+ </rich:panel>
- <h:form id="frm2">
+ <rich:panel id="frm2">
<h:outputText
value="JSF Component with Event and non-jsf target (onclick, onmouseout)" />
@@ -138,9 +131,9 @@
<br />
<span onclick="hideFrm2(),showIndexID()"><font color="blue">Close</font></span>
</f:verbatim>
- </h:form>
+ </rich:panel>
- <h:form id="frm3">
+ <rich:panel id="frm3">
<h:outputText
value="JSF Component with Event and jsf target (onclick, onmouseout)" />
@@ -164,9 +157,9 @@
<br />
<span onclick="hideFrm3(),showIndexID()"><font color="blue">Close</font></span>
</f:verbatim>
- </h:form>
+ </rich:panel>
- <h:form id="frm4">
+ <rich:panel id="frm4">
<h:outputText value="1. (Event 2)" />
<h:graphicImage id="img_1_ID" value="/pics/asus.jpg" width="200px"
height="150px" />
@@ -196,10 +189,10 @@
<br />
<span onclick="hideFrm4(),showIndexID()"><font color="blue">Close</font></span>
</f:verbatim>
- </h:form>
+ </rich:panel>
- <h:form id="frm5">
- <h:panelGrid id="panGrID" columns="2">
+ <rich:panel id="frm5">
+ <h:panelGrid id="panelGrdID" columns="2">
<f:verbatim>
<span onclick="hideRichPanel()"><font color="blue">Hide
Panel</font> </span>
@@ -271,7 +264,7 @@
<br />
<span onclick="hideFrm5(),showIndexID()"><font color="blue">Close</font></span>
</f:verbatim>
- </h:form>
+ </rich:panel>
<rich:effect for="indexID" name="hideIndexID" type="SlideUp" />
@@ -295,10 +288,8 @@
<rich:effect for="backFrmID" name="hideBackFrm" type="Fade" />
<rich:effect for="backFrmID" name="showBackFrm" type="Appear" />
- <h:form id="backFrmID">
+ <rich:panel id="backFrmID">
<h:commandLink value="Back" action="main"></h:commandLink>
-
- </h:form>
- </body>
-</f:view>
-</html>
+ </rich:panel>
+</h:form>
+
Modified: trunk/test-applications/facelets/src/main/webapp/Gmap/Gmap.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Gmap/Gmap.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Gmap/Gmap.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,16 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
-
-<f:view contentType="text/html">
-
- <body>
- <h:form>
<rich:gmap id="gm" lat="37.97" zoom="#{gmap.zoom}" gmapVar="map"
gmapKey="ABQIAAAAxU6W9QEhFLMNdc3ATIu-VxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRkrpOGzxH8_ud3inE9pG1845-FCA"
style="width:500px;height:400px"
@@ -110,6 +104,3 @@
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/Insert/Insert.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Insert/Insert.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Insert/Insert.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,14 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- </head>
- <body>
- <h:form>
<h:messages />
<rich:panel id="panelID" header="Highlight: #{insert.highlight}; File: #{insert.src}">
@@ -49,7 +43,4 @@
<h:selectBooleanCheckbox value="#{insert.rendered}" onchange="submit();"/>
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
- </h:form>
- </body>
-</f:view>
-</html>
\ No newline at end of file
+ </h:form>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/Message/Message.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Message/Message.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Message/Message.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,15 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- <link rel="stylesheet" type="text/css" href="/styles/app.css" />
- </head>
- <body>
- <h:form>
<rich:panel>
<h:panelGrid columns="2">
<h:outputText value="1." />
@@ -165,11 +158,8 @@
</h:outputText>
</rich:messages>
</rich:panel>
- </h:form>
- <h:form>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
-
Modified: trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,17 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form id="MPform"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- <link rel="stylesheet"
- href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
- type="text/css" />
- </head>
- <body>
- <h:form id="MPform">
<rich:modalPanel id="MPid" minHeight="#{modalPanel.minHeight}"
minWidth="#{modalPanel.minWidth}" height="#{modalPanel.height}"
width="#{modalPanel.width}" moveable="#{modalPanel.moveable}"
@@ -72,6 +63,4 @@
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
-</body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/Paint2D/Paint2D.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Paint2D/Paint2D.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Paint2D/Paint2D.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -4,7 +4,6 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
<head>
<link rel="stylesheet"
href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
@@ -99,5 +98,5 @@
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
</body>
-</f:view>
+
</html>
Modified: trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,16 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core">
-<f:view>
- <head>
- </head>
- <body>
- <h:form>
- <h:messages></h:messages>
<h:outputText
value="Panel 1, rendered: #{!panel.rendered}; Panel 2, rendered #{panel.rendered};"></h:outputText>
@@ -18,7 +11,7 @@
<rich:panel rendered="#{!panel.rendered}" id="p1"
style="width:#{panel.width};height:#{panel.height};overflow:auto;">
<f:facet name="header">
- <h:outputText id="t1" value="#{panel.title[0]} (Panel 1)" />
+ <h:outputText id="t1" value="#{panel.title[0]} (Panel 1)" />
</f:facet>
<rich:panel>
@@ -76,6 +69,5 @@
<br />
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
+
+
Modified: trunk/test-applications/facelets/src/main/webapp/Panel/panel2.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Panel/panel2.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Panel/panel2.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,14 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
-
-<f:view>
- <head>
- <style>
+ <style>
.panel {
vertical-align:top;
}
@@ -52,9 +48,6 @@
}
</style>
- </head>
- <body>
- <h:form>
<h:panelGrid columnClasses="panel" border="0" columns="3">
<rich:panel styleClass="top">
<f:facet name="header">
@@ -143,10 +136,9 @@
<h:outputText value="inside the form" />
</h:form>
</rich:panel>
- </h:form>
- <h:form>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
<h:commandLink value="Back to Panel" action="BackP"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/PanelBar/PanelBar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/PanelBar/PanelBar.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/PanelBar/PanelBar.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,18 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- <link rel="stylesheet"
- href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
- type="text/css" />
- </head>
-
- <body>
- <h:form>
<h:messages></h:messages>
<rich:panelBar id="pBId" height="#{panelBar.height}"
@@ -78,6 +68,3 @@
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,29 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich">
-
-
-<head>
-<style>
- .sPanel
- {
- background: gray;
- }
- .body
- {
- background-color: pink;
- border: green 3px solid;
- background: gray;
- }
- </style>
-</head>
-
-<body>
-<f:view>
- <h:form>
<rich:panelMenu id="panelMenuID" disabled="#{panelMenu.disabled}"
width="#{panelMenu.width}" selectedChild="thisChild"
expandSingle="#{panelMenu.expandSingle}" mode="#{panelMenu.mode}"
@@ -560,6 +539,3 @@
</f:verbatim>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
-</f:view>
-</body>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTable.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,13 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head></head>
- <body>
- <h:form>
<rich:scrollableDataTable var="sdt" value="#{scrollableDT.data}" rows="30" width="400px">
<rich:column width="100px" sortable="false">
@@ -38,7 +33,4 @@
<h:outputText value="#{sdt.data3}" />
</rich:column>
</rich:scrollableDataTable>
- </h:form>
- </body>
-</f:view>
-</html>
\ No newline at end of file
+ </h:form>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/Separator/Separator.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Separator/Separator.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Separator/Separator.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,19 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:rich="http://richfaces.org/rich"
xmlns:scriptfree="http://jakarta.apache.org/taglibs/standard/scriptfree"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core">
-<f:view>
- <head>
- <link rel="stylesheet"
- href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
- type="text/css" />
- </head>
- <body>
- <h:form>
<h:messages></h:messages>
<h:outputText value="Event:"></h:outputText>
<rich:separator height="20px" width="300px"
@@ -71,8 +62,4 @@
value="#{separator.btnLabel}" />
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
-
</h:form>
- </body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/SimpleTogglePanel/SimpleTogglePanel.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,11 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
<style type="text/css">
.head
{
@@ -16,11 +13,6 @@
background-color: pink;
}
</style>
- </head>
- <body>
- <h:messages></h:messages>
- <h:form>
-
<rich:simpleTogglePanel id="sTP" bodyClass="body" headerClass="head"
label="simpleTogglePanel with some text"
width="#{simpleTogglePanel.width}"
@@ -107,6 +99,4 @@
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/Spacer/Spacer.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Spacer/Spacer.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Spacer/Spacer.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,12 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:sql="http://java.sun.com/jsp/jstl/sql">
-<f:view>
- <head>
<style type="text/css">
.text
{
@@ -17,11 +14,6 @@
background-color: aqua;
}
</style>
- </head>
- <body>
-
- <h:messages></h:messages>
- <h:form>
<h:outputText value="Event:"></h:outputText>
<rich:spacer id="spacerIdEven" rendered="#{spacer.rendered}"
style="border: 3px solid red; background: blue;"
@@ -62,6 +54,3 @@
</f:verbatim>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/SuggestionBox/SuggestionBox.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/SuggestionBox/SuggestionBox.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/SuggestionBox/SuggestionBox.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,16 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form id="suggestionbox_form"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- <title></title>
- </head>
-
- <body>
- <h:form id="suggestionbox_form">
<f:verbatim>Suggestion Box will suggest you Town's names if it's started with the "a" or "A" letter
<br />
</f:verbatim>
@@ -132,7 +124,3 @@
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
-
- </body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/TabPanel/TabPanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/TabPanel/TabPanel.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/TabPanel/TabPanel.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,15 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+<h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jsp/jstl/core">
-<f:view>
-<head>
-<link rel="stylesheet"
- href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
- type="text/css" />
+
<style type="text/css">
.text
{
@@ -20,13 +15,8 @@
border: thick;
background-color: green
}
-
</style>
-</head>
-<body>
-<h:form>
- <h:messages></h:messages>
-
+
<rich:tabPanel id="tabPanelId"
headerAlignment="#{tabPanel.headerAlignment}"
width="#{tabPanel.width}" height="#{tabPanel.height}"
@@ -132,6 +122,3 @@
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
-</body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/TogglePanel/TogglePanel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/TogglePanel/TogglePanel.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/TogglePanel/TogglePanel.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,17 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+
+ <h:form id="tooggleTest"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets">
-<f:view>
- <head></head>
-
- <body>
- <h:form id="tooggleTest">
- <h:messages></h:messages>
-
<rich:togglePanel id="panel1" switchType="#{togglePanel.switchType}"
initialState="asus" stateOrder="asus,blank"
style="width:300px!important">
@@ -170,9 +163,10 @@
</rich:panel>
</f:facet>
</rich:togglePanel>
-
- <br />
- <br />
+ <f:verbatim>
+ <br />
+ <br />
+ </f:verbatim>
<rich:separator height="5px" width="500px" />
<h:panelGrid columns="2" cellpadding="5px" cellspacing="5px">
@@ -204,6 +198,4 @@
<h:commandLink value="Back" action="main"></h:commandLink>
<ui:debug hotkey="L"></ui:debug>
</h:form>
- </body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBar.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/ToolBar/ToolBar.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,17 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- <link rel="stylesheet"
- href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
- type="text/css "></link>
- </head>
- <body>
- <h:form>
<h:messages></h:messages>
<rich:toolBar id="toolBarId" width="#{toolBar.width}"
@@ -67,6 +58,3 @@
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/Tooltip/Tooltip.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Tooltip/Tooltip.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Tooltip/Tooltip.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,14 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- </head>
- <body>
- <h:form>
<h:messages></h:messages>
<h:outputText value="DEFAULT VALUE:"></h:outputText>
@@ -141,10 +135,9 @@
<!-- h:inputText value="ddd"
onclick="toolTipAttach();alert(document.getElementById('lkjl'))" /-->
- </h:form>
- <h:form>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/Tree/Tree.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Tree/Tree.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/Tree/Tree.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,17 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:dnd="http://richfaces.ajax4jsf.org/drag-drop">
-<f:view>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
- <title>Tree</title>
- </head>
- <body>
- <h:form>
<a4j:outputPanel ajaxRendered="true">
<h:messages />
</a4j:outputPanel>
@@ -128,6 +120,3 @@
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
Modified: trunk/test-applications/facelets/src/main/webapp/VirtualEarth/VirtualEarth.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/VirtualEarth/VirtualEarth.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/VirtualEarth/VirtualEarth.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,14 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
-<f:view contentType="text/html">
- <body>
- <h:form>
<h:panelGrid columns="2">
<rich:virtualEarth style="width:800px;" id="gm" lat="37.97"
dashboardSize="Normal" zoom="#{virtualEarth.zoom}" mapStyle="Hybrid"
@@ -76,11 +72,8 @@
}
</script>
</a4j:outputPanel>
- </h:form>
- <h:form>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
- </f:view>
-</html>
-
Property changes on: trunk/test-applications/facelets/src/main/webapp/WEB-INF
___________________________________________________________________
Name: svn:ignore
- classes
lib
+ classes
lib
*.jsfdia
Modified: trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config.xml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/faces-config.xml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -5,6 +5,10 @@
<navigation-rule>
<from-view-id>/pages/main.xhtml</from-view-id>
<navigation-case>
+ <from-outcome>TestDiv</from-outcome>
+ <to-view-id>/pages/Div.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
<from-outcome>Spinner</from-outcome>
<to-view-id>/inputNumberSpinner/inputNumberSpinner.xhtml</to-view-id>
</navigation-case>
@@ -109,13 +113,13 @@
<to-view-id>/Insert/Insert.xhtml</to-view-id>
</navigation-case>
<navigation-case>
- <from-outcome>TestDiv</from-outcome>
- <to-view-id>/Div/Div.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
<from-outcome>SDT</from-outcome>
<to-view-id>/ScrollableDataTable/ScrollableDataTable.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>Test</from-outcome>
+ <to-view-id>/pages/Test.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/Panel/Panel.xhtml</from-view-id>
Modified: trunk/test-applications/facelets/src/main/webapp/inputNumberSlider/inputNumberSlider.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/inputNumberSlider/inputNumberSlider.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/inputNumberSlider/inputNumberSlider.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,19 +1,9 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+
+ <h:form
xmlns:a4j="http://richfaces.org/a4j"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich">
-<f:view>
- <head>
- <link rel="stylesheet"
- href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
- type="text/css" />
-
- </head>
- <body>
- <h:messages></h:messages>
- <h:form>
<h:outputText value="Event:"></h:outputText>
<rich:inputNumberSlider minValue="0" maxValue="100" width="300px"
onmousedown="alert('OnMouseDown');"></rich:inputNumberSlider>
@@ -105,10 +95,9 @@
</a4j:commandButton>
</h:panelGrid>
- </h:form>
- <h:form>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
<h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
- </body>
-</f:view>
-</html>
+
Modified: trunk/test-applications/facelets/src/main/webapp/inputNumberSpinner/inputNumberSpinner.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/inputNumberSpinner/inputNumberSpinner.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/inputNumberSpinner/inputNumberSpinner.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,20 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
+ <h:form
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:scriptfree="http://jakarta.apache.org/taglibs/standard/scriptfree">
-<f:view>
- <head>
- <title></title>
- <link rel="stylesheet"
- href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
- type="text/css "></link>
- </head>
- <body>
- <h:form>
<h:messages></h:messages>
<h:outputText value="Event:"></h:outputText>
<rich:inputNumberSpinner minValue="0" maxValue="10"
@@ -88,7 +78,4 @@
value="#{inputNumberSpinner.btnLabel}" />
</h:panelGrid>
<h:commandLink value="Back" action="main"></h:commandLink>
- </h:form>
- </body>
-</f:view>
-</html>
+ </h:form>
\ No newline at end of file
Copied: trunk/test-applications/facelets/src/main/webapp/pages/Div.xhtml (from rev 2700, trunk/test-applications/facelets/src/main/webapp/Div/Div.xhtml)
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Div.xhtml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Div.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view>
+ <head>
+ <title></title>
+ <link rel="stylesheet"
+ href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
+ type="text/css" />
+ </head>
+ <body>
+ <div id="div_1_ID" style="position: relative; left:${divBean.left[0]}; top:${divBean.top[0]}; z-index:1;">
+ <div id="div_2_ID" style="position: absolute; left:${divBean.left[1]}; top:${divBean.top[1]};">
+ <ui:include src="${divBean.src}" />
+ </div>
+ </div>
+
+ <h:form id="forvDivOpthID" style="z-index:5">
+ <div id="divOpthID" style="position:relative" align="right">
+ <h:panelGrid columns="2">
+ <h:outputText value="Select component:" />
+ <h:selectOneMenu value="#{divBean.src}">
+ <f:selectItem itemValue="/Calendar/Calendar.xhtml" itemLabel="Calendar" />
+ <f:selectItem itemValue="/DataFilterSlider/DataFilterSlider.xhtml" itemLabel="Data Filter Slider" />
+ <f:selectItem itemValue="/DataScroller/DS.xhtml" itemLabel="Date Scroller" />
+ <f:selectItem itemValue="/DradAndDrop/DragAndDrop.xhtml" itemLabel="Drag And Drop" />
+ <f:selectItem itemValue="/DropDownMenu/DDMenu.xhtml" itemLabel="Drop Down Menu" />
+ <f:selectItem itemValue="/Effect/Effect.xhtml" itemLabel="Effect" />
+ <f:selectItem itemValue="/Gmap/Gmap.xhtml" itemLabel="Gmap" />
+ <f:selectItem itemValue="/inputNumberSlider/inputNumberSlider.xhtml" itemLabel="Input Number Slider" />
+ <f:selectItem itemValue="/inputNumberSpinner/inputNumberSpinner.xhtml" itemLabel="Input Number Spinner" />
+ <f:selectItem itemValue="/Insert/Insert.xhtml" itemLabel="Insert" />
+ <f:selectItem itemValue="/Message/Message.xhtml" itemLabel="Message" />
+ <f:selectItem itemValue="/ModalPanel/ModalPanel.xhtml" itemLabel="Modal Panel" />
+ <f:selectItem itemValue="/Paint2D/Paint2D.xhtml" itemLabel="Paint2D" />
+ <f:selectItem itemValue="/Panel/Panel.xhtml" itemLabel="Panel" />
+ <f:selectItem itemValue="/Panel/panel2.xhtml" itemLabel="Panel2" />
+ <f:selectItem itemValue="/PanelBar/PanelBar.xhtml" itemLabel="Panel Bar" />
+ <f:selectItem itemValue="/PanelMenu/PanelMenu.xhtml" itemLabel="Panel Menu" />
+ <f:selectItem itemValue="/Separator/Separator.xhtml" itemLabel="Separator" />
+ <f:selectItem itemValue="/SimpleTogglePanel/SimpleTogglePanel.xhtml" itemLabel="Simple Toggle Panel" />
+ <f:selectItem itemValue="/Spacer/Spacer.xhtml" itemLabel="Spacer" />
+ <f:selectItem itemValue="/SuggestionBox/SuggestionBox.xhtml" itemLabel="Suggestion Box" />
+ <f:selectItem itemValue="/TabPanel/TabPanel.xhtml" itemLabel="Tab Panel" />
+ <f:selectItem itemValue="/TogglePanel/TogglePanel.xhtml" itemLabel="Toggle Panel" />
+ <f:selectItem itemValue="/ToolBar/ToolBar.xhtml" itemLabel="Tool Bar" />
+ <f:selectItem itemValue="/Tooltip/Tooltip.xhtml" itemLabel="Tooltip" />
+ <f:selectItem itemValue="/Tree/Tree.xhtml" itemLabel="Tree" />
+ <f:selectItem itemValue="/VirtualEarth/VirtualEarth.xhtml" itemLabel="Virtual Earth" />
+ </h:selectOneMenu>
+
+ <h:commandLink value="Submit" action="submit();"></h:commandLink>
+ <f:verbatim></f:verbatim>
+
+ <h:outputText value="div 1 left:" />
+ <h:inputText value="#{divBean.left[0]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="div 1 top:" />
+ <h:inputText value="#{divBean.top[0]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="div 2 left:" />
+ <h:inputText value="#{divBean.left[1]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+
+
+ <h:outputText value="div 2 top:" />
+ <h:inputText value="#{divBean.top[1]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+ </h:panelGrid>
+ <h:commandLink value="Back" action="main"></h:commandLink>
+ </div>
+ </h:form>
+ </body>
+</f:view>
+</html>
\ No newline at end of file
Added: trunk/test-applications/facelets/src/main/webapp/pages/Test.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/Test.xhtml (rev 0)
+++ trunk/test-applications/facelets/src/main/webapp/pages/Test.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+<f:view>
+ <head>
+ <title></title>
+ <link rel="stylesheet"
+ href="#{facesContext.externalContext.requestContextPath}/styles/styles.css"
+ type="text/css" />
+ </head>
+ <body>
+
+ <ui:include src="${divBean.src}" />
+
+ <h:form id="forvDivOpthID" style="z-index:5">
+ <div id="divOpthID" style="position:relative" align="right">
+ <h:panelGrid columns="2">
+ <h:outputText value="Select component:" />
+ <h:selectOneMenu value="#{divBean.src}">
+ <f:selectItem itemValue="/Calendar/Calendar.xhtml" itemLabel="Calendar" />
+ <f:selectItem itemValue="/DataFilterSlider/DataFilterSlider.xhtml" itemLabel="Data Filter Slider" />
+ <f:selectItem itemValue="/DataScroller/DS.xhtml" itemLabel="Date Scroller" />
+ <f:selectItem itemValue="/DradAndDrop/DragAndDrop.xhtml" itemLabel="Drag And Drop" />
+ <f:selectItem itemValue="/DropDownMenu/DDMenu.xhtml" itemLabel="Drop Down Menu" />
+ <f:selectItem itemValue="/Effect/Effect.xhtml" itemLabel="Effect" />
+ <f:selectItem itemValue="/Gmap/Gmap.xhtml" itemLabel="Gmap" />
+ <f:selectItem itemValue="/inputNumberSlider/inputNumberSlider.xhtml" itemLabel="Input Number Slider" />
+ <f:selectItem itemValue="/inputNumberSpinner/inputNumberSpinner.xhtml" itemLabel="Input Number Spinner" />
+ <f:selectItem itemValue="/Insert/Insert.xhtml" itemLabel="Insert" />
+ <f:selectItem itemValue="/Message/Message.xhtml" itemLabel="Message" />
+ <f:selectItem itemValue="/ModalPanel/ModalPanel.xhtml" itemLabel="Modal Panel" />
+ <f:selectItem itemValue="/Paint2D/Paint2D.xhtml" itemLabel="Paint2D" />
+ <f:selectItem itemValue="/Panel/Panel.xhtml" itemLabel="Panel" />
+ <f:selectItem itemValue="/Panel/panel2.xhtml" itemLabel="Panel2" />
+ <f:selectItem itemValue="/PanelBar/PanelBar.xhtml" itemLabel="Panel Bar" />
+ <f:selectItem itemValue="/PanelMenu/PanelMenu.xhtml" itemLabel="Panel Menu" />
+ <f:selectItem itemValue="/Separator/Separator.xhtml" itemLabel="Separator" />
+ <f:selectItem itemValue="/SimpleTogglePanel/SimpleTogglePanel.xhtml" itemLabel="Simple Toggle Panel" />
+ <f:selectItem itemValue="/Spacer/Spacer.xhtml" itemLabel="Spacer" />
+ <f:selectItem itemValue="/SuggestionBox/SuggestionBox.xhtml" itemLabel="Suggestion Box" />
+ <f:selectItem itemValue="/TabPanel/TabPanel.xhtml" itemLabel="Tab Panel" />
+ <f:selectItem itemValue="/TogglePanel/TogglePanel.xhtml" itemLabel="Toggle Panel" />
+ <f:selectItem itemValue="/ToolBar/ToolBar.xhtml" itemLabel="Tool Bar" />
+ <f:selectItem itemValue="/Tooltip/Tooltip.xhtml" itemLabel="Tooltip" />
+ <f:selectItem itemValue="/Tree/Tree.xhtml" itemLabel="Tree" />
+ <f:selectItem itemValue="/VirtualEarth/VirtualEarth.xhtml" itemLabel="Virtual Earth" />
+ </h:selectOneMenu>
+
+ <h:commandLink value="Submit" action="submit();"></h:commandLink>
+ <f:verbatim></f:verbatim>
+
+ <h:outputText value="div 1 left:" />
+ <h:inputText value="#{divBean.left[0]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="div 1 top:" />
+ <h:inputText value="#{divBean.top[0]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="div 2 left:" />
+ <h:inputText value="#{divBean.left[1]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+
+
+ <h:outputText value="div 2 top:" />
+ <h:inputText value="#{divBean.top[1]}" >
+ <a4j:support event="onchange" action="submit();"></a4j:support>
+ </h:inputText>
+ </h:panelGrid>
+ <h:commandLink value="Back" action="main"></h:commandLink>
+ </div>
+ </h:form>
+ </body>
+</f:view>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/pages/main.xhtml 2007-09-06 18:30:12 UTC (rev 2802)
@@ -19,34 +19,8 @@
style="font-size: 30px"></h:outputText></div>
<rich:panel>
<h:panelGrid columns="2" cellpadding="5px" cellspacing="5px">
- <h:commandLink value="inputNumberSpinner" action="Spinner"></h:commandLink>
- <h:commandLink value="inputNumberSlider" action="Slide"></h:commandLink>
- <h:commandLink value="Panel" action="Panel"></h:commandLink>
- <h:commandLink value="PanelBar" action="PanelBar"></h:commandLink>
- <h:commandLink value="Gmap" action="Gmap"></h:commandLink>
- <h:commandLink value="Virtual Earth" action="VirtualEarth"></h:commandLink>
- <h:commandLink action="Separ" value="Separator"></h:commandLink>
- <h:commandLink value="Spacer" action="Spacer"></h:commandLink>
- <h:commandLink value="SimpleTogglePanel" action="sTP"></h:commandLink>
- <h:commandLink value="TabPanel" action="TabPanel"></h:commandLink>
- <h:commandLink value="SuggestionBox" action="Suggest"></h:commandLink>
- <h:commandLink value="Paint2D" action="Paint"></h:commandLink>
- <h:commandLink value="Tree" action="Tree"></h:commandLink>
- <h:commandLink value="TogglePanel" action="TogglePanel"></h:commandLink>
- <h:commandLink value="ToolBar" action="ToolBar"></h:commandLink>
- <h:commandLink value="Drag and Drop" action="dnd"></h:commandLink>
- <h:commandLink value="Data Scroller" action="DS"></h:commandLink>
- <h:commandLink value="Drop Down Menu" action="DDMenu"></h:commandLink>
- <h:commandLink value="Data Filter Slider" action="DFS"></h:commandLink>
- <h:commandLink value="Panel Menu" action="PanelMenu"></h:commandLink>
- <h:commandLink value="Modal Panel" action="ModalPanel"></h:commandLink>
- <h:commandLink value="Tooltip" action="Tooltip"></h:commandLink>
- <h:commandLink value="Calendar" action="Calendar"></h:commandLink>
- <h:commandLink value="Message" action="Message"></h:commandLink>
- <h:commandLink value="Effect" action="Effect"></h:commandLink>
- <h:commandLink value="Insert" action="Insert"></h:commandLink>
<h:commandLink value="Test Div" action="TestDiv"></h:commandLink>
- <h:commandLink value="ScrollableDataTable" action="SDT"></h:commandLink>
+ <h:commandLink value="Test" action="Test"></h:commandLink>
</h:panelGrid>
</rich:panel>
</h:form>
Modified: trunk/test-applications/facelets/src/main/webapp/styles/styles.css
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/styles/styles.css 2007-09-06 18:16:01 UTC (rev 2801)
+++ trunk/test-applications/facelets/src/main/webapp/styles/styles.css 2007-09-06 18:30:12 UTC (rev 2802)
@@ -1,3 +1,32 @@
+.rich-message-label{
+ padding: 0px 10px;
+}
+
+.rich-messages-label{
+ padding: 0px 10px
+}
+
+.rich-message-marker{
+}
+
+.rich-message{
+}
+
+.errorLabel{
+ color: #FF0000;
+}
+
+.warnLabel{
+ color: #0000FF;
+}
+
+.infoLabel{
+ color: #00FF00;
+}
+
+.fatalLabel{
+ color: #FF1493;
+}
.maintext {
font-size: 30px !important;
}
18 years, 8 months
JBoss Rich Faces SVN: r2801 - in trunk/ui/scrollableDataTable/src: main/java/org/richfaces/renderkit/html and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-09-06 14:16:01 -0400 (Thu, 06 Sep 2007)
New Revision: 2801
Added:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/GridScrollSettings.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/MockColumns.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ColumnWalkerTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/GridScrollSettingsTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableOptionsTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableScrollDataTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SortIconRendererTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/utils/
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/utils/TemplateLoaderTest.java
Removed:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnIterator.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ContextualColumnVisitor.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/response/
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/AbstractScrollableDataTableTestCase.java
Modified:
trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/utils/TemplateLoader.java
Log:
added some unit tests for scrollable data table
Modified: trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml
===================================================================
--- trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-09-06 18:14:06 UTC (rev 2800)
+++ trunk/ui/scrollableDataTable/src/main/config/component/scrollable-data-table.xml 2007-09-06 18:16:01 UTC (rev 2801)
@@ -22,7 +22,7 @@
</description>
<test>
<classname>org.richfaces.component.html.HtmlScrollableDataTableComponentTest</classname>
- <superclassname>org.richfaces.component.html.AbstractScrollableDataTableTestCase</superclassname>
+ <superclassname>org.richfaces.component.AbstractScrollableDataTableTestCase</superclassname>
</test>
<renderer generate="true" override="true">
@@ -35,10 +35,10 @@
<superclass>
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
- <!--test>
+ <test>
<classname>org.richfaces.taglib.ScrollableDataTableTagTest</classname>
<superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
- </test-->
+ </test>
</tag>
<property>
Deleted: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnIterator.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnIterator.java 2007-09-06 18:14:06 UTC (rev 2800)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnIterator.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -1,81 +0,0 @@
-/**
- *
- */
-package org.richfaces.renderkit.html;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.richfaces.component.Column;
-import org.richfaces.component.UIScrollableDataTable;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public class ColumnIterator implements Iterator {
-
-
- public static ColumnIterator frozen(UIScrollableDataTable grid, ScrollableDataTableRendererState state) {
- return new ColumnIterator(0, ScrollableDataTableUtils.getFrozenColumnsCount(grid), grid, state) {
- public Object next() {
- this.state.setFrozenPart(true);
- return super.next();
- }
- };
- }
-
- public static ColumnIterator normal(UIScrollableDataTable grid, ScrollableDataTableRendererState state) {
- return new ColumnIterator(ScrollableDataTableUtils.getFrozenColumnsCount(grid), grid.getChildCount(), grid, state) {
- public Object next() {
- this.state.setFrozenPart(false);
- return super.next();
- }
- };
- }
-
- public static ColumnIterator all(UIScrollableDataTable grid, ScrollableDataTableRendererState state) {
- return new ColumnIterator(0, grid.getChildCount(), grid, state);
- }
-
- ScrollableDataTableRendererState state;
- private int index = 0;
- private int start;
- private int end;
- private List kids;
-
- private ColumnIterator(int start, int end, UIScrollableDataTable grid, ScrollableDataTableRendererState state) {
- this.start = start;
- this.end = end;
- this.state = state;
- this.kids = grid.getChildren();
- rewind();
- }
-
- public boolean hasNext() {
- return index < end;
- }
-
- public Object next() {
- state.setCellIndex(index);
- Object o = kids.get(index);
-
- index++;
-
- return o;
- }
-
- public Column nextColumn() {
- return (Column) next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException("remove");
- }
-
- public void rewind() {
- index = start;
- state.setCellIndex(index);
- }
-
-}
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java 2007-09-06 18:14:06 UTC (rev 2800)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -32,12 +32,6 @@
return 0;
}
- if (visitor instanceof ContextualColumnVisitor) {
- ContextualColumnVisitor contextualColumnVisitor =
- (ContextualColumnVisitor) visitor;
-
- contextualColumnVisitor.setUp(context, state);
- }
try {
if(component instanceof UIScrollableDataTable){
@@ -54,12 +48,6 @@
}
} finally {
- if (visitor instanceof ContextualColumnVisitor) {
- ContextualColumnVisitor contextualColumnVisitor =
- (ContextualColumnVisitor) visitor;
-
- contextualColumnVisitor.tearDown(context, state);
- }
}
Deleted: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ContextualColumnVisitor.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ContextualColumnVisitor.java 2007-09-06 18:14:06 UTC (rev 2800)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ContextualColumnVisitor.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -1,17 +0,0 @@
-/**
- *
- */
-package org.richfaces.renderkit.html;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public interface ContextualColumnVisitor extends ColumnVisitor {
- public void setUp(FacesContext context, ScrollableDataTableRendererState state) throws IOException;
- public void tearDown(FacesContext context, ScrollableDataTableRendererState state) throws IOException;
-}
Added: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/GridScrollSettings.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/GridScrollSettings.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/GridScrollSettings.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.html;
+
+/**
+ * @author Anton Belevich
+ * Class for storing response options
+ */
+public class GridScrollSettings {
+
+ private int index;
+
+ private int startRow;
+
+ private int count;
+
+
+
+ public GridScrollSettings(int index, int startRow, int count) {
+
+ this.index = index;
+
+ this.startRow = startRow;
+
+ this.count = count;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public void setCount(int count) {
+ this.count = count;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ public int getStartRow() {
+ return startRow;
+ }
+
+ public void setStartRow(int startRow) {
+ this.startRow = startRow;
+ }
+}
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java 2007-09-06 18:14:06 UTC (rev 2800)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableRendererState.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -6,7 +6,6 @@
import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
-import java.util.Map;
import javax.faces.FacesException;
import javax.faces.component.NamingContainer;
@@ -14,7 +13,6 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.richfaces.component.UIScrollableDataTable;
/**
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/utils/TemplateLoader.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/utils/TemplateLoader.java 2007-09-06 18:14:06 UTC (rev 2800)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/utils/TemplateLoader.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -3,6 +3,8 @@
*/
package org.richfaces.utils;
+import javax.faces.FacesException;
+
import org.ajax4jsf.renderkit.RendererBase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -21,10 +23,10 @@
template = (RendererBase)Class.forName(className).newInstance();
} catch (ClassNotFoundException e) {
log.error("class not found: " + className );
- throw new RuntimeException(e);
+ throw new FacesException(e);
} catch (Exception e) {
log.error("exception in loading class : " + className);
- throw new RuntimeException(e);
+ throw new FacesException(e);
}
return template;
}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,210 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
+
+import org.ajax4jsf.event.AjaxEvent;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.html.MockColumns;
+import org.richfaces.event.ScrollableGridViewEvent;
+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.SortOrder;
+import org.richfaces.model.internal.ComponentSortableDataModel;
+import org.richfaces.model.selection.Selection;
+import org.richfaces.model.selection.SimpleSelection;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public abstract class AbstractScrollableDataTableTestCase extends AbstractAjax4JsfTestCase {
+
+
+ private UIScrollableDataTable table;
+ /**
+ * @param name
+ */
+ public AbstractScrollableDataTableTestCase(String name) {
+ super(name);
+
+ }
+
+ public void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+ table = (UIScrollableDataTable) application.createComponent(UIScrollableDataTable.COMPONENT_TYPE);
+ facesContext.getViewRoot().getChildren().add(table);
+ table.setId("zzz");
+
+ for(int i = 0; i < 10; i++) {
+ UIComponent column = MockColumns.newColumn("zzz" + i);
+ UIOutput output = new UIOutput();
+ output.setId("h" + i);
+ column.getFacets().put("header", output);
+ table.getChildren().add(column);
+ }
+
+ }
+
+ protected SortOrder createTestData_sortOrder() {
+ return new SortOrder();
+ }
+
+ protected Selection createTestData_selection() {
+ return new SimpleSelection();
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ table = null;
+ super.tearDown();
+ }
+
+ private class SortListener1 implements SortListener {
+ private boolean triggered = false;
+ public void processSort(SortEvent e) {
+ assertNotNull(e);
+ triggered = true;
+ }
+ }
+
+ public void testBroadCast() {
+ ScrollableGridViewEvent event = new ScrollEvent(table, 20, 30);
+ event.setAttribute("attr", "value0");
+ table.broadcast(event);
+ assertEquals("value0", table.getAttributes().get("attr"));
+
+ AjaxEvent ajaxEvent = new AjaxEvent(table);
+ String id = AjaxRendererUtils.getAbsoluteId(table);
+ table.broadcast(ajaxEvent);
+ assertTrue(ajaxContext.getAjaxAreasToRender().contains(id));
+
+ SortListener1 sortListener = new SortListener1();
+ table.setSortListener(sortListener);
+ table.broadcast(new SortEvent(table, 0, 20, 30));
+ assertTrue(sortListener.triggered);
+
+ }
+
+
+ public void testFixedChildren() {
+ Iterator iterator = table.fixedChildren();
+ assertTrue(iterator.hasNext());
+ int i = 0;
+ while(iterator.hasNext()) {
+ UIComponent kid = (UIComponent) iterator.next();
+ assertEquals("h" + i, kid.getId());
+ i++;
+ }
+ }
+
+ public void testSortListener() {
+ table.setSortMode(UIScrollableDataTable.SORT_MULTI);
+ assertSame(MultiColumnSortListener.INSTANCE, table.getSortListener());
+
+ table.setSortMode(UIScrollableDataTable.SORT_SINGLE);
+ assertSame(SingleColumnSortListener.INSTANCE, table.getSortListener());
+
+ SortListener1 sortListener1 = new SortListener1();
+
+ table.setSortListener(sortListener1);
+
+ assertSame(sortListener1, table.getSortListener());
+
+ }
+
+ public void testProcessSortingChange() {
+ SortListener1 sortListener1 = new SortListener1();
+
+ table.setSortListener(sortListener1);
+
+ SortEvent sortEvent = new SortEvent(table, 0, 20, 30);
+
+ table.processSortingChange(sortEvent);
+
+ assertTrue(sortListener1.triggered);
+
+ assertTrue(facesContext.getRenderResponse());
+
+ assertEquals(30, table.getFirst());
+
+ }
+
+ public void testProcessScrolling() {
+ ScrollableGridViewEvent event = new ScrollEvent(table, 20, 440);
+ table.processScrolling(event);
+
+ assertTrue(facesContext.getRenderResponse());
+ assertEquals(440, table.getFirst());
+
+ }
+
+ public void testCreateDataModel() {
+
+
+
+
+ List l = Collections.singletonList("aaaa");
+ table.setValue(l);
+ ExtendedDataModel model = table.createDataModel();
+
+ assertTrue(model instanceof DataModelCache);
+
+ assertEquals(1, model.getRowCount());
+ //assertTrue(model instanceof ComponentSortableDataModel);
+
+ //table.isCacheable()
+
+ table.setValue(null);
+ model = table.createDataModel();
+
+ assertTrue(model instanceof DataModelCache);
+
+ assertEquals(0, model.getRowCount());
+
+
+ }
+
+
+ public void testGetResponseData() {
+ List data = new ArrayList();
+ table.setResponseData(data);
+ assertSame(data, table.getResponseData());
+ }
+
+}
Deleted: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/AbstractScrollableDataTableTestCase.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/AbstractScrollableDataTableTestCase.java 2007-09-06 18:14:06 UTC (rev 2800)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/AbstractScrollableDataTableTestCase.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -1,51 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.component.html;
-
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.richfaces.model.SortOrder;
-import org.richfaces.model.selection.Selection;
-import org.richfaces.model.selection.SimpleSelection;
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public class AbstractScrollableDataTableTestCase extends AbstractAjax4JsfTestCase {
-
- /**
- * @param name
- */
- public AbstractScrollableDataTableTestCase(String name) {
- super(name);
-
- }
-
-
- protected SortOrder createTestData_sortOrder() {
- return new SortOrder();
- }
-
- protected Selection createTestData_selection() {
- return new SimpleSelection();
- }
-}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/MockColumns.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/MockColumns.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/html/MockColumns.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,77 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component.html;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+
+import org.richfaces.component.Column;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class MockColumns extends UIComponentBase implements Column {
+
+ private MockColumns(){
+
+ }
+
+ private String sortExpression;
+ private boolean sortable;
+ private boolean breakbefore;
+
+ public String getSortExpression() {
+ return sortExpression;
+ }
+
+ public void setSortExpression(String sortExpression) {
+ this.sortExpression = sortExpression;
+ }
+
+ public boolean isSortable() {
+ return sortable;
+ }
+
+ public void setSortable(boolean sortable) {
+ this.sortable = sortable;
+ }
+
+ public boolean isBreakBefore() {
+ return breakbefore;
+ }
+
+ public void setBreakBefore(boolean breakbefore) {
+ this.breakbefore = breakbefore;
+ }
+
+ public String getFamily() {
+ return UIColumn.COMPONENT_FAMILY;
+ }
+
+ public static UIComponent newColumn(String id) {
+ MockColumns column = new MockColumns();
+ column.setId(id);
+ return column;
+ }
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,140 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event.sort;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIScrollableDataTable;
+import org.richfaces.component.html.MockColumns;
+import org.richfaces.model.SortField;
+import org.richfaces.model.SortOrder;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class MultiColumnSortListenerTest extends AbstractAjax4JsfTestCase {
+
+ /**
+ * @param name
+ */
+ public MultiColumnSortListenerTest(String name) {
+ super(name);
+ }
+
+ private SortListener listener;
+ private UIScrollableDataTable table;
+
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ listener = MultiColumnSortListener.INSTANCE;
+
+ table = (UIScrollableDataTable)
+ application.createComponent(UIScrollableDataTable.COMPONENT_TYPE);
+
+ facesContext.getViewRoot().getChildren().add(table);
+
+
+ table.getChildren().add(MockColumns.newColumn("col1"));
+ table.getChildren().add(MockColumns.newColumn("col2"));
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ table = null;
+ listener = null;
+ }
+
+ /**
+ * Test method for {@link org.richfaces.event.sort.SingleColumnSortListener#processSort(org.richfaces.event.sort.SortEvent)}.
+ */
+ public final void testProcessSort() {
+ SortEvent event = new SortEvent(table, 0, 0, 0);
+
+ listener.processSort(event);
+
+ SortOrder sortOrder = table.getSortOrder();
+
+ assertNotNull(sortOrder);
+
+ SortField[] fields = sortOrder.getFields();
+
+ assertNotNull(fields);
+ assertEquals(1, fields.length);
+
+ SortField field = fields[0];
+
+ assertEquals("col1", field.getName());
+ assertEquals(Boolean.TRUE, field.getAscending());
+ assertEquals(0, field.getIndex());
+
+ listener.processSort(event);
+
+ sortOrder = table.getSortOrder();
+
+ assertNotNull(sortOrder);
+
+ fields = sortOrder.getFields();
+
+ assertNotNull(fields);
+ assertEquals(1, fields.length);
+
+ field = fields[0];
+
+ assertEquals("col1", field.getName());
+ assertEquals(Boolean.FALSE, field.getAscending());
+ assertEquals(0, field.getIndex());
+
+ event = new SortEvent(table, 1, 0, 0);
+
+ listener.processSort(event);
+
+ sortOrder = table.getSortOrder();
+
+ assertNotNull(sortOrder);
+
+ fields = sortOrder.getFields();
+
+ assertNotNull(fields);
+ assertEquals(2, fields.length);
+
+ field = fields[0];
+
+ assertEquals("col1", field.getName());
+ assertEquals(Boolean.FALSE, field.getAscending());
+ assertEquals(0, field.getIndex());
+
+ field = fields[1];
+
+ assertEquals("col2", field.getName());
+ assertEquals(Boolean.TRUE, field.getAscending());
+ assertEquals(1, field.getIndex());
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,132 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.event.sort;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIScrollableDataTable;
+import org.richfaces.component.html.MockColumns;
+import org.richfaces.model.SortField;
+import org.richfaces.model.SortOrder;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class SingleColumnSortListenerTest extends AbstractAjax4JsfTestCase {
+
+
+ private SortListener listener;
+ private UIScrollableDataTable table;
+
+ public SingleColumnSortListenerTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ listener = SingleColumnSortListener.INSTANCE;
+
+ table = (UIScrollableDataTable)
+ application.createComponent(UIScrollableDataTable.COMPONENT_TYPE);
+
+ facesContext.getViewRoot().getChildren().add(table);
+
+
+ table.getChildren().add(MockColumns.newColumn("col1"));
+ table.getChildren().add(MockColumns.newColumn("col2"));
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ table = null;
+ listener = null;
+ }
+
+ /**
+ * Test method for {@link org.richfaces.event.sort.SingleColumnSortListener#processSort(org.richfaces.event.sort.SortEvent)}.
+ */
+ public final void testProcessSort() {
+ SortEvent event = new SortEvent(table, 0, 0, 0);
+
+ listener.processSort(event);
+
+ SortOrder sortOrder = table.getSortOrder();
+
+ assertNotNull(sortOrder);
+
+ SortField[] fields = sortOrder.getFields();
+
+ assertNotNull(fields);
+ assertEquals(1, fields.length);
+
+ SortField field = fields[0];
+
+ assertEquals("col1", field.getName());
+ assertEquals(Boolean.TRUE, field.getAscending());
+ assertEquals(0, field.getIndex());
+
+ listener.processSort(event);
+
+ sortOrder = table.getSortOrder();
+
+ assertNotNull(sortOrder);
+
+ fields = sortOrder.getFields();
+
+ assertNotNull(fields);
+ assertEquals(1, fields.length);
+
+ field = fields[0];
+
+ assertEquals("col1", field.getName());
+ assertEquals(Boolean.FALSE, field.getAscending());
+ assertEquals(0, field.getIndex());
+
+ event = new SortEvent(table, 1, 0, 0);
+
+ listener.processSort(event);
+
+ sortOrder = table.getSortOrder();
+
+ assertNotNull(sortOrder);
+
+ fields = sortOrder.getFields();
+
+ assertNotNull(fields);
+ assertEquals(1, fields.length);
+
+ field = fields[0];
+
+ assertEquals("col2", field.getName());
+ assertEquals(Boolean.TRUE, field.getAscending());
+ assertEquals(1, field.getIndex());
+
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ColumnWalkerTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ColumnWalkerTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ColumnWalkerTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,99 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIScrollableDataTable;
+import org.richfaces.component.html.MockColumns;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class ColumnWalkerTest extends AbstractAjax4JsfTestCase {
+
+ private UIScrollableDataTable table;
+ private ScrollableDataTableRendererState state;
+ /**
+ * @param name
+ */
+ public ColumnWalkerTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ table =
+ (UIScrollableDataTable) application.createComponent(UIScrollableDataTable.COMPONENT_TYPE);
+ state = ScrollableDataTableRendererState.createState(facesContext, table);
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ ScrollableDataTableRendererState.restoreState(facesContext);
+ state = null;
+ table = null;
+ super.tearDown();
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ColumnWalker#iterateOverColumns(javax.faces.context.FacesContext, javax.faces.component.UIComponent, org.richfaces.renderkit.html.ColumnVisitor, javax.faces.context.ResponseWriter, org.richfaces.renderkit.html.ScrollableDataTableRendererState)}.
+ */
+ public final void testIterateOverColumns() {
+
+ for(int i = 0; i < 10; i++ ) {
+ table.getChildren().add(MockColumns.newColumn("col" + i));
+ }
+
+ ColumnVisitor visitor = new ColumnVisitor() {
+
+ public int visit(FacesContext context, UIComponent column,
+ ResponseWriter writer,
+ ScrollableDataTableRendererState state) throws IOException {
+
+ assertEquals("col" + state.getCellIndex(), column.getId());
+
+ return 0;
+ }
+ };
+
+
+ try {
+ ColumnWalker.iterateOverColumns(facesContext, table, visitor, writer, state);
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/GridScrollSettingsTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/GridScrollSettingsTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/GridScrollSettingsTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,109 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class GridScrollSettingsTest extends TestCase {
+
+ final int count = 100;
+ final int index = 12;
+ final int startRow = 30;
+
+ private GridScrollSettings data;
+
+ /**
+ * @param name
+ */
+ public GridScrollSettingsTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ data = new GridScrollSettings(index, startRow, count);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ data = null;
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#getCount()}.
+ */
+ public final void testGetCount() {
+ assertEquals(count, data.getCount());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#setCount(int)}.
+ */
+ public final void testSetCount() {
+ int i = 22;
+ data.setCount(i);
+ assertEquals(i, data.getCount());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#getIndex()}.
+ */
+ public final void testGetIndex() {
+ assertEquals(index, data.getIndex());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#setIndex(int)}.
+ */
+ public final void testSetIndex() {
+ int i = 11112;
+ data.setIndex(i);
+ assertEquals(i, data.getIndex());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#getStartRow()}.
+ */
+ public final void testGetStartRow() {
+ assertEquals(startRow, data.getStartRow());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#setStartRow(int)}.
+ */
+ public final void testSetStartRow() {
+ int i = 23;
+ data.setStartRow(i);
+ assertEquals(i, data.getStartRow());
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableOptionsTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableOptionsTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableOptionsTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,120 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import java.util.Map;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIOutput;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIScrollableDataTable;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class ScrollableDataTableOptionsTest extends AbstractAjax4JsfTestCase {
+
+
+ private ScrollableDataTableOptions options;
+ private UIScrollableDataTable table;
+ private ScrollableDataTableRendererState state;
+
+
+ public ScrollableDataTableOptionsTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ table = (UIScrollableDataTable) application.createComponent(UIScrollableDataTable.COMPONENT_TYPE);
+ table.setId("table");
+ state = ScrollableDataTableRendererState.createState(facesContext, table);
+
+
+
+ facesContext.getViewRoot().getChildren().add(table);
+
+ UIOutput output = new UIOutput();
+ output.setId("splash");
+ table.getFacets().put("splash", output);
+
+ for(int i = 0; i < 10; i++) {
+ table.getChildren().add(new UIColumn());
+ }
+
+ options = new ScrollableDataTableOptions(table);
+
+
+
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ ScrollableDataTableRendererState.restoreState(facesContext);
+
+ super.tearDown();
+ options = null;
+ state = null;
+ table = null;
+
+ }
+
+
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableOptions#ScrollableDataTableOptions(org.richfaces.component.UIScrollableDataTable)}.
+ */
+ public final void testScrollableDataTableOptions() {
+
+ Map map = options.getMap();
+ assertNotNull(map);
+ assertEquals(new Integer(10), map.get("columnsCount"));
+ assertEquals(new Integer(table.getRows()), map.get("rowsCount"));
+ assertEquals(table.getBaseClientId(facesContext), map.get("client_id"));
+ assertEquals("table:splash", map.get("splash_id"));
+ assertTrue(map.containsKey("onSortAjaxUpdate"));
+
+
+ //options.getMap().containsKey(key);
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableOptions#onSortAjaxUpdate(javax.faces.context.FacesContext, org.richfaces.component.UIScrollableDataTable)}.
+ */
+ public final void testOnSortAjaxUpdate() {
+ String ajaxUpdate = options.onSortAjaxUpdate(facesContext, table);
+ assertNotNull(ajaxUpdate);
+ assertTrue(ajaxUpdate.contains("table:sortColumn"));
+ assertTrue(ajaxUpdate.contains("table:sortOrder"));
+ assertTrue(ajaxUpdate.contains("table:sortIndex"));
+ assertTrue(ajaxUpdate.endsWith("return false;"));
+
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableScrollDataTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableScrollDataTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/ScrollableDataTableScrollDataTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,109 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class ScrollableDataTableScrollDataTest extends TestCase {
+
+ final int count = 100;
+ final int index = 12;
+ final int startRow = 30;
+
+ private ScrollableDataTableScrollData data;
+
+ /**
+ * @param name
+ */
+ public ScrollableDataTableScrollDataTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ data = new ScrollableDataTableScrollData(index, startRow, count);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ data = null;
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#getCount()}.
+ */
+ public final void testGetCount() {
+ assertEquals(count, data.getCount());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#setCount(int)}.
+ */
+ public final void testSetCount() {
+ int i = 22;
+ data.setCount(i);
+ assertEquals(i, data.getCount());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#getIndex()}.
+ */
+ public final void testGetIndex() {
+ assertEquals(index, data.getIndex());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#setIndex(int)}.
+ */
+ public final void testSetIndex() {
+ int i = 11112;
+ data.setIndex(i);
+ assertEquals(i, data.getIndex());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#getStartRow()}.
+ */
+ public final void testGetStartRow() {
+ assertEquals(startRow, data.getStartRow());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.renderkit.html.ScrollableDataTableScrollData#setStartRow(int)}.
+ */
+ public final void testSetStartRow() {
+ int i = 23;
+ data.setStartRow(i);
+ assertEquals(i, data.getStartRow());
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SortIconRendererTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SortIconRendererTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/renderkit/html/SortIconRendererTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,187 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class SortIconRendererTest extends AbstractAjax4JsfTestCase {
+
+ private SortIconRenderer renderer;
+
+ /**
+ * @param name
+ */
+ public SortIconRendererTest(String name) {
+ super(name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ renderer = new SortIconRenderer() {
+
+ protected Class getComponentClass() {
+ return UIComponent.class;
+ }
+ };
+
+
+
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ renderer = null;
+ }
+
+ /**
+ * Test method for
+ * {@link org.richfaces.renderkit.html.SortIconRenderer#renderAscIcon(javax.faces.context.FacesContext, javax.faces.component.UIComponent)}.
+ */
+ public final void testRenderAscIcon() {
+ UIComponent component = new UIColumn();
+ try {
+ setupResponseWriter();
+ renderer.renderAscIcon(facesContext, component);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement div = null;
+
+ while(elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("div")) {
+ div = node;
+ }
+ }
+
+ assertNotNull(div);
+
+ String className = div.getAttributeValue("class");
+
+ assertNotNull(className);
+
+ assertEquals("dr-sdt-sort-asc", className);
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ }
+
+
+ public void testRenderFacet() {
+ UIComponent component = new UIColumn();
+ UIOutput output = new UIOutput() {
+ public String getRendererType() {
+ return null;
+ }
+ public void encodeEnd(FacesContext context) throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement("div", this);
+ writer.writeAttribute("id", "test_div_0", "id");
+ writer.endElement("div");
+ }
+ };
+
+ component.getFacets().put("ascIcon", output);
+
+
+ try {
+ setupResponseWriter();
+ renderer.renderAscIcon(facesContext, component);
+ HtmlPage htmlPage = processResponseWriter();
+
+ HtmlElement element = htmlPage.getHtmlElementById("test_div_0");
+ assertNotNull(element);
+ assertEquals("div", element.getNodeName());
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+
+ }
+
+ /**
+ * Test method for
+ * {@link org.richfaces.renderkit.html.SortIconRenderer#renderDescIcon(javax.faces.context.FacesContext, javax.faces.component.UIComponent)}.
+ */
+ public final void testRenderDescIcon() {
+ UIComponent component = new UIColumn();
+ try {
+ setupResponseWriter();
+ renderer.renderDescIcon(facesContext, component);
+ HtmlPage page = processResponseWriter();
+
+ Iterator elementIterator = page.getAllHtmlChildElements();
+
+ HtmlElement div = null;
+
+ while(elementIterator.hasNext()) {
+ HtmlElement node = (HtmlElement) elementIterator.next();
+ if (node.getNodeName().equalsIgnoreCase("div")) {
+ div = node;
+ }
+ }
+
+ assertNotNull(div);
+
+ String className = div.getAttributeValue("class");
+
+ assertNotNull(className);
+
+ assertEquals("dr-sdt-sort-desc", className);
+
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/utils/TemplateLoaderTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/utils/TemplateLoaderTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/utils/TemplateLoaderTest.java 2007-09-06 18:16:01 UTC (rev 2801)
@@ -0,0 +1,94 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.utils;
+
+import javax.faces.FacesException;
+
+import org.ajax4jsf.renderkit.RendererBase;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Maksim Kaszynski
+ *
+ */
+public class TemplateLoaderTest extends TestCase {
+
+ /**
+ * @param name
+ */
+ public TemplateLoaderTest(String name) {
+ super(name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for
+ * {@link org.richfaces.utils.TemplateLoader#loadTemplate(java.lang.String)}.
+ */
+ public final void testLoadTemplate() {
+ boolean exception = false;
+ try {
+ TemplateLoader.loadTemplate("xxx.xxx.xx.TestClass");
+ } catch (FacesException e) {
+ exception = true;
+ assertTrue(e.getCause() instanceof ClassNotFoundException);
+ }
+
+ assertTrue(exception);
+
+ exception = false;
+
+ try {
+ TemplateLoader.loadTemplate(RendererBase.class.getName());
+ } catch (FacesException e) {
+ exception = true;
+ assertTrue(e.getCause() instanceof InstantiationException);
+ }
+
+ assertTrue(exception);
+
+ RendererBase template = TemplateLoader
+ .loadTemplate("org.richfaces.renderkit.html.ScrollableDataTableFooterCellRenderer");
+
+ assertNotNull(template);
+
+ }
+
+}
18 years, 8 months
JBoss Rich Faces SVN: r2800 - trunk/framework/api/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-09-06 14:14:06 -0400 (Thu, 06 Sep 2007)
New Revision: 2800
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java
Log:
http://jira.jboss.com/jira/browse/RF-837
Modified: trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java 2007-09-06 15:25:29 UTC (rev 2799)
+++ trunk/framework/api/src/main/java/org/richfaces/model/ScrollableTableDataModel.java 2007-09-06 18:14:06 UTC (rev 2800)
@@ -34,7 +34,7 @@
* @author Maksim Kaszynski
*
*/
- private static class SimpleRowKey implements Serializable{
+ public static class SimpleRowKey implements Serializable{
private static final long serialVersionUID = 1L;
private int i;
@@ -51,6 +51,28 @@
public String toString() {
return String.valueOf(i);
}
+
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + i;
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final SimpleRowKey other = (SimpleRowKey) obj;
+ if (i != other.i)
+ return false;
+ return true;
+ }
+
+
}
18 years, 8 months
JBoss Rich Faces SVN: r2799 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: simpleTogglePanel and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-09-06 11:25:29 -0400 (Thu, 06 Sep 2007)
New Revision: 2799
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/spacer/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/look-customization.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/use-with-data-table.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-524
language is checked
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/usage.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/usage.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -12,11 +12,13 @@
<p>rich:scrollableDataTable represents the tabular data and has the following features
<ul>
<li>variable content of the table cells;</li>
- <li>dynamically fetching the rows from the server when the table is scrolled up and down;</li>
- <li>resizing columns by mouse dragging the column bar;</li>
- <li>sorting column by clicking the header;</li>
- <li>fixed one or more left columns when table is scrolled horizontally;</li>
+ <li>dynamically fetching of rows from the server when a table is scrolled up and down;</li>
+ <li>resizing of columns by the mouse dragging the column bar;</li>
+ <li>sorting of columns by clicking the header;</li>
+ <li>fixing of one or more left columns when a table is scrolled horizontally;</li>
<li>one and multi-selection rows mode;</li>
+ <li>built-it drag-n-drop support;</li>
+ <li>customization of table look-n-fill from skin parameters</li>
<li>customizing the table look-n-fill from skin parameters</li>
</ul>
</p>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/simpleTogglePanel/usage.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -15,8 +15,8 @@
height:140px;
}
</style>
- <p>SimpleTogglePanel represents a panel with a base text label at the top and an additional
- content that can be shown or hidden. The additional content is shown or hidden
+ <p>SimpleTogglePanel represents a panel with a base text label at the top and additional
+ content that can be shown or hidden. Additional content is shown or hidden
using the simpleTogglePanel control located to the right of the base text label by default.<br />
This is an example of the component with default look-n-feel:
</p>
@@ -31,7 +31,7 @@
<p>The switchType attribute allows to select a toggle approach that can be 'client',
- 'server' or 'ajax'. The 'server' and 'ajax' types require to be surround with a form element such as <h:form> or <a4j:form>.
+ 'server' or 'ajax'. The 'server' and 'ajax' types require to be surrounded with a form element such as <h:form> or <a4j:form>.
</p>
<div class="sample-container" >
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/spacer/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/spacer/usage.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/spacer/usage.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -7,7 +7,7 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- Spacer is a simple component that render invisible image with given width, height. Usually it used to separate elements of page design.
+ Spacer is a simple component that renders an invisible image with the given width, height. Usually it is used to separate elements of page design.
</p>
<ui:include src="/richfaces/spacer/examples/spacers.xhtml"/>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/usage.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -11,14 +11,14 @@
<p>RichFaces Suggestion Box component adds the autocomplete
- capabity to the existing input component such as h:inputText or
- t:inputText. Use the attribute 'for' to pint to the input component
- you want to add the autocomplete capabity to.</p>
+ capability to the existing input component such as h:inputText or
+ t:inputText. Use the attribute 'for', in order to pint to the necessary input component
+ to add the autocomplete capabity to it.</p>
<p>Working with Suggestion Box is similar to the h:dataTable
component, but instead of the 'value' attribute it has a
suggestionAction attribute that points to the method that returns the
filtered collection. The 'fetch' attribute points to the data that
- will be inserted to the input field if the particular row is selected
+ is inserted into the input field if a particular row is selected
or clicked from the suggested list.</p>
<div class="sample-container">
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/look-customization.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/look-customization.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/look-customization.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -7,8 +7,8 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- This is a demo of use stylesheets and skinability features to adjust tab spanel look. Here we use pre-defined classes for tab panel
- "rich-tab-inactive", "rich-tab-active" and "rich-tabpanel-content" to adjust tab panel look. Note how look of tabs above also affected.
+ This is a demo of how to use stylesheets and skinability features in order to adjust tab panel appearance. Here we use pre-defined classes for the tab panel
+ "rich-tab-inactive", "rich-tab-active" and "rich-tabpanel-content" to adjust tab panel appearance. Note how appearance of tabs above could be also affected.
</p>
<div id="itme" class="sample-container">
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tabPanel/usage.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -7,8 +7,8 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- Tab panel use to create "tabbed" pages. RichFaces tab panel can be switched in 3 way - using "normal" server-side update, using "ajax" style update, when only tab panel area will be updated on the page, and using "client" type - without any interaction with server.
- Note, that in case of "client" switch type all tabs will be rendered at the same time.
+ Tab panel is used to create "tabbed" pages. RichFaces tab panel can be switched in 3 ways: using "normal" server-side update, using "ajax" style update, when only tab panel area is updated on the page, and using "client" type, without any interaction with the server.
+ Note, that in case of a "client" switch type, all tabs are rendered at the same time.
</p>
<div id="itme" class="sample-container">
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolBar/usage.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -9,8 +9,7 @@
<ui:define name="sample">
<p>
- Toolbar is a horizontal-oriented panel that you can you for different
- purpose such as top level menu, information panel, tools-like menu and so on.<br />
+ Toolbar is a horizontal-oriented panel that can be used in different ways: for top level menu, for information panel, for tools-like menu and so on.<br />
The following example shows how the panelBar might look like:
</p>
@@ -31,9 +30,9 @@
<p>
- The items on the toolBar can be grouped with ability to define the separator
- between the different group and between the member of the same group. The
- "location" attribute set to "right" put the group to the right side of the panel.
+ Items on the toolBar can be grouped with ability to define a separator
+ between different groups and between a member of the same group. The
+ "location" attribute set to "right" put a group to the right side of the panel.
</p>
<div class="sample-container" >
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/use-with-data-table.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/use-with-data-table.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/use-with-data-table.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -8,7 +8,7 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- This little example shows how ToolTip may be used in DataTable
+ This little example shows how ToolTip could be used in DataTable
</p>
<div class="sample-container">
<ui:include src="/richfaces/toolTip/examples/withTable.xhtml"/>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2007-09-06 15:23:58 UTC (rev 2798)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2007-09-06 15:25:29 UTC (rev 2799)
@@ -8,7 +8,7 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
<p>
- Tree is a component that renders tree control on the page.<br/>
+ Tree is a component that renders a tree control on the page.<br/>
The most important tree features are:
</p>
<ul>
@@ -36,7 +36,7 @@
</ui:include>
</div>
<p>
- Note how tree switched on "client" does not "remember" it state when whole page is reloaded. At the same time "ajax" tree remember it state without any additional code.
+ Note how the tree switched on "client" does not "remember" its state when whole page is reloaded. At the same time "ajax" tree remembers its state without any additional code.
</p>
</ui:define>
</ui:composition>
18 years, 8 months
JBoss Rich Faces SVN: r2798 - in trunk/ui/core/src/test/java/org/ajax4jsf: renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-09-06 11:23:58 -0400 (Thu, 06 Sep 2007)
New Revision: 2798
Added:
trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/
trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/
trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxStatusRendererTest.java
Log:
JUnit test for AjaxStatusRenderer class (not finished).
Added: trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxStatusRendererTest.java
===================================================================
--- trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxStatusRendererTest.java (rev 0)
+++ trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxStatusRendererTest.java 2007-09-06 15:23:58 UTC (rev 2798)
@@ -0,0 +1,105 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import javax.faces.component.UIForm;
+import javax.faces.component.UIOutput;
+import javax.faces.component.html.HtmlForm;
+
+import org.ajax4jsf.component.UIAjaxStatus;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+public class AjaxStatusRendererTest extends AbstractAjax4JsfTestCase {
+ private UIForm form = null;
+ private UIAjaxStatus status1 = null;
+ private UIAjaxStatus status2 = null;
+
+ public AjaxStatusRendererTest(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ application.addComponent("org.ajax4jsf.AjaxStatus", "org.ajax4jsf.component.html.HtmlAjaxStatus");
+
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+
+ status1 = (UIAjaxStatus)application.createComponent(UIAjaxStatus.COMPONENT_TYPE);
+ status1.setId("status1");
+ status1.setStartStyle("color: red;");
+ status1.setStartStyleClass("A B C D");
+ status1.setStopStyle("color: green;");
+ status1.setStopStyleClass("X Y Z");
+ status1.setStartText("startText");
+ status1.setStopText("stopText");
+ status1.getAttributes().put("layout", "block");
+
+ status2 = (UIAjaxStatus)application.createComponent(UIAjaxStatus.COMPONENT_TYPE);
+ status2.setId("status2");
+ status2.setStartStyle("color: red;");
+ status2.setStartStyleClass("A B C D");
+ status2.setStopStyle("color: green;");
+ status2.setStopStyleClass("X Y Z");
+ status2.getAttributes().put("layout", "inline");
+
+ UIOutput startOutput = new UIOutput();
+ startOutput.setValue("startOutput");
+ status2.getFacets().put("start", startOutput);
+
+ UIOutput stopOutput = new UIOutput();
+ stopOutput.setValue("stopOutput");
+ status2.getFacets().put("stop", startOutput);
+
+ form.getChildren().add(status1);
+ form.getChildren().add(status2);
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ status1 = null;
+ status2 = null;
+ form = null;
+ }
+
+ /**
+ * Test rendering
+ *
+ * @throws Exception
+ */
+ public void testRender() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+
+ HtmlElement div = page.getHtmlElementById(status1.getClientId(facesContext));
+ assertNotNull(div);
+ assertEquals("div", div.getNodeName());
+ }
+
+}
18 years, 8 months
JBoss Rich Faces SVN: r2797 - in trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model: selection and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-09-06 11:19:42 -0400 (Thu, 06 Sep 2007)
New Revision: 2797
Added:
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/ClientSelectionTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/SelectionRangeTest.java
Log:
JUnit tests
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/ClientSelectionTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/ClientSelectionTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/ClientSelectionTest.java 2007-09-06 15:19:42 UTC (rev 2797)
@@ -0,0 +1,50 @@
+package org.richfaces.model.selection;
+
+import junit.framework.TestCase;
+
+public class ClientSelectionTest extends TestCase {
+
+ ClientSelection selection;
+
+ public ClientSelectionTest(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ selection = new ClientSelection();
+ }
+
+ public void tearDown() throws Exception {
+ selection = null;
+ super.tearDown();
+ }
+
+ public void testRange() {
+ SelectionRange range = new SelectionRange(1,1);
+ selection.addRange(range);
+ assertEquals(1, selection.getRanges().size());
+ }
+
+ public void testIsSelected() {
+ SelectionRange range = new SelectionRange(1,3);
+ selection.addRange(range);
+ assertTrue(selection.isSelected(2));
+ }
+
+ public void testAddIndex() {
+ selection.addIndex(1);
+ selection.addIndex(4);
+ selection.addIndex(2);
+ assertEquals(2, selection.getRanges().size());
+ }
+
+ public void testSelectionFlag() {
+ selection.setSelectionFlag(ClientSelection.FLAG_RESET);
+ assertEquals(ClientSelection.FLAG_RESET, selection.getSelectionFlag());
+ assertTrue(selection.isReset());
+ selection.setSelectionFlag(ClientSelection.FLAG_ALL);
+ assertTrue(selection.isSelectAll());
+ }
+
+}
Added: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/SelectionRangeTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/SelectionRangeTest.java (rev 0)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/selection/SelectionRangeTest.java 2007-09-06 15:19:42 UTC (rev 2797)
@@ -0,0 +1,45 @@
+package org.richfaces.model.selection;
+
+import junit.framework.TestCase;
+
+public class SelectionRangeTest extends TestCase {
+
+ SelectionRange range;
+
+ public SelectionRangeTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ range = new SelectionRange(1,3);
+ }
+
+ protected void tearDown() throws Exception {
+ range = null;
+ super.tearDown();
+ }
+
+ public void testEqualsHashCode() {
+ SelectionRange selectionRange = new SelectionRange(1,3);
+ assertTrue(range.equals(selectionRange));
+ assertEquals(selectionRange.hashCode(), range.hashCode());
+ assertFalse(range.equals(new SelectionRange(1,2)));
+ }
+
+ public void testStartIndex() {
+ int i = 1;
+ range.setStartIndex(i);
+ assertEquals(i, range.getStartIndex());
+ }
+
+ public void testEndIndex() {
+ int i = 1;
+ range.setEndIndex(i);
+ assertEquals(i, range.getEndIndex());
+ }
+
+ public void testWithin() {
+ assertTrue(range.within(2));
+ }
+}
18 years, 8 months
JBoss Rich Faces SVN: r2796 - in trunk/test-applications/facelets/src/main: webapp/PanelMenu and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-09-06 10:06:01 -0400 (Thu, 06 Sep 2007)
New Revision: 2796
Modified:
trunk/test-applications/facelets/src/main/java/panelMenu/PanelMenu.java
trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-850
Modified: trunk/test-applications/facelets/src/main/java/panelMenu/PanelMenu.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/panelMenu/PanelMenu.java 2007-09-06 14:05:54 UTC (rev 2795)
+++ trunk/test-applications/facelets/src/main/java/panelMenu/PanelMenu.java 2007-09-06 14:06:01 UTC (rev 2796)
@@ -22,6 +22,7 @@
public PanelMenu() {
width = "500px";
mode = "none";
+ expandMode = "none";
align = "";
rendered = "true";
disabled = false;
Modified: trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml 2007-09-06 14:05:54 UTC (rev 2795)
+++ trunk/test-applications/facelets/src/main/webapp/PanelMenu/PanelMenu.xhtml 2007-09-06 14:06:01 UTC (rev 2796)
@@ -242,11 +242,14 @@
<f:selectItem itemLabel="none" itemValue="none" />
<f:selectItem itemLabel="ajax" itemValue="ajax" />
<f:selectItem itemLabel="server" itemValue="server" />
- <a4j:support event="onclick" reRender="panelMenuID,Mode2ID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="Expand mode"></h:outputText>
- <h:selectBooleanCheckbox value="#{panelMenu.expandMode}"></h:selectBooleanCheckbox>
+ <h:selectOneRadio value="#{panelMenu.expandMode}" onchange="submit();">
+ <f:selectItem itemLabel="none" itemValue="none" />
+ <f:selectItem itemLabel="ajax" itemValue="ajax" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ </h:selectOneRadio>
<h:outputText value="Align:"></h:outputText>
<h:selectOneMenu value="#{panelMenu.align}">
18 years, 8 months