Author: ppitonak(a)redhat.com
Date: 2011-03-14 06:28:54 -0400 (Mon, 14 Mar 2011)
New Revision: 22200
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/fAjax.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/jsr303.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml
Log:
samples for rich:inplaceSelect refactored
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-14
10:28:09 UTC (rev 22199)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichInplaceSelectBean.java 2011-03-14
10:28:54 UTC (rev 22200)
@@ -61,6 +61,8 @@
private String value2;
private String value3;
private String value4;
+ private String value5;
+ private String requiredMessage = "value is required";
/**
* Initializes the managed bean.
@@ -76,7 +78,6 @@
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"));
@@ -90,13 +91,14 @@
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");
@@ -171,6 +173,22 @@
this.value4 = value4;
}
+ public String getValue5() {
+ return value5;
+ }
+
+ public void setValue5(String value5) {
+ this.value5 = value5;
+ }
+
+ public String getRequiredMessage() {
+ return requiredMessage;
+ }
+
+ public void setRequiredMessage(String requiredMessage) {
+ this.requiredMessage = requiredMessage;
+ }
+
public void listener(ValueChangeEvent event) {
RichBean.logToPage("* value changed: " + event.getOldValue() + "
-> " + event.getNewValue());
}
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/csv.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/csv.xhtml 2011-03-14
10:28:09 UTC (rev 22199)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/csv.xhtml 2011-03-14
10:28:54 UTC (rev 22200)
@@ -82,6 +82,18 @@
</rich:inplaceSelect>
<rich:message id="inputMsg4" for="input4"/>
+ required
+ <rich:inplaceSelect id="input5"
+
defaultLabel="#{richInplaceSelectBean.attributes['defaultLabel'].value}"
+ required="true"
+
requiredMessage="#{richInplaceSelectBean.requiredMessage}"
+ value="#{richInplaceSelectBean.value5}"
+ >
+ <f:selectItems
value="#{richInplaceSelectBean.validationOptions}" />
+ <a4j:ajax event="change"
render="output5"/>
+ <rich:validator event="change"/>
+ </rich:inplaceSelect>
+ <rich:message id="inputMsg5" for="input5"/>
</h:panelGrid>
<br/><br/>
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-14
10:28:09 UTC (rev 22199)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/fAjax.xhtml 2011-03-14
10:28:54 UTC (rev 22200)
@@ -88,8 +88,6 @@
onselectitem="#{richInplaceSelectBean.attributes['onselectitem'].value}"
openOnEdit="#{richInplaceSelectBean.attributes['openOnEdit'].value}"
rendered="#{richInplaceSelectBean.attributes['rendered'].value}"
-
required="#{richInplaceSelectBean.attributes['required'].value}"
-
requiredMessage="#{richInplaceSelectBean.attributes['requiredMessage'].value}"
saveOnBlur="#{richInplaceSelectBean.attributes['saveOnBlur'].value}"
saveOnSelect="#{richInplaceSelectBean.attributes['saveOnSelect'].value}"
selectItemClass="#{richInplaceSelectBean.attributes['selectItemClass'].value}"
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/jsr303.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/jsr303.xhtml 2011-03-14
10:28:09 UTC (rev 22199)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/jsr303.xhtml 2011-03-14
10:28:54 UTC (rev 22200)
@@ -82,6 +82,17 @@
</rich:inplaceSelect>
<rich:message id="inputMsg4" for="input4"/>
+ required
+ <rich:inplaceSelect id="input5"
+
defaultLabel="#{richInplaceSelectBean.attributes['defaultLabel'].value}"
+ required="true"
+
requiredMessage="#{richInplaceSelectBean.requiredMessage}"
+ value="#{richInplaceSelectBean.value5}"
+ >
+ <f:selectItems
value="#{richInplaceSelectBean.validationOptions}" />
+ <a4j:ajax event="change"
render="output5"/>
+ </rich:inplaceSelect>
+ <rich:message id="inputMsg5" for="input5"/>
</h:panelGrid>
<br/><br/>
@@ -94,6 +105,8 @@
<h:outputText id="output3"
value="#{richInplaceSelectBean.value3}"/>
output4
<h:outputText id="output4"
value="#{richInplaceSelectBean.value4}"/>
+ output5
+ <h:outputText id="output5"
value="#{richInplaceSelectBean.value5}"/>
</h:panelGrid>
</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-14
10:28:09 UTC (rev 22199)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceSelect/simple.xhtml 2011-03-14
10:28:54 UTC (rev 22200)
@@ -88,8 +88,6 @@
onselectitem="#{richInplaceSelectBean.attributes['onselectitem'].value}"
openOnEdit="#{richInplaceSelectBean.attributes['openOnEdit'].value}"
rendered="#{richInplaceSelectBean.attributes['rendered'].value}"
-
required="#{richInplaceSelectBean.attributes['required'].value}"
-
requiredMessage="#{richInplaceSelectBean.attributes['requiredMessage'].value}"
saveOnBlur="#{richInplaceSelectBean.attributes['saveOnBlur'].value}"
saveOnSelect="#{richInplaceSelectBean.attributes['saveOnSelect'].value}"
selectItemClass="#{richInplaceSelectBean.attributes['selectItemClass'].value}"
Show replies by date