JBoss Rich Faces SVN: r22149 - in branches/4.0.X/ui/validator/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-03-10 15:49:40 -0500 (Thu, 10 Mar 2011)
New Revision: 22149
Modified:
branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java
branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/msg.ecss
Log:
CODING IN PROGRESS - issue RF-10370: messages: encoded as single line
https://issues.jboss.org/browse/RF-10370
sent to review by Ilya Shaikovsky
Modified: branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java
===================================================================
--- branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java 2011-03-10 17:42:31 UTC (rev 22148)
+++ branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/renderkit/MessageRendererBase.java 2011-03-10 20:49:40 UTC (rev 22149)
@@ -187,7 +187,7 @@
// Message id
responseWriter.writeAttribute("id", component.getClientId()+':'+message.getSourceId(),null);
// tooltip
- boolean wroteTooltip = Boolean.TRUE.equals(component.getAttributes().get("tooltip"));
+ boolean wroteTooltip = RendererUtils.getInstance().isBooleanAttribute(component, "tooltip");
if(wroteTooltip && !Strings.isNullOrEmpty(summary)){
responseWriter.writeAttribute("title", summary,null);
}
@@ -215,8 +215,9 @@
Map<String, Object> attributes = component.getAttributes();
Builder<String, Object> parametersBuilder = ImmutableMap.builder();
String forId = (String) attributes.get("for");
+ RendererUtils rendererUtils = RendererUtils.getInstance();
if (!Strings.isNullOrEmpty(forId)) {
- UIComponent target = RendererUtils.getInstance().findComponentFor(component, forId);
+ UIComponent target = rendererUtils.findComponentFor(component, forId);
if (null != target) {
parametersBuilder.put("forComponentId",
target.getClientId(facesContext));
@@ -226,13 +227,13 @@
if(FacesMessage.SEVERITY_INFO != level){
parametersBuilder.put("level", level.getOrdinal());
}
- if(!Boolean.TRUE.equals(attributes.get("showSummary"))){
+ if(!rendererUtils.isBooleanAttribute(component, "showSummary")){
parametersBuilder.put("showSummary", false);
}
- if(Boolean.TRUE.equals(attributes.get("showDetail"))){
+ if(rendererUtils.isBooleanAttribute(component, "showDetail")){
parametersBuilder.put("showDetail", true);
}
- if(Boolean.TRUE.equals(attributes.get("tooltip"))){
+ if(rendererUtils.isBooleanAttribute(component, "tooltip")){
parametersBuilder.put("tooltip", true);
}
if (component instanceof UIMessages) {
Modified: branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/msg.ecss
===================================================================
--- branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/msg.ecss 2011-03-10 17:42:31 UTC (rev 22148)
+++ branches/4.0.X/ui/validator/ui/src/main/resources/META-INF/resources/org.richfaces/msg.ecss 2011-03-10 20:49:40 UTC (rev 22149)
@@ -8,8 +8,9 @@
.rf-msg-err, .rf-msgs-err,
.rf-msg-ftl, .rf-msgs-ftl,
.rf-msg-inf, .rf-msgs-inf,
-.rf-msg-wrn, .rf-msgs-wrn {
- display:inline-block;
+.rf-msg-wrn, .rf-msgs-wrn,
+.rf-msg-ok, .rf-msgs-ok {
+ display:block;
padding-right:2px;
padding-left:20px;
vertical-align:middle;
@@ -36,15 +37,12 @@
.rf-msg-ok, .rf-msgs-ok {
background-image: "url(#{resource['org.richfaces:ok.png']})";
color:'#{richSkin.generalTextColor}';
- width:20px;
- display:inline-block;
- vertical-align:middle;
- background-repeat:no-repeat;
- background-position:left center ;
}
.rf-msg-sum, .rf-msgs-sum { /*Summary*/
+ display:inline;
}
.rf-msg-det, .rf-msgs-det { /*Description*/
+ display:inline;
}
13 years, 3 months
JBoss Rich Faces SVN: r22148 - branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-03-10 12:42:31 -0500 (Thu, 10 Mar 2011)
New Revision: 22148
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
Log:
RF-10711 css: dataTable review and updates
- reviewed by Konstantin Mishin
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-03-10 17:31:21 UTC (rev 22147)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-03-10 17:42:31 UTC (rev 22148)
@@ -77,19 +77,9 @@
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object [] params) throws IOException {
org.richfaces.component.AbstractColumn column = (org.richfaces.component.AbstractColumn) component;
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, column.getClientId(context), null);
-
- if (isSortable(column)) {
- //TODO :anton -> should component be selfSorted
- writer.startElement(HtmlConstants.SPAN_ELEM, column);
- writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rich-table-sortable-header", null);
- }
}
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object [] params) throws IOException {
- org.richfaces.component.AbstractColumn column = (org.richfaces.component.AbstractColumn) component;
- if (isSortable(column)) {
- writer.endElement(HtmlConstants.SPAN_ELEM);
- }
}
}
@@ -301,14 +291,6 @@
return true;
}
- public boolean isSortable(UIColumn column) {
- if (column instanceof org.richfaces.component.AbstractColumn) {
- //TODO: anton - add check for the "comparator" property
- return ((org.richfaces.component.AbstractColumn) column).getValueExpression("sortBy") != null;
- }
- return false;
- }
-
public void encodeClientScript(ResponseWriter writer, FacesContext facesContext, UIDataTableBase dataTableBase) throws IOException {
AbstractDataTable dataTable = (AbstractDataTable) dataTableBase;
13 years, 3 months
JBoss Rich Faces SVN: r22147 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richCalendar and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-10 12:31:21 -0500 (Thu, 10 Mar 2011)
New Revision: 22147
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml
Log:
samples modified so that it's possible to test attributes required and requiredMessage
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java 2011-03-10 17:31:21 UTC (rev 22147)
@@ -76,6 +76,7 @@
capitalsOptions.add(new SelectItem(capital.getState(), capital.getState()));
validationOptions.add(new SelectItem(capital.getState(), capital.getState()));
}
+ capitalsOptions.add(new SelectItem("", ""));
validationOptions.add(new SelectItem("@@", "@@"));
validationOptions.add(new SelectItem("", ""));
validationOptions.add(new SelectItem("RichFaces", "RichFaces"));
@@ -89,14 +90,13 @@
attributes.setAttribute("listWidth", "200px");
attributes.setAttribute("openOnEdit", true);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
attributes.setAttribute("saveOnBlur", true);
attributes.setAttribute("saveOnSelect", true);
// TODO has to be tested in another way
attributes.remove("converter");
attributes.remove("converterMessage");
- attributes.remove("required");
- attributes.remove("requiredMessage");
attributes.remove("validator");
attributes.remove("validatorMessage");
attributes.remove("valueChangeListener");
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSliderBean.java 2011-03-10 17:31:21 UTC (rev 22147)
@@ -67,6 +67,7 @@
attributes.setAttribute("maxValue", 10);
attributes.setAttribute("minValue", -10);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
attributes.setAttribute("showBoundaryValues", true);
attributes.setAttribute("showInput", true);
attributes.setAttribute("step", 1);
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInputNumberSpinnerBean.java 2011-03-10 17:31:21 UTC (rev 22147)
@@ -65,6 +65,7 @@
attributes.setAttribute("maxValue", 10);
attributes.setAttribute("minValue", -10);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
attributes.setAttribute("step", 1);
attributes.setAttribute("value", 2);
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -166,7 +166,7 @@
>
<f:ajax event="change" render="output :phasesPanel" />
</rich:calendar>
- <rich:message id="calendarMsg" for="calendar"/>
+ <rich:message id="msg" for="calendar"/>
</div>
<br/><br/>
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-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -166,7 +166,7 @@
>
<a4j:ajax event="change" render="output, phasesPanel" />
</rich:calendar>
- <rich:message id="calendarMsg" for="calendar"/>
+ <rich:message id="msg" for="calendar"/>
</div>
<br/><br/>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -90,7 +90,7 @@
<f:ajax event="change" render="output :phasesPanel"/>
</rich:inplaceInput>
- <rich:message id="calendarMsg" for="inplaceInput"/>
+ <rich:message id="msg" for="inplaceInput"/>
<br/><br/>
<h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
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-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -92,7 +92,7 @@
<a4j:ajax event="change" render="output"/>
</rich:inplaceInput>
- <rich:message id="calendarMsg" for="inplaceInput"/>
+ <rich:message id="msg" for="inplaceInput"/>
<br/><br/>
<h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/fAjax.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/fAjax.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -2,7 +2,7 @@
<!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:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
<!--
JBoss, Home of Professional Open Source
@@ -107,8 +107,12 @@
<f:ajax event="change" render="output :phasesPanel"/>
</rich:inplaceSelect>
+ <rich:message id="msg" for="inplaceSelect"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInplaceSelectBean.attributes['value'].value}"/>
</ui:define>
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-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -109,8 +109,12 @@
<a4j:ajax event="change" render="output"/>
</rich:inplaceSelect>
+ <rich:message id="msg" for="inplaceSelect"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInplaceSelectBean.attributes['value'].value}"/>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/fAjax.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/fAjax.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -2,7 +2,7 @@
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
- xmlns:h="http://java.sun.com/jsf/html">
+ xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html">
<!--
JBoss, Home of Professional Open Source
@@ -39,7 +39,7 @@
<ui:define name="component">
<rich:inputNumberSlider id="slider"
valueChangeListener="#{richBean.valueChangeListener}"
-
+
accesskey="#{richInputNumberSliderBean.attributes['accesskey'].value}"
decreaseClass="#{richInputNumberSliderBean.attributes['decreaseClass'].value}"
decreaseSelectedClass="#{richInputNumberSliderBean.attributes['decreaseSelectedClass'].value}"
@@ -95,8 +95,12 @@
<f:ajax event="change" render="output :phasesPanel"/>
</rich:inputNumberSlider>
+ <rich:message id="msg" for="slider"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInputNumberSliderBean.attributes['value'].value}"/>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSlider/simple.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -39,7 +39,7 @@
<ui:define name="component">
<rich:inputNumberSlider id="slider"
valueChangeListener="#{richBean.valueChangeListener}"
-
+
accesskey="#{richInputNumberSliderBean.attributes['accesskey'].value}"
decreaseClass="#{richInputNumberSliderBean.attributes['decreaseClass'].value}"
decreaseSelectedClass="#{richInputNumberSliderBean.attributes['decreaseSelectedClass'].value}"
@@ -95,8 +95,12 @@
<a4j:ajax event="change" render="output"/>
</rich:inputNumberSlider>
+ <rich:message id="msg" for="slider"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInputNumberSliderBean.attributes['value'].value}"/>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/fAjax.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/fAjax.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -44,7 +44,7 @@
<ui:define name="component">
<rich:inputNumberSpinner id="spinner"
valueChangeListener="#{richBean.valueChangeListener}"
-
+
accesskey="#{richInputNumberSpinnerBean.attributes['accesskey'].value}"
cycled="#{richInputNumberSpinnerBean.attributes['cycled'].value}"
dir="#{richInputNumberSpinnerBean.attributes['dir'].value}"
@@ -93,8 +93,12 @@
<f:ajax event="change" render="output :phasesPanel" />
</rich:inputNumberSpinner>
+ <rich:message id="msg" for="spinner"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInputNumberSpinnerBean.attributes['value'].value}"/>
</ui:define>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInputNumberSpinner/simple.xhtml 2011-03-10 17:31:21 UTC (rev 22147)
@@ -45,7 +45,7 @@
<ui:define name="component">
<rich:inputNumberSpinner id="spinner"
valueChangeListener="#{richBean.valueChangeListener}"
-
+
accesskey="#{richInputNumberSpinnerBean.attributes['accesskey'].value}"
cycled="#{richInputNumberSpinnerBean.attributes['cycled'].value}"
dir="#{richInputNumberSpinnerBean.attributes['dir'].value}"
@@ -94,8 +94,12 @@
<a4j:ajax event="change" render="output" />
</rich:inputNumberSpinner>
+ <rich:message id="msg" for="spinner"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInputNumberSpinnerBean.attributes['value'].value}"/>
</ui:define>
13 years, 3 months
JBoss Rich Faces SVN: r22146 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richInplaceInput and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-10 12:30:27 -0500 (Thu, 10 Mar 2011)
New Revision: 22146
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
Log:
samples for inplace input modified so that it's possible to test attribute required
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2011-03-10 17:29:50 UTC (rev 22145)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceInputBean.java 2011-03-10 17:30:27 UTC (rev 22146)
@@ -66,14 +66,13 @@
attributes.setAttribute("defaultLabel", "Click here to edit");
attributes.setAttribute("editEvent", "click");
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
attributes.setAttribute("saveOnBlur", true);
attributes.setAttribute("value", "RichFaces 4");
// TODO has to be tested in another way
attributes.remove("converter");
attributes.remove("converterMessage");
- attributes.remove("required");
- attributes.remove("requiredMessage");
attributes.remove("validator");
attributes.remove("validatorMessage");
attributes.remove("valueChangeListener");
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml 2011-03-10 17:29:50 UTC (rev 22145)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/fAjax.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
@@ -2,7 +2,7 @@
<!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:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j">
<!--
JBoss, Home of Professional Open Source
@@ -90,8 +90,12 @@
<f:ajax event="change" render="output :phasesPanel"/>
</rich:inplaceInput>
+ <rich:message id="calendarMsg" for="inplaceInput"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInplaceInputBean.attributes['value'].value}"/>
</ui:define>
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-03-10 17:29:50 UTC (rev 22145)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-03-10 17:30:27 UTC (rev 22146)
@@ -92,8 +92,12 @@
<a4j:ajax event="change" render="output"/>
</rich:inplaceInput>
+ <rich:message id="calendarMsg" for="inplaceInput"/>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output: <h:outputText id="output" value="#{richInplaceInputBean.attributes['value'].value}"/>
</ui:define>
13 years, 3 months
JBoss Rich Faces SVN: r22145 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-10 12:29:50 -0500 (Thu, 10 Mar 2011)
New Revision: 22145
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
Log:
default requiredMessage set for calendar
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2011-03-10 17:21:06 UTC (rev 22144)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCalendarBean.java 2011-03-10 17:29:50 UTC (rev 22145)
@@ -73,6 +73,7 @@
attributes.setAttribute("jointPoint", "bottomLeft");
attributes.setAttribute("popup", true);
attributes.setAttribute("rendered", true);
+ attributes.setAttribute("requiredMessage", "value is required");
attributes.setAttribute("showApplyButton", true);
attributes.setAttribute("showHeader", true);
attributes.setAttribute("showFooter", true);
13 years, 3 months
JBoss Rich Faces SVN: r22144 - branches/4.0.X/examples/core-demo/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-03-10 12:21:06 -0500 (Thu, 10 Mar 2011)
New Revision: 22144
Modified:
branches/4.0.X/examples/core-demo/src/main/webapp/ajax.xhtml
Log:
https://issues.jboss.org/browse/RF-10728 Ajax: different behavior in Mojarra and MyFaces when disabled. Demo updated.
Modified: branches/4.0.X/examples/core-demo/src/main/webapp/ajax.xhtml
===================================================================
--- branches/4.0.X/examples/core-demo/src/main/webapp/ajax.xhtml 2011-03-10 16:44:21 UTC (rev 22143)
+++ branches/4.0.X/examples/core-demo/src/main/webapp/ajax.xhtml 2011-03-10 17:21:06 UTC (rev 22144)
@@ -95,7 +95,25 @@
<h:commandLink value="Link">
<a:ajax bypassUpdates="#{true}" />
</h:commandLink>
+
+
</h:panelGrid>
</h:form>
+
+ <!-- https://issues.jboss.org/browse/RF-10728 -->
+ <h:form>
+ <h:panelGrid columns="2">
+ f:ajax with h:commandLink
+ <h:commandLink value="commandLink">
+ <f:ajax disabled="false"/>
+ </h:commandLink>
+ disabled f:ajax with h:commandLink
+ <h:commandLink value="commandLink">
+ <f:ajax disabled="true"/>
+ </h:commandLink>
+ </h:panelGrid>
+
+
+ </h:form>
</h:body>
</html>
\ No newline at end of file
13 years, 3 months
JBoss Rich Faces SVN: r22142 - modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-03-10 11:44:08 -0500 (Thu, 10 Mar 2011)
New Revision: 22142
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml
Log:
added validation message to calendar samples
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml 2011-03-10 16:01:10 UTC (rev 22141)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/fAjax.xhtml 2011-03-10 16:44:08 UTC (rev 22142)
@@ -2,7 +2,7 @@
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer" xmlns:rich="http://richfaces.org/rich"
- xmlns:h="http://java.sun.com/jsf/html">
+ xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html">
<!--
JBoss, Home of Professional Open Source
@@ -100,7 +100,6 @@
disabled="#{richCalendarBean.attributes['disabled'].value}"
enableManualInput="#{richCalendarBean.attributes['enableManualInput'].value}"
firstWeekDay="#{richCalendarBean.attributes['firstWeekDay'].value}"
- hidePopupOnScroll="#{richCalendarBean.attributes['hidePopupOnScroll'].value}"
horizontalOffset="#{richCalendarBean.attributes['horizontalOffset'].value}"
immediate="#{richCalendarBean.attributes['immediate'].value}"
inputClass="#{richCalendarBean.attributes['inputClass'].value}"
@@ -153,6 +152,7 @@
showWeekDaysBar="#{richCalendarBean.attributes['showWeekDaysBar'].value}"
showWeeksBar="#{richCalendarBean.attributes['showWeeksBar'].value}"
style="#{richCalendarBean.attributes['style'].value}"
+ styleClass="#{richCalendarBean.attributes['styleClass'].value}"
tabindex="#{richCalendarBean.attributes['tabindex'].value}"
timeZone="#{richCalendarBean.timeZone}"
todayControlMode="#{richCalendarBean.attributes['todayControlMode'].value}"
@@ -166,9 +166,13 @@
>
<f:ajax event="change" render="output :phasesPanel" />
</rich:calendar>
+ <rich:message id="calendarMsg" for="calendar"/>
</div>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output:
<h:outputText id="output" value="#{richCalendarBean.attributes['value'].value}">
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-03-10 16:01:10 UTC (rev 22141)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCalendar/simple.xhtml 2011-03-10 16:44:08 UTC (rev 22142)
@@ -166,9 +166,13 @@
>
<a4j:ajax event="change" render="output, phasesPanel" />
</rich:calendar>
+ <rich:message id="calendarMsg" for="calendar"/>
</div>
<br/><br/>
+ <h:commandButton id="hButton" value="h:commandButton" style="margin-right: 10px;"/>
+ <a4j:commandButton id="a4jButton" value="a4j:commandButton"/>
+ <br/><br/>
output:
<h:outputText id="output" value="#{richCalendarBean.attributes['value'].value}">
13 years, 3 months
JBoss Rich Faces SVN: r22141 - branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-03-10 11:01:10 -0500 (Thu, 10 Mar 2011)
New Revision: 22141
Modified:
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
Log:
RF-10727 tables: rowClass works only defined as string
- reviewed by Konstantin Mishin
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-03-10 15:56:30 UTC (rev 22140)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-03-10 16:01:10 UTC (rev 22141)
@@ -22,18 +22,19 @@
package org.richfaces.renderkit;
-import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTableBase;
-import org.richfaces.component.util.HtmlUtil;
+import java.io.IOException;
+import java.util.Iterator;
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.Iterator;
+import org.richfaces.component.Row;
+import org.richfaces.component.UIDataTableBase;
+import org.richfaces.component.util.HtmlUtil;
+
/**
* @author Anton Belevich
*
@@ -84,8 +85,7 @@
decodeSortingFiltering(context, component);
}
- @Override
- protected void encodeRows(FacesContext facesContext, RowHolderBase rowHolder) {
+ protected void putRowStylesIntoContext(FacesContext facesContext, RowHolderBase rowHolder) {
UIDataTableBase dataTableBase = (UIDataTableBase)rowHolder.getRow();
String rowClass = getRowSkinClass();
@@ -96,9 +96,7 @@
cellClass = mergeStyleClasses(CELL_CLASS_KEY, cellClass, dataTableBase);
firstClass = mergeStyleClasses(FIRST_ROW_CLASS_KEY, firstClass, dataTableBase);
- saveRowStyles(facesContext, dataTableBase.getClientId(facesContext), firstClass, rowClass, cellClass);
-
- super.encodeRows(facesContext, rowHolder);
+ saveRowStyles(facesContext, dataTableBase.getClientId(facesContext), firstClass, rowClass, cellClass);
}
protected boolean isEncodeHeaders(UIDataTableBase table) {
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java 2011-03-10 15:56:30 UTC (rev 22140)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableRenderer.java 2011-03-10 16:01:10 UTC (rev 22141)
@@ -185,7 +185,7 @@
public void encodeRow(ResponseWriter writer, FacesContext facesContext, RowHolderBase holder) throws IOException {
RowHolder rowHolder = (RowHolder)holder;
Row row = rowHolder.getRow();
-
+ putRowStylesIntoContext(facesContext, rowHolder);
rowHolder.setRowStart(true);
Iterator<UIComponent> components = row.columns();
if (rowHolder.isUpdatePartial()) {
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-03-10 15:56:30 UTC (rev 22140)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-03-10 16:01:10 UTC (rev 22141)
@@ -147,6 +147,8 @@
AbstractDataTable dataTable = (AbstractDataTable) row;
+ putRowStylesIntoContext(facesContext, rowHolder);
+
boolean partialUpdate = rowHolder.isUpdatePartial();
boolean parentTbodyStart = rowHolder.isEncodeParentTBody();
boolean tbodyStart = parentTbodyStart;
13 years, 3 months
JBoss Rich Faces SVN: r22140 - branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-03-10 10:56:30 -0500 (Thu, 10 Mar 2011)
New Revision: 22140
Modified:
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss
Log:
RF-10688: padding for drop down menu disabled label is fixed. Verified by Anton Belevich.
Modified: branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss
===================================================================
--- branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss 2011-03-10 15:00:36 UTC (rev 22139)
+++ branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss 2011-03-10 15:56:30 UTC (rev 22140)
@@ -3,11 +3,17 @@
font-size:'#{richSkin.generalSizeFont}';
font-weight: '#{richSkin.headerWeightFont}';
position:relative;
+ white-space:nowrap;
}
+
+.rf-ddm-lbl {
+ padding: 2px 5px;
+}
+
.rf-ddm-unsel {
- border:1px solid transparent;
- padding:3px 6px;
+ border: 1px solid transparent;
}
+
.rf-ddm-sel {
background-image: "url(#{resource['org.richfaces.images:menu_item_bg.gif']})";
background-repeat: repeat-x;
@@ -17,15 +23,8 @@
border : 1px solid; /*headerBackgroundColor*/
border-color: '#{richSkin.headerBackgroundColor}';
cursor:pointer;
- padding:3px 6px;
}
-.rf-ddm-lbl, .rf-ddm-lbl-dis {
- height:auto;
- padding:2px 5px;
- white-space:nowrap;
- width:auto;
-}
.rf-ddm-pos{
top:20px;
left:0;
13 years, 3 months