Author: Alex.Kolonitsky
Date: 2011-01-21 08:58:26 -0500 (Fri, 21 Jan 2011)
New Revision: 21151
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
Log:
RF-10245 Taglib: popup panel missing style and styleClass
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java 2011-01-21
13:57:12 UTC (rev 21150)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java 2011-01-21
13:58:26 UTC (rev 21151)
@@ -42,6 +42,12 @@
public static final String COMPONENT_FAMILY = "org.richfaces.PopupPanel";
@Attribute
+ public abstract String getStyle();
+
+ @Attribute
+ public abstract String getStyleClass();
+
+ @Attribute
public abstract String getVisualOptions();
@Attribute(defaultValue = "100")
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-21
13:57:12 UTC (rev 21150)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2011-01-21
13:58:26 UTC (rev 21151)
@@ -169,6 +169,24 @@
}
return "";
}
+
+ public String getContainerStyle(UIComponent panel){
+ StringBuilder res = new StringBuilder();
+ Map<String, Object> attrs = panel.getAttributes();
+ res.append("position: ").append(((Boolean)
attrs.get("followByScroll")) ? "fixed" :
"absolute").append("; ");
+
+ Integer zindex = (Integer) attrs.get("zindex");
+ if (zindex != null) {
+ res.append("z-index:").append(zindex).append("; ");
+ }
+
+ String style = (String) attrs.get("style");
+ if (style != null && style.length() > 0) {
+ res.append(style);
+ }
+
+ return res.toString();
+ }
private Object buildEventFunction(Object eventFunction) {
if(eventFunction != null && eventFunction.toString().length() > 0) {
return "new Function(\"" + eventFunction.toString() +
"\");";
Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-21 13:57:12 UTC
(rev 21150)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml 2011-01-21 13:58:26 UTC
(rev 21151)
@@ -32,7 +32,7 @@
</c:if>
<div id="#{clientId}_shadow" style="position:
#{component.attributes['followByScroll'] ? 'fixed' :
'absolute'};" class="rf-pp-shdw"/>
- <div id="#{clientId}_container" style="position:
#{component.attributes['followByScroll'] ? 'fixed' : 'absolute'};
#{not empty zindex ? 'z-index:'+zindex+';':''}"
cdk:passThroughWithExclusions="id style class styleClass" class="rf-pp-cntr
#{component.attributes['styleClass']}">
+ <div id="#{clientId}_container"
style="#{getContainerStyle(component)}" cdk:passThroughWithExclusions="id
style class styleClass" class="rf-pp-cntr
#{component.attributes['styleClass']}">
<c:if test="#{component.getFacet('header')!=null and
component.getFacet('header').rendered}">
<div id="#{clientId}_header" class="rf-pp-hdr
#{component.attributes['headerClass']}" >