JBoss Rich Faces SVN: r21315 - in trunk/examples/richfaces-showcase/src/main: resources/org/richfaces/demo/data/common and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-01-31 06:35:34 -0500 (Mon, 31 Jan 2011)
New Revision: 21315
Added:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/graphValidator.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/message.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/messages.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml
Modified:
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
Log:
https://issues.jboss.org/browse/RF-9257
Added: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/DayStatistics.java 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package org.richfaces.demo.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Ilya Shaikovsky
+ *
+ */
+@ManagedBean
+@RequestScoped
+public class DayStatistics {
+
+ public DayStatistics() {
+ dayPasstimes.add(new PassTime("Sport", 0));
+ dayPasstimes.add(new PassTime("Entertainment", 0));
+ dayPasstimes.add(new PassTime("Sleeping", 0));
+ dayPasstimes.add(new PassTime("Games", 0));
+ }
+
+ private List<PassTime> dayPasstimes = new ArrayList<PassTime>();
+
+ public List<PassTime> getDayPasstimes() {
+ return dayPasstimes;
+ }
+
+ public void setDayPasstimes(List<PassTime> dayPasstimes) {
+ this.dayPasstimes = dayPasstimes;
+ }
+
+ @NotNull
+ @Min(value = 1, message = "Please feel at list one entry")
+ @Max(value = 24, message = "Only 24h in a day!")
+ public Integer getTotalTime() {
+ Integer result = new Integer(0);
+ for (PassTime passtime : dayPasstimes) {
+ result += passtime.getTime();
+ }
+ return result;
+ }
+
+ public void store(ActionEvent event) {
+ FacesContext.getCurrentInstance().addMessage(
+ event.getComponent().getClientId(
+ FacesContext.getCurrentInstance()),
+ new FacesMessage(FacesMessage.SEVERITY_INFO,
+ "Changes Stored Successfully",
+ "Changes Stored Successfully"));
+ }
+}
Added: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/PassTime.java 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,37 @@
+package org.richfaces.demo.validation;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.constraints.Length;
+import org.hibernate.validator.constraints.NotEmpty;
+
+public class PassTime {
+
+ public PassTime(String title, Integer time) {
+ setTitle(title);
+ setTime(time);
+ }
+
+ @NotEmpty
+ @Length(max=15, min=3)
+ private String title;
+ @NotNull
+ @Min(0)
+ @Max(12)
+ private Integer time;
+ public String getTitle() {
+ return title;
+ }
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ public Integer getTime() {
+ return time;
+ }
+ public void setTime(Integer time) {
+ this.time = time;
+ }
+
+}
Modified: trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-01-31 11:02:52 UTC (rev 21314)
+++ trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-01-31 11:35:34 UTC (rev 21315)
@@ -189,6 +189,36 @@
</sample>
</samples>
</demo>
+ <!-- demo new="true">
+ <id>graphValidator</id>
+ <name>rich:graphValidator</name>
+ <samples>
+ <sample>
+ <id>graphValidator</id>
+ <name>Object validation using rich:graphValidator</name>
+ </sample>
+ </samples>
+ </demo-->
+ <demo new="true">
+ <id>message</id>
+ <name>rich:message</name>
+ <samples>
+ <sample>
+ <id>message</id>
+ <name>Simple rich:message sample</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo new="true">
+ <id>messages</id>
+ <name>rich:messages</name>
+ <samples>
+ <sample>
+ <id>messages</id>
+ <name>Simple rich:messages sample</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
<group>
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/graphValidator.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/graphValidator.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/graphValidator.xhtml 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,30 @@
+<!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"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition>
+ <p>rich:graphValidator is a component which allows to perform
+ Object validation. value attribute should be defined with the value
+ binding to bean. In the result all the bean properties will be
+ validated during validation phase. That allows you to validate all the
+ object properties and not just ones which are submitted with the
+ current request.</p>
+
+ <p>Simple example of such kind of usage is shown below. Just write
+ some activities of the day and the time you spend on each one in a day.</p>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+ <p>In this case only properties of each passTime(values of the
+ inputs) is validated at validation phase. But after the model is
+ updated (Each explicit passtime was validated ok) all the properties
+ including "TotalTime" are validated again. And total validation could
+ fail if the sum of the hours in a day more than 24.</p>
+</ui:composition>
+</html>
\ No newline at end of file
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ 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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <style>
+.red {
+ color: red;
+}
+
+.green {
+ color: green;
+}
+</style>
+ <h:form id="graphValidatorForm2">
+ <a4j:region renderRegionOnly="true">
+ <rich:graphValidator summary="Invalid values: "
+ value="#{dayStatistics}">
+ <table>
+ <thead>
+ <tr>
+ <th>Activity</th>
+ <th>Time</th>
+ </tr>
+ </thead>
+ <tbody>
+ <a4j:repeat value="#{dayStatistics.dayPasstimes}" var="pt"
+ id="table">
+ <tr>
+ <td align="center" width="100px"><h:outputText
+ value="#{pt.title}" /></td>
+ <td align="center" width="100px"><rich:inputNumberSpinner
+ minValue="0" maxValue="24" value="#{pt.time}" id="time">
+ </rich:inputNumberSpinner></td>
+ <td><rich:message for="time" /></td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+ </table>
+ </rich:graphValidator>
+ <a4j:commandButton value="Store my details"
+ actionListener="#{dayStatistics.store}" reRender="panel" />
+ <rich:messages infoClass="green" errorClass="red" />
+ </a4j:region>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/message.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/message.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/message.xhtml 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,34 @@
+<!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"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition>
+ <p>rich:message is an extension for a standard h:message component.
+ In addition to what the standard component provides, rich:message:</p>
+ <ul>
+ <li>does not require to be wrapped with a4j:outputPanel in order
+ to be rendered during the Ajax requests</li>
+ <li>allows to define different "failed" markers before the text
+ labels</li>
+ <li>has a predefined css class names for different kinds of
+ message severities</li>
+ </ul>
+ <p>The message marker is defined with a facet. There are several
+ facets names available to design the marker for different kind of
+ message severities. The following example shows how the markers might
+ be used to mark the "passed" and "failed" form fields. Fill the form
+ and click "Validate" button to see the entered data passing the defined
+ validation rules.</p>
+
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+
+</ui:composition>
+</html>
\ No newline at end of file
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ 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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <style type="text/css">
+.rich-message-marker img {
+ padding-right: 7px;
+}
+
+.rich-message-label {
+ color: red;
+}
+</style>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Validation Form" />
+ </f:facet>
+ <h:form>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText label="Name" id="name" required="true"
+ value="#{userBean.name}">
+ <f:validateLength minimum="3" />
+ </h:inputText>
+ <rich:message for="name" showDetails="true" showSummary="true">
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:message>
+
+ <h:outputText value="Job:" />
+ <h:inputText label="Job" id="job" required="true"
+ value="#{userBean.job}">
+ <f:validateLength minimum="3" maximum="50" />
+ </h:inputText>
+ <rich:message for="job">
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:message>
+ <h:outputText value="Address:" />
+ <h:inputText label="Address" id="address" required="true"
+ value="#{userBean.address}">
+ <f:validateLength minimum="10" />
+ </h:inputText>
+ <rich:message for="address">
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:message>
+ <h:outputText value="Zip:" />
+ <h:inputText label="Zip" id="zip" required="true"
+ value="#{userBean.zip}">
+ <f:validateLength minimum="4" maximum="9" />
+ </h:inputText>
+ <rich:message for="zip">
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:message>
+ <f:facet name="footer">
+ <a4j:commandButton value="Ajax Validate" />
+ <h:commandButton value="Common Validate" />
+ </f:facet>
+ </h:panelGrid>
+ </h:form>
+ </rich:panel>
+</ui:composition>
\ No newline at end of file
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/messages.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/messages.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/messages.xhtml 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,34 @@
+<!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"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition>
+ <p>rich:messages is an extension for a standard h:messages
+ component. In addition to what the standard component provides,
+ rich:messages:</p>
+ <ul>
+ <li>does not require to be wrapped with a4j:outputPanel in order
+ to be rendered during the Ajax requests</li>
+ <li>allows to define different "failed" markers before the text
+ labels</li>
+ <li>has a predefined css class names for different kinds of
+ messages severities</li>
+ </ul>
+ <p>The message markers is defined with facets. There are several
+ facets names available to design the marker for different kind of
+ messages severities. The following example shows how the markers might
+ be used to mark the "passed" and "failed" form fields. Fill the form
+ and click the "Validate" button to see the entered data passing the
+ defined validation rules.</p>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+
+</ui:composition>
+</html>
\ No newline at end of file
Added: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml 2011-01-31 11:35:34 UTC (rev 21315)
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ 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:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <style type="text/css">
+.rich-messages-marker img {
+ padding-right: 7px;
+}
+
+.rich-message-label {
+ color: red;
+}
+
+.top {
+ vertical-align: top;
+}
+</style>
+<a4j:region>
+ <rich:panel style="width:400px">
+ <f:facet name="header">
+ <h:outputText value="Validation Form" />
+ </f:facet>
+
+ <h:form>
+ <rich:messages passedLabel="Data is allowed to be stored."
+ layout="list" showSummary="true" showDetails="true">
+ <f:facet name="header">
+ <h:outputText value="Entered Data Status:"></h:outputText>
+ </f:facet>
+ <f:facet name="passedMarker">
+ <h:graphicImage value="/images/ajax/passed.gif" />
+ </f:facet>
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:messages>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Name:" />
+ <h:inputText label="Name" id="name" required="true"
+ value="#{userBean.name}">
+ <f:validateLength minimum="3" />
+ </h:inputText>
+ <h:outputText value="Job:" />
+ <h:inputText label="Job" id="job" required="true"
+ value="#{userBean.job}">
+ <f:validateLength minimum="3" maximum="50" />
+ </h:inputText>
+ <h:outputText value="Address:" />
+ <h:inputText label="Address" id="address" required="true"
+ value="#{userBean.address}">
+ <f:validateLength minimum="10" />
+ </h:inputText>
+ <h:outputText value="Zip:" />
+ <h:inputText label="Zip" id="zip" required="true"
+ value="#{userBean.zip}">
+ <f:validateLength minimum="4" maximum="9" />
+ </h:inputText>
+ <f:facet name="footer">
+ <a4j:commandButton value="Ajax Validate"/>
+ <h:commandButton value="Common Validate"/>
+ </f:facet>
+ </h:panelGrid>
+ </h:form>
+ </rich:panel>
+</a4j:region>
+</ui:composition>
\ No newline at end of file
13 years, 10 months
JBoss Rich Faces SVN: r21314 - in management/design-4x: button and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Ochikvina
Date: 2011-01-31 06:02:52 -0500 (Mon, 31 Jan 2011)
New Revision: 21314
Added:
management/design-4x/button/
management/design-4x/button/button.html
management/design-4x/button/images/
management/design-4x/button/images/ButtonBackgroundHoverImage.png
management/design-4x/button/images/ButtonBackgroundImage.png
Log:
RF-8675 - Hover effect on buttons
Added: management/design-4x/button/button.html
===================================================================
--- management/design-4x/button/button.html (rev 0)
+++ management/design-4x/button/button.html 2011-01-31 11:02:52 UTC (rev 21314)
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title>Select disabled</title>
+ <style rel="stylesheet" type="text/css">
+ body{
+ font:normal 11px Arial, Verdana, sans-serif;
+ margin:20px;
+ }
+
+ input, button{
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ }
+
+ input, button{
+ border-color:#BED6F8;
+ border-width:1px;
+ color:#000000;
+ }
+
+ button, input[type="button"], input[type="submit"] {
+ background-color:#BED6F8; /* headerBackgroundColor */
+ background-image:url("images/ButtonBackgroundImage.png"); /* gradient from(top) headerGradientColor to(bottom) headerBackgroundColor */
+ background-position:left top;
+ background-repeat:repeat-x;
+ border-color:#BED6F8; /* panelBorderColor */
+ border-width:1px;
+ color:#000000; /* generalTextColor */
+ font-family:Arial,Verdana,sans-serif; /* generalFamilyFont */
+ font-size:11px; /* generalSizeFont */
+ }
+
+ button:hover, input[type="button"]:hover, input[type="submit"]:hover{
+ background-color:#BED6F8; /* headerBackgroundColor */
+ background-image:url("images/ButtonBackgroundHoverImage.png"); /* gradient from(top) headerBackgroundColor to(bottom) headerGradientColor */
+ background-position:left bottom;
+ background-repeat:repeat-x;
+ }
+ </style>
+</head>
+<body>
+ <h1>Button</h1>
+
+ <p>
+ <input type="submit" value="Action Button"/>
+ </p>
+</body>
+</html>
Added: management/design-4x/button/images/ButtonBackgroundHoverImage.png
===================================================================
(Binary files differ)
Property changes on: management/design-4x/button/images/ButtonBackgroundHoverImage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/button/images/ButtonBackgroundImage.png
===================================================================
(Binary files differ)
Property changes on: management/design-4x/button/images/ButtonBackgroundImage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
13 years, 10 months
JBoss Rich Faces SVN: r21313 - management/design-4x/select-disabled.
by richfaces-svn-commits@lists.jboss.org
Author: Ochikvina
Date: 2011-01-31 04:45:11 -0500 (Mon, 31 Jan 2011)
New Revision: 21313
Modified:
management/design-4x/select-disabled/select-disabled.html
Log:
Added skin parameters for icons.
Modified: management/design-4x/select-disabled/select-disabled.html
===================================================================
--- management/design-4x/select-disabled/select-disabled.html 2011-01-29 00:41:00 UTC (rev 21312)
+++ management/design-4x/select-disabled/select-disabled.html 2011-01-31 09:45:11 UTC (rev 21313)
@@ -81,7 +81,7 @@
width:15px;
}
.rf-sel-btn-arrow {
- background-image:url("images/combo_down_button.gif");
+ background-image:url("images/combo_down_button.gif"); /* generalTextColor */
background-position:center center;
background-repeat:no-repeat;
cursor:pointer;
@@ -89,7 +89,7 @@
width:15px;
}
.rf-sel-btn-arrow-dis {
- background-image:url("images/combo_down_button_dis.gif");
+ background-image:url("images/combo_down_button_dis.gif"); /* tableBorderColor */
background-position:center center;
background-repeat:no-repeat;
cursor:default;
13 years, 10 months
JBoss Rich Faces SVN: r21312 - in trunk/examples: template/src/main/webapp and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-01-28 19:41:00 -0500 (Fri, 28 Jan 2011)
New Revision: 21312
Added:
trunk/examples/template/src/main/webapp/main.xhtml
trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java
trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml
trunk/examples/validator-demo/src/main/webapp/examples/faces-validators.xhtml
trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml
Modified:
trunk/examples/template/src/main/java/org/richfaces/example/Pages.java
trunk/examples/template/src/main/webapp/WEB-INF/web.xml
trunk/examples/template/src/main/webapp/index.jsp
trunk/examples/template/src/main/webapp/layout/template.xhtml
trunk/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java
Log:
CODING IN PROGRESS - issue RF-10309: CSV: not working JSF validators.
https://issues.jboss.org/browse/RF-10309
Modified: trunk/examples/template/src/main/java/org/richfaces/example/Pages.java
===================================================================
--- trunk/examples/template/src/main/java/org/richfaces/example/Pages.java 2011-01-28 20:12:49 UTC (rev 21311)
+++ trunk/examples/template/src/main/java/org/richfaces/example/Pages.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -24,7 +24,7 @@
public class Pages {
- public static final String DEFAULT_TITLE_PATTERN = "<h2>(.*)</h2>";
+ public static final String DEFAULT_TITLE_PATTERN = "<ui\\:param\\s+name=\"title\"\\s+value=\"([^\"]*)\"";
private static final Pattern JSP_PATTERN = Pattern.compile(".*\\.jspx?");
@@ -32,13 +32,13 @@
private Pattern titlePattern = compilePattern(DEFAULT_TITLE_PATTERN);
- private volatile List<PageDescriptionBean> _jspPages;
+ private volatile List<PageDescriptionBean> jspPages;
private Object jspMutex = new Object();
- private String _path = "/pages";
+ private String path = "/examples";
- private volatile List<PageDescriptionBean> _xhtmlPages;
+ private volatile List<PageDescriptionBean> xhtmlPages;
private Object xhtmlMutex = new Object();
@@ -46,7 +46,7 @@
* @return the path
*/
public String getPath() {
- return _path;
+ return path;
}
public Pattern compilePattern(String titlePattern) {
@@ -59,19 +59,19 @@
* the path to set
*/
public void setPath(String path) {
- _path = path;
+ this.path = path;
}
public List<PageDescriptionBean> getJspPages() {
- if (_jspPages == null && null != getExternalContext()) {
+ if (jspPages == null && null != getExternalContext()) {
synchronized (jspMutex) {
- if (_jspPages == null) {
- _jspPages = getPagesByPattern(JSP_PATTERN);
+ if (jspPages == null) {
+ jspPages = getPagesByPattern(JSP_PATTERN);
}
}
}
- return _jspPages;
+ return jspPages;
}
private ExternalContext getExternalContext() {
@@ -85,15 +85,15 @@
}
public List<PageDescriptionBean> getXhtmlPages() {
- if (_xhtmlPages == null && null != getExternalContext()) {
+ if (xhtmlPages == null && null != getExternalContext()) {
synchronized (xhtmlMutex) {
- if (_xhtmlPages == null) {
- _xhtmlPages = getPagesByPattern(XHTML_PATTERN);
+ if (xhtmlPages == null) {
+ xhtmlPages = getPagesByPattern(XHTML_PATTERN);
}
}
}
- return _xhtmlPages;
+ return xhtmlPages;
}
/**
Modified: trunk/examples/template/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/examples/template/src/main/webapp/WEB-INF/web.xml 2011-01-28 20:12:49 UTC (rev 21311)
+++ trunk/examples/template/src/main/webapp/WEB-INF/web.xml 2011-01-29 00:41:00 UTC (rev 21312)
@@ -25,10 +25,6 @@
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
<!-- Faces Servlet -->
<servlet>
@@ -48,7 +44,6 @@
-->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
Modified: trunk/examples/template/src/main/webapp/index.jsp
===================================================================
--- trunk/examples/template/src/main/webapp/index.jsp 2011-01-28 20:12:49 UTC (rev 21311)
+++ trunk/examples/template/src/main/webapp/index.jsp 2011-01-29 00:41:00 UTC (rev 21312)
@@ -5,7 +5,7 @@
<head></head>
<body>
- <jsp:forward page="/pages/index.jsf" />
+ <jsp:forward page="/main.jsf" />
</body>
</html>
\ No newline at end of file
Modified: trunk/examples/template/src/main/webapp/layout/template.xhtml
===================================================================
--- trunk/examples/template/src/main/webapp/layout/template.xhtml 2011-01-28 20:12:49 UTC (rev 21311)
+++ trunk/examples/template/src/main/webapp/layout/template.xhtml 2011-01-29 00:41:00 UTC (rev 21312)
@@ -2,27 +2,27 @@
<html xmlns="http://www.w3.org/1999/xhtml"
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:f="http://java.sun.com/jsf/core">
<f:view contentType="text/html">
-<h:head>
- <title>#{title}</title>
-</h:head>
-<h:body>
- <h:outputStylesheet name="reset-fonts-grids.css" library="com.exadel.template"/>
- <div id="doc3" class="yui-t2">
- <div id="hd"><ui:insert name="header" /></div>
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
- <div class="yui-g"><!-- YOUR DATA GOES HERE --> <ui:insert
- name="content" /></div>
- </div>
- </div>
- <div class="yui-b"><!-- YOUR NAVIGATION GOES HERE --></div>
- <ui:include src="/layout/pagesList.xhtml" /></div>
- <div id="ft">(C) Exadel Inc. 2010</div>
- </div>
-</h:body>
+ <h:head>
+ <title>#{title}</title>
+ </h:head>
+ <h:body>
+ <h:outputStylesheet name="reset-fonts-grids.css"
+ library="org.richfaces.template" />
+ <div id="doc3" class="yui-t2">
+ <div id="hd"><ui:insert name="header" /></div>
+ <div id="bd">
+ <div id="yui-main">
+ <div class="yui-b">
+ <div class="yui-g"><!-- YOUR DATA GOES HERE --> <ui:insert
+ name="content" /></div>
+ </div>
+ </div>
+ <div class="yui-b"><!-- YOUR NAVIGATION GOES HERE --> <ui:include
+ src="/layout/pagesList.xhtml" /></div>
+ </div>
+ </div>
+ </h:body>
</f:view>
</html>
\ No newline at end of file
Added: trunk/examples/template/src/main/webapp/main.xhtml
===================================================================
--- trunk/examples/template/src/main/webapp/main.xhtml (rev 0)
+++ trunk/examples/template/src/main/webapp/main.xhtml 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:csv="http://richfaces.org/csv"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="Developer example" />
+ <!-- content -->
+ <ui:define name="content">
+ <h2>Developer example</h2>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Property changes on: trunk/examples/template/src/main/webapp/main.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java 2011-01-28 20:12:49 UTC (rev 21311)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/Bean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -5,6 +5,16 @@
public static final String FOO_VALUE = "fooValue";
private String value=FOO_VALUE;
+
+ private String required;
+
+ private int intValue;
+
+ private long longValue;
+
+ private double doubleValue;
+
+ private String email;
/**
* @return the value
@@ -18,5 +28,75 @@
public void setValue(String value) {
this.value = value;
}
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the required
+ */
+ public String getRequired() {
+ return this.required;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param required the required to set
+ */
+ public void setRequired(String required) {
+ this.required = required;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return this.intValue;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the longValue
+ */
+ public long getLongValue() {
+ return this.longValue;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param longValue the longValue to set
+ */
+ public void setLongValue(long longValue) {
+ this.longValue = longValue;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the doubleValue
+ */
+ public double getDoubleValue() {
+ return this.doubleValue;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param doubleValue the doubleValue to set
+ */
+ public void setDoubleValue(double doubleValue) {
+ this.doubleValue = doubleValue;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @return the email
+ */
+ public String getEmail() {
+ return this.email;
+ }
+ /**
+ * <p class="changed_added_4_0"></p>
+ * @param email the email to set
+ */
+ public void setEmail(String email) {
+ this.email = email;
+ }
}
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,49 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Max;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DataBean {
+
+ private final List<Validable> beans;
+
+ /**
+ * @return the beans
+ */
+ @Valid
+ public List<Validable> getBeans() {
+ return beans;
+ }
+
+ public DataBean() {
+ beans = new ArrayList<Validable>(6);
+ beans.add(new NotNullBean());
+ beans.add(new NotEmptyBean());
+ beans.add(new LengthBean());
+ beans.add(new MinBean());
+ beans.add(new MaxBean());
+ beans.add(new MinMaxBean());
+ }
+
+ @Max(value=20,message="Total value should be less then 20")
+ public int getTotal(){
+ int total = 0;
+ for (Validable bean : beans) {
+ total += bean.getIntValue();
+ }
+ return total;
+ }
+
+
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,64 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import org.hibernate.validator.constraints.Length;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class LengthBean implements Validable {
+
+ @Length(max=10,min=2,message="incorrect field length")
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Validate String Length, for a range 2-10 chars";
+ }
+
+ public String getIntDescription() {
+ return "Integer Value, no restrictions";
+ }
+
+ public String getIntSummary() {
+ return "Invalid user name";
+ }
+
+ public String getTextSummary() {
+ return "Invalid user name";
+ }
+
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,67 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Max;
+
+import org.hibernate.validator.constraints.Email;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MaxBean implements Validable {
+
+ private String text;
+
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ @Email
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, should be correct email address";
+ }
+
+ public String getIntDescription() {
+ return "Integer Value, less then 10";
+ }
+
+ public String getIntSummary() {
+ return "Invalid number of items";
+ }
+
+ public String getTextSummary() {
+ return "Invalid payment card";
+ }
+
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,67 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Min;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinBean implements Validable {
+
+ private String text;
+
+ @Min(2)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, more then 1";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid rooms qty";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,69 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MinMaxBean implements Validable {
+
+ private String text;
+
+ @Min(2)
+ @Max(10)
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, no restrictions";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, valid values from 2 to 10";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid price";
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,67 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import org.hibernate.validator.constraints.NotEmpty;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotEmptyBean implements Validable {
+
+ @NotEmpty
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text value, Not Empty Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid password";
+ }
+
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,67 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.NotNull;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class NotNullBean implements Validable {
+
+ @NotNull
+ private String text;
+
+ private int intValue;
+
+ /**
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * @return the intValue
+ */
+ public int getIntValue() {
+ return intValue;
+ }
+
+ /**
+ * @param intValue the intValue to set
+ */
+ public void setIntValue(int intValue) {
+ this.intValue = intValue;
+ }
+
+ public String getTextDescription() {
+ return "Text Value, Not Null Validation";
+ }
+
+ public String getIntDescription() {
+ // TODO Auto-generated method stub
+ return "Integer Value, no restrictions";
+ }
+
+ public String getIntSummary() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTextSummary() {
+ // TODO Auto-generated method stub
+ return "Invalid address";
+ }
+
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java (rev 0)
+++ trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,21 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+/**
+ * @author asmirnov
+ *
+ */
+public interface Validable {
+
+ public String getText();
+
+ public String getTextDescription();
+
+ public String getTextSummary();
+
+ public int getIntValue();
+
+ public String getIntSummary();
+}
Property changes on: trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml
===================================================================
--- trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml (rev 0)
+++ trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="<rich:beanValidator> usage" />
+ <ui:param name="javaBean" value="org/richfaces/example/Bean.java" />
+ <!-- Page header -->
+ <ui:define name="header">
+ <h1><rich:beanValidator> usage</h1>
+ </ui:define>
+ <!-- content -->
+ <ui:define name="content">
+ <h:form id="form">
+ <h:panelGrid columns="3">
+ <h:outputLabel for="email" value="Email Address:" />
+ <h:inputText id="email" value="#{bean.email}" label="Email">
+ <rich:beanValidator summary="Invalid Email address"/>
+ </h:inputText>
+ <rich:message for="email"/>
+ <h:outputLabel for="card" value="Credit card number:" />
+ <h:inputText id="card" value="#{bean.creditCardNumber}" label="Credit card">
+ <rich:beanValidator summary="Invalid credit card number"/>
+ </h:inputText>
+ <rich:message for="card"/>
+ </h:panelGrid>
+ <h:commandButton value="Submit"></h:commandButton>
+ <rich:messages/>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
Property changes on: trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/webapp/examples/faces-validators.xhtml
===================================================================
--- trunk/examples/validator-demo/src/main/webapp/examples/faces-validators.xhtml (rev 0)
+++ trunk/examples/validator-demo/src/main/webapp/examples/faces-validators.xhtml 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,32 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:csv="http://richfaces.org/csv"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="JSF validators on client" />
+ <!-- Page header -->
+ <ui:define name="header">
+ <h1><csv:validator> usage</h1>
+ </ui:define>
+ <!-- content -->
+ <ui:define name="content">
+ <h:form id="form">
+ <h:panelGrid columns="4">
+ <h:outputLabel for="text" value="Text length from 1 to 3:" />
+ <h:inputText id="text" value="#{test.value}">
+ <f:validateLength minimum="1" maximum="3" />
+ <csv:validator event="blur" />
+ </h:inputText>
+ <h:outputText id="out" value="#{test.value}"></h:outputText>
+ <csv:message id="uiMessage" for="text" />
+ </h:panelGrid>
+ <h:commandButton value="Submit">
+ <csv:validator/>
+ </h:commandButton>
+ </h:form>
+ <csv:messages />
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Property changes on: trunk/examples/validator-demo/src/main/webapp/examples/faces-validators.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml
===================================================================
--- trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml (rev 0)
+++ trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml 2011-01-29 00:41:00 UTC (rev 21312)
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="<rich:graphValidator> usage" />
+ <ui:param name="javaBean" value="org/richfaces/example/GraphValidatorBean.java" />
+ <!-- Page header -->
+ <ui:define name="header">
+ <h1><rich:graphValidator> usage</h1>
+ </ui:define>
+ <!-- content -->
+ <ui:define name="content">
+ <h:form id="form">
+ <rich:graphValidator value="#{graphValidatorBean}" id="validator">
+ <h:panelGrid columns="3">
+ <h:outputLabel for="value0" value="First value:" />
+ <h:inputText id="value0" value="#{graphValidatorBean.first}" label="First" />
+ <rich:message for="value0"/>
+ <h:outputLabel for="value1" value="Second value:" />
+ <h:inputText id="value1" value="#{graphValidatorBean.second}" label="First" />
+ <rich:message for="value1"/>
+ <h:outputLabel for="value2" value="Third value:" />
+ <h:inputText id="value2" value="#{graphValidatorBean.third}" label="First" />
+ <rich:message for="value2"/>
+ <h:outputLabel for="total" value="Total:" />
+ <h:outputText id="total" value="#{graphValidatorBean.summ}"/>
+ </h:panelGrid>
+ <h:commandButton value="Submit" action="#{graphValidatorBean.action}"></h:commandButton>
+ <h:outputText id="result" value="#{graphValidatorBean.actionResult}"/>
+ </rich:graphValidator>
+ <rich:messages/>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Property changes on: trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 11 months
JBoss Rich Faces SVN: r21311 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-01-28 15:12:49 -0500 (Fri, 28 Jan 2011)
New Revision: 21311
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
Log:
RF-10275
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2011-01-28 17:08:21 UTC (rev 21310)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2011-01-28 20:12:49 UTC (rev 21311)
@@ -91,7 +91,7 @@
}
this.focusValue = this.selValueInput.val();
this.focused = true;
- this.invokeEvent.call(this, "focus", document.getElementById(this.id + 'Input'), e);
+ this.invokeEvent.call(this, "focus", document.getElementById(this.id), e);
}
},
@@ -280,7 +280,7 @@
this.__save();
if(this.focusValue != this.selValueInput.val() ) {
- this.invokeEvent.call(this,"selectitem", document.getElementById(this.id + 'Input'));
+ this.invokeEvent.call(this,"selectitem", document.getElementById(this.id));
}
},
@@ -316,9 +316,9 @@
}
this.focused = false;
- this.invokeEvent.call(this,"blur", document.getElementById(this.id + 'Input'), e);
+ this.invokeEvent.call(this,"blur", document.getElementById(this.id), e);
if(this.focusValue != this.selValueInput.val() ) {
- this.invokeEvent.call(this, "change", document.getElementById(this.id + 'Input'), e);
+ this.invokeEvent.call(this, "change", document.getElementById(this.id), e);
}
}
}
13 years, 11 months
JBoss Rich Faces SVN: r21310 - in trunk: examples/output-demo/src/main/webapp/qunit and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-01-28 12:08:21 -0500 (Fri, 28 Jan 2011)
New Revision: 21310
Modified:
trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml
trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml
trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml
trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance.xhtml
Log:
RF-10297: classes and icons are renamed
Modified: trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/examples/output-demo/src/main/webapp/examples/accordion.xhtml 2011-01-28 17:08:21 UTC (rev 21310)
@@ -17,7 +17,7 @@
<h:form id="f" style="border:blue solid thin;">
<h:panelGroup>
<pn:accordion width="500px" height="300px" itemChangeListener="#{togglePanelBean.itemChangeActionListener}" switchType="ajax"
- itemRightIconActive="triangleDown" itemRightIconInactive="triangleUp" itemRightIconDisabled="disc" itemLeftIconDisabled="disc" >
+ itemRightIconActive="triangleDown" itemInactiveRightIcon="triangleUp" itemDisabledRightIcon="disc" itemDisabledLeftIcon="disc" >
<pn:accordionItem header="label 1" >Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here.</pn:accordionItem>
<pn:accordionItem header="label 2" >content 2</pn:accordionItem>
<pn:accordionItem header="label 3" onenter="alert('hello, world!')" >content 3</pn:accordionItem>
Modified: trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml 2011-01-28 17:08:21 UTC (rev 21310)
@@ -42,12 +42,12 @@
<rich:panelMenu id="panelMenu"
itemLeftIcon="grid"
- groupLeftIconCollapsed="grid"
- topGroupLeftIconCollapsed="grid"
- topGroupLeftIconExpanded="chevronLeft"
- topGroupLeftIconDisabled="disc"
- itemLeftIconDisabled="triangleLeft"
- topItemLeftIconDisabled="triangleUp"
+ groupCollapsedLeftIcon="grid"
+ topGroupCollapsedLeftIcon="grid"
+ topGroupExpandedLeftIcon="chevronLeft"
+ topGroupDisabledLeftIcon="disc"
+ itemDisabledLeftIcon="triangleLeft"
+ topItemDisabledLeftIcon="triangleUp"
topItemLeftIcon="triangleDown"
groupMode="client" activeItem="item41">
<rich:panelMenuGroup id="group1" label="Group 1" disabled="true">
Modified: trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/examples/output-demo/src/main/webapp/examples/tabPanel.xhtml 2011-01-28 17:08:21 UTC (rev 21310)
@@ -15,8 +15,8 @@
<p>Page</p>
<h:form id="f">
- <pn:tabPanel id="panel" switchType="ajax" tabHeaderClassDisabled="myClass_01" itemChangeListener="#{togglePanelBean.itemChangeActionListener}">
- <pn:tab header="tab1 header" headerClassDisabled="myClass_02" onenter="alert('onenter 01')">
+ <pn:tabPanel id="panel" switchType="ajax" tabDisabledHeaderClass="myClass_01" itemChangeListener="#{togglePanelBean.itemChangeActionListener}">
+ <pn:tab header="tab1 header" headerDisabledClass="myClass_02" onenter="alert('onenter 01')">
Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here. Content will be here.
</pn:tab>
<pn:tab header="tab 1a (disabled) header" disabled="true">
Modified: trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/examples/output-demo/src/main/webapp/qunit/panelMenu.xhtml 2011-01-28 17:08:21 UTC (rev 21310)
@@ -52,10 +52,10 @@
itemMode="server"
groupMode="server"
activeItem="myFavariteIten"
- itemLeftIconDisabled="disc"
- groupLeftIconDisabled="disc"
- topItemLeftIconDisabled="disc"
- topGroupLeftIconDisabled="disc"
+ itemDisabledLeftIcon="disc"
+ groupDisabledLeftIcon="disc"
+ topItemDisabledLeftIcon="disc"
+ topGroupDisabledLeftIcon="disc"
itemChangeListener="#{modalPanel.itemChangeEventListener}"
expandEvent="dblclick"
collapseEvent="dblclick"
@@ -68,13 +68,13 @@
</pn:panelMenuGroup>
<pn:panelMenuGroup
label="Group 2"
- leftIconCollapsed="triangle"
- leftIconExpanded="triangleDown">
+ leftCollapsedIcon="triangle"
+ leftExpandedIcon="triangleDown">
<pn:panelMenuItem label="Item 2.1" />
<pn:panelMenuGroup
label="Group 2.2"
- leftIconCollapsed="chevron"
- leftIconExpanded="chevronDown">
+ leftCollapsedIcon="chevron"
+ leftExpandedIcon="chevronDown">
<pn:panelMenuItem label="Item 2.2.1" action="#{modalPanel.action}"/>
<pn:panelMenuItem label="Item 2.2.2" name="myFavariteIten" />
<pn:panelMenuItem label="Item 2.2.3"/>
Modified: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/panelMenu/samples/panelMenu-sample.xhtml 2011-01-28 17:08:21 UTC (rev 21310)
@@ -13,10 +13,10 @@
<h:form id="form">
<h:panelGrid columns="2" columnClasses="cols,cols" width="400">
<rich:panelMenu style="width:200px" mode="ajax" groupMode="ajax"
- groupLeftIconExpanded="triangleUp"
- groupLeftIconCollapsed="triangleDown"
- topGroupRightIconExpanded="chevronUp"
- topGroupRightIconCollapsed="chevronDown" itemLeftIcon="disc"
+ groupExpandedLeftIcon="triangleUp"
+ groupCollapsedLeftIcon="triangleDown"
+ topGroupExpandedRightIcon="chevronUp"
+ topGroupCollapsedRightIcon="chevronDown" itemLeftIcon="disc"
itemChangeListener="#{panelMenuBean.updateCurrent}">
<rich:panelMenuGroup label="Group 1">
<rich:panelMenuItem label="Item 1.1" name="Item_1_1" />
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -215,7 +215,7 @@
public abstract String getButtonIcon();
@Attribute
- public abstract String getButtonIconDisabled();
+ public abstract String getButtonDisabledIcon();
@Attribute
public abstract Object getDefaultTime();
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -22,29 +22,6 @@
package org.richfaces.renderkit;
-import java.io.IOException;
-import java.text.DateFormatSymbols;
-import java.text.Format;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.TimeZone;
-
-import javax.faces.application.ResourceDependencies;
-import javax.faces.application.ResourceDependency;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.PartialViewContext;
-import javax.faces.convert.Converter;
-import javax.faces.convert.ConverterException;
-import javax.faces.convert.DateTimeConverter;
-
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractCalendar;
@@ -57,6 +34,20 @@
import org.richfaces.event.CurrentDateChangeEvent;
import org.richfaces.utils.CalendarHelper;
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.PartialViewContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.DateTimeConverter;
+import java.io.IOException;
+import java.text.DateFormatSymbols;
+import java.text.Format;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
/**
* @author amarkhel
*
@@ -252,7 +243,7 @@
boolean disable = (Boolean)component.getAttributes().get(OPTION_DISABLED);
String buttonIcon = (String)component.getAttributes().get("buttonIcon");
if (disable) {
- buttonIcon = (String)component.getAttributes().get("buttonIconDisabled");
+ buttonIcon = (String)component.getAttributes().get("buttonDisabledIcon");
}
if(buttonIcon != null && buttonIcon.trim().length() != 0) {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordion.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -59,22 +59,22 @@
// ------------------------------------------------ Html Attributes
@Attribute
- public abstract String getItemLeftIconActive();
+ public abstract String getItemActiveLeftIcon();
@Attribute
- public abstract String getItemLeftIconInactive();
+ public abstract String getItemInactiveLeftIcon();
@Attribute
- public abstract String getItemLeftIconDisabled();
+ public abstract String getItemDisabledLeftIcon();
@Attribute
- public abstract String getItemRightIconActive();
+ public abstract String getItemActiveRightIcon();
@Attribute
- public abstract String getItemRightIconInactive();
+ public abstract String getItemRightInactiveIcon();
@Attribute
- public abstract String getItemRightIconDisabled();
+ public abstract String getItemDisabledRightIcon();
@Attribute
public abstract String getWidth();
@@ -83,13 +83,13 @@
public abstract String getHeight();
@Attribute
- public abstract String getItemHeaderClassActive();
+ public abstract String getItemActiveHeaderClass();
@Attribute
- public abstract String getItemHeaderClassDisabled();
+ public abstract String getItemDisabledHeaderClass();
@Attribute
- public abstract String getItemHeaderClassInactive();
+ public abstract String getItemInactiveHeaderClass();
@Attribute
public abstract String getItemContentClass();
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -39,7 +39,17 @@
public static final String COMPONENT_FAMILY = "org.richfaces.AccordionItem";
enum Properties {
- contentClass, leftIconActive, leftIconInactive, leftIconDisabled, rightIconActive, rightIconDisabled, rightIconInactive, headerClassActive, headerClassDisabled, headerClassInactive, headerClass;
+ contentClass,
+ leftActiveIcon,
+ leftInactiveIcon,
+ leftDisabledIcon,
+ rightActiveIcon,
+ rightDisabledIcon,
+ rightInactiveIcon,
+ headerActiveClass,
+ headerDisabledClass,
+ headerInactiveClass,
+ headerClass
}
public AbstractAccordionItem() {
@@ -50,86 +60,86 @@
return (AbstractAccordion) ToggleControl.getEnclosedPanel(this);
}
- @Attribute(defaultValue = "getAccordion().getItemLeftIconActive()", generate = false)
- public String getLeftIconActive() {
- return (String) getStateHelper().eval(Properties.leftIconActive, getAccordion().getItemLeftIconActive());
+ @Attribute(defaultValue = "getAccordion().getItemActiveLeftIcon()", generate = false)
+ public String getLeftActiveIcon() {
+ return (String) getStateHelper().eval(Properties.leftActiveIcon, getAccordion().getItemActiveLeftIcon());
}
- public void setLeftIconActive(String leftIconActive) {
- getStateHelper().put(Properties.leftIconActive, leftIconActive);
+ public void setLeftActiveIcon(String leftActiveIcon) {
+ getStateHelper().put(Properties.leftActiveIcon, leftActiveIcon);
}
- @Attribute(defaultValue = "getAccordion().getItemLeftIconDisabled()", generate = false)
- public String getLeftIconDisabled() {
- return (String) getStateHelper().eval(Properties.leftIconDisabled, getAccordion().getItemLeftIconDisabled());
+ @Attribute(defaultValue = "getAccordion().getItemDisabledLeftIcon()", generate = false)
+ public String getLeftDisabledIcon() {
+ return (String) getStateHelper().eval(Properties.leftDisabledIcon, getAccordion().getItemDisabledLeftIcon());
}
- public void setLeftIconDisabled(String leftIconDisabled) {
- getStateHelper().put(Properties.leftIconDisabled, leftIconDisabled);
+ public void setLeftDisabledIcon(String leftDisabledIcon) {
+ getStateHelper().put(Properties.leftDisabledIcon, leftDisabledIcon);
}
- @Attribute(defaultValue = "getAccordion().getItemLeftIconInactive()", generate = false)
- public String getLeftIconInactive() {
- return (String) getStateHelper().eval(Properties.leftIconInactive, getAccordion().getItemLeftIconInactive());
+ @Attribute(defaultValue = "getAccordion().getItemInactiveLeftIcon()", generate = false)
+ public String getLeftInactiveIcon() {
+ return (String) getStateHelper().eval(Properties.leftInactiveIcon, getAccordion().getItemInactiveLeftIcon());
}
- public void setLeftIconInactive(String leftIconInactive) {
- getStateHelper().put(Properties.leftIconInactive, leftIconInactive);
+ public void setLeftInactiveIcon(String leftInactiveIcon) {
+ getStateHelper().put(Properties.leftInactiveIcon, leftInactiveIcon);
}
- @Attribute(defaultValue = "getAccordion().getItemRightIconActive()", generate = false)
- public String getRightIconActive() {
- return (String) getStateHelper().eval(Properties.rightIconActive, getAccordion().getItemRightIconActive());
+ @Attribute(defaultValue = "getAccordion().getItemActiveRightIcon()", generate = false)
+ public String getRightActiveIcon() {
+ return (String) getStateHelper().eval(Properties.rightActiveIcon, getAccordion().getItemActiveRightIcon());
}
- public void setRightIconActive(String rightIconActive) {
- getStateHelper().put(Properties.rightIconActive, rightIconActive);
+ public void setRightActiveIcon(String rightActiveIcon) {
+ getStateHelper().put(Properties.rightActiveIcon, rightActiveIcon);
}
- @Attribute(defaultValue = "getAccordion().getItemRightIconDisabled()", generate = false)
- public String getRightIconDisabled() {
- return (String) getStateHelper().eval(Properties.rightIconDisabled, getAccordion().getItemRightIconDisabled());
+ @Attribute(defaultValue = "getAccordion().getItemDisabledRightIcon()", generate = false)
+ public String getRightDisabledIcon() {
+ return (String) getStateHelper().eval(Properties.rightDisabledIcon, getAccordion().getItemDisabledRightIcon());
}
- public void setRightIconDisabled(String rightIconDisabled) {
- getStateHelper().put(Properties.rightIconDisabled, rightIconDisabled);
+ public void setRightDisabledIcon(String rightDisabledIcon) {
+ getStateHelper().put(Properties.rightDisabledIcon, rightDisabledIcon);
}
- @Attribute(defaultValue = "getAccordion().getItemRightIconInactive()", generate = false)
- public String getRightIconInactive() {
- return (String) getStateHelper().eval(Properties.rightIconInactive, getAccordion().getItemRightIconInactive());
+ @Attribute(defaultValue = "getAccordion().getItemRightInactiveIcon()", generate = false)
+ public String getRightInactiveIcon() {
+ return (String) getStateHelper().eval(Properties.rightInactiveIcon, getAccordion().getItemRightInactiveIcon());
}
- public void setRightIconInactive(String rightIconInactive) {
- getStateHelper().put(Properties.rightIconInactive, rightIconInactive);
+ public void setRightInactiveIcon(String rightInactiveIcon) {
+ getStateHelper().put(Properties.rightInactiveIcon, rightInactiveIcon);
}
- @Attribute(defaultValue = "getAccordion().getItemHeaderClassActive()", generate = false)
- public String getHeaderClassActive() {
- return (String) getStateHelper().eval(Properties.headerClassActive, getAccordion().getItemHeaderClassActive());
+ @Attribute(defaultValue = "getAccordion().getItemHeaderActiveClass()", generate = false)
+ public String getHeaderActiveClass() {
+ return (String) getStateHelper().eval(Properties.headerActiveClass, getAccordion().getItemActiveHeaderClass());
}
- public void setHeaderClassActive(String headerClassActive) {
- getStateHelper().put(Properties.headerClassActive, headerClassActive);
+ public void setHeaderActiveClass(String headerActiveClass) {
+ getStateHelper().put(Properties.headerActiveClass, headerActiveClass);
}
- @Attribute(defaultValue = "getAccordion().getItemHeaderClassDisabled()", generate = false)
- public String getHeaderClassDisabled() {
- return (String) getStateHelper().eval(Properties.headerClassDisabled, getAccordion().getItemHeaderClassDisabled());
+ @Attribute(defaultValue = "getAccordion().getItemDisabledHeaderClass()", generate = false)
+ public String getHeaderDisabledClass() {
+ return (String) getStateHelper().eval(Properties.headerDisabledClass, getAccordion().getItemDisabledHeaderClass());
}
- public void setHeaderClassDisabled(String headerClassDisabled) {
- getStateHelper().put(Properties.headerClassDisabled, headerClassDisabled);
+ public void setHeaderDisabledClass(String headerDisabledClass) {
+ getStateHelper().put(Properties.headerDisabledClass, headerDisabledClass);
}
- @Attribute(defaultValue = "getAccordion().getItemHeaderClassInactive()", generate = false)
- public String getHeaderClassInactive() {
- return (String) getStateHelper().eval(Properties.headerClassInactive, getAccordion().getItemHeaderClassInactive());
+ @Attribute(defaultValue = "getAccordion().getItemInactiveHeaderClass()", generate = false)
+ public String getHeaderInactiveClass() {
+ return (String) getStateHelper().eval(Properties.headerInactiveClass, getAccordion().getItemInactiveHeaderClass());
}
- public void setHeaderClassInactive(String headerClassInactive) {
- getStateHelper().put(Properties.headerClassInactive, headerClassInactive);
+ public void setHeaderInactiveClass(String headerInactiveClass) {
+ getStateHelper().put(Properties.headerInactiveClass, headerInactiveClass);
}
@Attribute(defaultValue = "getAccordion().getItemHeaderClass()")
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -109,16 +109,16 @@
// ------------------------------------------------ Html Attributes
@Attribute
- public abstract String getLeftIconCollapsed();
+ public abstract String getLeftCollapsedIcon();
@Attribute
- public abstract String getLeftIconExpanded();
+ public abstract String getLeftExpandedIcon();
@Attribute
- public abstract String getRightIconCollapsed();
+ public abstract String getRightCollapsedIcon();
@Attribute
- public abstract String getRightIconExpanded();
+ public abstract String getRightExpandedIcon();
@Attribute
public abstract String getBodyClass();
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenu.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -23,6 +23,13 @@
package org.richfaces.component;
+import org.richfaces.PanelMenuMode;
+import org.richfaces.cdk.annotations.*;
+import org.richfaces.event.ItemChangeEvent;
+import org.richfaces.event.ItemChangeListener;
+import org.richfaces.event.ItemChangeSource;
+import org.richfaces.renderkit.util.PanelIcons;
+
import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
@@ -32,18 +39,6 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
-import org.richfaces.PanelMenuMode;
-import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.EventName;
-import org.richfaces.cdk.annotations.JsfComponent;
-import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.cdk.annotations.Tag;
-import org.richfaces.cdk.annotations.TagType;
-import org.richfaces.event.ItemChangeEvent;
-import org.richfaces.event.ItemChangeListener;
-import org.richfaces.event.ItemChangeSource;
-import org.richfaces.renderkit.util.PanelIcons;
-
/**
* @author akolonitsky
* @since 2010-10-25
@@ -220,8 +215,26 @@
// ------------------------------------------------ Html Attributes
enum Properties {
- itemRightIcon, itemLeftIconDisabled, itemRightIconDisabled, topItemLeftIcon, topItemRightIcon, topItemLeftIconDisabled, topItemRightIconDisabled, groupLeftIconExpanded, groupRightIconExpanded, groupLeftIconCollapsed, groupRightIconCollapsed, groupLeftIconDisabled, groupRightIconDisabled, topGroupLeftIconExpanded, topGroupRightIconExpanded, topGroupLeftIconCollapsed, topGroupRightIconCollapsed, topGroupLeftIconDisabled, topGroupRightIconDisabled, itemLeftIcon
-
+ itemRightIcon,
+ itemDisabledLeftIcon,
+ itemDisabledRightIcon,
+ topItemLeftIcon,
+ topItemRightIcon,
+ topItemDisabledLeftIcon,
+ topItemDisabledRightIcon,
+ groupExpandedLeftIcon,
+ groupExpandedRightIcon,
+ groupCollapsedLeftIcon,
+ groupCollapsedRightIcon,
+ groupDisabledLeftIcon,
+ groupDisabledRightIcon,
+ topGroupExpandedLeftIcon,
+ topGroupExpandedRightIcon,
+ topGroupCollapsedLeftIcon,
+ topGroupCollapsedRightIcon,
+ topGroupDisabledLeftIcon,
+ topGroupDisabledRightIcon,
+ itemLeftIcon
}
@Attribute
@@ -258,21 +271,21 @@
}
@Attribute(generate = false)
- public String getItemLeftIconDisabled() {
- return (String) getStateHelper().eval(Properties.itemLeftIconDisabled, PanelIcons.transparent.toString());
+ public String getItemDisabledLeftIcon() {
+ return (String) getStateHelper().eval(Properties.itemDisabledLeftIcon, PanelIcons.transparent.toString());
}
- public void setItemLeftIconDisabled(String itemLeftIconDisabled) {
- getStateHelper().put(Properties.itemLeftIconDisabled, itemLeftIconDisabled);
+ public void setItemDisabledLeftIcon(String itemDisabledLeftIcon) {
+ getStateHelper().put(Properties.itemDisabledLeftIcon, itemDisabledLeftIcon);
}
@Attribute(generate = false)
- public String getItemRightIconDisabled() {
- return (String) getStateHelper().eval(Properties.itemRightIconDisabled, PanelIcons.transparent.toString());
+ public String getItemDisabledRightIcon() {
+ return (String) getStateHelper().eval(Properties.itemDisabledRightIcon, PanelIcons.transparent.toString());
}
- public void setItemRightIconDisabled(String itemRightIconDisabled) {
- getStateHelper().put(Properties.itemRightIconDisabled, itemRightIconDisabled);
+ public void setItemDisabledRightIcon(String itemDisabledRightIcon) {
+ getStateHelper().put(Properties.itemDisabledRightIcon, itemDisabledRightIcon);
}
@Attribute
@@ -300,21 +313,21 @@
}
@Attribute(generate = false)
- public String getTopItemLeftIconDisabled() {
- return (String) getStateHelper().eval(Properties.topItemLeftIconDisabled, PanelIcons.transparent.toString());
+ public String getTopItemDisabledLeftIcon() {
+ return (String) getStateHelper().eval(Properties.topItemDisabledLeftIcon, PanelIcons.transparent.toString());
}
- public void setTopItemLeftIconDisabled(String topItemLeftIconDisabled) {
- getStateHelper().put(Properties.topItemLeftIconDisabled, topItemLeftIconDisabled);
+ public void setTopItemDisabledLeftIcon(String topItemDisabledLeftIcon) {
+ getStateHelper().put(Properties.topItemDisabledLeftIcon, topItemDisabledLeftIcon);
}
@Attribute(generate = false)
- public String getTopItemRightIconDisabled() {
- return (String) getStateHelper().eval(Properties.topItemRightIconDisabled, PanelIcons.transparent.toString());
+ public String getTopItemDisabledRightIcon() {
+ return (String) getStateHelper().eval(Properties.topItemDisabledRightIcon, PanelIcons.transparent.toString());
}
- public void setTopItemRightIconDisabled(String topItemRightIconDisabled) {
- getStateHelper().put(Properties.topItemRightIconDisabled, topItemRightIconDisabled);
+ public void setTopItemDisabledRightIcon(String topItemDisabledRightIcon) {
+ getStateHelper().put(Properties.topItemDisabledRightIcon, topItemDisabledRightIcon);
}
@Attribute
@@ -324,57 +337,57 @@
public abstract String getGroupDisabledClass();
@Attribute(generate = false)
- public String getGroupLeftIconExpanded() {
- return (String) getStateHelper().eval(Properties.groupLeftIconExpanded, PanelIcons.transparent.toString());
+ public String getGroupExpandedLeftIcon() {
+ return (String) getStateHelper().eval(Properties.groupExpandedLeftIcon, PanelIcons.transparent.toString());
}
- public void setGroupLeftIconExpanded(String groupLeftIconExpanded) {
- getStateHelper().put(Properties.groupLeftIconExpanded, groupLeftIconExpanded);
+ public void setGroupExpandedLeftIcon(String groupExpandedLeftIcon) {
+ getStateHelper().put(Properties.groupExpandedLeftIcon, groupExpandedLeftIcon);
}
@Attribute(generate = false)
- public String getGroupRightIconExpanded() {
- return (String) getStateHelper().eval(Properties.groupRightIconExpanded, PanelIcons.transparent.toString());
+ public String getGroupExpandedRightIcon() {
+ return (String) getStateHelper().eval(Properties.groupExpandedRightIcon, PanelIcons.transparent.toString());
}
- public void setGroupRightIconExpanded(String groupRightIconExpanded) {
- getStateHelper().put(Properties.groupRightIconExpanded, groupRightIconExpanded);
+ public void setGroupExpandedRightIcon(String groupExpandedRightIcon) {
+ getStateHelper().put(Properties.groupExpandedRightIcon, groupExpandedRightIcon);
}
@Attribute(generate = false)
- public String getGroupLeftIconCollapsed() {
- return (String) getStateHelper().eval(Properties.groupLeftIconCollapsed, PanelIcons.transparent.toString());
+ public String getGroupCollapsedLeftIcon() {
+ return (String) getStateHelper().eval(Properties.groupCollapsedLeftIcon, PanelIcons.transparent.toString());
}
- public void setGroupLeftIconCollapsed(String groupLeftIconCollapsed) {
- getStateHelper().put(Properties.groupLeftIconCollapsed, groupLeftIconCollapsed);
+ public void setGroupCollapsedLeftIcon(String groupCollapsedLeftIcon) {
+ getStateHelper().put(Properties.groupCollapsedLeftIcon, groupCollapsedLeftIcon);
}
@Attribute(generate = false)
- public String getGroupRightIconCollapsed() {
- return (String) getStateHelper().eval(Properties.groupRightIconCollapsed, PanelIcons.transparent.toString());
+ public String getGroupCollapsedRightIcon() {
+ return (String) getStateHelper().eval(Properties.groupCollapsedRightIcon, PanelIcons.transparent.toString());
}
- public void setGroupRightIconCollapsed(String groupRightIconCollapsed) {
- getStateHelper().put(Properties.groupRightIconCollapsed, groupRightIconCollapsed);
+ public void setGroupCollapsedRightIcon(String groupCollapsedRightIcon) {
+ getStateHelper().put(Properties.groupCollapsedRightIcon, groupCollapsedRightIcon);
}
@Attribute(generate = false)
- public String getGroupLeftIconDisabled() {
- return (String) getStateHelper().eval(Properties.groupLeftIconDisabled, PanelIcons.transparent.toString());
+ public String getGroupDisabledLeftIcon() {
+ return (String) getStateHelper().eval(Properties.groupDisabledLeftIcon, PanelIcons.transparent.toString());
}
- public void setGroupLeftIconDisabled(String groupLeftIconDisabled) {
- getStateHelper().put(Properties.groupLeftIconDisabled, groupLeftIconDisabled);
+ public void setGroupDisabledLeftIcon(String groupDisabledLeftIcon) {
+ getStateHelper().put(Properties.groupDisabledLeftIcon, groupDisabledLeftIcon);
}
@Attribute(generate = false)
- public String getGroupRightIconDisabled() {
- return (String) getStateHelper().eval(Properties.groupRightIconDisabled, PanelIcons.transparent.toString());
+ public String getGroupDisabledRightIcon() {
+ return (String) getStateHelper().eval(Properties.groupDisabledRightIcon, PanelIcons.transparent.toString());
}
- public void setGroupRightIconDisabled(String groupRightIconDisabled) {
- getStateHelper().put(Properties.groupRightIconDisabled, groupRightIconDisabled);
+ public void setGroupDisabledRightIcon(String groupDisabledRightIcon) {
+ getStateHelper().put(Properties.groupDisabledRightIcon, groupDisabledRightIcon);
}
@Attribute
@@ -384,57 +397,57 @@
public abstract String getTopGroupDisabledClass();
@Attribute(generate = false)
- public String getTopGroupLeftIconExpanded() {
- return (String) getStateHelper().eval(Properties.topGroupLeftIconExpanded, PanelIcons.transparent.toString());
+ public String getTopGroupExpandedLeftIcon() {
+ return (String) getStateHelper().eval(Properties.topGroupExpandedLeftIcon, PanelIcons.transparent.toString());
}
- public void setTopGroupLeftIconExpanded(String topGroupLeftIconExpanded) {
- getStateHelper().put(Properties.topGroupLeftIconExpanded, topGroupLeftIconExpanded);
+ public void setTopGroupExpandedLeftIcon(String topGroupExpandedLeftIcon) {
+ getStateHelper().put(Properties.topGroupExpandedLeftIcon, topGroupExpandedLeftIcon);
}
@Attribute(generate = false)
- public String getTopGroupRightIconExpanded() {
- return (String) getStateHelper().eval(Properties.topGroupRightIconExpanded, PanelIcons.transparent.toString());
+ public String getTopGroupExpandedRightIcon() {
+ return (String) getStateHelper().eval(Properties.topGroupExpandedRightIcon, PanelIcons.transparent.toString());
}
- public void setTopGroupRightIconExpanded(String topGroupRightIconExpanded) {
- getStateHelper().put(Properties.topGroupRightIconExpanded, topGroupRightIconExpanded);
+ public void setTopGroupExpandedRightIcon(String topGroupExpandedRightIcon) {
+ getStateHelper().put(Properties.topGroupExpandedRightIcon, topGroupExpandedRightIcon);
}
@Attribute(generate = false)
- public String getTopGroupLeftIconCollapsed() {
- return (String) getStateHelper().eval(Properties.topGroupLeftIconCollapsed, PanelIcons.transparent.toString());
+ public String getTopGroupCollapsedLeftIcon() {
+ return (String) getStateHelper().eval(Properties.topGroupCollapsedLeftIcon, PanelIcons.transparent.toString());
}
- public void setTopGroupLeftIconCollapsed(String topGroupLeftIconCollapsed) {
- getStateHelper().put(Properties.topGroupLeftIconCollapsed, topGroupLeftIconCollapsed);
+ public void setTopGroupCollapsedLeftIcon(String topGroupCollapsedLeftIcon) {
+ getStateHelper().put(Properties.topGroupCollapsedLeftIcon, topGroupCollapsedLeftIcon);
}
@Attribute(generate = false)
- public String getTopGroupRightIconCollapsed() {
- return (String) getStateHelper().eval(Properties.topGroupRightIconCollapsed, PanelIcons.transparent.toString());
+ public String getTopGroupCollapsedRightIcon() {
+ return (String) getStateHelper().eval(Properties.topGroupCollapsedRightIcon, PanelIcons.transparent.toString());
}
- public void setTopGroupRightIconCollapsed(String topGroupRightIconCollapsed) {
- getStateHelper().put(Properties.topGroupRightIconCollapsed, topGroupRightIconCollapsed);
+ public void setTopGroupCollapsedRightIcon(String topGroupCollapsedRightIcon) {
+ getStateHelper().put(Properties.topGroupCollapsedRightIcon, topGroupCollapsedRightIcon);
}
@Attribute(generate = false)
- public String getTopGroupLeftIconDisabled() {
- return (String) getStateHelper().eval(Properties.topGroupLeftIconDisabled, PanelIcons.transparent.toString());
+ public String getTopGroupDisabledLeftIcon() {
+ return (String) getStateHelper().eval(Properties.topGroupDisabledLeftIcon, PanelIcons.transparent.toString());
}
- public void setTopGroupLeftIconDisabled(String topGroupLeftIconDisabled) {
- getStateHelper().put(Properties.topGroupLeftIconDisabled, topGroupLeftIconDisabled);
+ public void setTopGroupDisabledLeftIcon(String topGroupDisabledLeftIcon) {
+ getStateHelper().put(Properties.topGroupDisabledLeftIcon, topGroupDisabledLeftIcon);
}
@Attribute(generate = false)
- public String getTopGroupRightIconDisabled() {
- return (String) getStateHelper().eval(Properties.topGroupRightIconDisabled, PanelIcons.transparent.toString());
+ public String getTopGroupDisabledRightIcon() {
+ return (String) getStateHelper().eval(Properties.topGroupDisabledRightIcon, PanelIcons.transparent.toString());
}
- public void setTopGroupRightIconDisabled(String topGroupRightIconDisabled) {
- getStateHelper().put(Properties.topGroupRightIconDisabled, topGroupRightIconDisabled);
+ public void setTopGroupDisabledRightIcon(String topGroupDisabledRightIcon) {
+ getStateHelper().put(Properties.topGroupDisabledRightIcon, topGroupDisabledRightIcon);
}
@Attribute(events = @EventName("click"))
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -23,21 +23,17 @@
package org.richfaces.component;
+import org.richfaces.PanelMenuMode;
+import org.richfaces.cdk.annotations.*;
+import org.richfaces.event.ItemChangeEvent;
+import org.richfaces.event.PanelToggleEvent;
+
import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.context.FacesContext;
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
-import org.richfaces.PanelMenuMode;
-import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.EventName;
-import org.richfaces.cdk.annotations.JsfComponent;
-import org.richfaces.cdk.annotations.Tag;
-import org.richfaces.cdk.annotations.TagType;
-import org.richfaces.event.ItemChangeEvent;
-import org.richfaces.event.PanelToggleEvent;
-
/**
* @author akolonitsky
* @since 2010-10-25
@@ -180,68 +176,68 @@
// ------------------------------------------------ Html Attributes
enum Properties {
- leftIconDisabled, leftIconExpanded, rightIconCollapsed, rightIconDisabled, rightIconExpanded, disabledClass, styleClass, leftIconCollapsed
+ leftDisabledIcon, leftExpandedIcon, rightCollapsedIcon, rightDisabledIcon, rightExpandedIcon, disabledClass, styleClass, leftCollapsedIcon
}
@Attribute(generate = false)
- public String getLeftIconCollapsed() {
- return (String) getStateHelper().eval(Properties.leftIconCollapsed,
- isTopItem() ? getPanelMenu().getTopGroupLeftIconCollapsed() : getPanelMenu().getGroupLeftIconCollapsed());
+ public String getLeftCollapsedIcon() {
+ return (String) getStateHelper().eval(Properties.leftCollapsedIcon,
+ isTopItem() ? getPanelMenu().getTopGroupCollapsedLeftIcon() : getPanelMenu().getGroupCollapsedLeftIcon());
}
- public void setLeftIconCollapsed(String leftIconCollapsed) {
- getStateHelper().put(Properties.leftIconCollapsed, leftIconCollapsed);
+ public void setLeftCollapsedIcon(String leftCollapsedIcon) {
+ getStateHelper().put(Properties.leftCollapsedIcon, leftCollapsedIcon);
}
@Attribute(generate = false)
- public String getLeftIconDisabled() {
- return (String) getStateHelper().eval(Properties.leftIconDisabled,
- isTopItem() ? getPanelMenu().getTopGroupLeftIconDisabled() : getPanelMenu().getGroupLeftIconDisabled());
+ public String getLeftDisabledIcon() {
+ return (String) getStateHelper().eval(Properties.leftDisabledIcon,
+ isTopItem() ? getPanelMenu().getTopGroupDisabledLeftIcon() : getPanelMenu().getGroupDisabledLeftIcon());
}
- public void setLeftIconDisabled(String leftIconDisabled) {
- getStateHelper().put(Properties.leftIconDisabled, leftIconDisabled);
+ public void setLeftDisabledIcon(String leftDisabledIcon) {
+ getStateHelper().put(Properties.leftDisabledIcon, leftDisabledIcon);
}
@Attribute(generate = false)
- public String getLeftIconExpanded() {
- return (String) getStateHelper().eval(Properties.leftIconExpanded,
- isTopItem() ? getPanelMenu().getTopGroupLeftIconExpanded() : getPanelMenu().getGroupLeftIconExpanded());
+ public String getLeftExpandedIcon() {
+ return (String) getStateHelper().eval(Properties.leftExpandedIcon,
+ isTopItem() ? getPanelMenu().getTopGroupExpandedLeftIcon() : getPanelMenu().getGroupExpandedLeftIcon());
}
- public void setLeftIconExpanded(String leftIconExpanded) {
- getStateHelper().put(Properties.leftIconExpanded, leftIconExpanded);
+ public void setLeftExpandedIcon(String leftExpandedIcon) {
+ getStateHelper().put(Properties.leftExpandedIcon, leftExpandedIcon);
}
@Attribute(generate = false)
- public String getRightIconCollapsed() {
- return (String) getStateHelper().eval(Properties.rightIconCollapsed,
- isTopItem() ? getPanelMenu().getTopGroupRightIconCollapsed() : getPanelMenu().getGroupRightIconCollapsed());
+ public String getRightCollapsedIcon() {
+ return (String) getStateHelper().eval(Properties.rightCollapsedIcon,
+ isTopItem() ? getPanelMenu().getTopGroupCollapsedRightIcon() : getPanelMenu().getGroupCollapsedRightIcon());
}
- public void setRightIconCollapsed(String rightIconCollapsed) {
- getStateHelper().put(Properties.rightIconCollapsed, rightIconCollapsed);
+ public void setRightCollapsedIcon(String rightCollapsedIcon) {
+ getStateHelper().put(Properties.rightCollapsedIcon, rightCollapsedIcon);
}
@Attribute(generate = false)
- public String getRightIconDisabled() {
- return (String) getStateHelper().eval(Properties.rightIconDisabled,
- isTopItem() ? getPanelMenu().getTopGroupRightIconDisabled() : getPanelMenu().getGroupRightIconDisabled());
+ public String getRightDisabledIcon() {
+ return (String) getStateHelper().eval(Properties.rightDisabledIcon,
+ isTopItem() ? getPanelMenu().getTopGroupDisabledRightIcon() : getPanelMenu().getGroupDisabledRightIcon());
}
- public void setRightIconDisabled(String rightIconDisabled) {
- getStateHelper().put(Properties.rightIconDisabled, rightIconDisabled);
+ public void setRightDisabledIcon(String rightDisabledIcon) {
+ getStateHelper().put(Properties.rightDisabledIcon, rightDisabledIcon);
}
@Attribute(generate = false)
- public String getRightIconExpanded() {
- return (String) getStateHelper().eval(Properties.rightIconExpanded,
- isTopItem() ? getPanelMenu().getTopGroupRightIconExpanded() : getPanelMenu().getGroupRightIconExpanded());
+ public String getRightExpandedIcon() {
+ return (String) getStateHelper().eval(Properties.rightExpandedIcon,
+ isTopItem() ? getPanelMenu().getTopGroupExpandedRightIcon() : getPanelMenu().getGroupExpandedRightIcon());
}
- public void setRightIconExpanded(String rightIconExpanded) {
- getStateHelper().put(Properties.rightIconExpanded, rightIconExpanded);
+ public void setRightExpandedIcon(String rightExpandedIcon) {
+ getStateHelper().put(Properties.rightExpandedIcon, rightExpandedIcon);
}
@Attribute(events = @EventName("collapse"))
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -23,15 +23,11 @@
package org.richfaces.component;
-import javax.faces.component.UIComponent;
-
import org.richfaces.PanelMenuMode;
-import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.cdk.annotations.EventName;
-import org.richfaces.cdk.annotations.JsfComponent;
-import org.richfaces.cdk.annotations.Tag;
-import org.richfaces.cdk.annotations.TagType;
+import org.richfaces.cdk.annotations.*;
+import javax.faces.component.UIComponent;
+
/**
* @author akolonitsky
* @since 2010-10-25
@@ -128,7 +124,7 @@
// ------------------------------------------------ Html Attributes
enum Properties {
- leftIcon, leftIconDisabled, iconRight, rightIconDisabled, styleClass, disabledClass, name
+ leftIcon, leftDisabledIcon, iconRight, rightDisabledIcon, styleClass, disabledClass, name
}
@@ -159,13 +155,13 @@
public abstract String getLeftIconClass();
@Attribute(generate = false)
- public String getLeftIconDisabled() {
- return (String) getStateHelper().eval(Properties.leftIconDisabled,
- isTopItem() ? getPanelMenu().getTopItemLeftIconDisabled() : getPanelMenu().getItemLeftIconDisabled());
+ public String getLeftDisabledIcon() {
+ return (String) getStateHelper().eval(Properties.leftDisabledIcon,
+ isTopItem() ? getPanelMenu().getTopItemDisabledLeftIcon() : getPanelMenu().getItemDisabledLeftIcon());
}
- public void setLeftIconDisabled(String leftIconDisabled) {
- getStateHelper().put(Properties.leftIconDisabled, leftIconDisabled);
+ public void setLeftDisabledIcon(String leftDisabledIcon) {
+ getStateHelper().put(Properties.leftDisabledIcon, leftDisabledIcon);
}
@Attribute(generate = false)
@@ -182,13 +178,13 @@
public abstract String getRightIconClass();
@Attribute(generate = false)
- public String getRightIconDisabled() {
- return (String) getStateHelper().eval(Properties.rightIconDisabled,
- isTopItem() ? getPanelMenu().getTopItemRightIconDisabled() : getPanelMenu().getItemRightIconDisabled());
+ public String getRightDisabledIcon() {
+ return (String) getStateHelper().eval(Properties.rightDisabledIcon,
+ isTopItem() ? getPanelMenu().getTopItemDisabledRightIcon() : getPanelMenu().getItemDisabledRightIcon());
}
- public void setRightIconDisabled(String rightIconDisabled) {
- getStateHelper().put(Properties.rightIconDisabled, rightIconDisabled);
+ public void setRightDisabledIcon(String rightDisabledIcon) {
+ getStateHelper().put(Properties.rightDisabledIcon, rightDisabledIcon);
}
@Attribute
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -47,51 +47,51 @@
// ------------------------------------------------ Html Attributes
enum Properties {
- headerClassDisabled, headerClassInactive, headerClass, contentClass, headerClassActive
+ headerDisabledClass, headerInactiveClass, headerClass, contentClass, headerActiveClass
}
@Attribute(generate = false)
- public String getHeaderClassActive() {
- String value = (String) getStateHelper().eval(Properties.headerClassActive);
+ public String getHeaderActiveClass() {
+ String value = (String) getStateHelper().eval(Properties.headerActiveClass);
if (value != null) {
return value;
}
- return getTabPanel().getTabHeaderClassActive();
+ return getTabPanel().getTabActiveHeaderClass();
}
- public void setHeaderClassActive(String headerClassActive) {
- getStateHelper().put(Properties.headerClassActive, headerClassActive);
+ public void setHeaderActiveClass(String headerActiveClass) {
+ getStateHelper().put(Properties.headerActiveClass, headerActiveClass);
}
@Attribute(generate = false)
- public String getHeaderClassDisabled() {
- String value = (String) getStateHelper().eval(Properties.headerClassDisabled);
+ public String getHeaderDisabledClass() {
+ String value = (String) getStateHelper().eval(Properties.headerDisabledClass);
if (value != null) {
return value;
}
- return getTabPanel().getTabHeaderClassDisabled();
+ return getTabPanel().getTabDisabledHeaderClass();
}
- public void setHeaderClassDisabled(String headerClassDisabled) {
- getStateHelper().put(Properties.headerClassDisabled, headerClassDisabled);
+ public void setHeaderDisabledClass(String headerDisabledClass) {
+ getStateHelper().put(Properties.headerDisabledClass, headerDisabledClass);
}
@Attribute(generate = false)
- public String getHeaderClassInactive() {
- String value = (String) getStateHelper().eval(Properties.headerClassInactive);
+ public String getHeaderInactiveClass() {
+ String value = (String) getStateHelper().eval(Properties.headerInactiveClass);
if (value != null) {
return value;
}
- return getTabPanel().getTabHeaderClassInactive();
+ return getTabPanel().getTabInactiveHeaderClass();
}
- public void setHeaderClassInactive(String headerClassInactive) {
- getStateHelper().put(Properties.headerClassInactive, headerClassInactive);
+ public void setHeaderInactiveClass(String headerInactiveClass) {
+ getStateHelper().put(Properties.headerInactiveClass, headerInactiveClass);
}
@Attribute(generate = false)
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTabPanel.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -67,13 +67,13 @@
public abstract HeaderAlignment getHeaderAlignment();
@Attribute
- public abstract String getTabHeaderClassActive();
+ public abstract String getTabActiveHeaderClass();
@Attribute
- public abstract String getTabHeaderClassDisabled();
+ public abstract String getTabDisabledHeaderClass();
@Attribute
- public abstract String getTabHeaderClassInactive();
+ public abstract String getTabInactiveHeaderClass();
@Attribute
public abstract String getTabContentClass();
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -22,14 +22,14 @@
package org.richfaces.component;
-import static org.richfaces.renderkit.html.DivPanelRenderer.capitalize;
-
-import javax.faces.component.UIComponent;
-
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.EventName;
import org.richfaces.renderkit.html.DivPanelRenderer;
+import javax.faces.component.UIComponent;
+
+import static org.richfaces.renderkit.html.DivPanelRenderer.capitalize;
+
/**
* @author akolonitsky
* @since 2010-08-05
@@ -100,13 +100,13 @@
// ------------------------------------------------ Html Attributes
@Attribute
- public abstract String getHeaderClassActive();
+ public abstract String getHeaderActiveClass();
@Attribute
- public abstract String getHeaderClassDisabled();
+ public abstract String getHeaderDisabledClass();
@Attribute
- public abstract String getHeaderClassInactive();
+ public abstract String getHeaderInactiveClass();
@Attribute
public abstract String getHeaderClass();
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -1,21 +1,18 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.TD_ELEM;
-import static org.richfaces.renderkit.html.DivPanelRenderer.attributeAsString;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
import org.richfaces.component.AbstractAccordionItem;
import org.richfaces.component.AbstractTogglePanelTitledItem;
import org.richfaces.component.util.HtmlUtil;
import org.richfaces.renderkit.util.PanelIcons;
import org.richfaces.renderkit.util.PanelIcons.State;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+
+import static org.richfaces.renderkit.HtmlConstants.*;
+import static org.richfaces.renderkit.html.DivPanelRenderer.attributeAsString;
+
class AccordionItemHeaderRenderer extends TableIconsRendererHelper<AbstractAccordionItem> {
public AccordionItemHeaderRenderer() {
@@ -23,15 +20,15 @@
}
protected void encodeHeaderLeftIcon(ResponseWriter writer, FacesContext context, AbstractAccordionItem panel) throws IOException {
- String iconInactive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconInactive();
- String iconActive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconActive();
+ String iconInactive = panel.isDisabled() ? panel.getLeftDisabledIcon() : panel.getLeftInactiveIcon();
+ String iconActive = panel.isDisabled() ? panel.getLeftDisabledIcon() : panel.getLeftActiveIcon();
encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconInactive, iconActive, panel.isDisabled() ? State.commonDisabled : State.common);
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractAccordionItem panel) throws IOException {
- String iconInactive = panel.isDisabled() ? panel.getRightIconDisabled() : panel.getRightIconInactive();
- String iconActive = panel.isDisabled() ? panel.getRightIconDisabled() : panel.getRightIconActive();
+ String iconInactive = panel.isDisabled() ? panel.getRightDisabledIcon() : panel.getRightInactiveIcon();
+ String iconActive = panel.isDisabled() ? panel.getRightDisabledIcon() : panel.getRightActiveIcon();
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconInactive, iconActive, panel.isDisabled() ? State.headerDisabled : State.header);
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -22,26 +22,22 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.STYLE_ATTRIBUTE;
+import org.ajax4jsf.javascript.JSObject;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.component.AbstractCollapsiblePanel;
+import org.richfaces.component.AbstractTogglePanel;
+import org.richfaces.renderkit.util.PanelIcons;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
-import org.ajax4jsf.javascript.JSObject;
-import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.component.AbstractCollapsiblePanel;
-import org.richfaces.component.AbstractTogglePanel;
-import org.richfaces.renderkit.util.PanelIcons;
+import static org.richfaces.renderkit.HtmlConstants.*;
/**
* @author akolonitsky
@@ -68,23 +64,23 @@
private final TableIconsRendererHelper<AbstractCollapsiblePanel> headerRenderer = new TableIconsRendererHelper<AbstractCollapsiblePanel>("header", "rf-cp") {
protected void encodeHeaderLeftIcon(ResponseWriter writer, FacesContext context, AbstractCollapsiblePanel panel) throws IOException {
- String leftIconCollapsed = panel.getLeftIconCollapsed();
- if (leftIconCollapsed == null || leftIconCollapsed.trim().length() == 0) {
- leftIconCollapsed = PanelIcons.chevronUp.toString();
+ String leftCollapsedIcon = panel.getLeftCollapsedIcon();
+ if (leftCollapsedIcon == null || leftCollapsedIcon.trim().length() == 0) {
+ leftCollapsedIcon = PanelIcons.chevronUp.toString();
}
- String leftIconExpanded = panel.getLeftIconExpanded();
- if (leftIconExpanded == null || leftIconExpanded.trim().length() == 0) {
- leftIconExpanded = PanelIcons.chevronDown.toString();
+ String leftExpandedIcon = panel.getLeftExpandedIcon();
+ if (leftExpandedIcon == null || leftExpandedIcon.trim().length() == 0) {
+ leftExpandedIcon = PanelIcons.chevronDown.toString();
}
encodeTdIcon(writer, context, cssClassPrefix + "-ico",
- leftIconCollapsed, leftIconExpanded, PanelIcons.State.header);
+ leftCollapsedIcon, leftExpandedIcon, PanelIcons.State.header);
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractCollapsiblePanel panel) throws IOException {
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico",
- panel.getRightIconCollapsed(), panel.getRightIconExpanded(), PanelIcons.State.header);
+ panel.getRightCollapsedIcon(), panel.getRightExpandedIcon(), PanelIcons.State.header);
}
@Override
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -1,14 +1,13 @@
package org.richfaces.renderkit.html;
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
import org.richfaces.component.AbstractPanelMenuGroup;
import org.richfaces.renderkit.util.PanelIcons;
import org.richfaces.renderkit.util.PanelIcons.State;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+
class PanelMenuGroupHeaderRenderer extends TableIconsRendererHelper<AbstractPanelMenuGroup> {
PanelMenuGroupHeaderRenderer(String cssClassPrefix) {
@@ -24,8 +23,8 @@
}
protected void encodeHeaderLeftIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuGroup group) throws IOException {
- String iconCollapsed = group.isDisabled() ? group.getLeftIconDisabled() : group.getLeftIconCollapsed();
- String iconExpanded = group.isDisabled() ? group.getLeftIconDisabled() : group.getLeftIconExpanded();
+ String iconCollapsed = group.isDisabled() ? group.getLeftDisabledIcon() : group.getLeftCollapsedIcon();
+ String iconExpanded = group.isDisabled() ? group.getLeftDisabledIcon() : group.getLeftExpandedIcon();
if (iconCollapsed == null || iconCollapsed.trim().length() == 0) {
iconCollapsed = PanelIcons.transparent.toString();
@@ -39,8 +38,8 @@
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuGroup group) throws IOException {
- String iconCollapsed = group.isDisabled() ? group.getRightIconDisabled() : group.getRightIconCollapsed();
- String iconExpanded = group.isDisabled() ? group.getRightIconDisabled() : group.getRightIconExpanded();
+ String iconCollapsed = group.isDisabled() ? group.getRightDisabledIcon() : group.getRightCollapsedIcon();
+ String iconExpanded = group.isDisabled() ? group.getRightDisabledIcon() : group.getRightExpandedIcon();
if (iconCollapsed == null || iconCollapsed.trim().length() == 0) {
iconCollapsed = PanelIcons.transparent.toString();
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -100,7 +100,7 @@
}
private void encodeHeaderGroupRightIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuItem menuItem, String classPrefix) throws IOException {
- String icon = menuItem.isDisabled() ? menuItem.getRightIconDisabled() : menuItem.getRightIcon();
+ String icon = menuItem.isDisabled() ? menuItem.getRightDisabledIcon() : menuItem.getRightIcon();
String cssClasses = concatClasses(classPrefix + "-exp-ico", menuItem.getLeftIconClass());
if (icon == null || icon.trim().length() == 0) {
@@ -110,7 +110,7 @@
}
private void encodeHeaderGroupLeftIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuItem menuItem, String classPrefix) throws IOException {
- String icon = menuItem.isDisabled() ? menuItem.getLeftIconDisabled() : menuItem.getLeftIcon();
+ String icon = menuItem.isDisabled() ? menuItem.getLeftDisabledIcon() : menuItem.getLeftIcon();
String cssClasses = concatClasses(classPrefix + "-ico", menuItem.getLeftIconClass());
if (icon == null || icon.trim().length() == 0) {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2011-01-28 17:08:21 UTC (rev 21310)
@@ -22,27 +22,6 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.active;
-import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.disabled;
-import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.inactive;
-import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.STYLE_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.TBODY_ELEMENT;
-import static org.richfaces.renderkit.HtmlConstants.TD_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.TR_ELEMENT;
-import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
-
-import java.io.IOException;
-import java.util.Map;
-
-import javax.faces.application.ResourceDependencies;
-import javax.faces.application.ResourceDependency;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.component.AbstractTabPanel;
@@ -53,6 +32,18 @@
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.RenderKitUtils;
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.Map;
+
+import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates.*;
+import static org.richfaces.renderkit.HtmlConstants.*;
+import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
+
/**
* @author akolonitsky
* @since 2010-08-24
@@ -195,10 +186,10 @@
writeTopTabSpacer(w, comp, "padding-right: 5px; width: 100%;", "rf-tb-hdr-spcr");
}
- private void writeTopTabSpacer(ResponseWriter w, UIComponent comp, String style, String classStyle) throws IOException {
+ private void writeTopTabSpacer(ResponseWriter w, UIComponent comp, String style, String styleClass) throws IOException {
w.startElement(TD_ELEM, comp);
w.writeAttribute(STYLE, style, null);
- w.writeAttribute(CLASS, classStyle, null);
+ w.writeAttribute(CLASS, styleClass, null);
w.write("<br />");
w.endElement(TD_ELEM);
}
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance.xhtml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance.xhtml 2011-01-28 17:07:14 UTC (rev 21309)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance.xhtml 2011-01-28 17:08:21 UTC (rev 21310)
@@ -42,36 +42,36 @@
itemLeftIcon="triangleDown"
itemClass="itemClass"
- itemRightIconDisabled="chevronUp"
- itemLeftIconDisabled="chevronDown"
+ itemDisabledRightIcon="chevronUp"
+ itemDisabledLeftIcon="chevronDown"
itemDisabledClass="itemDisabledClass"
topItemRightIcon="triangle"
topItemLeftIcon="triangle"
topItemClass="topItemClass"
- topItemRightIconDisabled="chevron"
- topItemLeftIconDisabled="chevron"
+ topItemDisabledRightIcon="chevron"
+ topItemDisabledLeftIcon="chevron"
topItemDisabledClass="topItemDisabledClass"
- groupRightIconCollapsed="triangleUp"
- groupRightIconExpanded="disc"
- groupLeftIconCollapsed="triangleDown"
- groupLeftIconExpanded="disc"
+ groupCollapsedRightIcon="triangleUp"
+ groupExpandedRightIcon="disc"
+ groupCollapsedLeftIcon="triangleDown"
+ groupExpandedLeftIcon="disc"
groupClass="groupClass"
- groupRightIconDisabled="chevronUp"
- groupLeftIconDisabled="chevronDown"
+ groupDisabledRightIcon="chevronUp"
+ groupDisabledLeftIcon="chevronDown"
groupDisabledClass="groupDisabledClass"
- topGroupRightIconCollapsed="triangle"
- topGroupRightIconExpanded="disc"
- topGroupLeftIconCollapsed="triangle"
- topGroupLeftIconExpanded="disc"
+ topGroupCollapsedRightIcon="triangle"
+ topGroupExpandedRightIcon="disc"
+ topGroupCollapsedLeftIcon="triangle"
+ topGroupExpandedLeftIcon="disc"
topGroupClass="topGroupClass"
- topGroupRightIconDisabled="chevron"
- topGroupLeftIconDisabled="chevron"
+ topGroupDisabledRightIcon="chevron"
+ topGroupDisabledLeftIcon="chevron"
topGroupDisabledClass="topGroupDisabledClass"
>
13 years, 11 months
JBoss Rich Faces SVN: r21309 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-28 12:07:14 -0500 (Fri, 28 Jan 2011)
New Revision: 21309
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
Log:
https://issues.jboss.org/browse/RF-10163 inplaceSelect: showPopup js API works wrong with default label
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-28 15:56:14 UTC (rev 21308)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-28 17:07:14 UTC (rev 21309)
@@ -56,21 +56,34 @@
onshow: function() {
$super.onshow.call(this);
if(this.openOnEdit) {
- this.showPopup();
+ this.__showPopup();
}
},
onhide: function() {
- this.hidePopup();
+ this.__hidePopup();
},
showPopup: function() {
+ this.editState = true;
+ this.scrollElements = rf.Event.bindScrollEventHandlers(this.id, this.__scrollHandler, this);
+ this.__setInputFocus();
+ this.__setFocused(true);
+ this.focusValue = this.getValue();
+ this.invokeEvent.call(this, "focus", document.getElementById(this.id + 'Input'));
+ this.__showPopup();
+
+
+ },
+
+ __showPopup: function() {
this.popupList.show();
- this.__hideLabel();
+ this.__hideLabel();
},
- hidePopup: function() {
+ __hidePopup: function() {
this.popupList.hide();
+ this.__showLabel();
},
onsave: function() {
@@ -91,7 +104,7 @@
},
onblur: function(e) {
- this.hidePopup();
+ this.__hidePopup();
$super.onblur.call(this);
},
@@ -108,7 +121,7 @@
this.setValue(label);
this.__setInputFocus();
- this.hidePopup();
+ this.__hidePopup();
if(this.saveOnSelect) {
this.save();
@@ -133,7 +146,7 @@
saveItemValue: function(value) {
this.selValueInput.val(value);
- this.__showLabel();
+
},
getItemLabel: function(item) {
@@ -203,7 +216,7 @@
},
__clickHandler: function(e) {
- this.showPopup();
+ this.__showPopup();
},
__onListMouseDown: function(e) {
13 years, 11 months
JBoss Rich Faces SVN: r21308 - in management/design-4x/panelMenu: images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Ochikvina
Date: 2011-01-28 10:56:14 -0500 (Fri, 28 Jan 2011)
New Revision: 21308
Added:
management/design-4x/panelMenu/images/gr2.png
management/design-4x/panelMenu/images/tgl_down_dis.gif
Modified:
management/design-4x/panelMenu/panelMenu_new.html
Log:
Added disabled mode for the top group.
Added: management/design-4x/panelMenu/images/gr2.png
===================================================================
(Binary files differ)
Property changes on: management/design-4x/panelMenu/images/gr2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design-4x/panelMenu/images/tgl_down_dis.gif
===================================================================
(Binary files differ)
Property changes on: management/design-4x/panelMenu/images/tgl_down_dis.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: management/design-4x/panelMenu/panelMenu_new.html
===================================================================
--- management/design-4x/panelMenu/panelMenu_new.html 2011-01-28 14:46:15 UTC (rev 21307)
+++ management/design-4x/panelMenu/panelMenu_new.html 2011-01-28 15:56:14 UTC (rev 21308)
@@ -87,6 +87,11 @@
font-weight:bold;
padding:2px 0 2px 15px;
}
+ .rf-top-gr-dis{
+ background:#ECF4FE url("images/gr2.png") left top repeat-x;/*from additionalBackgroundColor (top) to headerGradientColor (bottom), background-color - additionalBackgroundColor*/
+ color:#8DB7F3;/*tabDisabledTextColor*/
+ cursor:default;
+ }
.rf-pm-gr-ic{
white-space:nowrap;
}
@@ -196,10 +201,10 @@
</div>
</div>
<div class="rf-pm-top-gr">
- <div class="rf-pm-top-gr-hdr">
+ <div class="rf-pm-top-gr-hdr rf-top-gr-dis">
<span class="rf-pm-top-gr-ic"><img width="18" height="18" alt="Menu group icon" src="images/spacer.gif"/></span>
<span class="rf-pm-top-gr-lbl">Group 3</span>
- <span class="rf-pm-top-gr-tgl"><img width="16" height="16" alt="Menu group icon" src="images/tgl_down.gif"/></span>
+ <span class="rf-pm-top-gr-tgl"><img width="16" height="16" alt="Menu group icon" src="images/tgl_down_dis.gif"/></span>
</div>
<div class="rf-pm-itm" style="display: none;">
<span class="rf-pm-itm-ic"><img width="16" height="16" alt="Menu item icon" src="images/item_icon.gif"/></span>
13 years, 11 months
JBoss Rich Faces SVN: r21307 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-28 09:46:15 -0500 (Fri, 28 Jan 2011)
New Revision: 21307
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTabPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTogglePanel.java
Log:
* tests for toggle control fixed
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCAccordion.java 2011-01-28 14:21:31 UTC (rev 21306)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCAccordion.java 2011-01-28 14:46:15 UTC (rev 21307)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTabPanel.java 2011-01-28 14:21:31 UTC (rev 21306)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTabPanel.java 2011-01-28 14:46:15 UTC (rev 21307)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -36,8 +36,8 @@
*/
public class TestRichTCTabPanel extends AbstractTestToggleControl {
- JQueryLocator[] items1 = {pjq("div[id$=item11:content]"), pjq("div[id$=item12:content]"), pjq("div[id$=item13:content]")};
- JQueryLocator[] items2 = {pjq("div[id$=item21:content]"), pjq("div[id$=item22:content]"), pjq("div[id$=item23:content]")};
+ JQueryLocator[] items1 = {pjq("div[id$=item11]"), pjq("div[id$=item12]"), pjq("div[id$=item13]")};
+ JQueryLocator[] items2 = {pjq("div[id$=item21]"), pjq("div[id$=item22]"), pjq("div[id$=item23]")};
@Override
public URL getTestUrl() {
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTogglePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTogglePanel.java 2011-01-28 14:21:31 UTC (rev 21306)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richToggleControl/TestRichTCTogglePanel.java 2011-01-28 14:46:15 UTC (rev 21307)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
13 years, 11 months
JBoss Rich Faces SVN: r21306 - in modules/tests/metamer/trunk: application/src/main/webapp/components/a4jCommandButton and 30 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-28 09:21:31 -0500 (Fri, 28 Jan 2011)
New Revision: 21306
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
Log:
* added/fixed tests for panels
* fixed test in rich:select
* refactoring and minor fixes
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -28,7 +28,6 @@
import javax.faces.bean.ViewScoped;
import org.richfaces.component.UIAccordion;
-
import org.richfaces.tests.metamer.Attributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,7 +59,15 @@
attributes.setAttribute("activeItem", "item1");
attributes.setAttribute("rendered", true);
+ // will be tested in another way
+ attributes.remove("converter");
attributes.remove("itemChangeListener");
+
+ // TODO remove as soon as it is added to taglib RF-10310
+ attributes.setAttribute("onbeforedomupdate", null);
+ attributes.setAttribute("onbegin", null);
+ attributes.setAttribute("oncomplete", null);
+
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -58,9 +58,14 @@
attributes.setAttribute("activeItem", "tab1");
attributes.setAttribute("rendered", true);
- // TODO has to be tested in another way
+ // will be tested in another way
attributes.remove("converter");
attributes.remove("itemChangeListener");
+
+ // TODO remove as soon as it is added to taglib RF-10310
+ attributes.setAttribute("onbeforedomupdate", null);
+ attributes.setAttribute("onbegin", null);
+ attributes.setAttribute("oncomplete", null);
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -59,8 +59,14 @@
attributes.setAttribute("activeItem", "item1");
attributes.setAttribute("rendered", true);
- // TODO has to be tested in another way
+ // will to be tested in another way
+ attributes.remove("converter");
attributes.remove("itemChangeListener");
+
+ // TODO remove as soon as it is added to taglib RF-10310
+ attributes.setAttribute("onbeforedomupdate", null);
+ attributes.setAttribute("onbegin", null);
+ attributes.setAttribute("oncomplete", null);
}
public Attributes getAttributes() {
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandButton/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jCommandLink/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordionItem/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/dataModel.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/all.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richFunctions/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuGroup/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuItem/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMenuSeparator/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/customLook.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanel/nested.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuItem/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richProgressBar/static.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richSelect/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-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" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
- xmlns:rich="http://richfaces.org/rich">
+ xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:rich="http://richfaces.org/rich">
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -6,7 +6,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml 2011-01-28 14:21:31 UTC (rev 21306)
@@ -5,7 +5,7 @@
<!--
JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
by the @authors tag. See the copyright.txt in the distribution for a
full listing of individual contributors.
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -25,6 +25,7 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.locator.option.OptionLocatorFactory.optionLabel;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
@@ -42,6 +43,7 @@
import org.jboss.test.selenium.locator.Attribute;
import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
+import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
@@ -68,6 +70,8 @@
private JQueryLocator[] disabledHeaders = {pjq("div[id$=item1:header] div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item2:header] div.rf-ac-itm-lbl-dis"), pjq("div[id$=item3:header] div.rf-ac-itm-lbl-dis"),
pjq("div[id$=item4:header] div.rf-ac-itm-lbl-dis"), pjq("div[id$=item5:header] div.rf-ac-itm-lbl-dis")};
+ private JQueryLocator leftIcon = pjq("div[id$=item{0}] td.rf-ac-itm-ico");
+ private JQueryLocator rightIcon = pjq("div[id$=item{0}] td.rf-ac-itm-exp-ico");
@Override
public URL getTestUrl() {
@@ -94,48 +98,6 @@
}
@Test
- public void testSwitchTypeNull() {
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardXhr(selenium).click(itemHeaders[index]);
- waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- public void testSwitchTypeAjax() {
- selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=ajax]"));
- selenium.waitForPageToLoad();
-
- testSwitchTypeNull();
- }
-
- @Test
- public void testSwitchTypeClient() {
- selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=client]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardNoRequest(selenium).click(itemHeaders[index]);
- waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10040")
- public void testSwitchTypeServer() {
- selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=server]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardHttp(selenium).click(itemHeaders[index]);
- waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
public void testActiveItem() {
selenium.type(pjq("input[type=text][id$=activeItemInput]"), "item5");
selenium.waitForPageToLoad();
@@ -179,7 +141,7 @@
selenium.click(itemHeaders[2]);
waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -283,8 +245,7 @@
selenium.click(itemHeaders[2]);
waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
- String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(5)"));
- assertEquals(listenerOutput, "* item changed: item1 -> item3", "Item change listener's output");
+ phaseInfo.assertListener(PhaseId.INVOKE_APPLICATION, "item changed: item1 -> item3");
}
@Test
@@ -313,25 +274,72 @@
}
@Test
- public void testItemchangeEvents() {
- selenium.type(pjq("input[type=text][id$=onbeforeitemchangeInput]"), "metamerEvents += \"beforeitemchange \"");
- selenium.waitForPageToLoad();
- selenium.type(pjq("input[type=text][id$=onitemchangeInput]"), "metamerEvents += \"itemchange \"");
- selenium.waitForPageToLoad();
+ @IssueTracking("https://issues.jboss.org/browse/RF-10352")
+ public void testItemLeftIconActive() {
+ JQueryLocator icon = leftIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-act"));
+ JQueryLocator input = pjq("select[id$=itemLeftIconActiveInput]");
+ JQueryLocator image = leftIcon.format(1).getChild(jq("img"));
- selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
- String time1Value = selenium.getText(time);
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(leftIcon.format(i)), "Left icon of item" + i + " should not be present on the page.");
+ }
- guardXhr(selenium).click(itemHeaders[2]);
- waitGui.failWith("Page was not updated").waitForChange(time1Value, retrieveText.locator(time));
+ verifyStandardIcons(input, icon, image, "");
+ }
- String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+ @Test
+ public void testItemLeftIconDisabled() {
+ JQueryLocator icon = leftIcon.format(4).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemLeftIconDisabledInput]");
+ JQueryLocator image = leftIcon.format(4).getChild(jq("img"));
- assertEquals(events[0], "beforeitemchange", "Attribute onbeforeitemchange doesn't work");
- assertEquals(events[1], "itemchange", "Attribute onbeforeitemchange doesn't work");
+ verifyStandardIcons(input, icon, image, "-dis");
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10352")
+ public void testItemLeftIconInactive() {
+ JQueryLocator icon = leftIcon.format(3).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemLeftIconInactiveInput]");
+ JQueryLocator image = leftIcon.format(3).getChild(jq("img"));
+
+ verifyStandardIcons(input, icon, image, "");
+ }
+
+ @Test
+ public void testItemRightIconActive() {
+ JQueryLocator icon = rightIcon.format(1).getDescendant(jq("div.rf-ac-itm-ico-act"));
+ JQueryLocator input = pjq("select[id$=itemRightIconActiveInput]");
+ JQueryLocator image = rightIcon.format(1).getChild(jq("img"));
+
+ // icon=null
+ for (int i = 1; i < 6; i++) {
+ assertFalse(selenium.isElementPresent(rightIcon.format(i)), "Right icon of item" + i + " should not be present on the page.");
+ }
+
+ verifyStandardIcons(input, icon, image, "-hdr");
+ }
+
+ @Test
+ public void testItemRightIconDisabled() {
+ JQueryLocator icon = rightIcon.format(4).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemRightIconDisabledInput]");
+ JQueryLocator image = rightIcon.format(4).getChild(jq("img"));
+
+ verifyStandardIcons(input, icon, image, "-hdr-dis");
+ }
+
+ @Test
+ public void testItemRightIconInactive() {
+ JQueryLocator icon = rightIcon.format(3).getDescendant(jq("div.rf-ac-itm-ico-inact"));
+ JQueryLocator input = pjq("select[id$=itemRightIconInactiveInput]");
+ JQueryLocator image = rightIcon.format(3).getChild(jq("img"));
+
+ verifyStandardIcons(input, icon, image, "-hdr");
+ }
+
+ @Test
public void testLang() {
testLang(accordion);
}
@@ -352,6 +360,58 @@
}
@Test
+ public void testAjaxEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Item 2 is not displayed.").until(isDisplayed.locator(itemContents[1]));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 3, "3 events should be fired.");
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ @Test
+ public void testItemchangeEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeforeitemchangeInput]"), "metamerEvents += \"beforeitemchange \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onitemchangeInput]"), "metamerEvents += \"itemchange \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+ String time1Value = selenium.getText(time);
+
+ guardXhr(selenium).click(itemHeaders[2]);
+ waitGui.failWith("Page was not updated").waitForChange(time1Value, retrieveText.locator(time));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events[0], "beforeitemchange", "Attribute onbeforeitemchange doesn't work");
+ assertEquals(events[1], "itemchange", "Attribute onbeforeitemchange doesn't work");
+ }
+
+ @Test
+ public void testOnbeforeitemchange() {
+ selenium.type(pjq("input[id$=onbeforeitemchangeInput]"), "metamerEvents += \"onbeforeitemchange \"");
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Item 2 is not displayed.").until(isDisplayed.locator(itemContents[1]));
+
+ waitGui.failWith("onbeforeitemchange attribute does not work correctly").until(new EventFiredCondition(new Event("beforeitemchange")));
+ }
+
+ @Test
public void testOnclick() {
testFireEvent(Event.CLICK, accordion);
}
@@ -362,6 +422,17 @@
}
@Test
+ public void testOnitemchange() {
+ selenium.type(pjq("input[id$=onitemchangeInput]"), "metamerEvents += \"onitemchange \"");
+ selenium.waitForPageToLoad(TIMEOUT);
+
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Item 2 is not displayed.").until(isDisplayed.locator(itemContents[1]));
+
+ waitGui.failWith("onitemchange attribute does not work correctly").until(new EventFiredCondition(new Event("itemchange")));
+ }
+
+ @Test
public void testOnmousedown() {
testFireEvent(Event.MOUSEDOWN, accordion);
}
@@ -387,6 +458,16 @@
}
@Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "renderChecker");
+ selenium.waitForPageToLoad();
+
+ String renderCheckerTime = selenium.getText(renderChecker);
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Attribute render doesn't work").waitForChange(renderCheckerTime, retrieveText.locator(renderChecker));
+ }
+
+ @Test
public void testRendered() {
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
@@ -395,6 +476,16 @@
}
@Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"), "statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(itemHeaders[1]);
+ waitGui.failWith("Attribute status doesn't work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
+
+ @Test
public void testStyle() {
testStyle(accordion, "style");
}
@@ -405,6 +496,48 @@
}
@Test
+ public void testSwitchTypeNull() {
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardXhr(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+ selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=ajax]"));
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+ selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=client]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardNoRequest(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10040")
+ public void testSwitchTypeServer() {
+ selenium.click(pjq("input[type=radio][name$=switchTypeInput][value=server]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardHttp(selenium).click(itemHeaders[index]);
+ waitGui.failWith("Item " + index + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
public void testTitle() {
testTitle(accordion);
}
@@ -424,4 +557,62 @@
String value = selenium.getStyle(accordion, CssProperty.WIDTH);
assertEquals(value, "356px", "Attribute width");
}
+
+ private void verifyStandardIcons(JQueryLocator input, JQueryLocator icon, JQueryLocator image, String classSuffix) {
+ String imageNameSuffix = "";
+ if (classSuffix.contains("dis")) {
+ imageNameSuffix = "Disabled";
+ }
+
+ selenium.select(input, optionLabel("chevronDown"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-down" + classSuffix), "Div should have set class rf-ico-chevron-down" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("ChevronDown" + imageNameSuffix + ".png"), "Icon should contain a chevron down.");
+
+ selenium.select(input, optionLabel("chevronUp"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-chevron-up" + classSuffix), "Div should have set class rf-ico-chevron-up" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("ChevronUp" + imageNameSuffix + ".png"), "Icon should contain a chevron up.");
+
+ selenium.select(input, optionLabel("disc"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-disc" + classSuffix), "Div should have set class rf-ico-disc" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("Disc" + imageNameSuffix + ".png"), "Icon should contain a disc.");
+
+ selenium.select(input, optionLabel("grid"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-grid" + classSuffix), "Div should have set class rf-ico-grid" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("Grid" + imageNameSuffix + ".png"), "Icon should contain a grid.");
+
+ selenium.select(input, optionLabel("triangle"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle" + classSuffix), "Div should have set class rf-ico-triangle" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("Triangle" + imageNameSuffix + ".png"), "Icon should contain a triangle.");
+
+ selenium.select(input, optionLabel("triangleDown"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-down" + classSuffix), "Div should have set class rf-ico-triangle-down" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("TriangleDown" + imageNameSuffix + ".png"), "Icon should contain a triangle down.");
+
+ selenium.select(input, optionLabel("triangleUp"));
+ selenium.waitForPageToLoad();
+ assertTrue(selenium.belongsClass(icon, "rf-ico-triangle-up" + classSuffix), "Div should have set class rf-ico-triangle-up" + classSuffix + ".");
+ assertTrue(selenium.getStyle(icon, CssProperty.BACKGROUND_IMAGE).contains("TriangleUp" + imageNameSuffix + ".png"), "Icon should contain a triangle up.");
+
+ selenium.select(input, optionLabel("none"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon should not be present when icon=none.");
+
+ selenium.select(input, optionLabel("star"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon's div should not be present when icon=star.");
+ assertTrue(selenium.isElementPresent(image), "Icon's image should be rendered.");
+ assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("star.png"), "Icon's src attribute should contain star.png.");
+
+ selenium.select(input, optionLabel("nonexisting"));
+ selenium.waitForPageToLoad();
+ assertFalse(selenium.isElementPresent(icon), "Icon's div should not be present when icon=nonexisting.");
+ assertTrue(selenium.isElementPresent(image), "Icon's image should be rendered.");
+ assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("nonexisting"), "Icon's src attribute should contain nonexisting.");
+ }
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -525,7 +525,6 @@
selenium.select(input, optionLabel("star"));
selenium.waitForPageToLoad();
assertFalse(selenium.isElementPresent(icon), "Icon's div should not be present when icon=star.");
- waitFor(5000);
assertTrue(selenium.isElementPresent(image), "Icon's image should be rendered.");
assertTrue(selenium.getAttribute(image.getAttribute(Attribute.SRC)).contains("star.png"), "Icon's src attribute should contain star.png.");
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -206,8 +206,11 @@
selenium.type(pjq("input[type=text][id$=listHeightInput]"), "");
selenium.waitForPageToLoad();
- height = selenium.getStyle(jq("span.rf-is-lst-scrl"), CssProperty.HEIGHT);
- assertEquals(height, "200px", "Height of list did not change");
+ selenium.mouseDown(button);
+ selenium.mouseUp(button);
+ assertTrue(selenium.isVisible(popup), "Popup should be displayed.");
+
+ assertEquals(selenium.getElementHeight(jq("div.rf-sel-lst-scrl")), 100, "Height of list did not change");
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -53,6 +53,8 @@
public class TestRichTabPanel extends AbstractMetamerTest {
private JQueryLocator panel = pjq("div[id$=tabPanel]");
+ private JQueryLocator[] items = {pjq("div[id$=tab1]"), pjq("div[id$=tab2]"), pjq("div[id$=tab3]"), pjq("div[id$=tab4]"),
+ pjq("div[id$=tab5]")};
private JQueryLocator[] itemContents = {pjq("div[id$=tab1] > div.rf-tb-cnt"), pjq("div[id$=tab2] > div.rf-tb-cnt"),
pjq("div[id$=tab3] > div.rf-tb-cnt"), pjq("div[id$=tab4] > div.rf-tb-cnt"), pjq("div[id$=tab5] > div.rf-tb-cnt")};
private JQueryLocator[] activeHeaders = {pjq("td[id$=tab1:header:active]"), pjq("td[id$=tab2:header:active]"),
@@ -95,54 +97,12 @@
assertTrue(displayed, "Content of item1 should be visible.");
for (int i = 1; i < 5; i++) {
- displayed = selenium.isDisplayed(itemContents[i]);
+ displayed = selenium.isDisplayed(items[i]);
assertFalse(displayed, "Tab" + (i + 1) + "'s content should not be visible.");
}
}
@Test
- public void testSwitchTypeNull() {
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardXhr(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- public void testSwitchTypeAjax() {
- selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
- selenium.waitForPageToLoad();
-
- testSwitchTypeNull();
- }
-
- @Test
- public void testSwitchTypeClient() {
- selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardNoRequest(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10040")
- public void testSwitchTypeServer() {
- selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
- selenium.waitForPageToLoad();
-
- for (int i = 2; i >= 0; i--) {
- final int index = i;
- guardHttp(selenium).click(inactiveHeaders[index]);
- waitGui.failWith("Tab " + (index + 1) + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
- }
- }
-
- @Test
public void testActiveItem() {
selenium.type(pjq("input[type=text][id$=activeItemInput]"), "tab5");
selenium.waitForPageToLoad();
@@ -159,7 +119,7 @@
assertTrue(displayed, "Content of tab5 should be visible.");
for (int i = 0; i < 4; i++) {
- displayed = selenium.isDisplayed(itemContents[i]);
+ displayed = selenium.isDisplayed(items[i]);
assertFalse(displayed, "Tab" + (i + 1) + "'s content should not be visible.");
}
@@ -172,7 +132,7 @@
}
for (int i = 0; i < 5; i++) {
- displayed = selenium.isDisplayed(itemContents[i]);
+ displayed = selenium.isDisplayed(items[i]);
assertFalse(displayed, "Tab" + (i + 1) + "'s content should not be visible.");
}
}
@@ -186,7 +146,7 @@
selenium.click(inactiveHeaders[2]);
waitGui.failWith("Tab 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
}
@@ -263,7 +223,7 @@
selenium.click(inactiveHeaders[2]);
waitGui.failWith("Tab 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(2)"));
assertEquals(listenerOutput, "* item changed: tab1 -> tab3", "Item change listener's output");
@@ -302,6 +262,28 @@
}
@Test
+ public void testAjaxEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ guardXhr(selenium).click(inactiveHeaders[2]);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 3, "3 events should be fired.");
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ @Test
public void testOnbeforeitemchange() {
selenium.type(pjq("input[id$=onbeforeitemchangeInput]"), "metamerEvents += \"onbeforeitemchange \"");
selenium.waitForPageToLoad(TIMEOUT);
@@ -380,6 +362,16 @@
}
@Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "renderChecker");
+ selenium.waitForPageToLoad();
+
+ String renderCheckerTime = selenium.getText(renderChecker);
+ guardXhr(selenium).click(inactiveHeaders[1]);
+ waitGui.failWith("Attribute render doesn't work").waitForChange(renderCheckerTime, retrieveText.locator(renderChecker));
+ }
+
+ @Test
public void testRendered() {
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
@@ -388,6 +380,16 @@
}
@Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"), "statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(inactiveHeaders[1]);
+ waitGui.failWith("Attribute status doesn't work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
+
+ @Test
public void testStyle() {
testStyle(panel, "style");
}
@@ -398,15 +400,55 @@
}
@Test
+ public void testSwitchTypeNull() {
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardXhr(selenium).click(inactiveHeaders[index]);
+ waitGui.failWith("Tab " + (index + 1) + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardNoRequest(selenium).click(inactiveHeaders[index]);
+ waitGui.failWith("Tab " + (index + 1) + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10040")
+ public void testSwitchTypeServer() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
+ selenium.waitForPageToLoad();
+
+ for (int i = 2; i >= 0; i--) {
+ final int index = i;
+ guardHttp(selenium).click(inactiveHeaders[index]);
+ waitGui.failWith("Tab " + (index + 1) + " is not displayed.").until(isDisplayed.locator(itemContents[index]));
+ }
+ }
+
+ @Test
public void testTabContentClass() {
final String value = "metamer-ftest-class";
selenium.type(pjq("input[id$=tabContentClassInput]"), value);
selenium.waitForPageToLoad();
- for (JQueryLocator loc : itemContents) {
- assertTrue(selenium.belongsClass(loc, value), "tabContentClass does not work");
- }
+ assertTrue(selenium.belongsClass(itemContents[0], value), "tabContentClass does not work");
}
@Test
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-01-28 14:10:11 UTC (rev 21305)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-01-28 14:21:31 UTC (rev 21306)
@@ -82,75 +82,6 @@
}
@Test
- public void testSwitchTypeNull() {
- guardXhr(selenium).click(tc3);
- waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
- assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
-
- guardXhr(selenium).click(tc2);
- waitGui.failWith("Item 2 is not displayed.").until(isDisplayed.locator(item2));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
-
- guardXhr(selenium).click(tc1);
- waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(item1));
- assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
- }
-
- @Test
- public void testSwitchTypeAjax() {
- selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
- selenium.waitForPageToLoad();
-
- testSwitchTypeNull();
- }
-
- @Test
- public void testSwitchTypeClient() {
- selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
- selenium.waitForPageToLoad();
-
- guardNoRequest(selenium).click(tc3);
- waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
- assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
-
- guardNoRequest(selenium).click(tc2);
- waitGui.failWith("Item 2 is not displayed.").until(isDisplayed.locator(item2));
- assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
-
- guardNoRequest(selenium).click(tc1);
- waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(item1));
- assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
- assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
- }
-
- @Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10040")
- public void testSwitchTypeServer() {
- selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
- selenium.waitForPageToLoad();
-
- guardHttp(selenium).click(tc3);
- assertTrue(selenium.isVisible(item3), "Item 3 should be visible.");
- assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
- assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
-
- guardHttp(selenium).click(tc2);
- assertTrue(selenium.isVisible(item2), "Item 2 should be visible.");
- assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
- assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
-
- guardHttp(selenium).click(tc1);
- assertTrue(selenium.isVisible(item1), "Item 1 should be visible.");
- assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
- assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
- }
-
- @Test
public void testFirstLastPrevNextSwitchNull() {
guardXhr(selenium).click(tcNext);
waitGui.failWith("Next item (2) is not displayed.").until(isDisplayed.locator(item2));
@@ -261,7 +192,7 @@
selenium.click(tc3);
waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(3)"));
@@ -327,7 +258,7 @@
selenium.click(tc3);
waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
- assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
+ phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.RENDER_RESPONSE);
String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(2)"));
assertEquals(listenerOutput, "* item changed: item1 -> item3", "Item change listener's output");
@@ -338,8 +269,7 @@
selenium.click(tc3);
waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
- String listenerOutput = selenium.getText(jq("div#phasesPanel li:eq(5)"));
- assertEquals(listenerOutput, "* item changed: item1 -> item3", "Item change listener's output");
+ phaseInfo.assertListener(PhaseId.INVOKE_APPLICATION, "item changed: item1 -> item3");
}
@Test
@@ -374,6 +304,29 @@
}
@Test
+ public void testAjaxEvents() {
+ selenium.type(pjq("input[type=text][id$=onbeginInput]"), "metamerEvents += \"begin \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=onbeforedomupdateInput]"), "metamerEvents += \"beforedomupdate \"");
+ selenium.waitForPageToLoad();
+ selenium.type(pjq("input[type=text][id$=oncompleteInput]"), "metamerEvents += \"complete \"");
+ selenium.waitForPageToLoad();
+
+ selenium.getEval(new JavaScript("window.metamerEvents = \"\";"));
+
+ String reqTime = selenium.getText(time);
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Page was not updated").waitForChange(reqTime, retrieveText.locator(time));
+
+ String[] events = selenium.getEval(new JavaScript("window.metamerEvents")).split(" ");
+
+ assertEquals(events.length, 3, "3 events should be fired.");
+ assertEquals(events[0], "begin", "Attribute onbegin doesn't work");
+ assertEquals(events[1], "beforedomupdate", "Attribute onbeforedomupdate doesn't work");
+ assertEquals(events[2], "complete", "Attribute oncomplete doesn't work");
+ }
+
+ @Test
public void testItemchangeEvents() {
selenium.type(pjq("input[type=text][id$=onbeforeitemchangeInput]"), "metamerEvents += \"beforeitemchange \"");
selenium.waitForPageToLoad();
@@ -439,6 +392,16 @@
}
@Test
+ public void testRender() {
+ selenium.type(pjq("input[type=text][id$=renderInput]"), "renderChecker");
+ selenium.waitForPageToLoad();
+
+ String renderCheckerTime = selenium.getText(renderChecker);
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Attribute render doesn't work").waitForChange(renderCheckerTime, retrieveText.locator(renderChecker));
+ }
+
+ @Test
public void testRendered() {
selenium.click(pjq("input[type=radio][name$=renderedInput][value=false]"));
selenium.waitForPageToLoad();
@@ -447,6 +410,16 @@
}
@Test
+ public void testStatus() {
+ selenium.type(pjq("input[type=text][id$=statusInput]"), "statusChecker");
+ selenium.waitForPageToLoad();
+
+ String statusCheckerTime = selenium.getText(statusChecker);
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Attribute status doesn't work").waitForChange(statusCheckerTime, retrieveText.locator(statusChecker));
+ }
+
+ @Test
public void testStyle() {
testStyle(panel, "style");
}
@@ -457,6 +430,75 @@
}
@Test
+ public void testSwitchTypeNull() {
+ guardXhr(selenium).click(tc3);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
+
+ guardXhr(selenium).click(tc2);
+ waitGui.failWith("Item 2 is not displayed.").until(isDisplayed.locator(item2));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
+
+ guardXhr(selenium).click(tc1);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(item1));
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
+ }
+
+ @Test
+ public void testSwitchTypeAjax() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=ajax]"));
+ selenium.waitForPageToLoad();
+
+ testSwitchTypeNull();
+ }
+
+ @Test
+ public void testSwitchTypeClient() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=client]"));
+ selenium.waitForPageToLoad();
+
+ guardNoRequest(selenium).click(tc3);
+ waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
+
+ guardNoRequest(selenium).click(tc2);
+ waitGui.failWith("Item 2 is not displayed.").until(isDisplayed.locator(item2));
+ assertFalse(selenium.isVisible(item1), "Item 1 should not be visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
+
+ guardNoRequest(selenium).click(tc1);
+ waitGui.failWith("Item 1 is not displayed.").until(isDisplayed.locator(item1));
+ assertFalse(selenium.isVisible(item2), "Item 2 should not be visible.");
+ assertFalse(selenium.isVisible(item3), "Item 3 should not be visible.");
+ }
+
+ @Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10040")
+ public void testSwitchTypeServer() {
+ selenium.click(pjq("input[name$=switchTypeInput][value=server]"));
+ selenium.waitForPageToLoad();
+
+ guardHttp(selenium).click(tc3);
+ assertTrue(selenium.isVisible(item3), "Item 3 should be visible.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
+
+ guardHttp(selenium).click(tc2);
+ assertTrue(selenium.isVisible(item2), "Item 2 should be visible.");
+ assertFalse(selenium.isDisplayed(item1), "Item 1 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
+
+ guardHttp(selenium).click(tc1);
+ assertTrue(selenium.isVisible(item1), "Item 1 should be visible.");
+ assertFalse(selenium.isDisplayed(item2), "Item 2 should not be displayed.");
+ assertFalse(selenium.isDisplayed(item3), "Item 3 should not be displayed.");
+ }
+
+ @Test
public void testTitle() {
testTitle(panel);
}
13 years, 11 months