Author: alexsmirnov
Date: 2010-07-02 12:46:56 -0400 (Fri, 02 Jul 2010)
New Revision: 17713
Modified:
root/commons/branches/RF8755/
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/ComponentAttribute.java
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
Log:
Merged revisions 17698,17702 via svnmerge from
https://svn.jboss.org/repos/richfaces/root/commons/trunk
.......
r17698 | nbelaevski | 2010-07-01 11:28:45 -0700 (Thu, 01 Jul 2010) | 1 line
Small commons refactoring
.......
r17702 | konstantin.mishin | 2010-07-01 12:58:07 -0700 (Thu, 01 Jul 2010) | 1 line
RF-8101
.......
Property changes on: root/commons/branches/RF8755
___________________________________________________________________
Name: svnmerge-integrated
- /root/commons/trunk:1-17697
+ /root/commons/trunk:1-17712
Modified:
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/ComponentAttribute.java
===================================================================
---
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/ComponentAttribute.java 2010-07-02
16:45:41 UTC (rev 17712)
+++
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/ComponentAttribute.java 2010-07-02
16:46:56 UTC (rev 17713)
@@ -88,7 +88,7 @@
* @param eventNames the eventNames to set
* @return
*/
- public ComponentAttribute setEventNames(String[] eventNames) {
+ public ComponentAttribute setEventNames(String... eventNames) {
this.eventNames = eventNames;
return this;
Modified:
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
===================================================================
---
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2010-07-02
16:45:41 UTC (rev 17712)
+++
root/commons/branches/RF8755/api/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2010-07-02
16:46:56 UTC (rev 17713)
@@ -255,9 +255,8 @@
}
}
- public static void renderAttributeAndBehaviors(FacesContext facesContext, UIComponent
component,
- ComponentAttribute componentAttribute) throws IOException {
-
+ public static Object getAttributeAndBehaviorsValue(FacesContext facesContext,
UIComponent component,
+ ComponentAttribute componentAttribute) {
if (facesContext == null) {
throw new NullPointerException("facesContext");
}
@@ -270,7 +269,6 @@
throw new NullPointerException("componentAttribute");
}
- String htmlAttributeName = componentAttribute.getHtmlAttributeName();
String componentAttributeName = componentAttribute.getComponentAttributeName();
Object attributeValue = component.getAttributes().get(componentAttributeName);
@@ -293,8 +291,13 @@
}
}
}
+ return attributeValue;
+ }
- renderAttribute(facesContext, htmlAttributeName, attributeValue);
+ public static void renderAttributeAndBehaviors(FacesContext facesContext, UIComponent
component,
+ ComponentAttribute componentAttribute) throws IOException {
+ Object attributeValue = getAttributeAndBehaviorsValue(facesContext, component,
componentAttribute);
+ renderAttribute(facesContext, componentAttribute.getHtmlAttributeName(),
attributeValue);
}
public static void renderPassThroughAttributesOptimized(FacesContext context,
UIComponent component,