[richfaces-svn-commits] JBoss Rich Faces SVN: r18632 - in trunk/ui/output/ui/src/main: java/org/richfaces/renderkit/html and 3 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Aug 13 13:38:53 EDT 2010


Author: amarkhel
Date: 2010-08-13 13:38:52 -0400 (Fri, 13 Aug 2010)
New Revision: 18632

Added:
   trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
Removed:
   trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPopupPanel.java
   trunk/ui/output/ui/src/main/resources/META-INF/faces-config.xml
Modified:
   trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java
   trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
   trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
   trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panel.ecss
   trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
   trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
   trunk/ui/output/ui/src/main/templates/panel.template.xml
   trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
Log:
Refactor CSS classes in components panel and popupPanels and fix bugs for it

Added: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java	                        (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPopupPanel.java	2010-08-13 17:38:52 UTC (rev 18632)
@@ -0,0 +1,100 @@
+/**
+ * License Agreement.
+ *
+ *  JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007  Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.component;
+
+import javax.faces.component.UIComponentBase;
+
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+
+/**
+ * JSF component class
+ * 
+ */
+ at JsfComponent(tag = @Tag(type = TagType.Facelets), 
+	    renderer = @JsfRenderer(type = "org.richfaces.PopupPanelRenderer")
+	)
+public abstract class AbstractPopupPanel extends UIComponentBase {
+
+    public static final String COMPONENT_TYPE = "org.richfaces.PopupPanel";
+
+    public static final String COMPONENT_FAMILY = "org.richfaces.PopupPanel";
+    @Attribute
+    public abstract String getVisualOptions();
+    @Attribute(defaultValue="100")
+    public abstract int getZIndex();
+    @Attribute(defaultValue="-1")
+    public abstract int getHeight();
+    @Attribute(defaultValue="-1")
+    public abstract int getWidth();
+    @Attribute(defaultValue="-1")
+    public abstract int getMinHeight();
+    @Attribute(defaultValue="-1")
+    public abstract int getMinWidth();
+    @Attribute(defaultValue=""+Integer.MAX_VALUE)
+    public abstract int getMaxHeight();
+    @Attribute(defaultValue=""+Integer.MAX_VALUE)
+    public abstract int getMaxWidth();
+    @Attribute(defaultValue="auto")
+    public abstract String getTop();
+    @Attribute(defaultValue="auto")
+    public abstract String getLeft();
+    @Attribute(defaultValue="false")
+    public abstract boolean isShow();
+    public abstract void setShow(boolean show);
+    @Attribute(defaultValue="true")
+    public abstract boolean isMoveable();
+    @Attribute(defaultValue="false")
+    public abstract boolean isAutosized();
+    @Attribute(defaultValue="true")
+    public abstract boolean isModal();
+    @Attribute(defaultValue="false")
+    public abstract boolean isKeepVisualState();
+    @Attribute(defaultValue="false")
+    public abstract boolean isOverlapEmbedObjects();
+    @Attribute(defaultValue="false")
+    public abstract boolean isResizeable();
+    @Attribute(defaultValue="false")
+    public abstract boolean isTrimOverlayedElements();
+    @Attribute
+    public abstract String getDomElementAttachment();
+    @Attribute
+    public abstract String getControlsClass();
+    @Attribute
+    public abstract String getHeader();
+    @Attribute
+    public abstract String getHeaderClass();
+    @Attribute
+    public abstract String getShadowDepth();
+    @Attribute
+    public abstract String getShadowOpacity();
+    @Attribute(defaultValue="true")
+    public abstract boolean isFollowByScroll();
+
+    @Override
+    public String getFamily() {
+        return COMPONENT_FAMILY;
+    }
+}

Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java	2010-08-13 17:38:52 UTC (rev 18632)
@@ -23,11 +23,18 @@
 
 import javax.faces.component.UIComponentBase;
 
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+
 /**
  * JSF component class
  * 
  */
-//TODO nick - remove
+ at JsfComponent(tag = @Tag(type = TagType.Facelets), 
+	    renderer = @JsfRenderer(type = "org.richfaces.PanelRenderer")
+	)
 public class UIPanel extends UIComponentBase {
     private static final String COMPONENT_FAMILY = "org.richfaces.Panel";
 

Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPopupPanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPopupPanel.java	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPopupPanel.java	2010-08-13 17:38:52 UTC (rev 18632)
@@ -1,285 +0,0 @@
-/**
- * License Agreement.
- *
- *  JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007  Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.richfaces.component;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.FacesException;
-import javax.faces.component.UIComponentBase;
-
-import org.richfaces.json.JSONException;
-import org.richfaces.json.JSONMap;
-
-/**
- * JSF component class
- * 
- */
-public class UIPopupPanel extends UIComponentBase {
-
-    public static final String COMPONENT_TYPE = "org.richfaces.PopupPanel";
-
-    public static final String COMPONENT_FAMILY = "org.richfaces.PopupPanel";
-
-    protected enum PropertyKeys {
-        width, height, zIndex, trimOverlayedElements, minHeight, minWidth, maxHeight, maxWidth, top, left, moveable, autosized, modal, domElementAttachment, controlsClass, show, headerClass, keepVisualState, overlapEmbedObjects, resizeable, shadowDepth, shadowOpacity, style, styleClass, visualOptions
-    }
-
-    public Map<String, Object> getHandledVisualOptions() {
-        String options = (String) getStateHelper().eval(PropertyKeys.visualOptions);
-        Map<String, Object> result;
-        result = prepareVisualOptions(options);
-
-        if (null == result) {
-            result = new HashMap<String, Object>();
-        }
-        return result;
-    }
-
-    //TODO nick - CDK should generate all these properties' code
-    public String getVisualOptions() {
-        return (String) getStateHelper().eval(PropertyKeys.visualOptions);
-    }
-
-    public void setVisualOptions(String visualOptions) {
-        getStateHelper().put(PropertyKeys.visualOptions, visualOptions);
-    }
-
-    public int getZIndex() {
-        return (Integer) getStateHelper().eval(PropertyKeys.zIndex, 100);
-    }
-
-    public void setZIndex(int zIndex) {
-        getStateHelper().put(PropertyKeys.zIndex, zIndex);
-    }
-
-    public int getHeight() {
-        return (Integer) getStateHelper().eval(PropertyKeys.height, -1);
-    }
-
-    public void setHeight(int height) {
-        getStateHelper().put(PropertyKeys.height, height);
-    }
-
-    public int getWidth() {
-        return (Integer) getStateHelper().eval(PropertyKeys.width, -1);
-    }
-
-    public void setWidth(int width) {
-        getStateHelper().put(PropertyKeys.width, width);
-    }
-
-    public int getMinHeight() {
-        return (Integer) getStateHelper().eval(PropertyKeys.minHeight, -1);
-    }
-
-    public void setMinHeight(int minheight) {
-        getStateHelper().put(PropertyKeys.minHeight, minheight);
-    }
-
-    public int getMinWidth() {
-        return (Integer) getStateHelper().eval(PropertyKeys.minWidth, -1);
-    }
-
-    public void setMinWidth(int minWidth) {
-        getStateHelper().put(PropertyKeys.minWidth, minWidth);
-    }
-
-    public int getMaxHeight() {
-        return (Integer) getStateHelper().eval(PropertyKeys.maxHeight, Integer.MAX_VALUE);
-    }
-
-    public void setMaxHeight(int maxheight) {
-        getStateHelper().put(PropertyKeys.maxHeight, maxheight);
-    }
-
-    public int getMaxWidth() {
-        return (Integer) getStateHelper().eval(PropertyKeys.maxWidth, Integer.MAX_VALUE);
-    }
-
-    public void setMaxWidth(int maxWidth) {
-        getStateHelper().put(PropertyKeys.maxWidth, maxWidth);
-    }
-
-    public String getTop() {
-        return (String) getStateHelper().eval(PropertyKeys.top, "auto");
-    }
-
-    public void setTop(String top) {
-        getStateHelper().put(PropertyKeys.top, top);
-    }
-
-    public String getLeft() {
-        return (String) getStateHelper().eval(PropertyKeys.left, "auto");
-    }
-
-    public void setLeft(String left) {
-        getStateHelper().put(PropertyKeys.left, left);
-    }
-
-    public boolean isShow() {
-        return (Boolean) getStateHelper().eval(PropertyKeys.show, false);
-    }
-
-    public void setShow(boolean show) {
-        getStateHelper().put(PropertyKeys.show, show);
-    }
-
-    public boolean isMoveable() {
-        return (Boolean) getStateHelper().eval(PropertyKeys.moveable, true);
-    }
-
-    public void setMoveable(boolean moveable) {
-        getStateHelper().put(PropertyKeys.moveable, moveable);
-    }
-
-    public boolean isAutosized() {
-        return (Boolean) getStateHelper().eval(PropertyKeys.autosized, false);
-    }
-
-    public void setAutosized(boolean autosized) {
-        getStateHelper().put(PropertyKeys.autosized, autosized);
-    }
-
-    public boolean isModal() {
-        return (Boolean) getStateHelper().eval(PropertyKeys.modal, true);
-    }
-
-    public void setModal(boolean modal) {
-        getStateHelper().put(PropertyKeys.modal, modal);
-    }
-
-    public boolean isKeepVisualState() {
-        return (Boolean) getStateHelper().eval(PropertyKeys.keepVisualState, false);
-    }
-
-    public void setKeepVisualState(boolean keepVisualState) {
-        getStateHelper().put(PropertyKeys.keepVisualState, keepVisualState);
-    }
-
-    public boolean isOverlapEmbedObjects() {
-        return (Boolean) getStateHelper().eval(PropertyKeys.overlapEmbedObjects, false);
-    }
-
-    public void setOverlapEmbedObjects(boolean overlapEmbedObjects) {
-        getStateHelper().put(PropertyKeys.overlapEmbedObjects, overlapEmbedObjects);
-    }
-
-    public boolean isResizeable() {
-        return (Boolean) getStateHelper().eval(PropertyKeys.resizeable, true);
-    }
-
-    public void setResizeable(boolean resizeable) {
-        getStateHelper().put(PropertyKeys.resizeable, resizeable);
-    }
-
-    public boolean isTrimOverlayedElements() {
-        return (Boolean) getStateHelper().eval(
-            PropertyKeys.trimOverlayedElements, false);
-    }
-
-    public void setTrimOverlayedElements(boolean trimOverlayedElements) {
-        getStateHelper().put(PropertyKeys.trimOverlayedElements,
-            trimOverlayedElements);
-    }
-
-    public String getDomElementAttachment() {
-        return (String) getStateHelper()
-            .eval(PropertyKeys.domElementAttachment);
-    }
-
-    public void setDomElementAttachment(String domElementAttachment) {
-        getStateHelper().put(PropertyKeys.domElementAttachment, domElementAttachment);
-    }
-
-    public String getControlsClass() {
-        return (String) getStateHelper().eval(PropertyKeys.controlsClass);
-    }
-
-    public void setControlsClass(String controlsClass) {
-        getStateHelper().put(PropertyKeys.controlsClass, controlsClass);
-    }
-
-    /*
-     * public String getLabel() { return (String) getStateHelper().eval(PropertyKeys.label); }
-     * 
-     * public void setLabel(String label) { getStateHelper().put(PropertyKeys.label, label); }
-     */
-
-    public String getHeaderClass() {
-        return (String) getStateHelper().eval(PropertyKeys.headerClass);
-    }
-
-    public void setHeaderClass(String headerClass) {
-        getStateHelper().put(PropertyKeys.headerClass, headerClass);
-    }
-
-    /*
-     * public String getScrollerClass() { return (String) getStateHelper().eval(PropertyKeys.scrollerClass); }
-     * 
-     * public void setScrollerClass(String scrollerClass) { getStateHelper().put(PropertyKeys.scrollerClass,
-     * scrollerClass); }
-     */
-
-    public String getShadowDepth() {
-        return (String) getStateHelper().eval(PropertyKeys.shadowDepth);
-    }
-
-    public void setShadowDepth(String shadowDepth) {
-        getStateHelper().put(PropertyKeys.shadowDepth, shadowDepth);
-    }
-
-    public String getShadowOpacity() {
-        return (String) getStateHelper().eval(PropertyKeys.shadowOpacity);
-    }
-
-    public void setShadowOpacity(String shadowOpacity) {
-        getStateHelper().put(PropertyKeys.shadowOpacity, shadowOpacity);
-    }
-
-    //TODO nick - this should part of renderer
-    private Map<String, Object> prepareVisualOptions(Object value) {
-        if (null == value) {
-            return new HashMap<String, Object>();
-        } else if (value instanceof Map) {
-            return (Map<String, Object>) value;
-        } else if (value instanceof String) {
-            String s = (String) value;
-            if (!s.startsWith("{")) {
-                s = "{" + s + "}";
-            }
-            try {
-                return new HashMap<String, Object>(new JSONMap(s));
-            } catch (JSONException e) {
-                throw new FacesException(e);
-            }
-        } else {
-            throw new FacesException("Attribute visualOptions of component [" + this.getClientId(getFacesContext())
-                + "] must be instance of Map or String, but its type is " + value.getClass().getSimpleName());
-        }
-    }
-
-    @Override
-    public String getFamily() {
-        return COMPONENT_FAMILY;
-    }
-}

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	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java	2010-08-13 17:38:52 UTC (rev 18632)
@@ -1,12 +1,14 @@
 package org.richfaces.renderkit.html;
 
 import java.io.IOException;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
+import javax.faces.FacesException;
 import javax.faces.application.ResourceDependencies;
 import javax.faces.application.ResourceDependency;
 import javax.faces.component.UIComponent;
@@ -15,7 +17,9 @@
 
 import org.ajax4jsf.javascript.JSFunctionDefinition;
 import org.ajax4jsf.renderkit.RendererBase;
-import org.richfaces.component.UIPopupPanel;
+import org.richfaces.component.AbstractPopupPanel;
+import org.richfaces.json.JSONException;
+import org.richfaces.json.JSONMap;
 
 //TODO nick - JSF have concept of library, it should be used instead of '/' in resource names
 @ResourceDependencies( { @ResourceDependency(name = "jquery.js"), @ResourceDependency(name = "richfaces.js"),
@@ -58,7 +62,7 @@
     protected void doDecode(FacesContext context, UIComponent component) {
         super.doDecode(context, component);
 
-        UIPopupPanel panel = (UIPopupPanel) component;
+        AbstractPopupPanel panel = (AbstractPopupPanel) component;
         ExternalContext exCtx = context.getExternalContext();
         Map<String, String> rqMap = exCtx.getRequestParameterMap();
         Object panelOpenState = rqMap.get(panel.getClientId(context) + "OpenedState");
@@ -73,7 +77,7 @@
                 boolean show = panel.isShow() || Boolean.parseBoolean((String) panelOpenState);
                 panel.setShow(show);
 
-                Map<String, Object> visualOptions = (Map<String, Object>) panel.getHandledVisualOptions();
+                Map<String, Object> visualOptions = (Map<String, Object>) getHandledVisualOptions(panel);
                 Iterator<Entry<String, String>> it = rqMap.entrySet().iterator();
                 while (it.hasNext()) {
                     Map.Entry<String, String> entry = it.next();
@@ -88,11 +92,11 @@
     }
 
     protected Class getComponentClass() {
-        return UIPopupPanel.class;
+        return AbstractPopupPanel.class;
     }
 
     public void checkOptions(FacesContext context, UIComponent component) {
-        UIPopupPanel panel = (UIPopupPanel) component;
+    	AbstractPopupPanel panel = (AbstractPopupPanel) component;
         if (panel.isAutosized() && panel.isResizeable()) {
             throw new IllegalArgumentException("Autosized modal panel can't be resizeable.");
         }
@@ -127,7 +131,7 @@
 
     @SuppressWarnings("unchecked")
     public String buildShowScript(FacesContext context, UIComponent component) {
-        UIPopupPanel panel = (UIPopupPanel) component;
+    	AbstractPopupPanel panel = (AbstractPopupPanel) component;
         StringBuilder result = new StringBuilder();
 
         // Bug https://jira.jboss.org/jira/browse/RF-2466
@@ -137,7 +141,7 @@
             result.append("RichFaces.ui.PopupPanel.showPopupPanel('" + panel.getClientId(context) + "', {");
 
             //TODO nick - use ScriptUtils.toScript
-            Iterator<Map.Entry<String, Object>> it = ((Map<String, Object>) panel.getHandledVisualOptions()).entrySet()
+            Iterator<Map.Entry<String, Object>> it = ((Map<String, Object>) getHandledVisualOptions(panel)).entrySet()
                 .iterator();
             while (it.hasNext()) {
                 Map.Entry<String, Object> entry = it.next();
@@ -176,9 +180,9 @@
             builder.append(",");
         }
     }
-
+    
     public String buildScript(FacesContext context, UIComponent component) throws IOException {
-        UIPopupPanel panel = (UIPopupPanel) component;
+    	AbstractPopupPanel panel = (AbstractPopupPanel) component;
         StringBuilder result = new StringBuilder();
         result.append("new RichFaces.ui.PopupPanel('");
         result.append(panel.getClientId());
@@ -206,6 +210,7 @@
         writeOption(result, "domElementAttachment", panel.getDomElementAttachment(), component, true);
         writeOption(result, "keepVisualState", panel.isKeepVisualState(), component, false);
         writeOption(result, "show", panel.isShow(), component, false);
+        writeOption(result, "modal", panel.isModal(), component, false);
         writeOption(result, "autosized", panel.isAutosized(), component, false);
         writeOption(result, "overlapEmbedObjects", panel.isOverlapEmbedObjects(), component, false);
         //TODO nick - what is deleted here?
@@ -237,10 +242,21 @@
         return "";
     }
 
-    private String writeVisualOptions(FacesContext context, UIPopupPanel panel) throws IOException {
+    public Map<String, Object> getHandledVisualOptions(AbstractPopupPanel panel) {
+        String options = panel.getVisualOptions();
+        Map<String, Object> result;
+        result = prepareVisualOptions(options, panel);
+
+        if (null == result) {
+            result = new HashMap<String, Object>();
+        }
+        return result;
+    }
+    
+    private String writeVisualOptions(FacesContext context, AbstractPopupPanel panel) throws IOException {
         StringBuffer result = new StringBuffer();
 
-        Iterator<Map.Entry<String, Object>> it = ((Map<String, Object>) panel.getHandledVisualOptions()).entrySet()
+        Iterator<Map.Entry<String, Object>> it = ((Map<String, Object>) getHandledVisualOptions(panel)).entrySet()
             .iterator();
         if (it.hasNext()) {
             result.append(",\n");
@@ -255,4 +271,25 @@
         }
         return result.toString();
     }
+    
+    private Map<String, Object> prepareVisualOptions(Object value, AbstractPopupPanel panel) {
+        if (null == value) {
+            return new HashMap<String, Object>();
+        } else if (value instanceof Map) {
+            return (Map<String, Object>) value;
+        } else if (value instanceof String) {
+            String s = (String) value;
+            if (!s.startsWith("{")) {
+                s = "{" + s + "}";
+            }
+            try {
+                return new HashMap<String, Object>(new JSONMap(s));
+            } catch (JSONException e) {
+                throw new FacesException(e);
+            }
+        } else {
+            throw new FacesException("Attribute visualOptions of component [" + panel.getClientId(FacesContext.getCurrentInstance())
+                + "] must be instance of Map or String, but its type is " + value.getClass().getSimpleName());
+        }
+    }
 }

Deleted: trunk/ui/output/ui/src/main/resources/META-INF/faces-config.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/faces-config.xml	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/resources/META-INF/faces-config.xml	2010-08-13 17:38:52 UTC (rev 18632)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<faces-config version="2.0" metadata-complete="false"
-              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
-              xmlns="http://java.sun.com/xml/ns/javaee" xmlns:cdk="http://richfaces.org/cdk/extensions"
-              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<component>
-		<component-type>org.richfaces.Panel</component-type>
-		<component-class>org.richfaces.component.UIPanel</component-class>
-	</component>
-	<component>
-		<component-type>org.richfaces.PopupPanel</component-type>
-		<component-class>org.richfaces.component.UIPopupPanel</component-class>
-	</component>
-    <render-kit>
-        <render-kit-id>HTML_BASIC</render-kit-id>
-        <renderer>
-            <component-family>org.richfaces.Panel</component-family>
-            <renderer-type>org.richfaces.PanelRenderer</renderer-type>
-            <renderer-class>org.richfaces.renderkit.html.PanelRenderer</renderer-class>
-        </renderer>
-        <renderer>
-            <component-family>org.richfaces.PopupPanel</component-family>
-            <renderer-type>org.richfaces.PopupPanelRenderer</renderer-type>
-            <renderer-class>org.richfaces.renderkit.html.PopupPanelRenderer</renderer-class>
-        </renderer>
-    </render-kit>
-    <faces-config-extension>
-        <cdk:taglib>
-            <cdk:shortName>panels</cdk:shortName>
-            <cdk:uri>http://richfaces.org/panels</cdk:uri>
-        </cdk:taglib>
-    </faces-config-extension>
-</faces-config>

Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml	2010-08-13 17:38:52 UTC (rev 18632)
@@ -653,6 +653,8 @@
         </attribute>
 
     </tag>
+    
+    
 
-
+    
 </facelet-taglib>

Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panel.ecss	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panel.ecss	2010-08-13 17:38:52 UTC (rev 18632)
@@ -1,4 +1,4 @@
-.rf-panel{
+.rf-p{
 	background-color:'#{richSkin.generalBackgroundColor}';
 	color:'#{richSkin.panelBorderColor}';
 	border-width:1px;
@@ -6,7 +6,7 @@
 	padding:1px;
 }
    
-.rf-panel-header{
+.rf-p-hr{
 	background-color:'#{richSkin.headerBackgroundColor}';
 	border-color:'#{richSkin.headerBackgroundColor}';
 	font-size:'#{richSkin.headerSizeFont}';
@@ -21,7 +21,7 @@
 	background-image:"url(#{resource['org.richfaces.renderkit.html.GradientA']})";
 }
 
-.rf-panel-body{
+.rf-p-b{
 	font-size:'#{richSkin.generalSizeFont}';
 	color:'#{richSkin.generalTextColor}';
 	font-family:'#{richSkin.generalFamilyFont}';

Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss	2010-08-13 17:38:52 UTC (rev 18632)
@@ -1,4 +1,4 @@
-.mp-button {
+.rf-pp-b {
 	outline-style: none;
 	position: absolute;
 	clip: rect(0px 0px 1px 1px);
@@ -11,7 +11,7 @@
 	filter : 'alpha(opacity=10)';
 }
 
-.mp_shade {
+.rf-pp-sh {
 	position : fixed;
  	width : 100%;
  	height : 100%;
@@ -21,28 +21,18 @@
  	opacity:0.5;
  	filter : 'alpha(opacity=50)';
 }
-.mp_iframe {
-	position : absolute;
- 	width : 100%;
- 	height : 100%;
- 	top:0px;
-  	left : 0px;
- 	opacity:0.3;
- 	filter : 'alpha(opacity=30)';
-}
-.mp_shadow {
-	position : fixed;
+
+.rf-pp-shw {
  	background-color : #000000;
  	opacity:0.1;
  	filter : 'alpha(opacity=10)';
 }
-.mp_container {
-	position : fixed;
+.rf-pp-cr {
  	border : '1px solid #{richSkin.panelBorderColor}';
  	background : '#{richSkin.generalBackgroundColor}';
  	z-index:100;
 }
-.mp_header {
+.rf-pp-h {
 	background : "url(#{resource['org.richfaces.renderkit.html.GradientA']})";
  	repeat-x : 'top left #{richSkin.headerBackgroundColor}';
  	position : relative;
@@ -50,7 +40,7 @@
  	cursor : move;
  	padding : 2px;
 }
-.mp_header_content {
+.rf-pp-h-ct {
 	overflow : hidden;
  	white-space : nowrap;
  	text-overflow: ellipsis;
@@ -61,7 +51,7 @@
  	padding : 2px;
  	padding-left : 10px;
 }
-.mp_header_controls {
+.rf-pp-h-cs {
  	position : absolute;
  	top : 2px;
  	right : 2px;
@@ -71,29 +61,30 @@
  	color : '#{richSkin.headerTextColor}';
  	font-family : '#{richSkin.headerFamilyFont}';
  	font-size : '#{richSkin.headerSizeFont}';
+	z-index:100;
 }
 
-.mp_content_scroller {
+.rf-pp-ct-sr {
  	position : relative;
  	top : 0px;
  	left : 0px;
  	overflow : auto;
 }
-.mp_content {
+.rf-pp-ct {
 	position : relative;
  	padding : 10px;
  	color : '#{richSkin.generalTextColor}';
  	font-family : '#{richSkin.generalFamilyFont}';
  	font-size : '#{richSkin.generalSizeFont}';
 }
-.mp_handler {
+.rf-pp-hr {
 	background : red;
  	filter : 'alpha(opacity=0)';
  	opacity:0;
 	position : absolute;
 	margin : -4px;
 }
-.mp_handler_left {
+.rf-pp-hr-l {
  	width : 7px;
  	height : 100%;
  	top : 0px;
@@ -101,7 +92,7 @@
  	cursor : w-resize;
 }
 
-.mp_handler_right {
+.rf-pp-hr-r {
  	width : 7px;
  	height : 100%;
  	top : 0px;
@@ -109,7 +100,7 @@
  	cursor : w-resize;
 }
 
-.mp-iframe {
+.rf-pp-if {
 			position: absolute; 
 			left: 0px; 
 			top: 0px; 
@@ -118,14 +109,14 @@
 			z-index: -1;
 }
 		
-.mp_handler_top {
+.rf-pp-hr-t {
  	width : 100%;
  	height : 7px;
  	top : 0px;
  	left : 0px;
  	cursor : n-resize;
 }
-.mp_handler_bottom {
+.rf-pp-hr-b {
  	width : 100%;
  	height : 7px;
  	bottom : 0px;
@@ -133,28 +124,28 @@
  	cursor : n-resize;
 }
 	
-.mp_handler_top_left {
+.rf-pp-hr-tl {
  	width : 10px;
  	height : 10px;
  	top : 0px;
  	left : 0px;
  	cursor : nw-resize;
 }
-.mp_handler_top_right {
+.rf-pp-hr-tr {
  	width : 10px;
  	height : 10px;
  	top : 0px;
  	right : 0px;
  	cursor : ne-resize;
 }
-.mp_handler_bottom_left {
+.rf-pp-hr-bl {
  	width : 10px;
  	height : 10px;
  	bottom : 0px;
  	left : 0px;
  	cursor : ne-resize;
 }
-.mp_handler_bottom_right {
+.rf-pp-hr-br {
  	width : 10px;
  	height : 10px;
  	bottom : 0px;

Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js	2010-08-13 17:38:52 UTC (rev 18632)
@@ -304,7 +304,7 @@
 					if (this.options.overlapEmbedObjects && !this.iframe) {
 	                        		this.iframe = this.markerId + "IFrame";
 	            		$("<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.iframe + "\" " +								
-						"class=\"mp-iframe\" style=\"width:" +this.options.width + "px; height:" + this.options.height + "px;\">" +
+						"class=\"rf-pp-if\" style=\"width:" +this.options.width + "px; height:" + this.options.height + "px;\">" +
 						"</iframe>").insertBefore($(':first-child', $(this.cdiv))[0]);
 				
 						eIframe = jQuery("#"+this.iframe); 

Modified: trunk/ui/output/ui/src/main/templates/panel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/panel.template.xml	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/templates/panel.template.xml	2010-08-13 17:38:52 UTC (rev 18632)
@@ -14,23 +14,23 @@
 	</cc:interface>
 
 	<cc:implementation>
-		<div cdk:passThroughWithExclusions="id,value,styleClass,class" id="#{clientId}" class="rf-panel #{component.attributes['styleClass']}">
+		<div cdk:passThroughWithExclusions="id,value,styleClass,class" id="#{clientId}" class="rf-p #{component.attributes['styleClass']}">
 		 <c:choose>
 		 <c:when test="#{component.getFacet('header') != null and component.getFacet('header').rendered}"> 
-				<div id="#{clientId}_header" class="rf-panel-header #{component.attributes['headerClass']}">
+				<div id="#{clientId}_header" class="rf-p-hr #{component.attributes['headerClass']}">
 					<!--  <cc:renderFacet name="header" />-->
 					<cdk:call expression="renderHeaderFacet(facesContext, component)" />
 				</div>
 			 </c:when>
 			 <c:when test="#{component.attributes['header']!= null and not component.attributes['header'].equals('')}"> 
-				<div id="#{clientId}_header" class="rf-panel-header #{component.attributes['headerClass']}">
+				<div id="#{clientId}_header" class="rf-p-hr #{component.attributes['headerClass']}">
 					#{component.attributes['header']}
 				</div>
 			 </c:when>
 			<c:otherwise>
 			 </c:otherwise>
 			</c:choose>
-			<div id="#{clientId}_body" class="rf-panel-body #{component.attributes['bodyClass']}">
+			<div id="#{clientId}_body" class="rf-p-b #{component.attributes['bodyClass']}">
 				<cdk:call expression="renderChildren(facesContext, component)" />
 			</div>
 		</div>

Modified: trunk/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- trunk/ui/output/ui/src/main/templates/popupPanel.template.xml	2010-08-13 17:34:18 UTC (rev 18631)
+++ trunk/ui/output/ui/src/main/templates/popupPanel.template.xml	2010-08-13 17:38:52 UTC (rev 18632)
@@ -24,42 +24,49 @@
 				onmousedown="#{component.attributes['onmaskmousedown']}"
 				onmousemove="#{component.attributes['onmaskmousemove']}"
 				onmouseover="#{component.attributes['onmaskmouseover']}"
-				onmouseout="#{component.attributes['onmaskmouseout']}" class="mp_shade">
-				<button class="mp-button" id="#{clientId}FirstHref"></button>
+				onmouseout="#{component.attributes['onmaskmouseout']}" class="rf-pp-sh">
+				<button class="rf-pp-b" id="#{clientId}FirstHref"></button>
 				</div>
 
 </c:if>
-	<div id="#{clientId}_shadow" class="mp_shadow"/>
-	<div id="#{clientId}_container" cdk:passThroughWithExclusions="id style class styleClass" class="mp_container #{component.attributes['styleClass']}">
+	<div id="#{clientId}_shadow" style="position: #{component.attributes['followByScroll'] ? 'fixed' : 'absolute'};" class="rf-pp-shw"/>
+	<div id="#{clientId}_container" style="position: #{component.attributes['followByScroll'] ? 'fixed' : 'absolute'};" cdk:passThroughWithExclusions="id style class styleClass" class="rf-pp-cr #{component.attributes['styleClass']}">
 
-		<c:if test="#{component.getFacet('header')!=null and component.getFacet('header').rendered}">
-		<div id="#{clientId}_header" class="mp_header #{component.attributes['headerClass']}" >
-			<div id="#{clientId}_header_content" class="mp_header_content">
+		<c:if test="(#{component.getFacet('header')!=null and component.getFacet('header').rendered})">
+		<div id="#{clientId}_header" class="rf-pp-h #{component.attributes['headerClass']}" >
+			<div id="#{clientId}_header_content" class="rf-pp-h-ct">
 				<cdk:call expression="renderHeaderFacet(facesContext, component)"/>
 			</div>
 			</div>
 		</c:if>
+		<c:if test="#{component.attributes['header'] != null and (component.getFacet('header')==null or !component.getFacet('header').rendered)}">
+		<div id="#{clientId}_header" class="rf-pp-h #{component.attributes['headerClass']}" >
+			<div id="#{clientId}_header_content" class="rf-pp-h-ct">
+				#{component.attributes['header']}
+			</div>
+			</div>
+		</c:if>
 		<c:if test="#{component.getFacet('controls')!=null and component.getFacet('controls').rendered}">
-			<div id="#{clientId}_header_controls" class="mp_header_controls #{component.attributes['controlsClass']}">
+			<div id="#{clientId}_header_controls" class="rf-pp-h-cs #{component.attributes['controlsClass']}">
 				<cdk:call expression="renderControlsFacet(facesContext, component)"/>
 			</div>
 	</c:if>
 		
-		<div id="#{clientId}_content_scroller" style="#{getStyleIfTrimmed(component)}" class="mp_content_scroller">
-			<div id="#{clientId}_content" class="mp_content" style="#{component.attributes['style']}">
+		<div id="#{clientId}_content_scroller" style="#{getStyleIfTrimmed(component)}" class="rf-pp-ct-sr">
+			<div id="#{clientId}_content" class="rf-pp-ct" style="#{component.attributes['style']}">
 				<cdk:call expression="renderChildren(facesContext, component)"/>
 			</div>
 		</div>
 		<c:if test="#{component.attributes['resizeable']}">
-		<div id="#{clientId}ResizerW" class="mp_handler  mp_handler_left"></div>
-		<div id="#{clientId}ResizerE" class="mp_handler mp_handler_right"></div>
-		<div id="#{clientId}ResizerN" class="mp_handler mp_handler_top"></div>
+		<div id="#{clientId}ResizerW" class="rf-pp-hr  rf-pp-hr-l"></div>
+		<div id="#{clientId}ResizerE" class="rf-pp-hr rf-pp-hr-r"></div>
+		<div id="#{clientId}ResizerN" class="rf-pp-hr rf-pp-hr-t"></div>
 
-		<div id="#{clientId}ResizerS" class="mp_handler mp_handler_bottom"></div>
-		<div id="#{clientId}ResizerNW" class="mp_handler mp_handler_top_left"></div>
-		<div id="#{clientId}ResizerNE" class="mp_handler mp_handler_top_right"></div>
-		<div id="#{clientId}ResizerSW" class="mp_handler mp_handler_bottom_left"></div>
-		<div id="#{clientId}ResizerSE" class="mp_handler mp_handler_bottom_right"></div>
+		<div id="#{clientId}ResizerS" class="rf-pp-hr rf-pp-hr-b"></div>
+		<div id="#{clientId}ResizerNW" class="rf-pp-hr rf-pp-hr-tl"></div>
+		<div id="#{clientId}ResizerNE" class="rf-pp-hr rf-pp-hr-tr"></div>
+		<div id="#{clientId}ResizerSW" class="rf-pp-hr rf-pp-hr-bl"></div>
+		<div id="#{clientId}ResizerSE" class="rf-pp-hr rf-pp-hr-br"></div>
 		</c:if>
 		
 	</div>



More information about the richfaces-svn-commits mailing list