Author: konstantin.mishin
Date: 2009-08-24 14:42:00 -0400 (Mon, 24 Aug 2009)
New Revision: 15289
Modified:
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java
root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml
root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
Log:
attribute limitRender has been added
Modified:
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java
===================================================================
---
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java 2009-08-24
18:40:44 UTC (rev 15288)
+++
root/examples/trunk/components/core-demo/src/main/java/org/richfaces/demo/CommandBean.java 2009-08-24
18:42:00 UTC (rev 15289)
@@ -1,4 +1,6 @@
package org.richfaces.demo;
+import java.util.Date;
+
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@@ -24,4 +26,8 @@
public void reset() {
name = "";
}
+
+ public Date getDate() {
+ return new Date();
+ }
}
Modified: root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml
===================================================================
--- root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml 2009-08-24
18:40:44 UTC (rev 15288)
+++ root/examples/trunk/components/core-demo/src/main/webapp/button.xhtml 2009-08-24
18:42:00 UTC (rev 15289)
@@ -9,10 +9,14 @@
<h:head>
</h:head>
<h:body>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:outputText value="#{commandBean.date}" />
+ </a4j:outputPanel>
<h:outputText value="Name:" />
<h:form>
<h:inputText value="#{commandBean.name}" />
<a4j:commandButton action="#{commandBean.submit}"
render="out" value="Say Hello" />
+ <a4j:commandButton action="#{commandBean.submit}"
render="out" value="Say Hello with limitRender"
limitRender="true"/>
<a4j:commandButton action="#{commandBean.reset}"
render="out" value="Reset" />
</h:form>
<br />
Modified: root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml
===================================================================
--- root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml 2009-08-24
18:40:44 UTC (rev 15288)
+++ root/examples/trunk/components/core-demo/src/main/webapp/link.xhtml 2009-08-24
18:42:00 UTC (rev 15289)
@@ -9,12 +9,18 @@
<h:head>
</h:head>
<h:body>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:outputText value="#{commandBean.date}" />
+ </a4j:outputPanel>
<h:outputText value="Name:" />
<h:form>
<h:inputText value="#{commandBean.name}" />
<a4j:commandLink action="#{commandBean.submit}"
render="out">
<h:outputText value="Say Hello" />
</a4j:commandLink>
+ <a4j:commandLink action="#{commandBean.submit}" render="out"
limitRender="true">
+ <h:outputText value="Say Hello with limitRender" />
+ </a4j:commandLink>
<a4j:commandLink action="#{commandBean.reset}"
render="out">
<h:outputText value="Reset" />
</a4j:commandLink>
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java 2009-08-24
18:40:44 UTC (rev 15288)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandButton.java 2009-08-24
18:42:00 UTC (rev 15289)
@@ -32,7 +32,35 @@
public final static String COMPONENT_TYPE = "org.richfaces.CommandButton";
+ private static enum PropertyKeys {
+ style, styleClass, limitRender
+ }
+
public HtmlCommandButton(){
setRendererType("org.richfaces.CommandButtonRenderer");
}
+
+ public String getStyle() {
+ return (String) getStateHelper().eval(PropertyKeys.style, "");
+ }
+
+ public void setStyle(String style) {
+ getStateHelper().put(PropertyKeys.style, style);
+ }
+
+ public String getStyleClass() {
+ return (String) getStateHelper().eval(PropertyKeys.styleClass, "");
+ }
+
+ public void setStyleClass(String styleClass) {
+ getStateHelper().put(PropertyKeys.styleClass, styleClass);
+ }
+
+ public boolean getLimitRender() {
+ return Boolean.valueOf(getStateHelper().eval(PropertyKeys.limitRender,
Boolean.FALSE).toString());
+ }
+
+ public void setLimitRender(boolean limitRender) {
+ getStateHelper().put(PropertyKeys.limitRender, limitRender);
+ }
}
Modified:
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java
===================================================================
---
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java 2009-08-24
18:40:44 UTC (rev 15288)
+++
root/ui/trunk/components/core/src/main/java/org/richfaces/component/html/HtmlCommandLink.java 2009-08-24
18:42:00 UTC (rev 15289)
@@ -34,7 +34,7 @@
public final static String COMPONENT_TYPE = "org.richfaces.CommandLink";
private static enum PropertyKeys {
- style, styleClass
+ style, styleClass, limitRender
}
public HtmlCommandLink() {
@@ -56,4 +56,12 @@
public void setStyleClass(String styleClass) {
getStateHelper().put(PropertyKeys.styleClass, styleClass);
}
+
+ public boolean getLimitRender() {
+ return Boolean.valueOf(getStateHelper().eval(PropertyKeys.limitRender,
Boolean.FALSE).toString());
+ }
+
+ public void setLimitRender(boolean limitRender) {
+ getStateHelper().put(PropertyKeys.limitRender, limitRender);
+ }
}
Show replies by date