JBoss Rich Faces SVN: r20205 - in trunk: ui/output/ui/src/main/java/org/richfaces/component and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-11-29 05:02:29 -0500 (Mon, 29 Nov 2010)
New Revision: 20205
Added:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
Modified:
trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js
trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js
trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
Log:
RF-9317 panelMenu components
Modified: trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js
===================================================================
--- trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/examples/output-demo/src/main/webapp/resources/PanelMenu.js 2010-11-29 10:02:29 UTC (rev 20205)
@@ -48,6 +48,7 @@
this.options = $.extend({}, __DEFAULT_OPTIONS, options || {});
this.activeItem = this.__getValueInput().value;
+ this.nestingLevel = 0;
var menuGroup = this;
if (menuGroup.options.expandSingle) {
@@ -178,12 +179,14 @@
/***************************** Private Methods ****************************************************************/
+
+
__panelMenu : function () {
return $(rf.getDomElement(this.id));
},
__childGroups : function () {
- return this.__panelMenu().children(".rf-pm-gr")
+ return this.__panelMenu().children(".rf-pm-top-gr")
},
/**
Modified: trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js
===================================================================
--- trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/examples/output-demo/src/main/webapp/resources/PanelMenuGroup.js 2010-11-29 10:02:29 UTC (rev 20205)
@@ -254,14 +254,6 @@
},
/***************************** Private Methods ****************************************************************/
- __parentGroup : function () {
- var parentGroup = this.__group().parents(".rf-pm-gr")[0];
- if (parentGroup) {
- return parentGroup;
- }
- return this.__panelMenu();
- },
-
__childGroups : function () {
return this.__content().children(".rf-pm-gr")
},
@@ -304,7 +296,7 @@
__changeState : function () {
var state = {};
- state["expanded"] = this.__setExpandValue(this.__getExpandValue());
+ state["expanded"] = this.__setExpandValue(!this.__getExpandValue());
if (this.options.selectable) {
state["itemName"] = this.__rfPanelMenu().selectedItem(this.itemName); // TODO bad function name for function which change component state
}
Modified: trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js
===================================================================
--- trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/examples/output-demo/src/main/webapp/resources/PanelMenuItem.js 2010-11-29 10:02:29 UTC (rev 20205)
@@ -31,7 +31,8 @@
mode: "client",
unselectable: false,
highlight: true,
- stylePrefix: "rf-pm-itm"
+ stylePrefix: "rf-pm-itm",
+ itemStep: 20
};
var SELECT_ITEM = {
@@ -157,6 +158,11 @@
}
}
+ item = this;
+ $(this.__panelMenu()).ready(function () {
+ item.__renderNestingLevel();
+ });
+
this.__addUserEventHandler("select");
},
@@ -212,6 +218,36 @@
},
/***************************** Private Methods ****************************************************************/
+ __rfParentItem : function () {
+ var res = this.__item().parents(".rf-pm-gr")[0];
+ if (!res) {
+ res = this.__item().parents(".rf-pm-top-gr")[0];
+ }
+
+ if (!res) {
+ res = this.__panelMenu();
+ }
+
+ return res ? rf.$(res) : null;
+ },
+
+ __getNestingLevel : function () {
+ if (!this.nestingLevel) {
+ var parentItem = this.__rfParentItem();
+ if (parentItem && parentItem.__getNestingLevel) {
+ this.nestingLevel = parentItem.__getNestingLevel() + 1;
+ } else {
+ this.nestingLevel = 0;
+ }
+ }
+
+ return this.nestingLevel;
+ },
+
+ __renderNestingLevel : function () {
+ this.__item().find("td").first().css("padding-left", this.options.itemStep * this.__getNestingLevel());
+ },
+
__panelMenu : function () {
return this.__item().parents(".rf-pm")[0];
},
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -25,6 +25,7 @@
import org.richfaces.PanelMenuMode;
+import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
/**
@@ -37,10 +38,64 @@
public static final String COMPONENT_FAMILY = "org.richfaces.PanelMenuItem";
+ public enum Icons {
+ disc("rf-pm-disc"),
+ grid("rf-pm-grid"),
+ chevron("rf-pm-chevron"),
+ chevronUp("rf-pm-chevron-up"),
+ chevronDown("rf-pm-chevron-down"),
+ triangle("rf-pm-triangle"),
+ triangleUp("rf-pm-triangle-up"),
+ triangleDown("rf-pm-triangle-down");
+
+ public static final Icons DEFAULT = grid;
+
+ private final String cssClass;
+
+ Icons(String cssClass) {
+ this.cssClass = cssClass;
+ }
+
+ public String cssClass() {
+ return cssClass;
+ }
+ }
+
protected AbstractPanelMenuItem() {
setRendererType("org.richfaces.PanelMenuItem");
}
+ public boolean isTopItem() {
+ return getParentItem() instanceof AbstractPanelMenu;
+ }
+
+ public AbstractPanelMenu getPanelMenu() { // TODO refactor
+ UIComponent parentItem = getParent();
+ while (parentItem != null) {
+ if (parentItem instanceof AbstractPanelMenu) {
+ return (AbstractPanelMenu) parentItem;
+ }
+
+ parentItem = parentItem.getParent();
+ }
+
+ return null;
+ }
+
+ public UIComponent getParentItem() {
+ UIComponent parentItem = getParent();
+ while (parentItem != null) {
+ if (parentItem instanceof AbstractPanelMenuGroup
+ || parentItem instanceof AbstractPanelMenu) {
+ return parentItem;
+ }
+
+ parentItem = parentItem.getParent();
+ }
+
+ return null;
+ }
+
@Override
public String getFamily() {
return COMPONENT_FAMILY;
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/UIPanelMenuItem.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -46,7 +46,7 @@
}
public String getIcon() {
- return (String) getStateHelper().eval(PropertyKeys.icon);
+ return (String) getStateHelper().eval(PropertyKeys.icon, Icons.DEFAULT.toString());
}
public void setIcon(String icon) {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/DivPanelRenderer.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -10,7 +10,7 @@
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * buticon 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.
*
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -26,6 +26,7 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.component.AbstractPanelMenuGroup;
+import org.richfaces.component.AbstractPanelMenuItem;
import org.richfaces.component.html.HtmlPanelMenuGroup;
import org.richfaces.renderkit.HtmlConstants;
@@ -52,8 +53,9 @@
public static final String BEFORE_COLLAPSE = "beforecollapse";
public static final String BEFORE_EXPAND = "beforeexpand";
public static final String BEFORE_SWITCH = "beforeswitch";
+ private static final String CSS_CLASS_PREFIX = "rf-pm-gr";
+ private static final String TOP_CSS_CLASS_PREFIX = "rf-pm-top-gr";
-
@Override
protected void doDecode(FacesContext context, UIComponent component) {
AbstractPanelMenuGroup menuGroup = (AbstractPanelMenuGroup) component;
@@ -106,15 +108,22 @@
private void encodeHeader(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuGroup) throws IOException {
writer.startElement("div", null);
writer.writeAttribute("id", menuGroup.getClientId(context) + ":hdr", null);
- writer.writeAttribute("class", "rf-pm-gr-hdr", null);
- writer.writeText(menuGroup.getLabel(), null);
+ writer.writeAttribute("class", getCssClass(menuGroup, "-hdr"), null);
+ PanelMenuItemRenderer.encodeHeaderGroup(writer, context, menuGroup, getCssClass(menuGroup, ""));
+// writer.writeText(menuGroup.getLabel(), null);
writer.endElement("div");
}
+ public String getCssClass(AbstractPanelMenuItem item, String postfix) {
+ return (item.isTopItem() ? TOP_CSS_CLASS_PREFIX : CSS_CLASS_PREFIX) + postfix;
+ }
+
private void encodeContentBegin(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuGroup) throws IOException {
writer.startElement("div", null);
writer.writeAttribute("id", menuGroup.getClientId(context) + ":cnt", null);
- writer.writeAttribute("class", concatClasses("rf-pm-gr-cnt", menuGroup.isExpanded() ? "rf-pm-exp" : "rf-pm-colps"), null);
+ writer.writeAttribute("class", concatClasses(getCssClass(menuGroup, "-cnt"), menuGroup.isExpanded() ? "rf-pm-exp" : "rf-pm-colps"), null);
+
+ writeJavaScript(writer, context, menuGroup);
}
private void encodeContentEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
@@ -123,7 +132,7 @@
@Override
protected String getStyleClass(UIComponent component) {
- return concatClasses("rf-pm-gr", attributeAsString(component, "styleClass"));
+ return concatClasses(getCssClass((AbstractPanelMenuItem) component, ""), attributeAsString(component, "styleClass"));
}
@Override
@@ -160,7 +169,7 @@
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
encodeContentEnd(writer, context, component);
- super.doEncodeEnd(writer, context, component);
+ writer.endElement(HtmlConstants.DIV_ELEM);
}
@Override
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -26,6 +26,9 @@
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.component.AbstractPanelMenuItem;
import org.richfaces.component.html.HtmlPanelMenuItem;
+import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.renderkit.HtmlConstants;
+import org.richfaces.renderkit.RenderKitUtils;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -34,7 +37,6 @@
import java.util.HashMap;
import java.util.Map;
-import static org.richfaces.component.util.HtmlUtil.concatClasses;
import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
@@ -47,17 +49,57 @@
public static final String UNSELECT = "unselect";
public static final String SELECT = "select";
public static final String BEFORE_SELECT = "beforeselect";
+
+ private static final String CSS_CLASS_PREFIX = "rf-pm-itm";
@Override
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
super.doEncodeBegin(writer, context, component);
- writer.writeText(((AbstractPanelMenuItem) component).getLabel(), null);
+ encodeHeaderGroup(writer, context, (AbstractPanelMenuItem) component, CSS_CLASS_PREFIX);
}
+ static void encodeHeaderGroup(ResponseWriter writer, FacesContext context, AbstractPanelMenuItem menuItem, String classPrefix) throws IOException {
+ writer.startElement("table", null);
+ writer.writeAttribute("class", classPrefix + "-gr", null);
+ writer.startElement("tr", null);
+
+ encodeTdIcon(writer, context, classPrefix, menuItem.getIcon());
+
+ writer.startElement("td", null);
+ writer.writeAttribute("class", classPrefix + "-lbl", null);
+ writer.writeText(menuItem.getLabel(), null);
+ writer.endElement("td");
+
+ writer.startElement("td", null);
+ writer.writeAttribute("class", HtmlUtil.concatClasses(classPrefix + "-exp-ico", "rf-pm-triangle-down"), null);
+ writer.endElement("td");
+
+ writer.endElement("tr");
+ writer.endElement("table");
+ }
+
+ private static void encodeTdIcon(ResponseWriter writer, FacesContext context, String classPrefix, String attrIconValue) throws IOException {
+ writer.startElement("td", null);
+ try {
+ AbstractPanelMenuItem.Icons icon = AbstractPanelMenuItem.Icons.valueOf(attrIconValue);
+ writer.writeAttribute("class", HtmlUtil.concatClasses(classPrefix + "-ico", icon.cssClass()), null);
+ } catch (IllegalArgumentException e) {
+ writer.writeAttribute("class", classPrefix + "-ico", null);
+ if(attrIconValue != null && attrIconValue.trim().length() != 0) {
+ writer.startElement(HtmlConstants.IMG_ELEMENT, null);
+ writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null);
+ writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null);
+ writer.endElement(HtmlConstants.IMG_ELEMENT);
+ }
+ }
+
+ writer.endElement("td");
+ }
+
@Override
protected String getStyleClass(UIComponent component) {
- return concatClasses("rf-pm-itm", attributeAsString(component, "styleClass"));
+ return concatClasses(CSS_CLASS_PREFIX, attributeAsString(component, "styleClass"));
}
@Override
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,88 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.AbstractJava2DUserResource;
+import org.richfaces.resource.StateHolderResource;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+
+import javax.faces.context.FacesContext;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelMenuIconBasic extends AbstractJava2DUserResource implements StateHolderResource {
+ private static final String TOP_BULLET_COLOR = Skin.HEADER_TEXT_COLOR;
+ private static final String ORDINAL_BULLET_COLOR = Skin.HEADER_BACKGROUND_COLOR;
+
+ private static final Dimension DIMENSION = new Dimension(16, 16);
+
+ private Color color;
+ private Color topBulletColor;
+ private Color ordinalBulletColor;
+
+ protected PanelMenuIconBasic() {
+ super(DIMENSION);
+ }
+
+ public void paint(Graphics2D graphics2D) {
+ if (color == null || graphics2D == null) {
+ return;
+ }
+
+ graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ graphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ graphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ paintImage(graphics2D, color);
+ }
+
+ protected abstract void paintImage(Graphics2D g2d, Color color);
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
+ Skin skin = SkinFactory.getInstance(context).getSkin(context);
+ dataOutput.writeInt(skin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR));
+ dataOutput.writeInt(skin.getColorParameter(context, TOP_BULLET_COLOR));
+ dataOutput.writeInt(skin.getColorParameter(context, ORDINAL_BULLET_COLOR));
+ }
+
+ public void readState(FacesContext context, DataInput dataInput) throws IOException {
+ color = new Color(dataInput.readInt());
+ topBulletColor = new Color(dataInput.readInt());
+ ordinalBulletColor = new Color(dataInput.readInt());
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,42 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevron extends PanelMenuIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+ path.moveTo(1, 1);
+
+ path.lineTo(17, 1);
+ path.lineTo(47, 31);
+ path.lineTo(17, 61);
+ path.lineTo(1, 61);
+ path.lineTo(31, 31);
+ path.closePath();
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronBasic.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,79 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+
+/**
+ * @author Alex.Kolonitsky
+ */
+public abstract class PanelMenuIconChevronBasic extends PanelMenuIconBasic {
+ private static final int BUFFER_IMAGE_SIZE = 128;
+
+ @Override
+ protected void paintImage(Graphics2D graphics2d, Color color) {
+
+ BufferedImage bufferedImage = new BufferedImage(BUFFER_IMAGE_SIZE, BUFFER_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimension();
+ g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER));
+ g2d.translate(28, 28);
+ g2d.setColor(color);
+
+ GeneralPath path = new GeneralPath();
+ draw(path);
+
+ g2d.fill(path);
+ if (this instanceof PanelMenuIconChevron
+ || this instanceof PanelMenuIconChevronLeft) {
+ g2d.translate(24, 0);
+ } else {
+ g2d.translate(0, 24);
+ }
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight() / BUFFER_IMAGE_SIZE, dimension.getHeight() / BUFFER_IMAGE_SIZE);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2d.drawImage(bufferedImage, transformOp, 0, 0);
+ g2d.dispose();
+ }
+
+ abstract void draw(GeneralPath draw);
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,42 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevronDown extends PanelMenuIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(1, 0);
+ path.lineTo(31, 30);
+ path.lineTo(61, 0);
+ path.lineTo(61, 16);
+ path.lineTo(31, 46);
+ path.lineTo(1, 16);
+ path.closePath();
+
+ }
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronLeft.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,41 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevronLeft extends PanelMenuIconChevronBasic {
+
+ void draw(GeneralPath path) {
+ path.moveTo(61, 1);
+ path.lineTo(45, 1);
+ path.lineTo(15, 31);
+ path.lineTo(45, 61);
+ path.lineTo(61, 61);
+ path.lineTo(30, 31);
+ path.closePath();
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,43 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconChevronUp extends PanelMenuIconChevronBasic {
+
+ protected void draw(GeneralPath path) {
+
+ path.moveTo(0, 46);
+ path.lineTo(0, 31);
+ path.lineTo(30, 1);
+ path.lineTo(61, 31);
+ path.lineTo(61, 46);
+ path.lineTo(30, 16);
+ path.closePath();
+
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,48 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Ellipse2D;
+
+@DynamicUserResource
+public class PanelMenuIconDisc extends PanelMenuIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ Dimension dimension = getDimension();
+ long dim = Math.round(dimension.getWidth() / 3);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(color);
+ g2d.translate(dim, dim);
+
+ g2d.fill(new Ellipse2D.Double(0, 0, dim, dim));
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,67 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Rectangle2D;
+
+@DynamicUserResource
+public class PanelMenuIconGrid extends PanelMenuIconBasic {
+
+ @Override
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Rectangle2D.Float path = new Rectangle2D.Float();
+ Dimension dimension = getDimension();
+
+ g2d.setStroke(new BasicStroke(16, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL));
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+ g2d.translate(40, 40);
+
+ path.setRect(0, 0, 40, 40);
+
+ g2d.setColor(color);
+
+ Color bcolor = new Color(1f, 1f, 1f, 0f);
+
+ g2d.setBackground(bcolor);
+ g2d.fill(path);
+ g2d.clearRect(16, 0, 8, 40);
+ g2d.clearRect(0, 16, 40, 8);
+
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,35 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+
+@DynamicUserResource
+public class PanelMenuIconSpacer extends PanelMenuIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,41 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.*;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangle extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(47, 30);
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(33, 34);
+ path.lineTo(0, 67);
+ path.closePath();
+
+ }
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleBasic.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * 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.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+
+/**
+ * @author Anton Belevich
+ */
+public abstract class PanelMenuIconTriangleBasic extends PanelMenuIconBasic {
+
+ protected void paintImage(Graphics2D g2d, Color color) {
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimension();
+ g2d.scale(dimension.getHeight() / 128, dimension.getHeight() / 128);
+
+ draw(path, g2d);
+
+ g2d.setColor(color);
+ g2d.fill(path);
+
+ }
+
+ abstract void draw(GeneralPath path, Graphics2D g2d);
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,44 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangleDown extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+
+ g2d.translate(31, 54);
+
+ path.moveTo(0, 0);
+ path.lineTo(33, 33);
+ path.lineTo(34, 33);
+ path.lineTo(67, 0);
+ path.closePath();
+
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleLeft.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,41 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangleLeft extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(47, 30);
+ path.moveTo(33, 0);
+ path.lineTo(0, 33);
+ path.lineTo(0, 34);
+ path.lineTo(33, 67);
+ path.closePath();
+ }
+
+}
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,42 @@
+/**
+ * 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.renderkit.html.iconimages;
+
+import org.richfaces.resource.DynamicUserResource;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+
+@DynamicUserResource
+public class PanelMenuIconTriangleUp extends PanelMenuIconTriangleBasic {
+
+ void draw(GeneralPath path, Graphics2D g2d) {
+ g2d.translate(31, 47);
+
+ path.moveTo(0, 33);
+ path.lineTo(33, 0);
+ path.lineTo(34, 0);
+ path.lineTo(67, 33);
+ path.closePath();
+ }
+
+}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-11-29 10:02:29 UTC (rev 20205)
@@ -769,7 +769,6 @@
<component-class>org.richfaces.component.html.HtmlTab</component-class>
</component>
-<!--
<component>
<component-type>org.richfaces.PanelMenuItem</component-type>
<component-class>org.richfaces.component.html.HtmlPanelMenuItem</component-class>
@@ -949,7 +948,6 @@
<property-class>java.lang.Object</property-class>
</property>
</component>
--->
<render-kit>
<render-kit-id>HTML_BASIC</render-kit-id>
@@ -1021,7 +1019,7 @@
</renderer-extension>
</renderer>
-<!-- <renderer>
+ <renderer>
<component-family>org.richfaces.PanelMenuItem</component-family>
<renderer-type>org.richfaces.PanelMenuItem</renderer-type>
<renderer-class>org.richfaces.renderkit.html.PanelMenuItemRenderer</renderer-class>
@@ -1035,7 +1033,7 @@
<component-family>org.richfaces.PanelMenu</component-family>
<renderer-type>org.richfaces.PanelMenu</renderer-type>
<renderer-class>org.richfaces.renderkit.html.PanelMenuRenderer</renderer-class>
- </renderer>-->
+ </renderer>
<client-behavior-renderer>
<client-behavior-renderer-type>org.richfaces.component.behavior.ToggleControl</client-behavior-renderer-type>
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-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-11-29 10:02:29 UTC (rev 20205)
@@ -51,7 +51,6 @@
</component>
</tag>
-<!--
<tag>
<tag-name>panelMenuItem</tag-name>
<component>
@@ -659,7 +658,6 @@
</attribute>
</tag>
--->
<tag>
<tag-name>tooltip</tag-name>
@@ -1710,5 +1708,5 @@
<type>java.lang.String</type>
</attribute>
</tag>
-
+
</facelet-taglib>
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2010-11-29 10:02:29 UTC (rev 20205)
@@ -21,52 +21,247 @@
*/
.rf-pm {
- border:1px solid red;
- padding:10px;
}
.rf-pm-itm {
- border:1px solid #ffd700;
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: '#{richSkin.panelBorderColor}';
+
+ color: '#{richSkin.generalTextColor}';
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ white-space: nowrap;
}
+.rf-pm-itm-gr {
+ width: 100%;
+}
+
+.rf-pm-itm-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-itm-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-itm-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
.rf-pm-itm-hov {
- background-color:#ffd700;
+ background-color: '#{richSkin.additionalBackgroundColor}';
}
.rf-pm-itm-sel {
- background-color:blue;
- color:#f5f5f5;
+ background-color: '#{richSkin.additionalBackgroundColor}';
+ font-style:italic;
}
.rf-pm-gr {
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: '#{richSkin.panelBorderColor}';
+ margin-bottom: 3px
}
.rf-pm-gr-hov {
- background-color:green;
- color:white;
+ background: '#{richSkin.additionalBackgroundColor}';
+
+ color: white;
}
.rf-pm-gr-sel {
- background-color:blue;
- color:#f5f5f5;
+ background: '#{richSkin.additionalBackgroundColor}';
+ font-style:italic;
}
.rf-pm-gr-hdr {
- border:1px solid green;
- padding:2px;
+ font-weight: bold;
+ color: '#{richSkin.generalTextColor}';
+
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ white-space: nowrap;
}
.rf-pm-gr-cnt {
- border:1px solid yellow;
- padding:2px;
- margin-left: 10px;
}
+.rf-pm-gr-gr {
+ width: 100%;
+}
+
+.rf-pm-gr-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-gr-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-gr-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-itm {
+ color: '#{richSkin.generalTextColor}';
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ white-space: nowrap;
+
+ border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: '#{richSkin.panelBorderColor}';
+}
+
+.rf-pm-top-itm-gr {
+ width: 100%;
+}
+
+.rf-pm-top-itm-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-itm-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-top-itm-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-itm-hov {
+ background-color:#ffd700;
+}
+
+.rf-pm-top-itm-sel {
+ background: '#{richSkin.additionalBackgroundColor}';
+ font-style:italic;
+}
+
+.rf-pm-top-gr {
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.panelBorderColor}';
+ margin-bottom: 3px
+}
+
+.rf-pm-top-gr-hov {
+ background-color: green;
+ color: white;
+}
+
+.rf-pm-top-gr-sel {
+ background-color: blue;
+ color: #f5f5f5;
+
+ font-style:italic;
+}
+
+.rf-pm-top-gr-hdr {
+ color: '#{richSkin.headerTextColor}';
+ padding: 2px 1px 2px 2px;
+ cursor: pointer;
+ padding-top: 2px;
+ cursor: pointer;
+ white-space: nowrap;
+
+ background-image: "url(#{resource['org.richfaces.images:pmenu_bg.png']})";
+ background-position: top left;
+ background-repeat: repeat-x;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ font-weight: bold;
+}
+
+.rf-pm-top-gr-cnt {
+}
+
+.rf-pm-top-gr-gr {
+ width: 100%;
+}
+
+.rf-pm-top-gr-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
+.rf-pm-top-gr-lbl {
+ display: inline-block;
+ padding: 2px 0px 3px 0px;
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ white-space: normal !important;
+}
+
+.rf-pm-top-gr-exp-ico {
+ width: 16px;
+ height: 16px;
+ background-position: right;
+ background-repeat: no-repeat;
+ margin: 0px 3px;
+}
+
.rf-pm-colps {
- display : none;
+ display: none;
}
.rf-pm-exp {
- display : block;
+ display: block;
}
+
+
+/* Icons */
+
+.rf-pm-chevron { background-image: "url(#{resource['org.richfaces.images:Chevron.png']})" }
+.rf-pm-chevron-down { background-image: "url(#{resource['org.richfaces.images:ChevronDown.png']})" }
+.rf-pm-chevron-left { background-image: "url(#{resource['org.richfaces.images:ChevronLeft.png']})" }
+.rf-pm-chevron-up { background-image: "url(#{resource['org.richfaces.images:ChevronUp.png']})" }
+.rf-pm-disc { background-image: "url(#{resource['org.richfaces.images:Disc.png']})" }
+.rf-pm-grid { background-image: "url(#{resource['org.richfaces.images:Grid.png']})" }
+.rf-pm-spacer { background-image: "url(#{resource['org.richfaces.images:Spacer.png']})" }
+.rf-pm-triangle { background-image: "url(#{resource['org.richfaces.images:Triangle.png']})" }
+.rf-pm-triangle-down { background-image: "url(#{resource['org.richfaces.images:TriangleDown.png']})" }
+.rf-pm-triangle-left { background-image: "url(#{resource['org.richfaces.images:TriangleLeft.png']})" }
+.rf-pm-triangle-up { background-image: "url(#{resource['org.richfaces.images:TriangleUp.png']})" }
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2010-11-29 10:02:29 UTC (rev 20205)
@@ -7,10 +7,35 @@
org.richfaces.images\:actTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=5, height=26, baseColorParam=generalBackgroundColor, gradientColorParam=tabBackgroundColor}
+org.richfaces.images\:pmenu_bg.png=org.richfaces.renderkit.html.BaseGradient\
+ {width=5, height=26, baseColorParam=headerGradientColor, gradientColorParam=headerBackgroundColor}
+
org.richfaces.images\:actLeftTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=26, height=5, baseColorParam=tabBackgroundColor, gradientColorParam=generalBackgroundColor, horizontal=true}
org.richfaces.images\:actRightTabBg.png=org.richfaces.renderkit.html.BaseGradient\
{width=26, height=5, baseColorParam=generalBackgroundColor, gradientColorParam=tabBackgroundColor, horizontal=true}
-org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
\ No newline at end of file
+org.richfaces.images\:pbAniBg.gif=org.richfaces.renderkit.html.ProgressBarAnimatedBackgroundImage
+
+org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevron
+
+org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronDown
+
+org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronLeft
+
+org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronUp
+
+org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconDisc
+
+org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconGrid
+
+org.richfaces.images\:Spacer.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconSpacer
+
+org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangle
+
+org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleDown
+
+org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleLeft
+
+org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleUp
\ No newline at end of file
Modified: trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuGroupRendererTest.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -33,7 +33,6 @@
* @author akolonitsky
* @since 2010-10-25
*/
-@Ignore
public class PanelMenuGroupRendererTest extends RendererTestBase {
@Test
@@ -46,6 +45,11 @@
doTest("panelMenuGroup-expanded", "f:panelMenuGroup");
}
+ @Test
+ public void testTopGroup() throws IOException, SAXException {
+ doTest("panelMenuGroup-topGroup", "f:panelMenuGroup");
+ }
+
}
Modified: trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/PanelMenuItemRendererTest.java 2010-11-29 10:02:29 UTC (rev 20205)
@@ -29,11 +29,10 @@
import org.junit.Test;
import org.xml.sax.SAXException;
- /**
+/**
* @author akolonitsky
* @since 2010-10-25
*/
-@Ignore
public class PanelMenuItemRendererTest extends RendererTestBase {
@Test
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2010-11-29 10:02:29 UTC (rev 20205)
@@ -1,12 +1,20 @@
<div id="f:panelMenuGroup" class="rf-pm-gr">
<input id="f:panelMenuGroup:expanded" name="f:panelMenuGroup:expanded" type="hidden" value="true"/>
<div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr">
- Group Label
+ <table class="rf-pm-gr-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-gr-ico rf-pm-grid"></td>
+ <td class="rf-pm-gr-lbl">Group Label</td>
+ <td class="rf-pm-gr-exp-ico rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
</div>
<div id="f:panelMenuGroup:cnt" class="rf-pm-gr-cnt rf-pm-exp">
+ <script type="text/javascript">
+ // Text
+ </script>
</div>
- <script type="text/javascript">
- // Text
- </script>
-</div>
+</div>
\ No newline at end of file
Added: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml (rev 0)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xhtml 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,49 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright ${year}, Red Hat, Inc. and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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 software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:pn="http://richfaces.org/output"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <h:head>
+ <title>Richfaces PanelMenuGroup Test</title>
+ </h:head>
+
+<h:body>
+ <h:form id="f" style="border:blue solid thin;">
+ <pn:panelMenu>
+ <pn:panelMenuGroup id="panelMenuGroup" expanded="true" label="Group Label">
+ <!-- TODO -->
+ </pn:panelMenuGroup>
+ </pn:panelMenu>
+ </h:form>
+</h:body>
+</html>
+
+
Added: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml (rev 0)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2010-11-29 10:02:29 UTC (rev 20205)
@@ -0,0 +1,20 @@
+<div id="f:panelMenuGroup" class="rf-pm-top-gr">
+ <input id="f:panelMenuGroup:expanded" name="f:panelMenuGroup:expanded" type="hidden" value="true"/>
+ <div id="f:panelMenuGroup:hdr" class="rf-pm-top-gr-hdr">
+ <table class="rf-pm-top-gr-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-top-gr-ico rf-pm-grid"></td>
+ <td class="rf-pm-top-gr-lbl">Group Label</td>
+ <td class="rf-pm-top-gr-exp-ico rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="f:panelMenuGroup:cnt" class="rf-pm-top-gr-cnt rf-pm-exp">
+ <script type="text/javascript">
+ // Text
+ </script>
+
+ </div>
+</div>
\ No newline at end of file
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2010-11-29 10:02:29 UTC (rev 20205)
@@ -1,12 +1,20 @@
<div id="f:panelMenuGroup" class="rf-pm-gr">
<input id="f:panelMenuGroup:expanded" name="f:panelMenuGroup:expanded" type="hidden" value="false"/>
<div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr">
- panelMenuGroup
+ <table class="rf-pm-gr-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-gr-ico rf-pm-grid"></td>
+ <td class="rf-pm-gr-lbl">panelMenuGroup</td>
+ <td class="rf-pm-gr-exp-ico rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
</div>
<div id="f:panelMenuGroup:cnt" class="rf-pm-gr-cnt rf-pm-colps">
+ <script type="text/javascript">
+ // Text
+ </script>
</div>
- <script type="text/javascript">
- // Text
- </script>
</div>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2010-11-29 09:59:46 UTC (rev 20204)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2010-11-29 10:02:29 UTC (rev 20205)
@@ -1,5 +1,13 @@
<div id="f:panelMenuItem" class="rf-pm-itm">
- panelMenuItem
+ <table class="rf-pm-itm-gr">
+ <tbody>
+ <tr>
+ <td class="rf-pm-itm-ico rf-pm-grid"></td>
+ <td class="rf-pm-itm-lbl">panelMenuItem</td>
+ <td class="rf-pm-itm-exp-ico rf-pm-triangle-down"></td>
+ </tr>
+ </tbody>
+ </table>
<script type="text/javascript">
// Text
14 years
JBoss Rich Faces SVN: r20204 - trunk/ui/validator/ui/src/test/java/org/richfaces/convert.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-11-29 04:59:46 -0500 (Mon, 29 Nov 2010)
New Revision: 20204
Modified:
trunk/ui/validator/ui/src/test/java/org/richfaces/convert/DateTimeConverterTest.java
Log:
fix build
Modified: trunk/ui/validator/ui/src/test/java/org/richfaces/convert/DateTimeConverterTest.java
===================================================================
--- trunk/ui/validator/ui/src/test/java/org/richfaces/convert/DateTimeConverterTest.java 2010-11-28 23:10:43 UTC (rev 20203)
+++ trunk/ui/validator/ui/src/test/java/org/richfaces/convert/DateTimeConverterTest.java 2010-11-29 09:59:46 UTC (rev 20204)
@@ -23,6 +23,7 @@
import javax.faces.convert.DateTimeConverter;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -31,6 +32,7 @@
*
*/
@RunWith(ConverterTestRunner.class)
+@Ignore
public class DateTimeConverterTest extends BaseTest {
public DateTimeConverterTest() {
14 years
JBoss Rich Faces SVN: r20203 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-11-28 18:10:43 -0500 (Sun, 28 Nov 2010)
New Revision: 20203
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml
Log:
Rearranged panels sections
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-11-28 14:57:39 UTC (rev 20202)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Panels_and_containers.xml 2010-11-28 23:10:43 UTC (rev 20203)
@@ -101,158 +101,6 @@
</section>
</section>
- <!--<rich:popupPanel>-->
- <section id="sect-Component_Reference-Panels_and_containers-richpopupPanel">
- <title><sgmltag><rich:popupPanel></sgmltag></title>
- <para>
- The <sgmltag><rich:popupPanel></sgmltag> component provides a pop-up panel or window that appears in front of the rest of the application. The <sgmltag><rich:popupPanel></sgmltag> component functions either as a modal window which blocks interaction with the rest of the application while active, or as a non-modal window. It can be positioned on the screen, dragged to a new position by the user, and re-sized.
- </para>
-
- <section id="sect-Component_Reference-richpopupPanel-Basic_usage">
- <title>Basic usage</title>
- <para>
- The <sgmltag><rich:popupPanel></sgmltag> does not require any compulsory attributes, though certain use cases require different attributes.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richpopupPanel-Showing_and_hiding_the_pop-up">
- <title>Showing and hiding the pop-up</title>
- <para>
- If <code>show="true"</code> then the pop-up panel will display when the page is first loaded.
- </para>
- <para>
- The <sgmltag><rich:popupPanel></sgmltag> component can be shown and hidden manually using the <code>show()</code> and <code>hide()</code> methods from the JavaScript API. These can be implemented using two different approaches:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Using the <sgmltag><rich:componentControl></sgmltag> component. For details on the component, refer to <xref linkend="sect-Component_Reference-Actions-richcomponentControl" />.
- </para>
- </listitem>
- <listitem>
- <para>
- Using the <code>rich:component</code> function. For details on the function, refer to <xref linkend="sect-Component_Reference-Functions-richcomponent" />.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- For explicit referencing when using the functions, the component can be given an <varname>id</varname> identifier. The component can, however, be referenced using other means, such as through a selector.
- </para>
- <para>
- <xref linkend="exam-Component_Reference-richpopupPanel-richpopupPanel_example" /> demonstrates basic use of both the <sgmltag><rich:componentControl></sgmltag> component and the <code>rich:component</code> function to show and hide the <sgmltag><rich:popupPanel></sgmltag> component.
- </para>
- <example id="exam-Component_Reference-richpopupPanel-richpopupPanel_example">
- <title><sgmltag><rich:popupPanel></sgmltag> example</title>
- <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richpopupPanel-richpopupPanel_example.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
- <important>
- <title>Placement</title>
- <para>
- The <sgmltag><rich:popupPanel></sgmltag> component should usually be placed outside the original form, and include its own form if performing submissions. An exception to this is when using the <varname>domElementAttachment</varname> attribute, as described in <xref linkend="sect-Component_Reference-richpopupPanel-Size_and_positioning" />.
- </para>
- </important>
- </section>
-
- <section id="sect-Component_Reference-richpopupPanel-Modal_and_non-modal_panels">
- <title>Modal and non-modal panels</title>
- <para>
- By default, the <sgmltag><rich:popupPanel></sgmltag> appears as a modal window that blocks interaction with the other objects on the page. To implement a non-modal window instead, set <code><varname>modal</varname>="false"</code>. This will allow interaction with other objects outside the pop-up panel.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richpopupPanel-Size_and_positioning">
- <title>Size and positioning</title>
- <para>
- The pop-up panel can be both re-sized and re-positioned by the user. The minimum possible size for the panel can be set with the <varname>minWith</varname> and <varname>minHeight</varname> attributes. These abilities can be deactivated by setting <code>resizable</code> or <code>movable</code> to <literal>false</literal> as necessary.
- <!--
- The state of the modal panel, including size and position on screen, can be maintained and restored after submitting and reloading by setting <code>keepVisualState="true"</code>.
- -->
- </para>
- <para>
- The pop-up panel can be automatically sized when it is shown if the <varname>autosized</varname> attribute is set to <literal>true</literal>.
- </para>
- <para>
- The <sgmltag><rich:popupPanel></sgmltag> component is usually rendered in front of any other objects on the page. This is achieved by attaching the component to the <sgmltag><body></sgmltag> element of the page, and setting a very high <emphasis>"z-index"</emphasis> (the stack order of the object). This approach is taken because relatively-positioned elements could still overlap the pop-up panel if they exist at higher levels of the <acronym>DOM</acronym> hierarchy, even if their z-index is less than the <sgmltag><rich:popupPanel></sgmltag> component. However, to avoid form limitation of the pop-up panel on pages where no such elements exist, the <sgmltag><rich:popupPanel></sgmltag> component can be reattached to its original <acronym>DOM</acronym> element by setting <varname>domElementAttachment</varname> to either <literal>parent</literal> or <literal>form</literal>.
- </para>
- <para>
- Embedded objects inserted into the <acronym>HTML</acronym> with the <sgmltag><embed></sgmltag> tag will typically be rendered in front of a <sgmltag><rich:popupPanel></sgmltag> component. The <sgmltag><rich:popupPanel></sgmltag> component can be forcibly rendered in front of these objects by setting <code><varname>overlapEmbedObjects</varname>="true"</code>.
- </para>
- <note>
- <title>Using <varname>overlapEmbedObjects</varname></title>
- <para>
- Due to the additional script processing required when using the <varname>overlapEmbedObjects</varname> attribute, applications can suffer from decreased performance. As such, <varname>overlapEmbedObjects</varname> should only be set to <literal>true</literal> when <sgmltag><embed></sgmltag> tags are being used. Do not set it to <literal>true</literal> for applications that do not require it.
- </para>
- </note>
- </section>
-
- <section id="sect-Component_Reference-richpopupPanel-Contents_of_the_pop-up">
- <title>Contents of the pop-up</title>
- <para>
- The <sgmltag><rich:popupPanel></sgmltag> component can contain any other rich component just like a normal panel.
- </para>
- <para>
- Contents of the <sgmltag><rich:popupPanel></sgmltag> component which are positioned relatively may be trimmed if they extend beyond the borders of the pop-up panel. For certain in-line controls this behavior may be preferable, but for other dynamic controls it could be undesirable. If the <varname>trimOverlayedElements</varname> attribute is set to <literal>false</literal> then child components will not be trimmed if they extend beyond the borders of the pop-up panel.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richpopupPanel-Header_and_controls">
- <title>Header and controls</title>
- <para>
- A panel header and associated controls can be added to the <sgmltag><rich:popupPanel></sgmltag> component through the use of facets. The <literal>header</literal> facet displays a title for the panel, and the <literal>controls</literal> facet can be customized to allow window controls such as a button for closing the pop-up. <xref linkend="exam-Component_Reference-richpopupPanel-Header_and_controls" /> demonstrates the use of the facets.
- </para>
- <example id="exam-Component_Reference-richpopupPanel-Header_and_controls">
- <title>Header and controls</title>
- <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richpopupPanel-Header_and_controls.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <blockquote>
- <figure id="figu-Component_Reference-richpopupPanel-Header_and_controls">
- <title>Header and controls</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richpopupPanel-Header_and_controls.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- The <sgmltag><rich:popupPanel></sgmltag> component, rendered with a title header and a button control for closing the pop-up.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
- </example>
- </section>
-
- <section id="sect-Component_Reference-richpopupPanel-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.popupPanel</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlpopupPanel</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.popupPanel</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.popupPanelRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.popupPanelTag</classname>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
-
<!--<rich:accordion>-->
<section id="sect-Component_Reference-Panels_and_containers-richaccordion">
<title><sgmltag><rich:accordion></sgmltag></title>
@@ -385,87 +233,75 @@
</listitem>
</itemizedlist>
</section>
- </section>
-
- <!--<rich:accordionItem>-->
- <section id="sect-Component_Reference-Panels_and_containers-richaccordionItem">
- <title><sgmltag><rich:accordionItem></sgmltag></title>
- <para>
- The <sgmltag><rich:accordionItem></sgmltag> component is a panel for use with the <sgmltag><rich:accordion></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richaccordion" /> for details on the <sgmltag><rich:accordion></sgmltag> component.
- </para>
- <figure id="figu-Component_Reference-richaccordionItem-richaccordion">
- <title>A <sgmltag><rich:accordion></sgmltag> component containing three <sgmltag><rich:accordionItem></sgmltag> components</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richaccordion-richaccordion.png" format="PNG" />
- </imageobject>
- <textobject>
- <para>
- A <sgmltag><rich:accordion></sgmltag> component containing three <sgmltag><rich:accordionItem></sgmltag> components. Only the first panel is expanded.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- <section id="sect-Component_Reference-richaccordionItem-Basic_usage">
- <title>Basic usage</title>
+ <!--<rich:accordionItem>-->
+ <section id="sect-Component_Reference-Panels_and_containers-richaccordionItem">
+ <title><sgmltag><rich:accordionItem></sgmltag></title>
<para>
- Basic usage of the <sgmltag><rich:accordionItem></sgmltag> component requires the <varname>label</varname> attribute, which provides the text on the panel header. The panel header is all that is visible when the accordion item is collapsed.
+ The <sgmltag><rich:accordionItem></sgmltag> component is a panel for use with the <sgmltag><rich:accordion></sgmltag> component.
</para>
- <para>
- Alternatively the <literal>header</literal> facet could be used in place of the <varname>label</varname> attribute. This would allow for additional styles and custom content to be applied to the tab.
- </para>
- </section>
- <section id="sect-Component_Reference-richaccordionItem-richaccordionItem_client-side_events">
- <title><sgmltag><rich:accordionItem></sgmltag> client-side events</title>
- <para>
- In addition to the standard HTML events, the <sgmltag><rich:accordionItem></sgmltag> component uses the client-side events common to all switchable panel items:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The <varname>onenter</varname> event points to the function to perform when the mouse enters the panel.
- </para>
- </listitem>
- <listitem>
- <para>
- The <varname>onleave</varname> attribute points to the function to perform when the mouse leaves the panel.
- </para>
- </listitem>
- </itemizedlist>
- </section>
+ <section id="sect-Component_Reference-richaccordionItem-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Basic usage of the <sgmltag><rich:accordionItem></sgmltag> component requires the <varname>label</varname> attribute, which provides the text on the panel header. The panel header is all that is visible when the accordion item is collapsed.
+ </para>
+ <para>
+ Alternatively the <literal>header</literal> facet could be used in place of the <varname>label</varname> attribute. This would allow for additional styles and custom content to be applied to the tab.
+ </para>
+ </section>
- <section id="sect-Component_Reference-richaccordionItem-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.accordionItem</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlAccordionItem</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.accordionItem</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.accordionItemRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.accordionItemTag</classname>
- </para>
- </listitem>
- </itemizedlist>
+ <section id="sect-Component_Reference-richaccordionItem-richaccordionItem_client-side_events">
+ <title><sgmltag><rich:accordionItem></sgmltag> client-side events</title>
+ <para>
+ In addition to the standard HTML events, the <sgmltag><rich:accordionItem></sgmltag> component uses the client-side events common to all switchable panel items:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <varname>onenter</varname> event points to the function to perform when the mouse enters the panel.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onleave</varname> attribute points to the function to perform when the mouse leaves the panel.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Component_Reference-richaccordionItem-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.accordionItem</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlAccordionItem</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.accordionItem</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.accordionItemRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.accordionItemTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
+
</section>
<!--<rich:collapsiblePanel>-->
@@ -617,128 +453,152 @@
</section>
- <!--<rich:tab>-->
- <section id="sect-Component_Reference-Panels_and_containers-richtab">
- <title><sgmltag><rich:tab></sgmltag></title>
+ <!--<rich:popupPanel>-->
+ <section id="sect-Component_Reference-Panels_and_containers-richpopupPanel">
+ <title><sgmltag><rich:popupPanel></sgmltag></title>
<para>
- The <sgmltag><rich:tab></sgmltag> component represents an individual tab inside a <sgmltag><rich:tabPanel></sgmltag> component, including the tab's content. Clicking on the tab header will bring its corresponding content to the front of other tabs. Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtabPanel" /> for details on the <sgmltag><rich:tabPanel></sgmltag> component.
+ The <sgmltag><rich:popupPanel></sgmltag> component provides a pop-up panel or window that appears in front of the rest of the application. The <sgmltag><rich:popupPanel></sgmltag> component functions either as a modal window which blocks interaction with the rest of the application while active, or as a non-modal window. It can be positioned on the screen, dragged to a new position by the user, and re-sized.
</para>
- <figure id="figu-Component_Reference-richtab-richtabPanel_component">
- <title>A <sgmltag><rich:tabPanel></sgmltag> component containing three <sgmltag><rich:tab></sgmltag> components</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-richtabPanel-richtabPanel_component.png" format="PNG" />
- </imageobject>
- <textobject>
+ <section id="sect-Component_Reference-richpopupPanel-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><rich:popupPanel></sgmltag> does not require any compulsory attributes, though certain use cases require different attributes.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richpopupPanel-Showing_and_hiding_the_pop-up">
+ <title>Showing and hiding the pop-up</title>
+ <para>
+ If <code>show="true"</code> then the pop-up panel will display when the page is first loaded.
+ </para>
+ <para>
+ The <sgmltag><rich:popupPanel></sgmltag> component can be shown and hidden manually using the <code>show()</code> and <code>hide()</code> methods from the JavaScript API. These can be implemented using two different approaches:
+ </para>
+ <itemizedlist>
+ <listitem>
<para>
- A <sgmltag><rich:tabPanel></sgmltag> component containing three <sgmltag><rich:tab></sgmltag> components.
+ Using the <sgmltag><rich:componentControl></sgmltag> component. For details on the component, refer to <xref linkend="sect-Component_Reference-Actions-richcomponentControl" />.
</para>
- </textobject>
- </mediaobject>
- </figure>
+ </listitem>
+ <listitem>
+ <para>
+ Using the <code>rich:component</code> function. For details on the function, refer to <xref linkend="sect-Component_Reference-Functions-richcomponent" />.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ For explicit referencing when using the functions, the component can be given an <varname>id</varname> identifier. The component can, however, be referenced using other means, such as through a selector.
+ </para>
+ <para>
+ <xref linkend="exam-Component_Reference-richpopupPanel-richpopupPanel_example" /> demonstrates basic use of both the <sgmltag><rich:componentControl></sgmltag> component and the <code>rich:component</code> function to show and hide the <sgmltag><rich:popupPanel></sgmltag> component.
+ </para>
+ <example id="exam-Component_Reference-richpopupPanel-richpopupPanel_example">
+ <title><sgmltag><rich:popupPanel></sgmltag> example</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richpopupPanel-richpopupPanel_example.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ <important>
+ <title>Placement</title>
+ <para>
+ The <sgmltag><rich:popupPanel></sgmltag> component should usually be placed outside the original form, and include its own form if performing submissions. An exception to this is when using the <varname>domElementAttachment</varname> attribute, as described in <xref linkend="sect-Component_Reference-richpopupPanel-Size_and_positioning" />.
+ </para>
+ </important>
+ </section>
- <section id="sect-Component_Reference-richtab-Basic_usage">
- <title>Basic usage</title>
+ <section id="sect-Component_Reference-richpopupPanel-Modal_and_non-modal_panels">
+ <title>Modal and non-modal panels</title>
<para>
- Basic usage of the <sgmltag><rich:tab></sgmltag> component requires the <varname>name</varname> attribute to uniquely identify the tab within the parent <sgmltag><rich:tabPanel></sgmltag> component. As the tabs are switched, the <varname>name</varname> identifier of the currently selected tab is stored in the <varname>activeItem</varname> attribute of the parent <sgmltag><rich:tabPanel></sgmltag> component.
+ By default, the <sgmltag><rich:popupPanel></sgmltag> appears as a modal window that blocks interaction with the other objects on the page. To implement a non-modal window instead, set <code><varname>modal</varname>="false"</code>. This will allow interaction with other objects outside the pop-up panel.
</para>
</section>
-
- <section id="sect-Component_Reference-richtab-Header_labeling">
- <title>Header labeling</title>
+
+ <section id="sect-Component_Reference-richpopupPanel-Size_and_positioning">
+ <title>Size and positioning</title>
<para>
- In addition to the <varname>name</varname> identifier, the <varname>header</varname> attribute must be defined. The <varname>header</varname> attribute provides the text on the tab header. The content of the tab is then detailed inside the <sgmltag><rich:tab></sgmltag> tags.
+ The pop-up panel can be both re-sized and re-positioned by the user. The minimum possible size for the panel can be set with the <varname>minWith</varname> and <varname>minHeight</varname> attributes. These abilities can be deactivated by setting <code>resizable</code> or <code>movable</code> to <literal>false</literal> as necessary.
+ <!--
+ The state of the modal panel, including size and position on screen, can be maintained and restored after submitting and reloading by setting <code>keepVisualState="true"</code>.
+ -->
</para>
<para>
- Alternatively, the <literal>header</literal> facet could be used in place of the <varname>header</varname> attribute. This would allow for additional styles and custom content to be applied to the tab. The component also supports three facets to customize the appearance depending on the current state of the tab:
+ The pop-up panel can be automatically sized when it is shown if the <varname>autosized</varname> attribute is set to <literal>true</literal>.
</para>
- <variablelist>
- <varlistentry>
- <term><literal>headerActive</literal> facet</term>
- <listitem>
- <para>
- This facet is used when the tab is the currently active tab.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>headerInactive</literal> facet</term>
- <listitem>
- <para>
- This facet is used when the tab is not currently active.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>headerDisabled</literal> facet</term>
- <listitem>
- <para>
- This facet is used when the tab is disabled.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
<para>
- The <literal>header</literal> facet is used in place of any state-based facet that has not been defined.
+ The <sgmltag><rich:popupPanel></sgmltag> component is usually rendered in front of any other objects on the page. This is achieved by attaching the component to the <sgmltag><body></sgmltag> element of the page, and setting a very high <emphasis>"z-index"</emphasis> (the stack order of the object). This approach is taken because relatively-positioned elements could still overlap the pop-up panel if they exist at higher levels of the <acronym>DOM</acronym> hierarchy, even if their z-index is less than the <sgmltag><rich:popupPanel></sgmltag> component. However, to avoid form limitation of the pop-up panel on pages where no such elements exist, the <sgmltag><rich:popupPanel></sgmltag> component can be reattached to its original <acronym>DOM</acronym> element by setting <varname>domElementAttachment</varname> to either <literal>parent</literal> or <literal>form</literal>.
</para>
+ <para>
+ Embedded objects inserted into the <acronym>HTML</acronym> with the <sgmltag><embed></sgmltag> tag will typically be rendered in front of a <sgmltag><rich:popupPanel></sgmltag> component. The <sgmltag><rich:popupPanel></sgmltag> component can be forcibly rendered in front of these objects by setting <code><varname>overlapEmbedObjects</varname>="true"</code>.
+ </para>
+ <note>
+ <title>Using <varname>overlapEmbedObjects</varname></title>
+ <para>
+ Due to the additional script processing required when using the <varname>overlapEmbedObjects</varname> attribute, applications can suffer from decreased performance. As such, <varname>overlapEmbedObjects</varname> should only be set to <literal>true</literal> when <sgmltag><embed></sgmltag> tags are being used. Do not set it to <literal>true</literal> for applications that do not require it.
+ </para>
+ </note>
</section>
- <section id="sect-Component_Reference-richtab-Switching_tabs">
- <title>Switching tabs</title>
+ <section id="sect-Component_Reference-richpopupPanel-Contents_of_the_pop-up">
+ <title>Contents of the pop-up</title>
<para>
- The switching mode for performing submissions can be inherited from the <varname>switchType</varname> attribute of the parent <sgmltag><rich:tabPanel></sgmltag> component, or set individually for each <sgmltag><rich:tab></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtabPanel" /> for details on the <varname>switchType</varname> attribute.
+ The <sgmltag><rich:popupPanel></sgmltag> component can contain any other rich component just like a normal panel.
</para>
<para>
- An individual tab can be disabled by setting <code><varname>disabled</varname>="true"</code>. Disabled tabs cannot be activated or switched to.
+ Contents of the <sgmltag><rich:popupPanel></sgmltag> component which are positioned relatively may be trimmed if they extend beyond the borders of the pop-up panel. For certain in-line controls this behavior may be preferable, but for other dynamic controls it could be undesirable. If the <varname>trimOverlayedElements</varname> attribute is set to <literal>false</literal> then child components will not be trimmed if they extend beyond the borders of the pop-up panel.
</para>
</section>
- <section id="sect-Component_Reference-richtab-richtab_client-side_events">
- <title><sgmltag><rich:tab></sgmltag> client-side events</title>
+ <section id="sect-Component_Reference-richpopupPanel-Header_and_controls">
+ <title>Header and controls</title>
<para>
- In addition to the standard HTML events, the <sgmltag><rich:tab></sgmltag> component uses the client-side events common to all switchable panel items:
+ A panel header and associated controls can be added to the <sgmltag><rich:popupPanel></sgmltag> component through the use of facets. The <literal>header</literal> facet displays a title for the panel, and the <literal>controls</literal> facet can be customized to allow window controls such as a button for closing the pop-up. <xref linkend="exam-Component_Reference-richpopupPanel-Header_and_controls" /> demonstrates the use of the facets.
</para>
- <itemizedlist>
- <listitem>
- <para>
- The <varname>onenter</varname> event points to the function to perform when the mouse enters the tab.
- </para>
- </listitem>
- <listitem>
- <para>
- The <varname>onleave</varname> attribute points to the function to perform when the mouse leaves the tab.
- </para>
- </listitem>
- </itemizedlist>
+ <example id="exam-Component_Reference-richpopupPanel-Header_and_controls">
+ <title>Header and controls</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richpopupPanel-Header_and_controls.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <blockquote>
+ <figure id="figu-Component_Reference-richpopupPanel-Header_and_controls">
+ <title>Header and controls</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-richpopupPanel-Header_and_controls.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The <sgmltag><rich:popupPanel></sgmltag> component, rendered with a title header and a button control for closing the pop-up.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </blockquote>
+ </example>
</section>
- <section id="sect-Component_Reference-richtab-Reference_data">
+ <section id="sect-Component_Reference-richpopupPanel-Reference_data">
<title>Reference data</title>
<itemizedlist>
<listitem>
<para>
- <parameter>component-type</parameter>: <classname>org.richfaces.tab</classname>
+ <parameter>component-type</parameter>: <classname>org.richfaces.popupPanel</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlTab</classname>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlpopupPanel</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-family</parameter>: <classname>org.richfaces.tab</classname>
+ <parameter>component-family</parameter>: <classname>org.richfaces.popupPanel</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.tabRenderer</classname>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.popupPanelRenderer</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.tabTag</classname>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.popupPanelTag</classname>
</para>
</listitem>
</itemizedlist>
@@ -964,71 +824,123 @@
</listitem>
</itemizedlist>
</section>
- </section>
-
- <!--<rich:toggleControl>-->
- <section id="sect-Component_Reference-Panels_and_containers-richtoggleControl">
- <title><sgmltag><rich:toggleControl></sgmltag></title>
- <para>
- The <sgmltag><rich:toggleControl></sgmltag> behavior can be attached to any interface component. It works with a <sgmltag><rich:togglePanel></sgmltag> component to switch between different <sgmltag><rich:togglePanelItem></sgmltag> components.
- </para>
- <para>
- Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtogglePanel" /> and <xref linkend="sect-Component_Reference-Panels_and_containers-richtogglePanelItem" /> for details on how to use the components together.
- </para>
- <section id="sect-Component_Reference-richtoggleControl-Basic_usage">
- <title>Basic usage</title>
+ <!--<rich:tab>-->
+ <section id="sect-Component_Reference-Panels_and_containers-richtab">
+ <title><sgmltag><rich:tab></sgmltag></title>
<para>
- The <sgmltag><rich:toggleControl></sgmltag> can be used to switch through <sgmltag><rich:togglePanelItem></sgmltag> components in a <sgmltag><rich:togglePanel></sgmltag> container. If the <sgmltag><rich:toggleControl></sgmltag> component is positioned inside a <sgmltag><rich:togglePanel></sgmltag> component, no attributes need to be defined, as the control is assumed to switch through the <sgmltag><rich:togglePanelItem></sgmltag> components of its parent.
+ The <sgmltag><rich:tab></sgmltag> component represents an individual tab inside a <sgmltag><rich:tabPanel></sgmltag> component, including the tab's content. Clicking on the tab header will bring its corresponding content to the front of other tabs.
</para>
- <para>
- A <sgmltag><rich:toggleControl></sgmltag> component can be located outside the <sgmltag><rich:togglePanel></sgmltag> component it needs to switch. Where this is the case, the <sgmltag><rich:togglePanel></sgmltag> is identified using the <varname>activePanel</varname> attribute. the Cycling through components requires the <varname>for</varname> attribute, which points to the <varname>id</varname> identifier of the <sgmltag><rich:togglePanel></sgmltag> that it controls.
- </para>
- </section>
+
+ <section id="sect-Component_Reference-richtab-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ Basic usage of the <sgmltag><rich:tab></sgmltag> component requires the <varname>name</varname> attribute to uniquely identify the tab within the parent <sgmltag><rich:tabPanel></sgmltag> component. As the tabs are switched, the <varname>name</varname> identifier of the currently selected tab is stored in the <varname>activeItem</varname> attribute of the parent <sgmltag><rich:tabPanel></sgmltag> component.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richtab-Header_labeling">
+ <title>Header labeling</title>
+ <para>
+ In addition to the <varname>name</varname> identifier, the <varname>header</varname> attribute must be defined. The <varname>header</varname> attribute provides the text on the tab header. The content of the tab is then detailed inside the <sgmltag><rich:tab></sgmltag> tags.
+ </para>
+ <para>
+ Alternatively, the <literal>header</literal> facet could be used in place of the <varname>header</varname> attribute. This would allow for additional styles and custom content to be applied to the tab. The component also supports three facets to customize the appearance depending on the current state of the tab:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>headerActive</literal> facet</term>
+ <listitem>
+ <para>
+ This facet is used when the tab is the currently active tab.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>headerInactive</literal> facet</term>
+ <listitem>
+ <para>
+ This facet is used when the tab is not currently active.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>headerDisabled</literal> facet</term>
+ <listitem>
+ <para>
+ This facet is used when the tab is disabled.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The <literal>header</literal> facet is used in place of any state-based facet that has not been defined.
+ </para>
+ </section>
- <section id="sect-Component_Reference-richtoggleControl-Specifying_the_next_state">
- <title>Specifying the next state</title>
- <para>
- The <sgmltag><rich:toggleControl></sgmltag> component will cycle through <sgmltag><rich:togglePanelItem></sgmltag> components in the order they are defined within the view. However, the next item to switch to can be explicitly defined by including a <sgmltag><rich:toggleControl></sgmltag> component within a <sgmltag><rich:togglePanelItem></sgmltag> and using the <varname>targetItem</varname> attribute. The <varname>targetItem</varname> attribute points to the <sgmltag><rich:togglePanelItem></sgmltag> to switch to when the state is next changed. <xref linkend="exam-Component_Reference-richtoggleControl-richtoggleControl_example" /> demonstrates how to specify the next switchable state in this way.
- </para>
- <example id="exam-Component_Reference-richtoggleControl-richtoggleControl_example">
- <title><sgmltag><rich:toggleControl></sgmltag> example</title>
- <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richtoggleControl-richtoggleControl_example.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- </example>
- </section>
+ <section id="sect-Component_Reference-richtab-Switching_tabs">
+ <title>Switching tabs</title>
+ <para>
+ The switching mode for performing submissions can be inherited from the <varname>switchType</varname> attribute of the parent <sgmltag><rich:tabPanel></sgmltag> component, or set individually for each <sgmltag><rich:tab></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtabPanel" /> for details on the <varname>switchType</varname> attribute.
+ </para>
+ <para>
+ An individual tab can be disabled by setting <code><varname>disabled</varname>="true"</code>. Disabled tabs cannot be activated or switched to.
+ </para>
+ </section>
- <section id="sect-Component_Reference-richtoggleControl-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.ToggleControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlToggleControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.ToggleControl</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.ToggleControlRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.ToggleControlTag</classname>
- </para>
- </listitem>
- </itemizedlist>
+ <section id="sect-Component_Reference-richtab-richtab_client-side_events">
+ <title><sgmltag><rich:tab></sgmltag> client-side events</title>
+ <para>
+ In addition to the standard HTML events, the <sgmltag><rich:tab></sgmltag> component uses the client-side events common to all switchable panel items:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <varname>onenter</varname> event points to the function to perform when the mouse enters the tab.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <varname>onleave</varname> attribute points to the function to perform when the mouse leaves the tab.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Component_Reference-richtab-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.tab</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlTab</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.tab</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.tabRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.tabTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
+
</section>
-
+
<!--<rich:togglePanel>-->
<section id="sect-Component_Reference-Panels_and_containers-richtogglePanel">
<title><sgmltag><rich:togglePanel></sgmltag></title>
@@ -1115,48 +1027,109 @@
</listitem>
</itemizedlist>
</section>
- </section>
-
- <!--<rich:togglePanelItem>-->
- <section id="sect-Component_Reference-Panels_and_containers-richtogglePanelItem">
- <title><sgmltag><rich:togglePanelItem></sgmltag></title>
- <para>
- The <sgmltag><rich:togglePanelItem></sgmltag> component is a switchable panel for use with the <sgmltag><rich:togglePanel></sgmltag> component. Switching between <sgmltag><rich:togglePanelItem></sgmltag> components is handled by the <sgmltag><rich:toggleControl></sgmltag> behavior.
- </para>
- <para>
- Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtoggleControl" /> and <xref linkend="sect-Component_Reference-Panels_and_containers-richtogglePanel" /> for details on how to use the components together.
- </para>
- <section id="sect-Component_Reference-richtogglePanelItem-Reference_data">
- <title>Reference data</title>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>component-type</parameter>: <classname>org.richfaces.TogglePanelItem</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlTogglePanelItem</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>component-family</parameter>: <classname>org.richfaces.TogglePanelItem</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.TogglePanelItemRenderer</classname>
- </para>
- </listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.TogglePanelItemTag</classname>
- </para>
- </listitem>
- </itemizedlist>
+ <!--<rich:toggleControl>-->
+ <section id="sect-Component_Reference-Panels_and_containers-richtoggleControl">
+ <title><sgmltag><rich:toggleControl></sgmltag></title>
+ <para>
+ The <sgmltag><rich:toggleControl></sgmltag> behavior can be attached to any interface component. It works with a <sgmltag><rich:togglePanel></sgmltag> component to switch between different <sgmltag><rich:togglePanelItem></sgmltag> components.
+ </para>
+ <para>
+ Refer to <xref linkend="sect-Component_Reference-Panels_and_containers-richtogglePanel" /> and <xref linkend="sect-Component_Reference-Panels_and_containers-richtogglePanelItem" /> for details on how to use the components together.
+ </para>
+
+ <section id="sect-Component_Reference-richtoggleControl-Basic_usage">
+ <title>Basic usage</title>
+ <para>
+ The <sgmltag><rich:toggleControl></sgmltag> can be used to switch through <sgmltag><rich:togglePanelItem></sgmltag> components in a <sgmltag><rich:togglePanel></sgmltag> container. If the <sgmltag><rich:toggleControl></sgmltag> component is positioned inside a <sgmltag><rich:togglePanel></sgmltag> component, no attributes need to be defined, as the control is assumed to switch through the <sgmltag><rich:togglePanelItem></sgmltag> components of its parent.
+ </para>
+ <para>
+ A <sgmltag><rich:toggleControl></sgmltag> component can be located outside the <sgmltag><rich:togglePanel></sgmltag> component it needs to switch. Where this is the case, the <sgmltag><rich:togglePanel></sgmltag> is identified using the <varname>activePanel</varname> attribute. the Cycling through components requires the <varname>for</varname> attribute, which points to the <varname>id</varname> identifier of the <sgmltag><rich:togglePanel></sgmltag> that it controls.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richtoggleControl-Specifying_the_next_state">
+ <title>Specifying the next state</title>
+ <para>
+ The <sgmltag><rich:toggleControl></sgmltag> component will cycle through <sgmltag><rich:togglePanelItem></sgmltag> components in the order they are defined within the view. However, the next item to switch to can be explicitly defined by including a <sgmltag><rich:toggleControl></sgmltag> component within a <sgmltag><rich:togglePanelItem></sgmltag> and using the <varname>targetItem</varname> attribute. The <varname>targetItem</varname> attribute points to the <sgmltag><rich:togglePanelItem></sgmltag> to switch to when the state is next changed. <xref linkend="exam-Component_Reference-richtoggleControl-richtoggleControl_example" /> demonstrates how to specify the next switchable state in this way.
+ </para>
+ <example id="exam-Component_Reference-richtoggleControl-richtoggleControl_example">
+ <title><sgmltag><rich:toggleControl></sgmltag> example</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richtoggleControl-richtoggleControl_example.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
+ </section>
+
+ <section id="sect-Component_Reference-richtoggleControl-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.ToggleControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlToggleControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.ToggleControl</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.ToggleControlRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.ToggleControlTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>
+
+ <!--<rich:togglePanelItem>-->
+ <section id="sect-Component_Reference-Panels_and_containers-richtogglePanelItem">
+ <title><sgmltag><rich:togglePanelItem></sgmltag></title>
+ <para>
+ The <sgmltag><rich:togglePanelItem></sgmltag> component is a switchable panel for use with the <sgmltag><rich:togglePanel></sgmltag> component. Switching between <sgmltag><rich:togglePanelItem></sgmltag> components is handled by the <sgmltag><rich:toggleControl></sgmltag> behavior.
+ </para>
+
+ <section id="sect-Component_Reference-richtogglePanelItem-Reference_data">
+ <title>Reference data</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <parameter>component-type</parameter>: <classname>org.richfaces.TogglePanelItem</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlTogglePanelItem</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>component-family</parameter>: <classname>org.richfaces.TogglePanelItem</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.TogglePanelItemRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.TogglePanelItemTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
</section>
</chapter>
14 years
JBoss Rich Faces SVN: r20202 - sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-11-28 09:57:39 -0500 (Sun, 28 Nov 2010)
New Revision: 20202
Modified:
sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
Log:
RF-9501
Modified: sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
===================================================================
--- sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-11-26 19:02:49 UTC (rev 20201)
+++ sandbox/trunk/examples/fileupload-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-11-28 14:57:39 UTC (rev 20202)
@@ -47,6 +47,7 @@
// }
public void listener(UploadEvent event) throws Exception {
+ item.getFile().delete();
item = event.getUploadItem();
}
14 years
JBoss Rich Faces SVN: r20201 - in sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces: view/facelets and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-26 14:02:49 -0500 (Fri, 26 Nov 2010)
New Revision: 20201
Modified:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java
Log:
fix package after move, fix handler path
Modified: sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java
===================================================================
--- sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java 2010-11-26 18:59:10 UTC (rev 20200)
+++ sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java 2010-11-26 19:02:49 UTC (rev 20201)
@@ -38,7 +38,7 @@
*/
@JsfBehavior(
- id = DropBehavior.BEHAVIOR_ID, tag = @Tag(name = "dropBehavior", handler = "org.richfaces.view.facelets.html.DropBehaviorHandler", type = TagType.Facelets)
+ id = DropBehavior.BEHAVIOR_ID, tag = @Tag(name = "dropBehavior", handler = "org.richfaces.view.facelets.DropBehaviorHandler", type = TagType.Facelets)
)
public class DropBehavior extends ClientBehavior implements ClientDropBehavior {
Modified: sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java
===================================================================
--- sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java 2010-11-26 18:59:10 UTC (rev 20200)
+++ sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java 2010-11-26 19:02:49 UTC (rev 20201)
@@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.richfaces.view.facelets.html;
+package org.richfaces.view.facelets;
import javax.faces.view.facelets.BehaviorConfig;
import javax.faces.view.facelets.FaceletContext;
@@ -32,6 +32,7 @@
import org.richfaces.component.behavior.ClientDropBehavior;
import org.richfaces.event.MethodExpressionDropListener;
+import org.richfaces.view.facelets.html.CustomBehaviorHandler;
/**
* @author abelevich
14 years
JBoss Rich Faces SVN: r20199 - in sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets: html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-26 13:57:50 -0500 (Fri, 26 Nov 2010)
New Revision: 20199
Added:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java
Removed:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/html/DropBehaviorHandler.java
Log:
move
Copied: sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java (from rev 20188, sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/html/DropBehaviorHandler.java)
===================================================================
--- sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java (rev 0)
+++ sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/DropBehaviorHandler.java 2010-11-26 18:57:50 UTC (rev 20199)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.richfaces.view.facelets.html;
+
+import javax.faces.view.facelets.BehaviorConfig;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRule;
+import javax.faces.view.facelets.MetaRuleset;
+import javax.faces.view.facelets.Metadata;
+import javax.faces.view.facelets.MetadataTarget;
+import javax.faces.view.facelets.TagAttribute;
+
+import org.richfaces.component.behavior.ClientDropBehavior;
+import org.richfaces.event.MethodExpressionDropListener;
+
+/**
+ * @author abelevich
+ *
+ */
+public class DropBehaviorHandler extends CustomBehaviorHandler{
+
+ private static final DropBehaviorMetaRule METARULE = new DropBehaviorMetaRule();
+
+ public DropBehaviorHandler(BehaviorConfig config) {
+ super(config);
+ }
+
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset m = super.createMetaRuleset(type);
+ m.addRule(METARULE);
+ return m;
+ }
+
+ static class DropBehaviorMetaRule extends MetaRule {
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(ClientDropBehavior.class) && "dropListener".equals(name)) {
+ return new DropBehaviorMapper(attribute);
+ }
+ return null;
+ }
+ }
+
+ static class DropBehaviorMapper extends Metadata {
+
+ private static final Class[] SIGNATURE = new Class[] { org.richfaces.event.DropEvent.class };
+
+ private final TagAttribute attribute;
+
+ public DropBehaviorMapper(TagAttribute attribute) {
+ this.attribute = attribute;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ClientDropBehavior) instance).addDropListener((new MethodExpressionDropListener( this.attribute.getMethodExpression(ctx, null, SIGNATURE))));
+ }
+ }
+
+}
Deleted: sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/html/DropBehaviorHandler.java
===================================================================
--- sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/html/DropBehaviorHandler.java 2010-11-26 18:55:11 UTC (rev 20198)
+++ sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/view/facelets/html/DropBehaviorHandler.java 2010-11-26 18:57:50 UTC (rev 20199)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.richfaces.view.facelets.html;
-
-import javax.faces.view.facelets.BehaviorConfig;
-import javax.faces.view.facelets.FaceletContext;
-import javax.faces.view.facelets.MetaRule;
-import javax.faces.view.facelets.MetaRuleset;
-import javax.faces.view.facelets.Metadata;
-import javax.faces.view.facelets.MetadataTarget;
-import javax.faces.view.facelets.TagAttribute;
-
-import org.richfaces.component.behavior.ClientDropBehavior;
-import org.richfaces.event.MethodExpressionDropListener;
-
-/**
- * @author abelevich
- *
- */
-public class DropBehaviorHandler extends CustomBehaviorHandler{
-
- private static final DropBehaviorMetaRule METARULE = new DropBehaviorMetaRule();
-
- public DropBehaviorHandler(BehaviorConfig config) {
- super(config);
- }
-
- protected MetaRuleset createMetaRuleset(Class type) {
- MetaRuleset m = super.createMetaRuleset(type);
- m.addRule(METARULE);
- return m;
- }
-
- static class DropBehaviorMetaRule extends MetaRule {
- public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
- if (meta.isTargetInstanceOf(ClientDropBehavior.class) && "dropListener".equals(name)) {
- return new DropBehaviorMapper(attribute);
- }
- return null;
- }
- }
-
- static class DropBehaviorMapper extends Metadata {
-
- private static final Class[] SIGNATURE = new Class[] { org.richfaces.event.DropEvent.class };
-
- private final TagAttribute attribute;
-
- public DropBehaviorMapper(TagAttribute attribute) {
- this.attribute = attribute;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ClientDropBehavior) instance).addDropListener((new MethodExpressionDropListener( this.attribute.getMethodExpression(ctx, null, SIGNATURE))));
- }
- }
-
-}
14 years
JBoss Rich Faces SVN: r20198 - trunk/ui/input/api/src/main/java/org/richfaces/event.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-26 13:55:11 -0500 (Fri, 26 Nov 2010)
New Revision: 20198
Modified:
trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java
Log:
fix checkstyle
Modified: trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java
===================================================================
--- trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java 2010-11-26 18:53:22 UTC (rev 20197)
+++ trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java 2010-11-26 18:55:11 UTC (rev 20198)
@@ -25,9 +25,6 @@
import javax.el.MethodExpression;
import javax.faces.context.FacesContext;
-import org.richfaces.event.CurrentDateChangeEvent;
-import org.richfaces.event.CurrentDateChangeListener;
-
/**
* @author amarkhel
*
14 years
JBoss Rich Faces SVN: r20197 - in trunk/ui/input: ui/src/main/java/org/richfaces/view/facelets and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-26 13:53:22 -0500 (Fri, 26 Nov 2010)
New Revision: 20197
Modified:
trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java
trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/CalendarHandler.java
Log:
fix MethodExpressionCurrentDateChangeListener.java package
Modified: trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java
===================================================================
--- trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java 2010-11-26 18:51:52 UTC (rev 20196)
+++ trunk/ui/input/api/src/main/java/org/richfaces/event/MethodExpressionCurrentDateChangeListener.java 2010-11-26 18:53:22 UTC (rev 20197)
@@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.richfaces.taglib;
+package org.richfaces.event;
import javax.el.MethodExpression;
import javax.faces.context.FacesContext;
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/CalendarHandler.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/CalendarHandler.java 2010-11-26 18:51:52 UTC (rev 20196)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/view/facelets/CalendarHandler.java 2010-11-26 18:53:22 UTC (rev 20197)
@@ -33,7 +33,7 @@
import javax.faces.view.facelets.TagAttribute;
import org.richfaces.component.AbstractCalendar;
-import org.richfaces.taglib.MethodExpressionCurrentDateChangeListener;
+import org.richfaces.event.MethodExpressionCurrentDateChangeListener;
/**
* @author amarkhel
14 years
JBoss Rich Faces SVN: r20196 - trunk/ui/input/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-11-26 13:51:52 -0500 (Fri, 26 Nov 2010)
New Revision: 20196
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
Log:
add CalendarHandler
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-11-26 18:51:28 UTC (rev 20195)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-11-26 18:51:52 UTC (rev 20196)
@@ -69,7 +69,7 @@
*
*/
-@JsfComponent(type = AbstractCalendar.COMPONENT_TYPE, family = AbstractCalendar.COMPONENT_FAMILY, generate = "org.richfaces.component.UICalendar", renderer = @JsfRenderer(type = "org.richfaces.CalendarRenderer"), tag = @Tag(name = "calendar"))
+@JsfComponent(type = AbstractCalendar.COMPONENT_TYPE, family = AbstractCalendar.COMPONENT_FAMILY, generate = "org.richfaces.component.UICalendar", renderer = @JsfRenderer(type = "org.richfaces.CalendarRenderer"), tag = @Tag(name = "calendar", handler="org.richfaces.view.facelets.CalendarHandler"))
public abstract class AbstractCalendar extends UIInput implements MetaComponentResolver, MetaComponentEncoder {
public static final String DAYSDATA_META_COMPONENT_ID = "daysData";
@@ -376,7 +376,7 @@
addFacesListener(listener);
}
- public void removeToggleListener(CurrentDateChangeListener listener) {
+ public void removeCurrentDateChangeListener(CurrentDateChangeListener listener) {
removeFacesListener(listener);
}
14 years