JBoss Rich Faces SVN: r17973 - in root/ui/output/trunk: panels/ui/src/main and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-12 13:56:20 -0400 (Mon, 12 Jul 2010)
New Revision: 17973
Added:
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPanel.java
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java
root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/MANIFEST.MF
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/panel.ecss
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/popupPanel.ecss
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/faces-config.xml
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/images/
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/images/bg_header.png
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/images/close_act.gif
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/images/edit.gif
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/panels.taglib.xml
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanel.js
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelBorders.js
root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelSizer.js
root/ui/output/trunk/panels/ui/src/main/templates/
root/ui/output/trunk/panels/ui/src/main/templates/panel.template.xml
root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml
root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PanelRendererTest.java
root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PopupRendererTest.java
root/ui/output/trunk/panels/ui/src/test/resources/
root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml
root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml
Modified:
root/ui/output/trunk/bom/pom.xml
Log:
Moved ui-sandbox/panels2/ui module
Modified: root/ui/output/trunk/bom/pom.xml
===================================================================
--- root/ui/output/trunk/bom/pom.xml 2010-07-12 17:52:44 UTC (rev 17972)
+++ root/ui/output/trunk/bom/pom.xml 2010-07-12 17:56:20 UTC (rev 17973)
@@ -36,6 +36,7 @@
<properties>
<org.richfaces.core.version>4.0.0-SNAPSHOT</org.richfaces.core.version>
+ <org.richfaces.ui.core.version>4.0.0-SNAPSHOT</org.richfaces.ui.core.version>
</properties>
<dependencyManagement>
@@ -49,6 +50,14 @@
</dependency>
<dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-bom</artifactId>
+ <version>${org.richfaces.ui.core.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
<groupId>org.richfaces.ui.output</groupId>
<artifactId>richfaces-ui-output-ui</artifactId>
<version>${project.version}</version>
Copied: root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPanel.java (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/java/org/richfaces/component/UIPanel.java)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPanel.java (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPanel.java 2010-07-12 17:56:20 UTC (rev 17973)
@@ -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.component;
+
+import javax.faces.component.UIComponentBase;
+
+/**
+ * JSF component class
+ *
+ */
+public class UIPanel extends UIComponentBase {
+ private static final String COMPONENT_FAMILY = "org.richfaces.Panel";
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+}
Copied: root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/java/org/richfaces/component/UIPopupPanel.java)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/component/UIPopupPanel.java 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,280 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.FacesException;
+import javax.faces.component.UIComponentBase;
+
+import org.richfaces.json.JSONException;
+import org.richfaces.json.JSONMap;
+
+/**
+ * JSF component class
+ *
+ */
+public class UIPopupPanel extends UIComponentBase {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.PopupPanel";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.PopupPanel";
+
+ protected enum PropertyKeys {
+ width, height, zIndex, minHeight, minWidth, maxHeight, maxWidth, top, left, moveable, autosized, modal, domElementAttachment, controlsClass, show, headerClass, keepVisualState, overlapEmbedObjects, resizeable, shadowDepth, shadowOpacity, style, styleClass, visualOptions
+ }
+
+ public Map<String, Object> getHandledVisualOptions() {
+ String options = (String) getStateHelper().eval(PropertyKeys.visualOptions);
+ Map<String, Object> result;
+ result = prepareVisualOptions(options);
+
+ if (null == result) {
+ result = new HashMap<String, Object>();
+ }
+ return result;
+ }
+
+ public String getVisualOptions() {
+ return (String) getStateHelper().eval(PropertyKeys.visualOptions);
+ }
+
+ public void setVisualOptions(String visualOptions) {
+ getStateHelper().put(PropertyKeys.visualOptions, visualOptions);
+ }
+
+ public int getZIndex() {
+ return (Integer) getStateHelper().eval(PropertyKeys.zIndex, 100);
+ }
+
+ public void setZIndex(int zIndex) {
+ getStateHelper().put(PropertyKeys.zIndex, zIndex);
+ }
+
+ public int getHeight() {
+ return (Integer) getStateHelper().eval(PropertyKeys.height, -1);
+ }
+
+ public void setHeight(int height) {
+ getStateHelper().put(PropertyKeys.height, height);
+ }
+
+ public int getWidth() {
+ return (Integer) getStateHelper().eval(PropertyKeys.width, -1);
+ }
+
+ public void setWidth(int width) {
+ getStateHelper().put(PropertyKeys.width, width);
+ }
+
+ public int getMinHeight() {
+ return (Integer) getStateHelper().eval(PropertyKeys.minHeight, -1);
+ }
+
+ public void setMinHeight(int minheight) {
+ getStateHelper().put(PropertyKeys.minHeight, minheight);
+ }
+
+ public int getMinWidth() {
+ return (Integer) getStateHelper().eval(PropertyKeys.minWidth, -1);
+ }
+
+ public void setMinWidth(int minWidth) {
+ getStateHelper().put(PropertyKeys.minWidth, minWidth);
+ }
+
+ public int getMaxHeight() {
+ return (Integer) getStateHelper().eval(PropertyKeys.maxHeight, Integer.MAX_VALUE);
+ }
+
+ public void setMaxHeight(int maxheight) {
+ getStateHelper().put(PropertyKeys.maxHeight, maxheight);
+ }
+
+ public int getMaxWidth() {
+ return (Integer) getStateHelper().eval(PropertyKeys.maxWidth, Integer.MAX_VALUE);
+ }
+
+ public void setMaxWidth(int maxWidth) {
+ getStateHelper().put(PropertyKeys.maxWidth, maxWidth);
+ }
+
+ public String getTop() {
+ return (String) getStateHelper().eval(PropertyKeys.top, "auto");
+ }
+
+ public void setTop(String top) {
+ getStateHelper().put(PropertyKeys.top, top);
+ }
+
+ public String getLeft() {
+ return (String) getStateHelper().eval(PropertyKeys.left, "auto");
+ }
+
+ public void setLeft(String left) {
+ getStateHelper().put(PropertyKeys.left, left);
+ }
+
+ public boolean isShow() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.show, false);
+ }
+
+ public void setShow(boolean show) {
+ getStateHelper().put(PropertyKeys.show, show);
+ }
+
+ public boolean isMoveable() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.moveable, true);
+ }
+
+ public void setMoveable(boolean moveable) {
+ getStateHelper().put(PropertyKeys.moveable, moveable);
+ }
+
+ public boolean isAutosized() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.autosized, false);
+ }
+
+ public void setAutosized(boolean autosized) {
+ getStateHelper().put(PropertyKeys.autosized, autosized);
+ }
+
+ public boolean isModal() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.modal, true);
+ }
+
+ public void setModal(boolean modal) {
+ getStateHelper().put(PropertyKeys.modal, modal);
+ }
+
+ public boolean isKeepVisualState() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.keepVisualState, false);
+ }
+
+ public void setKeepVisualState(boolean keepVisualState) {
+ getStateHelper().put(PropertyKeys.keepVisualState, keepVisualState);
+ }
+
+ public boolean isOverlapEmbedObjects() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.overlapEmbedObjects, false);
+ }
+
+ public void setOverlapEmbedObjects(boolean overlapEmbedObjects) {
+ getStateHelper().put(PropertyKeys.overlapEmbedObjects, overlapEmbedObjects);
+ }
+
+ public boolean isResizeable() {
+ return (Boolean) getStateHelper().eval(PropertyKeys.resizeable, true);
+ }
+
+ public void setResizeable(boolean resizeable) {
+ getStateHelper().put(PropertyKeys.resizeable, resizeable);
+ }
+
+ /*
+ * public boolean isTrimOverlayedElements() { return (Boolean)
+ * getStateHelper().eval(PropertyKeys.trimOverlayedElements, false); }
+ *
+ * public void setTrimOverlayedElements(boolean trimOverlayedElements) {
+ * getStateHelper().put(PropertyKeys.trimOverlayedElements, trimOverlayedElements); }
+ */
+
+ public String getDomElementAttachment() {
+ return (String) getStateHelper().eval(PropertyKeys.domElementAttachment);
+ }
+
+ public void setDomElementAttachment(String domElementAttachment) {
+ getStateHelper().put(PropertyKeys.domElementAttachment, domElementAttachment);
+ }
+
+ public String getControlsClass() {
+ return (String) getStateHelper().eval(PropertyKeys.controlsClass);
+ }
+
+ public void setControlsClass(String controlsClass) {
+ getStateHelper().put(PropertyKeys.controlsClass, controlsClass);
+ }
+
+ /*
+ * public String getLabel() { return (String) getStateHelper().eval(PropertyKeys.label); }
+ *
+ * public void setLabel(String label) { getStateHelper().put(PropertyKeys.label, label); }
+ */
+
+ public String getHeaderClass() {
+ return (String) getStateHelper().eval(PropertyKeys.headerClass);
+ }
+
+ public void setHeaderClass(String headerClass) {
+ getStateHelper().put(PropertyKeys.headerClass, headerClass);
+ }
+
+ /*
+ * public String getScrollerClass() { return (String) getStateHelper().eval(PropertyKeys.scrollerClass); }
+ *
+ * public void setScrollerClass(String scrollerClass) { getStateHelper().put(PropertyKeys.scrollerClass,
+ * scrollerClass); }
+ */
+
+ public String getShadowDepth() {
+ return (String) getStateHelper().eval(PropertyKeys.shadowDepth);
+ }
+
+ public void setShadowDepth(String shadowDepth) {
+ getStateHelper().put(PropertyKeys.shadowDepth, shadowDepth);
+ }
+
+ public String getShadowOpacity() {
+ return (String) getStateHelper().eval(PropertyKeys.shadowOpacity);
+ }
+
+ public void setShadowOpacity(String shadowOpacity) {
+ getStateHelper().put(PropertyKeys.shadowOpacity, shadowOpacity);
+ }
+
+ private Map<String, Object> prepareVisualOptions(Object value) {
+ if (null == value) {
+ return new HashMap<String, Object>();
+ } else if (value instanceof Map) {
+ return (Map<String, Object>) value;
+ } else if (value instanceof String) {
+ String s = (String) value;
+ if (!s.startsWith("{")) {
+ s = "{" + s + "}";
+ }
+ try {
+ return new HashMap<String, Object>(new JSONMap(s));
+ } catch (JSONException e) {
+ throw new FacesException(e);
+ }
+ } else {
+ throw new FacesException("Attribute visualOptions of component [" + this.getClientId(getFacesContext())
+ + "] must be instance of Map or String, but its type is " + value.getClass().getSimpleName());
+ }
+ }
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+}
Copied: root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PanelBaseRenderer.java 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,52 @@
+/**
+ * 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;
+
+import java.io.IOException;
+
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.renderkit.RendererBase;
+import org.richfaces.component.UIPanel;
+
+/**
+ * @author amarkhel
+ * @since Jun 14, 2010
+ */
+@ResourceDependency(name = "css/panel.ecss")
+public class PanelBaseRenderer extends RendererBase {
+
+ public PanelBaseRenderer() {
+ }
+
+ public void renderHeaderFacet(FacesContext context, UIComponent component) throws IOException {
+ UIComponent headerFacet = component.getFacet("header");
+ headerFacet.encodeAll(context);
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return UIPanel.class;
+ }
+}
Copied: root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,241 @@
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.renderkit.RendererBase;
+import org.richfaces.component.UIPopupPanel;
+
+@ResourceDependencies( { @ResourceDependency(name = "jquery.js"), @ResourceDependency(name = "richfaces.js"),
+ @ResourceDependency(name = "richfaces-base-component.js"), @ResourceDependency(name = "script/popupPanel.js"),
+ @ResourceDependency(name = "script/popupPanelBorders.js"), @ResourceDependency(name = "script/popupPanelSizer.js"),
+ @ResourceDependency(name = "css/popupPanel.ecss")
+
+})
+public class PopupPanelBaseRenderer extends RendererBase {
+
+ private static final String CONTROLS_FACET = "controls";
+ private static final String HEADER_FACET = "header";
+ private static final int SIZE = 10;
+ private static final String STATE_OPTION_SUFFIX = "StateOption_";
+ private static final Set<String> ALLOWED_ATTACHMENT_OPTIONS = new HashSet<String>();
+ static {
+ ALLOWED_ATTACHMENT_OPTIONS.add("body");
+ ALLOWED_ATTACHMENT_OPTIONS.add("parent");
+ ALLOWED_ATTACHMENT_OPTIONS.add("form");
+ }
+
+ public void renderHeaderFacet(FacesContext context, UIComponent component) throws IOException {
+ renderFacet(context, component, HEADER_FACET);
+ }
+
+ public void renderControlsFacet(FacesContext context, UIComponent component) throws IOException {
+ renderFacet(context, component, CONTROLS_FACET);
+ }
+
+ private void renderFacet(FacesContext context, UIComponent component, String facet) throws IOException {
+ UIComponent headerFacet = component.getFacet(facet);
+ headerFacet.encodeAll(context);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void doDecode(FacesContext context, UIComponent component) {
+ super.doDecode(context, component);
+
+ UIPopupPanel panel = (UIPopupPanel) component;
+ ExternalContext exCtx = context.getExternalContext();
+ Map<String, String> rqMap = exCtx.getRequestParameterMap();
+ Object panelOpenState = rqMap.get(panel.getClientId(context) + "OpenedState");
+
+ if (panel.isKeepVisualState()) {
+ if (null != panelOpenState) {
+ // Bug https://jira.jboss.org/jira/browse/RF-2466
+ // Incorrect old:
+ // panel.setShowWhenRendered(Boolean.parseBoolean((String) clnId));
+ // ShowWhenRendered can be settled separately with modal panel "showWhenRendered" attribute
+ // so we should combine ShowWhenRendered || KeepVisualState && (OpenedState==TRUE) against rewriting
+ boolean show = panel.isShow() || Boolean.parseBoolean((String) panelOpenState);
+ panel.setShow(show);
+
+ Map<String, Object> visualOptions = (Map<String, Object>) panel.getHandledVisualOptions();
+ Iterator<Entry<String, String>> it = rqMap.entrySet().iterator();
+ while (it.hasNext()) {
+ Map.Entry<String, String> entry = it.next();
+ int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
+ if (-1 != suffixPos) {
+ String key = entry.getKey().toString().substring(suffixPos + STATE_OPTION_SUFFIX.length());
+ visualOptions.put(key, entry.getValue());
+ }
+ }
+ }
+ }
+ }
+
+ protected Class getComponentClass() {
+ return UIPopupPanel.class;
+ }
+
+ public void checkOptions(FacesContext context, UIComponent component) {
+ UIPopupPanel panel = (UIPopupPanel) component;
+ if (panel.isAutosized() && panel.isResizeable()) {
+ throw new IllegalArgumentException("Autosized modal panel can't be resizeable.");
+ }
+
+ String domElementAttachment = panel.getDomElementAttachment();
+ if (domElementAttachment != null && domElementAttachment.trim().length() != 0) {
+ if (!ALLOWED_ATTACHMENT_OPTIONS.contains(domElementAttachment)) {
+ throw new IllegalArgumentException("Value '" + domElementAttachment
+ + "' of domElementAttachment attribute is illegal. " + "Allowed values are: "
+ + ALLOWED_ATTACHMENT_OPTIONS);
+ }
+ }
+
+ if (panel.getMinHeight() != -1) {
+ if (panel.getMinHeight() < SIZE) {
+ throw new IllegalArgumentException();
+ }
+
+ }
+
+ if (panel.getMinWidth() != -1) {
+ if (panel.getMinWidth() < SIZE) {
+ throw new IllegalArgumentException();
+ }
+
+ }
+ }
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ @SuppressWarnings("unchecked")
+ public String buildShowScript(FacesContext context, UIComponent component) {
+ UIPopupPanel panel = (UIPopupPanel) component;
+ StringBuilder result = new StringBuilder();
+
+ // Bug https://jira.jboss.org/jira/browse/RF-2466
+ // We are already processed KeepVisualState and current open state in
+ // doDecode, so no need to check panel.isKeepVisualState() here.
+ if (panel.isShow()) {
+ result.append("RichFaces.ui.PopupPanel.showPopupPanel('" + panel.getClientId(context) + "', {");
+
+ Iterator<Map.Entry<String, Object>> it = ((Map<String, Object>) panel.getHandledVisualOptions()).entrySet()
+ .iterator();
+ while (it.hasNext()) {
+ Map.Entry<String, Object> entry = it.next();
+
+ result.append(entry.getKey() + ": '" + entry.getValue() + "'");
+ if (it.hasNext()) {
+ result.append(", ");
+ }
+ }
+
+ result.append("});");
+ }
+ return result.toString();
+ }
+
+ private void writeOption(StringBuilder builder, String attribbute, Object value, UIComponent component,
+ boolean isString) {
+ if (component.getAttributes().get(attribbute) != null) {
+ builder.append(attribbute + ":");
+ if (isString) {
+ builder.append("'");
+ }
+ builder.append(value);
+ if (isString) {
+ builder.append("'");
+ }
+ builder.append(",");
+ }
+ }
+
+ public String buildScript(FacesContext context, UIComponent component) throws IOException {
+ UIPopupPanel panel = (UIPopupPanel) component;
+ StringBuilder result = new StringBuilder();
+ result.append("new RichFaces.ui.PopupPanel('");
+ result.append(panel.getClientId());
+ result.append("',{");
+ writeOption(result, "width", panel.getWidth(), component, false);
+ writeOption(result, "height", panel.getHeight(), component, false);
+ writeOption(result, "minWidth", panel.getMinWidth(), component, false);
+ writeOption(result, "minHeight", panel.getMinHeight(), component, false);
+ writeOption(result, "maxWidth", panel.getMaxWidth(), component, false);
+ writeOption(result, "maxHeight", panel.getMaxHeight(), component, false);
+ writeOption(result, "resizeable", panel.isResizeable(), component, false);
+ writeOption(result, "moveable", panel.isMoveable(), component, false);
+ writeOption(result, "left", panel.getLeft(), component, true);
+ writeOption(result, "top", panel.getTop(), component, true);
+ writeOption(result, "zIndex", panel.getZIndex(), component, false);
+ writeOption(result, "onresize", writeEventHandlerFunction(context, panel, "onresize"), component, false);
+ writeOption(result, "onmove", writeEventHandlerFunction(context, panel, "onmove"), component, false);
+ writeOption(result, "onshow", writeEventHandlerFunction(context, panel, "onshow"), component, false);
+ writeOption(result, "onhide", writeEventHandlerFunction(context, panel, "onhide"), component, false);
+ writeOption(result, "onbeforeshow", writeEventHandlerFunction(context, panel, "onbeforeshow"), component, false);
+ writeOption(result, "onbeforehide", writeEventHandlerFunction(context, panel, "onbeforehide"), component, false);
+ writeOption(result, "shadowDepth", panel.getShadowDepth(), component, true);
+ writeOption(result, "shadowOpacity", panel.getShadowOpacity(), component, true);
+ writeOption(result, "domElementAttachment", panel.getDomElementAttachment(), component, true);
+ writeOption(result, "keepVisualState", panel.isKeepVisualState(), component, false);
+ writeOption(result, "show", panel.isShow(), component, false);
+ writeOption(result, "autosized", panel.isAutosized(), component, false);
+ writeOption(result, "overlapEmbedObjects", panel.isOverlapEmbedObjects(), component, false);
+ result.delete(result.length() - 1, result.length());
+ if (component.getAttributes().get("visualOptions") != null) {
+ result.append(writeVisualOptions(context, panel));
+ }
+ result.append("});");
+ return result.toString();
+ }
+
+ public String writeEventHandlerFunction(FacesContext context, UIComponent component, String eventName)
+ throws IOException {
+ String event = (String) component.getAttributes().get(eventName);
+
+ if (event != null) {
+ event = event.trim();
+
+ if (event.length() != 0) {
+ JSFunctionDefinition function = new JSFunctionDefinition();
+
+ function.addParameter("event");
+ function.addToBody(event);
+
+ return function.toScript();
+ }
+ }
+
+ return "";
+ }
+
+ private String writeVisualOptions(FacesContext context, UIPopupPanel panel) throws IOException {
+ StringBuffer result = new StringBuffer();
+
+ Iterator<Map.Entry<String, Object>> it = ((Map<String, Object>) panel.getHandledVisualOptions()).entrySet()
+ .iterator();
+ if (it.hasNext()) {
+ result.append(",\n");
+ }
+ while (it.hasNext()) {
+ Map.Entry<String, Object> entry = it.next();
+
+ result.append(entry.getKey() + ": '" + entry.getValue() + "'");
+ if (it.hasNext()) {
+ result.append(",");
+ }
+ }
+ return result.toString();
+ }
+}
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/MANIFEST.MF (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/MANIFEST.MF)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/MANIFEST.MF (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/MANIFEST.MF 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/panel.ecss (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/css/panel.ecss)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/panel.ecss (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/panel.ecss 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,29 @@
+.rf-panel{
+ background-color:'#{richSkin.generalBackgroundColor}';
+ color:'#{richSkin.panelBorderColor}';
+ border-width:1px;
+ border-style:solid;
+ padding:1px;
+}
+
+.rf-panel-header{
+ background-color:'#{richSkin.headerBackgroundColor}';
+ border-color:'#{richSkin.headerBackgroundColor}';
+ font-size:'#{richSkin.headerSizeFont}';
+ color:'#{richSkin.headerTextColor}';
+ font-weight:'#{richSkin.headerWeightFont}';
+ font-family:'#{richSkin.headerFamilyFont}';
+ padding:2px;
+ border-width:1px;
+ border-style:solid;
+ background-position:top left;
+ background-repeat:repeat-x;
+ background-image:"url(#{resource['org.richfaces.renderkit.html.GradientA']})";
+}
+
+.rf-panel-body{
+ font-size:'#{richSkin.generalSizeFont}';
+ color:'#{richSkin.generalTextColor}';
+ font-family:'#{richSkin.generalFamilyFont}';
+ padding:10px;
+}
\ No newline at end of file
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/popupPanel.ecss (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/css/popupPanel.ecss)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/popupPanel.ecss (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/css/popupPanel.ecss 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,170 @@
+.mp-button {
+ outline-style: none;
+ position: absolute;
+ clip: rect(0px 0px 1px 1px);
+ height: 0px;
+ width: 0px;
+ left: 0px;
+ top: 0px;
+ z-index: -300;
+ opacity:0.1;
+ filter : 'alpha(opacity=10)';
+}
+
+.mp_shade {
+ position : fixed;
+ width : 100%;
+ height : 100%;
+ top:0px;
+ left : 0px;
+ background : #D0D0D0;
+ opacity:0.5;
+ filter : 'alpha(opacity=50)';
+}
+.mp_iframe {
+ position : absolute;
+ width : 100%;
+ height : 100%;
+ top:0px;
+ left : 0px;
+ opacity:0.3;
+ filter : 'alpha(opacity=30)';
+}
+.mp_shadow {
+ position : fixed;
+ background-color : #000000;
+ opacity:0.1;
+ filter : 'alpha(opacity=10)';
+}
+.mp_container {
+ position : fixed;
+ border : '1px solid #{richSkin.panelBorderColor}';
+ background : '#{richSkin.generalBackgroundColor}';
+ z-index:100;
+}
+.mp_header {
+ background : "url(#{resource['org.richfaces.renderkit.html.GradientA']})";
+ repeat-x : 'top left #{richSkin.headerBackgroundColor}';
+ position : relative;
+ padding-left : 10px;
+ cursor : move;
+ padding : 2px;
+}
+.mp_header_content {
+ overflow : hidden;
+ white-space : nowrap;
+ text-overflow: ellipsis;
+ font-weight : '#{richSkin.headerWeightFont}';
+ color : '#{richSkin.headerTextColor}';
+ font-family : '#{richSkin.headerFamilyFont}';
+ font-size : '#{richSkin.headerSizeFont}';
+ padding : 2px;
+ padding-left : 10px;
+}
+.mp_header_controls {
+ background : "url(#{resource['images/close_act.gif']}) no-repeat center";
+ width : 16px;
+ height : 16px;
+ position : absolute;
+ top : 8px;
+ right : 8px;
+ white-space : nowrap;
+ cursor : default;
+}
+.mp_header_icon {
+ background : "url(#{resource['images/edit.gif']}) no-repeat center";
+ width : 16px;
+ height : 16px;
+ margin-right : 5px;
+ vertical-align : middle;
+ display : inline-block;
+ text-align : middle;
+}
+.mp_content_scroller {
+ position : relative;
+ top : 0px;
+ left : 0px;
+ overflow : auto;
+}
+.mp_content {
+ position : relative;
+ padding : 10px;
+ color : '#{richSkin.generalTextColor}';
+ font-family : '#{richSkin.generalFamilyFont}';
+ font-size : '#{richSkin.generalSizeFont}';
+}
+.mp_handler {
+ background : red;
+ filter : 'alpha(opacity=0)';
+ opacity:0;
+ position : absolute;
+ margin : -4px;
+}
+.mp_handler_left {
+ width : 7px;
+ height : 100%;
+ top : 0px;
+ left : 0px;
+ cursor : w-resize;
+}
+
+.mp_handler_right {
+ width : 7px;
+ height : 100%;
+ top : 0px;
+ right : 0px;
+ cursor : w-resize;
+}
+
+.mp-iframe {
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ background-color: white;
+ overflow-y: hidden;
+ z-index: -1;
+}
+
+.mp_handler_top {
+ width : 100%;
+ height : 7px;
+ top : 0px;
+ left : 0px;
+ cursor : n-resize;
+}
+.mp_handler_bottom {
+ width : 100%;
+ height : 7px;
+ bottom : 0px;
+ left : 0px;
+ cursor : n-resize;
+}
+
+.mp_handler_top_left {
+ width : 10px;
+ height : 10px;
+ top : 0px;
+ left : 0px;
+ cursor : nw-resize;
+}
+.mp_handler_top_right {
+ width : 10px;
+ height : 10px;
+ top : 0px;
+ right : 0px;
+ cursor : ne-resize;
+}
+.mp_handler_bottom_left {
+ width : 10px;
+ height : 10px;
+ bottom : 0px;
+ left : 0px;
+ cursor : ne-resize;
+}
+.mp_handler_bottom_right {
+ width : 10px;
+ height : 10px;
+ bottom : 0px;
+ right : 0px;
+ cursor : nw-resize;
+}
\ No newline at end of file
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/faces-config.xml (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/faces-config.xml)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/faces-config.xml (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/faces-config.xml 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<faces-config version="2.0" metadata-complete="false"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:cdk="http://richfaces.org/cdk/extensions"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<component>
+ <component-type>org.richfaces.Panel</component-type>
+ <component-class>org.richfaces.component.UIPanel</component-class>
+ </component>
+ <component>
+ <component-type>org.richfaces.PopupPanel</component-type>
+ <component-class>org.richfaces.component.UIPopupPanel</component-class>
+ </component>
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <renderer>
+ <component-family>org.richfaces.Panel</component-family>
+ <renderer-type>org.richfaces.PanelRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.PanelRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <component-family>org.richfaces.PopupPanel</component-family>
+ <renderer-type>org.richfaces.PopupPanelRenderer</renderer-type>
+ <renderer-class>org.richfaces.renderkit.html.PopupPanelRenderer</renderer-class>
+ </renderer>
+ </render-kit>
+ <faces-config-extension>
+ <cdk:taglib>
+ <cdk:shortName>panels</cdk:shortName>
+ <cdk:uri>http://richfaces.org/panels</cdk:uri>
+ </cdk:taglib>
+ </faces-config-extension>
+</faces-config>
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/images/bg_header.png (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/images/bg_header.png)
===================================================================
(Binary files differ)
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/images/close_act.gif (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/images/close_act.gif)
===================================================================
(Binary files differ)
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/images/edit.gif (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/images/edit.gif)
===================================================================
(Binary files differ)
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/panels.taglib.xml (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/panels.taglib.xml)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/panels.taglib.xml (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/panels.taglib.xml 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd" version="2.0" id="a4j">
+ <namespace>http://richfaces.org/panels</namespace>
+ <tag>
+ <tag-name>panel</tag-name>
+ <component>
+ <component-type>org.richfaces.Panel</component-type>
+ <renderer-type>org.richfaces.PanelRenderer</renderer-type>
+ </component>
+ </tag>
+
+ <tag>
+ <tag-name>popupPanel</tag-name>
+ <component>
+ <component-type>org.richfaces.PopupPanel</component-type>
+ <renderer-type>org.richfaces.PopupPanelRenderer</renderer-type>
+ </component>
+ </tag>
+</facelet-taglib>
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanel.js (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/script/popupPanel.js)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanel.js (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanel.js 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,686 @@
+(function ($, richfaces) {
+
+ richfaces.ui = richfaces.ui || {};
+ var selectionEventHandler = function(event){
+ event.stopPropagation();
+ event.preventDefault();
+ };
+
+ var disableSelection = function (element)
+ {
+ if (typeof element.onselectstart!="undefined") //IE
+ {
+ jQuery(element).bind( 'selectstart', selectionEventHandler);
+ }
+ else //All other (ie: Opera)
+ {
+ jQuery(element).bind( 'mousedown', selectionEventHandler);
+ }
+ }
+
+ var enableSelection = function (element)
+ {
+ if (typeof element.onselectstart!="undefined") //IE
+ {
+ jQuery(element).unbind( 'selectstart', selectionEventHandler);
+ }
+ else if (typeof element.style.MozUserSelect!="undefined") //Firefox
+ {
+ jQuery(element).css('MozUserSelect','');
+ }
+ else //All other (ie: Opera)
+ {
+ jQuery(element).unbind( 'mousedown', selectionEventHandler);
+ }
+ }
+
+ richfaces.ui.PopupPanel = function(id, options) {
+
+ $super.constructor.call(this,id);
+ this.markerId = id;
+ $p.attachToDom.call(this, id);
+ id = "#" + id;
+ this.options = options;
+
+ this.id = $(id);
+ this.minWidth = this.getMinimumSize(this.options.minWidth);
+ this.minHeight = this.getMinimumSize(this.options.minHeight);
+ this.maxWidth = this.options.maxWidth;
+ this.maxHeight = this.options.maxHeight;
+ this.options = options;
+
+ this.baseZIndex = this.options.zindex ? this.options.zindex : 100;
+
+ this.div = id;
+ this.cdiv = id + "_container";
+ this.contentDiv = id + "_content";
+ this.shadowDiv = id + "_shadow";
+ this.scrollerDiv = id + "_content_scroller"
+
+ this.borders = new Array();
+
+ if (this.options.resizeable) {
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerN", this, "N-resize", richfaces.ui.PopupPanel.Sizer.N));
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerE", this, "E-resize", richfaces.ui.PopupPanel.Sizer.E));
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerS", this, "S-resize", richfaces.ui.PopupPanel.Sizer.S));
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerW", this, "W-resize", richfaces.ui.PopupPanel.Sizer.W));
+
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerNW", this, "NW-resize", richfaces.ui.PopupPanel.Sizer.NW));
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerNE", this, "NE-resize", richfaces.ui.PopupPanel.Sizer.NE));
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerSE", this, "SE-resize", richfaces.ui.PopupPanel.Sizer.SE));
+ this.borders.push(new richfaces.ui.PopupPanel.Border(id + "ResizerSW", this, "SW-resize", richfaces.ui.PopupPanel.Sizer.SW));
+ }
+
+ if (this.options.moveable && $(id + "_header")) {
+ this.header = new richfaces.ui.PopupPanel.Border(id + "_header", this, "move", richfaces.ui.PopupPanel.Sizer.Header);
+ } else{
+ $(id + "_header").css('cursor', 'default');
+ }
+
+ };
+
+ var $super = richfaces.BaseComponent.extend(richfaces.BaseComponent, richfaces.ui.PopupPanel);
+ var $p = richfaces.BaseComponent.extend(richfaces.BaseComponent,richfaces.ui.PopupPanel, {});
+ var $super = richfaces.ui.PopupPanel.$super;
+ $.extend(richfaces.ui.PopupPanel.prototype, (function (options) {
+
+ return {
+
+ name: "RichFaces.ui.PopupPanel",
+ saveInputValues: function(element) {
+ /* Fix for RF-3856 - Checkboxes in modal panel does not hold their states after modal was closed and opened again */
+ if ($.browser.msie /* reproducible for checkbox/radio in IE6, radio in IE 7/8 beta 2 */) {
+ $('input[type=checkbox], input[type=radio]', element).each(function(index) {
+ $(this).defaultChecked = $(this).checked;
+ });
+ }
+ },
+
+ width: function() {
+ return this.getContentElement()[0].clientWidth;//TODO
+ },
+
+ height: function() {
+ return this.getContentElement()[0].clientHeight;//TODO
+ },
+
+ getLeft : function (){
+ return $(this.cdiv).css('left');
+ },
+
+ getTop : function (){
+ return $(this.cdiv).css('top');
+ },
+
+ getInitialSize : function(){
+ if(this.options.autosized){
+ return $(this.div+"_headerSpan").height();
+ } else{
+ return $(this.div + "_header_content").height();
+ }
+ },
+
+ getContentElement: function() {
+ if (!this._contentElement) {
+ this._contentElement = $(this.cdiv);
+ }
+
+ return this._contentElement;
+ },
+ getSizeElement : function() {
+ return document.body;
+ },
+
+ getMinimumSize : function(size) {
+ return Math.max(size, 2*this.getInitialSize() + 2);
+ },
+ destroy: function() {
+
+ this._contentElement = null;
+
+ this.parent = null;
+ if (this.header) {
+ this.header.destroy();
+ this.header=null;
+ }
+
+ for (var k = 0; k < this.borders.length; k++ ) {
+ this.borders[k].destroy();
+ }
+ this.borders = null;
+
+ if (this.domReattached) {
+ var element = this.id;
+ var parent = $(element).parent();
+ if (parent) {
+ parent.remove(element);
+ }
+ }
+ },
+
+ initIframe : function() {
+ if (this.contentWindow) {
+ $(this.contentWindow.document.body).css("margin", "0px 0px 0px 0px");
+ } else {
+ //TODO opera etc.
+
+ }
+
+ if("transparent" == $(document.body).css("background-color")) {
+ $(this).css('filter', "alpha(opacity=0)");
+ $(this).css('opacity', "0");
+ }
+ },
+
+ setLeft: function(pos) {
+ if(!isNaN(pos)){
+ $(this.cdiv).css('left', pos + "px");
+ var depth = this.options.shadowDepth ? this.options.shadowDepth : 2;
+ $(this.shadowDiv).css('left', pos + depth + "px");
+ }
+ },
+
+ setTop: function(pos) {
+ if(!isNaN(pos)){
+ $(this.cdiv).css('top', pos + "px");
+ var depth = this.options.shadowDepth ? this.options.shadowDepth : 2;
+ $(this.shadowDiv).css('top', pos + depth +"px");
+ }
+ },
+
+ show: function(event, opts) {
+ if(!this.shown && this.invokeEvent("beforeshow",event,null,element)) {
+
+ var element = this.id;
+
+ if (!this.domReattached) {
+ this.parent = $(element).parent();
+
+ var domElementAttachment;
+ if (opts) {
+ domElementAttachment = opts.domElementAttachment;
+ }
+
+ if (!domElementAttachment) {
+ domElementAttachment = this.options.domElementAttachment;
+ }
+
+ var newParent;
+ if ('parent' == domElementAttachment) {
+ newParent = this.parent;
+ } else if ('form' == domElementAttachment) {
+ newParent = this.findForm(element) || document.body;
+ } else {
+ //default - body
+ newParent = document.body;
+ }
+
+ if (newParent != this.parent) {
+ this.saveInputValues(element);
+ element.insertBefore(newParent.firstChild);
+ this.domReattached = true;
+ } else {
+ $(this.parent).show();
+ }
+ }
+
+ var forms = $("form", element);
+
+ if (this.options.keepVisualState && forms) {
+ for (var i = 0; i < forms.length; i++) {
+ var popup = this;
+ $(forms[i]).bind( "submit", {popup:popup}, this.setStateInput);
+ }
+ }
+
+
+
+ var options = {};
+ this.userOptions = {};
+ if (!element.mpSet) {
+ $.extend(options, this.options);
+ }
+
+ if (opts) {
+ $.extend(options, opts);
+ $.extend(this.userOptions, opts);
+ }
+
+ this.currentMinHeight = this.getMinimumSize((options.minHeight || options.minHeight == 0) ? options.minHeight : this.minHeight);
+ this.currentMinWidth = this.getMinimumSize((options.minWidth || options.minWidth == 0) ? options.minWidth : this.minWidth);
+
+ var eContentElt = this.getContentElement();
+
+ if (!this.options.autosized) {
+ if (options.width && options.width == -1)
+ options.width = 600;
+ if (options.height && options.height == -1)
+ options.height = 400;
+ } else{
+ options.width = $(this.div+"_headerSpan").width() +20;
+ }
+
+ if (options.width && options.width != -1) {
+ if (this.currentMinWidth > options.width) {
+ options.width = this.currentMinWidth;
+ }
+ if (options.width > this.maxWidth) {
+ options.width = this.maxWidth;
+ }
+ $(eContentElt).css('width', options.width + (/px/.test(options.width) ? '' : 'px'));
+ $(this.shadowDiv).css('width', options.width + 4 + (/px/.test(options.width) ? '' : 'px'));
+ $(this.scrollerDiv).css('width', options.width + (/px/.test(options.width) ? '' : 'px'));
+
+
+ }
+
+ if (options.height && options.height != -1) {
+ if (this.currentMinHeight > options.height) {
+ options.height = this.currentMinHeight;
+ }
+ if (options.height > this.maxHeight) {
+ options.height = this.maxHeight;
+ }
+ $(eContentElt).css('height', options.height + (/px/.test(options.height) ? '' : 'px'));
+ $(this.shadowDiv).css('height', options.height + 4 + (/px/.test(options.height) ? '' : 'px'));
+ var headerHeight = $(this.div +"_header")[0].clientHeight;
+ $(this.scrollerDiv).css('height', options.height - headerHeight + (/px/.test(options.height) ? '' : 'px'));
+
+
+ }
+ var eIframe;
+ if (this.options.overlapEmbedObjects && !this.iframe) {
+ this.iframe = this.markerId + "IFrame";
+ $("<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.iframe + "\" " +
+ "class=\"mp-iframe\" style=\"width:" +this.options.width + "px; height:" + this.options.height + "px;\">" +
+ "</iframe>").insertBefore($(':first-child', $(this.cdiv))[0]);
+
+ eIframe = jQuery("#"+this.iframe);
+
+ $(eIframe).bind('load', this.initIframe);
+ this.eIframe = eIframe;
+ }
+ element.mpSet = true;
+
+ var eDiv = $(this.div);
+
+ if (options.left) {
+ var _left;
+ if (options.left != "auto") {
+ _left = parseInt(options.left, 10);
+ } else {
+ var cw = this.getSizeElement().clientWidth;
+ var _width = this.width();
+ if (cw >= _width) {
+ _left = (cw - _width) / 2;
+ } else {
+ _left = 0;
+ }
+ }
+
+ this.setLeft(Math.round(_left));
+ }
+
+ if (options.top) {
+ var _top;
+ if (options.top != "auto") {
+ _top = parseInt(options.top, 10);
+ } else {
+ var cw = this.getSizeElement().clientHeight;
+ var _height = this.height();
+ if (cw >= _height) {
+ _top = (cw - _height) / 2;
+ } else {
+ _top = 0;
+ }
+ }
+
+ this.setTop(Math.round(_top));
+ }
+
+ var opacity = options.shadowOpacity ? options.shadowOpacity : 0.1;
+ $(this.shadowDiv).css('opacity', opacity);
+ $(this.shadowDiv).css('filter ', 'alpha(opacity='+opacity*100 +');');
+ $(element).css('visibility', '');
+ $(element).css('display', 'block');
+ var event = {};
+ event.parameters = opts || {};
+ this.shown = true;
+ this.invokeEvent("show",event,null,element);
+ }
+ },
+
+ startDrag: function(border) {
+ for (var k = 0; k < this.borders.length; k++ ) {
+ this.borders[k].hide();
+ }
+ disableSelection(document.body);
+ },
+
+ endDrag: function(border) {
+ for (var k = 0; k < this.borders.length; k++ ) {
+ this.borders[k].show();
+ this.borders[k].doPosition();
+ }
+ enableSelection(document.body);
+ },
+
+ hide: function(event, opts) {
+ var element = this.id;
+ if (this.shown && this.invokeEvent("beforehide",event,null,element)) {
+
+ this.currentMinHeight = undefined;
+ this.currentMinWidth = undefined;
+
+ $(this.id).hide();
+
+ if (this.parent) {
+ if (this.domReattached) {
+ this.saveInputValues(element);
+
+ this.parent.append(element);
+
+ this.domReattached = false;
+ } else {
+ $(this.parent).hide();
+ }
+ }
+
+ var event = {};
+ event.parameters = opts || {};
+ if (this.options && this.options.onhide) {
+ this.options.onhide(event);
+ }
+
+ var forms = $("form", element);
+ if (this.options.keepVisualState && forms) {
+ for (var i = 0; i < forms.length; i++) {
+ $(forms[i]).unbind( "submit", this.setStateInput);
+ }
+ }
+
+ this.shown = false;
+
+ }
+ },
+
+ getStyle: function(elt, name) {
+ return parseInt($(elt).css(name).replace("px", ""), 10);
+ },
+
+ doResizeOrMove: function(diff) {
+ var vetoes = {};
+ var shadowHash = {};
+ var cssHash = {};
+ var cssHashWH = {};
+ var shadowHashWH = {};
+ var contentHashWH = {};
+ var scrollerHashWH = {};
+
+ var vetoeChange = false;
+ var newSize;
+ var shadowDepth = this.options.shadowDepth? this.options.shadowDepth: 4;
+ var scrollerHeight = 22;
+ var scrollerWidth = 0;
+ var eContentElt = this.getContentElement();
+
+ newSize = this.getStyle(eContentElt, "width");
+
+ var oldSize = newSize;
+ newSize += diff.deltaWidth || 0;
+
+
+
+ if (newSize >= this.currentMinWidth || this.options.autosized) {
+ if (diff.deltaWidth) {
+ cssHashWH.width = newSize + 'px';
+ shadowHashWH.width = newSize + shadowDepth + 'px';
+ contentHashWH.width = newSize - scrollerWidth + 'px';
+ scrollerHashWH.width = newSize - scrollerWidth + 'px';
+ }
+ } else {
+ if (diff.deltaWidth) {
+ cssHashWH.width = this.currentMinWidth + 'px';
+ shadowHashWH.width = this.currentMinWidth + shadowDepth + 'px';
+ contentHashWH.width = this.currentMinWidth - scrollerWidth + 'px';
+ scrollerHashWH.width = this.currentMinWidth - scrollerWidth + 'px';
+ vetoes.vx = oldSize - this.currentMinWidth;
+ }
+
+ vetoes.x = true;
+ }
+
+ if (newSize >= this.options.maxWidth) {
+ if (diff.deltaWidth) {
+ cssHashWH.width = this.currentMaxWidth + 'px';
+ shadowHashWH.width = this.currentMaxWidth + shadowDepth + 'px';
+ contentHashWH.width = this.currentMaxWidth - scrollerWidth + 'px';
+ scrollerHashWH.width = this.currentMaxWidth - scrollerWidth + 'px';
+ vetoes.vx = oldSize - this.currentMaxWidth;
+ }
+
+ vetoes.x = true;
+ }
+
+ if (vetoes.vx && diff.deltaX) {
+ diff.deltaX = -vetoes.vx;
+ }
+
+ var eCdiv = $(this.cdiv);
+
+ if (diff.deltaX && (vetoes.vx || !vetoes.x)) {
+ if (vetoes.vx) {
+ diff.deltaX = vetoes.vx;
+ }
+ var newPos;
+
+ newPos = this.getStyle(eCdiv, "left");
+ newPos += diff.deltaX;
+ cssHash.left = newPos + 'px';
+
+ shadowHash.left = newPos + shadowDepth + "px";
+ }
+
+ newSize = this.getStyle(eContentElt, "height")
+
+ var oldSize = newSize;
+ newSize += diff.deltaHeight || 0;
+
+ if (newSize >= this.currentMinHeight || this.options.autosized) {
+ if (diff.deltaHeight) {
+ cssHashWH.height = newSize + 'px';
+ shadowHashWH.height = newSize + shadowDepth + 'px';
+ scrollerHashWH.height = newSize - scrollerHeight + 'px';
+ }
+ } else {
+ if (diff.deltaHeight) {
+ cssHashWH.height = this.currentMinHeight + 'px';
+ shadowHashWH.height = this.currentMinHeight + shadowDepth + 'px';
+ scrollerHashWH.height = this.currentMinHeight - scrollerHeight + 'px';
+ vetoes.vy = oldSize - this.currentMinHeight;
+ }
+
+ vetoes.y = true;
+ }
+
+ if (newSize >= this.options.maxHeight) {
+ if (diff.deltaHeight) {
+ cssHashWH.height = this.currentMaxHeight + 'px';
+ shadowHashWH.height = this.currentMaxHeight + shadowDepth + 'px';
+ scrollerHashWH.height = this.currentMaxHeight - scrollerHeight + 'px';
+ vetoes.vy = oldSize - this.currentMaxHeight;
+ }
+
+ vetoes.y = true;
+ }
+
+ if (vetoes.vy && diff.deltaY) {
+ diff.deltaY = -vetoes.vy;
+ }
+
+ if (diff.deltaY && (vetoes.vy || !vetoes.y)) {
+ if (vetoes.vy) {
+ diff.deltaY = vetoes.vy;
+ }
+
+ }
+ if (diff.deltaY && (vetoes.vy || !vetoes.y)) {
+ if (vetoes.vy) {
+ diff.deltaY = vetoes.vy;
+ }
+ var newPos;
+
+ newPos = this.getStyle(eCdiv, "top");
+ newPos += diff.deltaY;
+ cssHash.top = newPos + 'px';
+ shadowHash.top = newPos + shadowDepth + "px";
+ }
+ $(eContentElt).css(cssHashWH);
+ $(this.scrollerDiv).css(scrollerHashWH);
+ if(this.eIframe)$(this.eIframe).css(scrollerHashWH);
+ $(this.shadowDiv).css(shadowHashWH);
+
+ $(eCdiv).css(cssHash);
+ $(this.shadowDiv).css(shadowHash);
+ //if(this.eIframe)$(this.eIframe).css(cssHash);
+ $.extend(this.userOptions, cssHash);
+ $.extend(this.userOptions, cssHashWH);
+ var w = this.width();
+ var h = this.height();
+
+ this.reductionData = null;
+
+ if (w <= 2*this.getInitialSize()) {
+ this.reductionData = {};
+ this.reductionData.w = w;
+ }
+
+ if (h <= 2*this.getInitialSize()) {
+ if (!this.reductionData) {
+ this.reductionData = {};
+ }
+
+ this.reductionData.h = h;
+ }
+
+ if (this.header) {
+ this.header.doPosition();
+ }
+
+ return vetoes;
+ },
+
+ setSize : function (width, height){
+ var w = width - this.width() ;
+ var h = height -this.height();
+ var diff = new richfaces.ui.PopupPanel.Sizer.Diff(0,0, w, h);
+ this.doResizeOrMove(diff);
+ },
+
+ moveTo : function (top, left){
+ var shadowDepth = this.options.shadowDepth? this.options.shadowDepth: 4;
+ $(this.cdiv).css('top', top);
+ $(this.cdiv).css('left', left);
+ $(this.shadowDiv).css('top', top + shadowDepth);
+ $(this.shadowDiv).css('left', left + shadowDepth);
+ },
+
+ move : function (dx, dy){
+ var diff = new richfaces.ui.PopupPanel.Sizer.Diff(dx,dy, 0, 0);
+ this.doResizeOrMove(diff);
+ },
+
+ resize : function (dx, dy){
+ var diff = new richfaces.ui.PopupPanel.Sizer.Diff(0,0, dx, dy);
+ this.doResizeOrMove(diff);
+ },
+
+ findForm: function(elt) {
+ var target = elt;
+ while (target) {
+ if (!target.tagName /* document node doesn't have tagName */
+ || target.tagName.toLowerCase() != "form") {
+
+ target = $(target).parent();
+ } else {
+ break;
+ }
+ }
+
+ return target;
+ },
+
+ setStateInput: function(event) {
+ // Concret input but not entire form is a target element for onsubmit in FF
+ var popup = event.data.popup;
+ target = $(popup.findForm(event.currentTarget));
+
+ var input = document.createElement("input");
+ input.type = "hidden";
+ input.id = popup.markerId + "OpenedState";
+ input.name = popup.markerId + "OpenedState";
+ input.value = popup.shown ? "true" : "false";
+ target.append(input);
+
+ $.each(popup.userOptions, function(key, value) {
+ input = document.createElement("input");
+ input.type = "hidden";
+ input.id = popup.markerId + "StateOption_" + key;
+ input.name = popup.markerId + "StateOption_" + key;
+ input.value = value;
+ target.append(input);
+ });
+
+ return true;
+ },
+
+ invokeEvent: function(eventName, event, value, element) {
+
+ var eventFunction = this.options['on'+eventName];
+ var result;
+
+ if (eventFunction) {
+ var eventObj;
+ if (event) {
+ eventObj = event;
+ }
+ else if(document.createEventObject) {
+ eventObj = document.createEventObject();
+ }
+ else if( document.createEvent ) {
+ eventObj = document.createEvent('Events');
+ eventObj.initEvent( eventName, true, false );
+ }
+
+ eventObj.rich = {component:this};
+ eventObj.rich.value = value;
+
+ try {
+ result = eventFunction.call(element, eventObj);
+ }
+ catch (e) { LOG.warn("Exception: "+e.Message + "\n[on"+eventName + "]"); }
+ }
+
+ if (result!=false) {
+ result = true;
+ }
+ return result;
+ }
+
+
+ }
+
+ })());
+ $.extend(richfaces.ui.PopupPanel, {
+
+ showPopupPanel : function (id, opts, event) {
+
+ $(document).ready(richfaces.$(id).show());
+ },
+
+ hidePopupPanel : function (id, opts, event) {
+ $(document).ready(richfaces.$(id).hide());
+ }
+ });
+
+})(jQuery, window.RichFaces);
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelBorders.js (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/script/popupPanelBorders.js)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelBorders.js (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelBorders.js 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,174 @@
+(function ($, richfaces) {
+
+ richfaces.ui = richfaces.ui || {};
+
+ richfaces.ui.PopupPanel.Border = function(id, modalPanel, cursor, sizer) {
+
+ $super.constructor.call(this,id);
+
+ var element = jQuery(id);
+ jQuery(element).css('cursor',cursor);
+ var border = this;
+ jQuery(this.id).bind( 'mousedown', {border:border},this.startDrag);
+
+ this.modalPanel = modalPanel;
+ this.sizer = sizer;
+ };
+
+ var $super = richfaces.BaseComponent.extend(richfaces.BaseComponent, richfaces.ui.PopupPanel.Border);
+ var $super = richfaces.ui.PopupPanel.Border.$super;
+
+ $.extend(richfaces.ui.PopupPanel.Border.prototype, (function (options) {
+
+ return {
+
+ name: "RichFaces.ui.PopupPanel.Border",
+
+ destroy: function()
+ {
+ if (this.doingDrag)
+ {
+ jQuery(document).unbind( 'mousemove', this.doDrag);
+ jQuery(document).unbind( 'mouseup', this.endDrag);
+ }
+
+ jQuery(this.id).unbind( 'mousedown', this.startDrag);
+ this.modalPanel=null;
+ },
+
+ show: function() {
+ jQuery(this.id).show();
+ },
+
+ hide: function() {
+ jQuery(this.id).hide();
+ },
+
+ startDrag: function(event) {
+ var border = event.data.border;
+ border.doingDrag = true;
+
+ border.dragX = event.clientX;
+ border.dragY = event.clientY;
+ jQuery(document).bind( 'mousemove',{border:border}, border.doDrag);
+ jQuery(document).bind( 'mouseup',{border:border}, border.endDrag);
+
+ //var eCursorDiv = jQuery(border.modalPanel.cDiv);
+ //jQuery(eCursorDiv).css('cursor', jQuery(border.id).css('cursor'));
+ //jQuery(eCursorDiv).css('zIndex', 10);
+
+ border.modalPanel.startDrag(border);
+
+ border.onselectStartHandler = document.onselectstart;
+ document.onselectstart = function() { return false; }
+ },
+
+ getWindowSize : function() {
+ var myWidth = 0, myHeight = 0;
+ if( typeof( window.innerWidth ) == 'number' ) {
+ myWidth = window.innerWidth;
+ myHeight = window.innerHeight;
+ } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
+ myWidth = document.documentElement.clientWidth;
+ myHeight = document.documentElement.clientHeight;
+ } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
+ myWidth = document.body.clientWidth;
+ myHeight = document.body.clientHeight;
+ }
+ return {"width":myWidth,"height":myHeight};
+ },
+
+ doDrag: function(event) {
+ var border = event.data.border;
+ if (!border.doingDrag) {
+ return ;
+ }
+
+ var evtX = event.clientX;
+ var evtY = event.clientY;
+
+ var winSize = border.getWindowSize();
+
+ if (evtX < 0) {
+ evtX = 0;
+ } else if (evtX >= winSize.width) {
+ evtX = winSize.width - 1;
+ }
+
+ if (evtY < 0) {
+ evtY = 0;
+ } else if (evtY >= winSize.height) {
+ evtY = winSize.height - 1;
+ }
+
+ var dx = evtX - border.dragX;
+ var dy = evtY - border.dragY;
+
+ if (dx != 0 || dy != 0) {
+
+ var id = border.id;
+
+ var diff = border.sizer.prototype.doDiff(dx, dy);//TODO
+ var doResize;
+
+ var element = jQuery(border.modalPanel.cdiv);
+
+ if (diff.deltaWidth || diff.deltaHeight) {
+ doResize = border.modalPanel.invokeEvent("resize",event,null,element);
+ } else if (diff.deltaX || diff.deltaY) {
+ doResize = border.modalPanel.invokeEvent("move",event,null,element);
+ }
+
+ var vetoes;
+
+ if (doResize) {
+ vetoes = border.modalPanel.doResizeOrMove(diff);
+ }
+
+ if(vetoes){
+ if (!vetoes.x) {
+ border.dragX = evtX;
+ } else {
+ if (!diff.deltaX) {
+ border.dragX -= vetoes.vx || 0;
+ } else {
+ border.dragX += vetoes.vx || 0;
+ }
+ }
+
+ if (!vetoes.y) {
+ border.dragY = evtY;
+ } else {
+ if (!diff.deltaY) {
+ border.dragY -= vetoes.vy || 0;
+ } else {
+ border.dragY += vetoes.vy || 0;
+ }
+ }
+ }
+ }
+ },
+
+ endDrag: function(event) {
+ var border = event.data.border;
+ border.doingDrag = undefined;
+
+ jQuery(document).unbind( 'mousemove', border.doDrag);
+ jQuery(document).unbind( 'mouseup', border.endDrag);
+
+ border.modalPanel.endDrag(border);
+
+ border.modalPanel.doResizeOrMove(richfaces.ui.PopupPanel.Sizer.Diff.EMPTY);
+
+ document.onselectstart = border.onselectStartHandler;
+ border.onselectStartHandler = null;
+ },
+
+ doPosition: function() {
+ this.sizer.prototype.doPosition(this.modalPanel, jQuery(this.id)); //TODO remove prototype
+ }
+ }
+
+ })());
+
+})(jQuery, window.RichFaces);
\ No newline at end of file
Copied: root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelSizer.js (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/resources/META-INF/script/popupPanelSizer.js)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelSizer.js (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/resources/META-INF/script/popupPanelSizer.js 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,279 @@
+(function ($, richfaces) {
+
+ richfaces.ui = richfaces.ui || {};
+
+ richfaces.ui.PopupPanel.Sizer = function(id, modalPanel, cursor, sizer) {
+
+ $super.constructor.call(this,id);
+
+ };
+
+ var $super = richfaces.BaseComponent.extend(richfaces.BaseComponent, richfaces.ui.PopupPanel.Sizer);
+ var $super = richfaces.ui.PopupPanel.Sizer.$super;
+ $.extend(richfaces.ui.PopupPanel.Sizer.prototype, (function (options) {
+ return {
+
+ name: "richfaces.ui.PopupPanel.Sizer",
+
+ doSetupSize: function (modalPanel, elt) {
+ var width = 0;
+ var height = 0;
+
+ var reductionData = modalPanel.reductionData;
+
+ if (reductionData) {
+ if (reductionData.w) {
+ width = reductionData.w / 2;
+ }
+
+ if (reductionData.h) {
+ height = reductionData.h / 2;
+ }
+ }
+
+ if (width > 0) {
+ if (elt.clientWidth > width) {
+ if (!elt.reducedWidth) {
+ elt.reducedWidth = jQuery(elt).css('width');
+ }
+ jQuery(elt).css('width', width + 'px');
+ } else if (width < 4 && elt.reducedWidth == 4 + 'px') {
+ jQuery(elt).css('width', width + 'px');
+ }
+ } else {
+ if (elt.reducedWidth) {
+ jQuery(elt).css('width', elt.reducedWidth);
+ elt.reducedWidth = undefined;
+ }
+ }
+
+ if (height > 0) {
+ if (elt.clientHeight > height) {
+ if (!elt.reducedHeight) {
+ elt.reducedHeight = jQuery(elt).css('height');
+ }
+ elt.style.height = height + 'px';
+ } else if (height < 4 && elt.reducedHeight == 4 + 'px') {
+ jQuery(elt).css('height', height + 'px');
+ }
+ } else {
+ if (elt.reducedHeight) {
+ jQuery(elt).css('height', elt.reducedHeight);
+ elt.reducedHeight = undefined;
+ }
+ }
+ },
+
+ doSetupPosition: function (modalPanel, elt, left, top) {
+ if(!isNaN(left) && !isNaN(top)){
+ jQuery(elt).css('left', left + 'px');
+ jQuery(elt).css('top', top + 'px');
+ }
+ },
+
+ doPosition: function (modalPanel, elt) {
+
+ },
+
+ doDiff: function (dx, dy) {
+
+ }
+ }
+
+ })());
+ richfaces.ui.PopupPanel.Sizer.Diff = function(dX, dY, dWidth, dHeight) {
+
+ this.deltaX = dX;
+ this.deltaY = dY;
+
+ this.deltaWidth = dWidth;
+ this.deltaHeight = dHeight;
+
+ };
+
+ richfaces.ui.PopupPanel.Sizer.Diff.EMPTY = function(){
+ return new richfaces.ui.PopupPanel.Sizer.Diff(0, 0, 0, 0);
+ },
+
+ richfaces.ui.PopupPanel.Sizer.N = function(){
+
+ }
+
+ $.extend(richfaces.ui.PopupPanel.Sizer.N.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.N.prototype, {
+
+
+ name: "richfaces.ui.PopupPanel.Sizer.N",
+
+ doPosition : function (popupPanel, elt) {
+ jQuery(elt).css('width',popupPanel.width() + 'px');
+ this.doSetupPosition(popupPanel, elt, 0, 0);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(0, dy, 0, -dy);
+ },
+
+ });
+
+ richfaces.ui.PopupPanel.Sizer.NW = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.NW.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.NW.prototype, {
+
+ name: "richfaces.ui.PopupPanel.Sizer.NW",
+
+ doPosition : function (popupPanel, elt) {
+ this.doSetupSize(popupPanel, elt);
+ this.doSetupPosition(popupPanel, elt, 0, 0);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(dx, dy, -dx, -dy);
+ }
+
+ });
+
+ richfaces.ui.PopupPanel.Sizer.NE = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.NE.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.NE.prototype, {
+
+ name: "richfaces.ui.PopupPanel.Sizer.NE",
+
+ doPosition : function (popupPanel, elt) {
+ this.doSetupSize(popupPanel, elt);
+ this.doSetupPosition(popupPanel, elt, popupPanel.width() - elt.clientWidth, 0);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(0, dy, dx, -dy);
+ }
+
+ });
+
+ richfaces.ui.PopupPanel.Sizer.E = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.E.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.E.prototype, {
+
+ name: "richfaces.ui.PopupPanel.Sizer.E",
+
+ doPosition : function (popupPanel, elt) {
+ jQuery(elt).css('height', popupPanel.height() + 'px');
+ this.doSetupPosition(popupPanel, elt, popupPanel.width() - elt.clientWidth, 0);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(0, 0, dx, 0);
+ }
+
+ });
+
+ richfaces.ui.PopupPanel.Sizer.SE = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.SE.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.prototype.SE, {
+
+ name: "richfaces.ui.PopupPanel.Sizer.SE",
+
+ doPosition : function (popupPanel, elt) {
+ this.doSetupSize(popupPanel, elt);
+ this.doSetupPosition(popupPanel, elt, popupPanel.width() - elt.clientWidth,
+ popupPanel.height() - elt.clientHeight);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(0, 0, dx, dy);
+ }
+
+ });
+
+ richfaces.ui.PopupPanel.Sizer.S = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.S.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.S.prototype,{
+
+ name: "richfaces.ui.PopupPanel.Sizer.S",
+
+ doPosition : function (popupPanel, elt) {
+ jQuery(elt).css('width', popupPanel.width() + 'px');
+ this.doSetupPosition(popupPanel, elt, 0, popupPanel.height() - elt.clientHeight);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(0, 0, 0, dy);
+ }
+
+ });
+
+
+ richfaces.ui.PopupPanel.Sizer.SW = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.SW.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.SW.prototype,{
+
+
+ name: "richfaces.ui.PopupPanel.Sizer.SW",
+
+ doPosition : function (popupPanel, elt) {
+ this.doSetupSize(popupPanel, elt);
+ this.doSetupPosition(popupPanel, elt, 0, popupPanel.height() - elt.clientHeight);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(dx, 0, -dx, dy);
+ }
+
+ });
+
+ richfaces.ui.PopupPanel.Sizer.W = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.W.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.W.prototype,{
+
+
+ name: "richfaces.ui.PopupPanel.Sizer.W",
+
+ doPosition : function (popupPanel, elt) {
+ jQuery(elt).css('height', popupPanel.height() + 'px');
+ this.doSetupPosition(popupPanel, elt, 0, 0);
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(dx, 0, -dx, 0);
+ }
+
+
+ });
+
+
+ richfaces.ui.PopupPanel.Sizer.Header = function(){
+
+ }
+ $.extend(richfaces.ui.PopupPanel.Sizer.Header.prototype, richfaces.ui.PopupPanel.Sizer.prototype);
+ $.extend(richfaces.ui.PopupPanel.Sizer.Header.prototype, {
+
+
+ name: "richfaces.ui.PopupPanel.Sizer.Header",
+
+ doPosition : function (popupPanel, elt) {
+
+ },
+
+ doDiff : function(dx, dy) {
+ return new richfaces.ui.PopupPanel.Sizer.Diff(dx, dy, 0, 0);
+ }
+
+
+ });
+
+
+})(jQuery, window.RichFaces);
\ No newline at end of file
Copied: root/ui/output/trunk/panels/ui/src/main/templates/panel.template.xml (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/templates/panel.template.xml)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/templates/panel.template.xml (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/templates/panel.template.xml 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdk:root xmlns="http://richfaces.org/cdk/xhtml-el"
+ xmlns:cdk="http://richfaces.org/cdk/core"
+ xmlns:c="http://richfaces.org/cdk/jstl/core"
+ xmlns:cc="http://richfaces.org/cdk/jsf/composite"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+
+ <cc:interface>
+ <cdk:class>org.richfaces.renderkit.html.PanelRenderer</cdk:class>
+ <cdk:superclass>org.richfaces.renderkit.html.PanelBaseRenderer</cdk:superclass>
+ <cdk:component-family>org.richfaces.Panel</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.PanelRenderer</cdk:renderer-type>
+ </cc:interface>
+
+ <cc:implementation>
+ <div cdk:passThroughWithExclusions="id,value,styleClass,class" id="#{clientId}" class="rf-panel #{component.attributes['styleClass']}">
+ <c:choose>
+ <c:when test="#{component.getFacet('header') != null and component.getFacet('header').rendered}">
+ <div id="#{clientId}_header" class="rf-panel-header #{component.attributes['headerClass']}">
+ <!-- <cc:renderFacet name="header" />-->
+ <cdk:call expression="renderHeaderFacet(facesContext, component)" />
+ </div>
+ </c:when>
+ <c:when test="#{component.attributes['header']!= null and not component.attributes['header'].equals('')}">
+ <div id="#{clientId}_header" class="rf-panel-header #{component.attributes['headerClass']}">
+ #{component.attributes['header']}
+ </div>
+ </c:when>
+ <c:otherwise>
+ </c:otherwise>
+ </c:choose>
+ <div id="#{clientId}_body" class="rf-panel-body #{component.attributes['bodyClass']}">
+ <cdk:call expression="renderChildren(facesContext, component)" />
+ </div>
+ </div>
+
+ </cc:implementation>
+</cdk:root>
\ No newline at end of file
Copied: root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/main/templates/popupPanel.template.xml)
===================================================================
--- root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml (rev 0)
+++ root/ui/output/trunk/panels/ui/src/main/templates/popupPanel.template.xml 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cdk:root xmlns="http://richfaces.org/cdk/xhtml-el"
+ xmlns:cdk="http://richfaces.org/cdk/core"
+ xmlns:c="http://richfaces.org/cdk/jstl/core"
+ xmlns:cc="http://richfaces.org/cdk/jsf/composite"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+
+ <cc:interface>
+ <cdk:class>org.richfaces.renderkit.html.PopupPanelRenderer</cdk:class>
+ <cdk:superclass>org.richfaces.renderkit.html.PopupPanelBaseRenderer</cdk:superclass>
+ <cdk:component-family>org.richfaces.PopupPanel</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.PopupPanelRenderer</cdk:renderer-type>
+ </cc:interface>
+
+ <cc:implementation>
+ <cdk:call expression="checkOptions(facesContext, component)" />
+ <div id="#{clientId}" style="visibility: hidden;">
+ <button class="mp-button" id="#{clientId}FirstHref"></button>
+ <c:if test="#{component.attributes['modal']}">
+ <div id="#{clientId}_shade" onclick="#{component.attributes['onmaskclick']}"
+ ondblclick="#{component.attributes['onmaskdblclick']}"
+ oncontextmenu="#{component.attributes['onmaskcontextmenu']}"
+ onmouseup="#{component.attributes['onmaskmouseup']}"
+ onmousedown="#{component.attributes['onmaskmousedown']}"
+ onmousemove="#{component.attributes['onmaskmousemove']}"
+ onmouseover="#{component.attributes['onmaskmouseover']}"
+ onmouseout="#{component.attributes['onmaskmouseout']}" class="mp_shade"/>
+
+</c:if>
+ <div id="#{clientId}_shadow" class="mp_shadow"/>
+ <div id="#{clientId}_container" cdk:passThroughWithExclusions="id,style,class,styleClass" class="mp_container #{component.attributes['styleClass']}">
+ <div id="#{clientId}_header" class="mp_header #{component.attributes['headerClass']}" >
+ <c:if test="#{component.getFacet('header')!=null and component.getFacet('header').rendered}">
+ <div id="#{clientId}_header_content" class="mp_header_content">
+ <c:if test="#{component.attributes['autosized']}">
+ <span id="#{clientId}_headerSpan">
+ <cdk:call expression="renderHeaderFacet(facesContext, component)"/>
+ </span>
+ </c:if>
+ <c:if test="#{!component.attributes['autosized']}">
+ <cdk:call expression="renderHeaderFacet(facesContext, component)"/>
+ </c:if>
+ </div>
+ </c:if>
+ <c:if test="#{component.getFacet('controls')!=null and component.getFacet('controls').rendered}">
+ <div id="#{clientId}_header_controls" class="mp_header_controls #{component.attributes['controlsClass']}">
+ <cdk:call expression="renderControlsFacet(facesContext, component)"/>
+ </div>
+ </c:if>
+ </div>
+ <div id="#{clientId}_content_scroller" class="mp_content_scroller #{component.attributes['scrollerClass']}">
+ <div id="#{clientId}_content" class="mp_content" style="#{component.attributes['style']}">
+ <cdk:call expression="renderChildren(facesContext, component)"/>
+ </div>
+ </div>
+ <c:if test="#{component.attributes['resizeable']}">
+ <div id="#{clientId}ResizerW" class="mp_handler mp_handler_left"></div>
+ <div id="#{clientId}ResizerE" class="mp_handler mp_handler_right"></div>
+ <div id="#{clientId}ResizerN" class="mp_handler mp_handler_top"></div>
+
+ <div id="#{clientId}ResizerS" class="mp_handler mp_handler_bottom"></div>
+ <div id="#{clientId}ResizerNW" class="mp_handler mp_handler_top_left"></div>
+ <div id="#{clientId}ResizerNE" class="mp_handler mp_handler_top_right"></div>
+ <div id="#{clientId}ResizerSW" class="mp_handler mp_handler_bottom_left"></div>
+ <div id="#{clientId}ResizerSE" class="mp_handler mp_handler_bottom_right"></div>
+ </c:if>
+
+ </div>
+
+
+
+<button class="mp-button" id="#{clientId}LastHref"></button>
+</div>
+<cdk:object type="java.lang.String" name="script" value="#{buildScript(facesContext, component)}" />
+ <cdk:object type="java.lang.String" name="showScript" value="#{buildShowScript(facesContext, component)}" />
+ <script type="text/javascript">
+ #{script}
+ </script>
+ <c:if test="#{showScript != null}">
+ <script type="text/javascript">
+ #{showScript}
+ </script>
+ </c:if>
+
+
+ </cc:implementation>
+</cdk:root>
\ No newline at end of file
Copied: root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PanelRendererTest.java (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/test/java/org/richfaces/renderkit/html/PanelRendererTest.java)
===================================================================
--- root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PanelRendererTest.java (rev 0)
+++ root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PanelRendererTest.java 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,157 @@
+/*
+ * 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.renderkit.html;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.faces.application.ViewHandler;
+import javax.faces.context.FacesContext;
+import javax.faces.view.ViewDeclarationLanguage;
+
+import org.jboss.test.faces.FacesEnvironment.FacesRequest;
+import org.jboss.test.faces.htmlunit.HtmlUnitEnvironment;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.richfaces.component.UIPanel;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * @author Andrey Markhel
+ *
+ */
+public class PanelRendererTest {
+
+ private HtmlUnitEnvironment environment;
+
+ @Before
+ public void setUp() {
+ environment = new HtmlUnitEnvironment();
+ environment.withWebRoot(new File("src/test/resources"));
+ environment.start();
+ }
+
+ @After
+ public void tearDown() {
+ environment.release();
+ environment = null;
+ }
+
+ private FacesRequest startFacesRequest() throws IOException {
+ FacesRequest facesRequest = environment.createFacesRequest("http://localhost/panelTest.jsf");
+ facesRequest.withViewId("/panelTest.jsf");
+ facesRequest.start();
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ViewHandler vh = facesContext.getApplication().getViewHandler();
+ ViewDeclarationLanguage vdl = vh.getViewDeclarationLanguage(facesContext, facesContext.getViewRoot()
+ .getViewId());
+ vdl.buildView(facesContext, facesContext.getViewRoot());
+ return facesRequest;
+ }
+ /**
+ * Test method for {@link org.richfaces.renderkit.ExtendedDataTableRenderer#getComponentClass()}.
+ *
+ * @throws IOException
+ */
+ @Test
+ public final void testGetComponentClass() throws IOException {
+ FacesRequest facesRequest = startFacesRequest();
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ UIPanel component = (UIPanel) facesContext.getViewRoot().findComponent("panelWithFacet");
+ PanelRenderer renderer = (PanelRenderer) FacesContext.getCurrentInstance()
+ .getRenderKit().getRenderer(component.getFamily(), component.getRendererType());
+ assertEquals(UIPanel.class, renderer.getComponentClass());
+ facesRequest.release();
+ }
+
+ /**
+ * Test method for
+ * {@link org.richfaces.renderkit.ExtendedDataTableRenderer#doEncodeBegin(javax.faces.context.ResponseWriter,
+ * javax.faces.context.FacesContext, javax.faces.component.UIComponent)}.
+ *
+ * @throws IOException
+ */
+ /*@Test
+ public final void testDoEncode() throws IOException {
+ HtmlPage page = environment.getPage("/panelTest.jsf");
+ HtmlElement panelWithFacet = page.getElementById("panelWithFacet");
+ assertEquals("rf-panel panel", panelWithFacet.getAttribute("class"));
+ assertEquals("Write your own custom rich components with built-in AJAX support", panelWithFacet.getElementById("panelWithFacet_header").getTextContent().trim());
+ assertEquals("The CDK includes", panelWithFacet.getElementById("panelWithFacet_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement simplePanel = page.getElementById("simplePanel");
+ assertEquals("rf-panel ", simplePanel.getAttribute("class"));
+ try{
+ simplePanel.getElementById("simplePanel_header");
+ }catch(Exception e){
+ assertTrue(true);
+ }
+ assertEquals("RichFaces is a l", simplePanel
+ .getElementById("simplePanel_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement simplePanelBody = page.getElementById("simplePanel_body");
+ assertEquals("rf-panel-body rich-laguna-panel-no-header", simplePanelBody.getAttribute("class"));
+ HtmlElement simplePanel2 = page.getElementById("simplePanelWithTextHeader");
+ assertEquals("rf-panel ", simplePanel2.getAttribute("class"));
+ assertNotNull(simplePanel2.getElementById("simplePanelWithTextHeader_header"));
+ assertEquals("rich-laguna-panel-no-header", simplePanel2.getElementById("simplePanelWithTextHeader_header").getTextContent().trim());
+ assertEquals("RichFaces is a l", simplePanel2
+ .getElementById("simplePanelWithTextHeader_body")
+ .getTextContent().trim().substring(0, 16));
+
+ HtmlElement nestedPanelContainer = page.getElementById("nestedPanelContainer");
+ assertEquals("rf-panel ", nestedPanelContainer.getAttribute("class"));
+ assertNotNull(nestedPanelContainer.getElementById("nestedPanelContainer_header"));
+ assertEquals("||||", nestedPanelContainer.getElementById("nestedPanelContainer_header").getTextContent().trim());
+ HtmlElement nestedPanelContainerHeader = page.getElementById("nestedPanelContainer_header");
+ assertEquals("rf-panel-header outpanelHeader", nestedPanelContainerHeader.getAttribute("class"));
+ assertEquals("Benefits of Usin", nestedPanelContainer
+ .getElementById("nestedPanelContainer_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement nestedPanel1 = nestedPanelContainer.getElementById("nestedPanel1");
+ assertEquals("rf-panel ", nestedPanel1.getAttribute("class"));
+ HtmlElement nestedPanel1Body = page.getElementById("nestedPanel1_body");
+ assertEquals("rf-panel-body inpanelBody", nestedPanel1Body.getAttribute("class"));
+ assertNotNull(nestedPanel1.getElementById("nestedPanel1_header"));
+ assertEquals("For Application Developers", nestedPanel1.getElementById("nestedPanel1_header").getTextContent().trim());
+ assertEquals("Production quali", nestedPanel1
+ .getElementById("nestedPanel1_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement nestedPanel2 = nestedPanelContainer.getElementById("nestedPanel2");
+ assertEquals("rf-panel ", nestedPanel2.getAttribute("class"));
+ HtmlElement nestedPanel2Body = page.getElementById("nestedPanel2_body");
+ assertEquals("rf-panel-body inpanelBody", nestedPanel2Body.getAttribute("class"));
+ assertNotNull(nestedPanel2.getElementById("nestedPanel2_header"));
+ assertEquals("For Component Developers", nestedPanel2.getElementById("nestedPanel2_header").getTextContent().trim());
+ assertEquals("Ajax4jsf is Open", nestedPanel2
+ .getElementById("nestedPanel2_body")
+ .getTextContent().trim().substring(0, 16));
+ }*/
+
+}
Copied: root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PopupRendererTest.java (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/test/java/org/richfaces/renderkit/html/PopupRendererTest.java)
===================================================================
--- root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PopupRendererTest.java (rev 0)
+++ root/ui/output/trunk/panels/ui/src/test/java/org/richfaces/renderkit/html/PopupRendererTest.java 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,159 @@
+/*
+ * 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.renderkit.html;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.faces.application.ViewHandler;
+import javax.faces.context.FacesContext;
+import javax.faces.view.ViewDeclarationLanguage;
+
+import org.jboss.test.faces.FacesEnvironment.FacesRequest;
+import org.jboss.test.faces.htmlunit.HtmlUnitEnvironment;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.richfaces.component.UIPanel;
+import org.richfaces.component.UIPopupPanel;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+
+/**
+ * @author Andrey Markhel
+ *
+ */
+public class PopupRendererTest {
+
+ private HtmlUnitEnvironment environment;
+
+ @Before
+ public void setUp() {
+ environment = new HtmlUnitEnvironment();
+ environment.withWebRoot(new File("src/test/resources"));
+ environment.start();
+ }
+
+ @After
+ public void tearDown() {
+ environment.release();
+ environment = null;
+ }
+
+ private FacesRequest startFacesRequest() throws IOException {
+ FacesRequest facesRequest = environment.createFacesRequest("http://localhost/popupPanelTest.jsf");
+ facesRequest.withViewId("/popupPanelTest.jsf");
+ facesRequest.start();
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ViewHandler vh = facesContext.getApplication().getViewHandler();
+ ViewDeclarationLanguage vdl = vh.getViewDeclarationLanguage(facesContext, facesContext.getViewRoot()
+ .getViewId());
+ vdl.buildView(facesContext, facesContext.getViewRoot());
+ return facesRequest;
+ }
+ /**
+ * Test method for {@link org.richfaces.renderkit.ExtendedDataTableRenderer#getComponentClass()}.
+ *
+ * @throws IOException
+ */
+ @Test
+ public final void testGetComponentClass() throws IOException {
+ /*FacesRequest facesRequest = startFacesRequest();
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ UIPopupPanel component = (UIPopupPanel) facesContext.getViewRoot().findComponent("panel");
+ PopupPanelRenderer renderer = (PopupPanelRenderer) FacesContext.getCurrentInstance()
+ .getRenderKit().getRenderer(component.getFamily(), component.getRendererType());
+ assertEquals(UIPopupPanel.class, renderer.getComponentClass());
+ facesRequest.release();*/
+ return ;
+ }
+
+ /**
+ * Test method for
+ * {@link org.richfaces.renderkit.ExtendedDataTableRenderer#doEncodeBegin(javax.faces.context.ResponseWriter,
+ * javax.faces.context.FacesContext, javax.faces.component.UIComponent)}.
+ *
+ * @throws IOException
+ */
+ /*@Test
+ public final void testDoEncode() throws IOException {
+ HtmlPage page = environment.getPage("/panelTest.jsf");
+ HtmlElement panelWithFacet = page.getElementById("panelWithFacet");
+ assertEquals("rf-panel panel", panelWithFacet.getAttribute("class"));
+ assertEquals("Write your own custom rich components with built-in AJAX support", panelWithFacet.getElementById("panelWithFacet_header").getTextContent().trim());
+ assertEquals("The CDK includes", panelWithFacet.getElementById("panelWithFacet_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement simplePanel = page.getElementById("simplePanel");
+ assertEquals("rf-panel ", simplePanel.getAttribute("class"));
+ try{
+ simplePanel.getElementById("simplePanel_header");
+ }catch(Exception e){
+ assertTrue(true);
+ }
+ assertEquals("RichFaces is a l", simplePanel
+ .getElementById("simplePanel_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement simplePanelBody = page.getElementById("simplePanel_body");
+ assertEquals("rf-panel-body rich-laguna-panel-no-header", simplePanelBody.getAttribute("class"));
+ HtmlElement simplePanel2 = page.getElementById("simplePanelWithTextHeader");
+ assertEquals("rf-panel ", simplePanel2.getAttribute("class"));
+ assertNotNull(simplePanel2.getElementById("simplePanelWithTextHeader_header"));
+ assertEquals("rich-laguna-panel-no-header", simplePanel2.getElementById("simplePanelWithTextHeader_header").getTextContent().trim());
+ assertEquals("RichFaces is a l", simplePanel2
+ .getElementById("simplePanelWithTextHeader_body")
+ .getTextContent().trim().substring(0, 16));
+
+ HtmlElement nestedPanelContainer = page.getElementById("nestedPanelContainer");
+ assertEquals("rf-panel ", nestedPanelContainer.getAttribute("class"));
+ assertNotNull(nestedPanelContainer.getElementById("nestedPanelContainer_header"));
+ assertEquals("||||", nestedPanelContainer.getElementById("nestedPanelContainer_header").getTextContent().trim());
+ HtmlElement nestedPanelContainerHeader = page.getElementById("nestedPanelContainer_header");
+ assertEquals("rf-panel-header outpanelHeader", nestedPanelContainerHeader.getAttribute("class"));
+ assertEquals("Benefits of Usin", nestedPanelContainer
+ .getElementById("nestedPanelContainer_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement nestedPanel1 = nestedPanelContainer.getElementById("nestedPanel1");
+ assertEquals("rf-panel ", nestedPanel1.getAttribute("class"));
+ HtmlElement nestedPanel1Body = page.getElementById("nestedPanel1_body");
+ assertEquals("rf-panel-body inpanelBody", nestedPanel1Body.getAttribute("class"));
+ assertNotNull(nestedPanel1.getElementById("nestedPanel1_header"));
+ assertEquals("For Application Developers", nestedPanel1.getElementById("nestedPanel1_header").getTextContent().trim());
+ assertEquals("Production quali", nestedPanel1
+ .getElementById("nestedPanel1_body")
+ .getTextContent().trim().substring(0, 16));
+ HtmlElement nestedPanel2 = nestedPanelContainer.getElementById("nestedPanel2");
+ assertEquals("rf-panel ", nestedPanel2.getAttribute("class"));
+ HtmlElement nestedPanel2Body = page.getElementById("nestedPanel2_body");
+ assertEquals("rf-panel-body inpanelBody", nestedPanel2Body.getAttribute("class"));
+ assertNotNull(nestedPanel2.getElementById("nestedPanel2_header"));
+ assertEquals("For Component Developers", nestedPanel2.getElementById("nestedPanel2_header").getTextContent().trim());
+ assertEquals("Ajax4jsf is Open", nestedPanel2
+ .getElementById("nestedPanel2_body")
+ .getTextContent().trim().substring(0, 16));
+ }*/
+
+}
\ No newline at end of file
Copied: root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/test/resources/panelTest.xhtml)
===================================================================
--- root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml (rev 0)
+++ root/ui/output/trunk/panels/ui/src/test/resources/panelTest.xhtml 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,98 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!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:panel="http://richfaces.org/panels"
+ xmlns:rich="http://richfaces.org/rich">
+<!--
+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.
+-->
+ <h:head>
+ <title>Richfaces ExtendedDataTable Test</title>
+ </h:head>
+
+ <h:body>
+ <panel:panel styleClass="panel" id="panelWithFacet">
+ <f:facet name="header">
+ Write your own custom rich components with built-in AJAX support
+ </f:facet>
+ The CDK includes a code-generation facility and a
+ templating facility using a JSP-like syntax. These capabilities help
+ to avoid a routine process of a component creation. The component factory
+ works like a well-oiled machine allowing the creation of first-class
+ rich components with built-in Ajax functionality even more easily than
+ the creation of simpler components by means of the traditional coding
+ approach.
+ </panel:panel>
+ <panel:panel id="simplePanel" bodyClass="rich-laguna-panel-no-header">
+ RichFaces is a library for adding rich user interface features to JSF
+ applications. It extends the Ajax4jsf framework to include a large
+ (and growing) set of powerful rich AJAX-enabled components that come
+ with extensive skins support.
+ </panel:panel>
+ <panel:panel id="simplePanelWithTextHeader" header="rich-laguna-panel-no-header">
+ RichFaces is a library for adding rich user interface features to JSF
+ applications. It extends the Ajax4jsf framework to include a large
+ (and growing) set of powerful rich AJAX-enabled components that come
+ with extensive skins support.
+ </panel:panel>
+ <panel:panel id="nestedPanelContainer" style="padding:0" headerClass="outpanelHeader">
+ <f:facet name="header">
+ ||||
+ </f:facet>
+ <h2 align="center"><h:outputText value="Benefits of Using Ajax4jsf" /></h2>
+ <h:panelGrid columns="2" columnClasses="gridContent">
+ <panel:panel id="nestedPanel1" bodyClass="inpanelBody">
+ <f:facet name="header">
+ For Application Developers
+ </f:facet>
+ <ul>
+ <li>Production quality Open Source</li>
+ <li>Does Open Source and has an Open Architecture</li>
+ <li>Compatible with any JSF Implementation - MyFaces, JSF1.1, JSF1.2</li>
+ <li>Allows to Ajaxify JSF application without writing Javascript</li>
+ <li>Works with standard and third party components</li>
+ <li>Adds the Ajax capability to existing non-Ajax components</li>
+ </ul>
+ </panel:panel>
+ <panel:panel id="nestedPanel2" bodyClass="inpanelBody">
+ <f:facet name="header" >
+ For Component Developers
+ </f:facet>
+ <ul>
+ <li>Ajax4jsf is Open Source and has an Open Architecture</li>
+ <li>Gives an API to create components with built-in Ajax support</li>
+ <li>Has a Component Development Kit for rapid development</li>
+ <li>Allows to skin the look-n-feel using both CSS and set of skin-parameters</li>
+ <li>Automatically generates the unit test-cases for developing components</li>
+ <li>Allows to pack javascript code, images, css inside the final jar</li>
+ </ul>
+ </panel:panel>
+ </h:panelGrid>
+ </panel:panel>
+ </h:body>
+</html>
Copied: root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml (from rev 17965, root/ui-sandbox/panels2/trunk/ui/src/test/resources/popupPanelText.xhtml)
===================================================================
--- root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml (rev 0)
+++ root/ui/output/trunk/panels/ui/src/test/resources/popupPanelText.xhtml 2010-07-12 17:56:20 UTC (rev 17973)
@@ -0,0 +1,82 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!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:a4j="http://richfaces.org/a4j"
+ xmlns:panel="http://richfaces.org/panels"
+ xmlns:rich="http://richfaces.org/rich">
+<!--
+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.
+-->
+ <h:head>
+ <title>Richfaces ExtendedDataTable Test</title>
+ </h:head>
+
+ <h:body>
+
+ <panel:popupPanel domElementAttachment="body" visualOptions="{left:400px;}" moveable="true" overlapEmbedObjects="true" keepVisualState="true" onmaskclick="alert('1')" width="600" height="400" id="panel" left="500px" top="300px">
+ <f:facet name="header">
+ Write your own custom rich components with built-in AJAX
+ </f:facet>
+ <h:form>
+ <h:panelGroup layout="block" style="width:500px,height:400px;">
+ The CDK includes a code-generation facility and a
+ templating facility using a JSP-like syntax. These capabilities help
+ to avoid a routine process of a component creation. The component factory
+ works like a well-oiled machine allowing the creation of first-class
+ rich components with built-in Ajax functionality even more easily than
+ the creation of simpler components by means of the traditional coding
+ approach.
+
+ <a4j:commandLink value="Hide">
+
+ <rich:componentControl target="panel" operation="hide" event="click">
+ </rich:componentControl>
+ </a4j:commandLink>
+
+<h:inputText value="aaa"/>
+<a href="#" onclick="RichFaces.$('panel').setSize(500, 300)" tabindex="0">setSize
+ </a>
+ <a href="#" onclick="RichFaces.$('panel').resize(20, 50)" tabindex="0">resize
+ </a>
+ <a href="#" onclick="RichFaces.$('panel').move(20, 50)" tabindex="0">move
+ </a>
+
+ <a href="#" onclick="RichFaces.$('panel').moveTo(20, 50)" tabindex="0">moveTo
+ </a>
+ </h:panelGroup>
+ </h:form>
+ </panel:popupPanel>
+
+ <a4j:commandLink value="Show">
+
+ <rich:componentControl target="panel" operation="show" event="click">
+ </rich:componentControl>
+ </a4j:commandLink>
+
+ </h:body>
+</html>
\ No newline at end of file
14 years, 6 months
JBoss Rich Faces SVN: r17971 - in root: ui/iteration/trunk/dist/richfaces-ui-iteration-ui and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-07-12 13:33:41 -0400 (Mon, 12 Jul 2010)
New Revision: 17971
Modified:
root/core/trunk/impl/pom.xml
root/ui/iteration/trunk/dist/richfaces-ui-iteration-ui/pom.xml
Log:
RF-8904 Release ZIP contains corrupted files generated by jsdoc
Modified: root/core/trunk/impl/pom.xml
===================================================================
--- root/core/trunk/impl/pom.xml 2010-07-12 17:17:45 UTC (rev 17970)
+++ root/core/trunk/impl/pom.xml 2010-07-12 17:33:41 UTC (rev 17971)
@@ -248,6 +248,9 @@
<configuration>
<classesDirectory>${basedir}/target/site/jsdoc</classesDirectory>
<classifier>jsdoc</classifier>
+ <excludes>
+ <exclude>**/symbols/src/*</exclude>
+ </excludes>
</configuration>
</execution>
</executions>
Modified: root/ui/iteration/trunk/dist/richfaces-ui-iteration-ui/pom.xml
===================================================================
--- root/ui/iteration/trunk/dist/richfaces-ui-iteration-ui/pom.xml 2010-07-12 17:17:45 UTC (rev 17970)
+++ root/ui/iteration/trunk/dist/richfaces-ui-iteration-ui/pom.xml 2010-07-12 17:33:41 UTC (rev 17971)
@@ -162,8 +162,8 @@
</execution>
</executions>
</plugin>
-<!-- <plugin>
- <!– collecting jsdoc –>
+ <plugin>
+ <!-- collecting jsdoc -->
<groupId>gr.abiss.mvn.plugins</groupId>
<artifactId>maven-jstools-plugin</artifactId>
<executions>
@@ -183,7 +183,7 @@
</executions>
</plugin>
<plugin>
- <!– pack jsdoc to jar –>
+ <!-- pack jsdoc to jar -->
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
@@ -195,10 +195,13 @@
<configuration>
<classesDirectory>${basedir}/target/jsdoc</classesDirectory>
<classifier>jsdoc</classifier>
+ <excludes>
+ <exclude>**/symbols/src/*</exclude>
+ </excludes>
</configuration>
</execution>
</executions>
- </plugin>-->
+ </plugin>
<plugin>
<!-- collecting javadoc -->
<artifactId>maven-javadoc-plugin</artifactId>
14 years, 6 months
JBoss Rich Faces SVN: r17970 - in root/ui/iteration/trunk/tables/ui/src/main: java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-07-12 13:17:45 -0400 (Mon, 12 Jul 2010)
New Revision: 17970
Modified:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataGrid.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/tables.taglib.xml
Log:
add metacomponents support, rename nodata -> noData
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataGrid.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataGrid.java 2010-07-12 16:51:04 UTC (rev 17969)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/component/UIDataGrid.java 2010-07-12 17:17:45 UTC (rev 17970)
@@ -22,26 +22,52 @@
package org.richfaces.component;
+import java.io.IOException;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.Set;
import javax.faces.component.UIComponent;
+import javax.faces.component.visit.VisitCallback;
+import javax.faces.component.visit.VisitContext;
+import javax.faces.component.visit.VisitResult;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PreRenderComponentEvent;
+import org.richfaces.context.ExtendedVisitContext;
+import org.richfaces.context.ExtendedVisitContextMode;
+import org.richfaces.log.RichfacesLogger;
+import org.richfaces.renderkit.MetaComponentRenderer;
+import org.slf4j.Logger;
+
/**
* @author Anton Belevich
*
*/
-public class UIDataGrid extends UISequence implements Row {
+public class UIDataGrid extends UISequence implements Row, MetaComponentResolver, MetaComponentEncoder {
public static final String HEADER_FACET_NAME = "header";
-
public static final String FOOTER_FACET_NAME = "footer";
-
public static final String CAPTION_FACET_NAME = "caption";
+ public static final String NODATA_FACET_NAME = "noData";
- public static final String NODATA_FACET_NAME = "nodata";
+ public static final String HEADER = "header";
+ public static final String FOOTER = "footer";
+ public static final String BODY = "body";
+
+ private static final Logger RENDERKIT_LOG = RichfacesLogger.RENDERKIT.getLogger();
+ private static final Set<String> SUPPORTED_META_COMPONENTS = new HashSet<String>();
+
+ static {
+ SUPPORTED_META_COMPONENTS.add(HEADER);
+ SUPPORTED_META_COMPONENTS.add(FOOTER);
+ SUPPORTED_META_COMPONENTS.add(BODY);
+ }
+
+
enum PropertyKeys {
- columns
+ columns, elements
}
public int getColumns() {
@@ -52,6 +78,14 @@
getStateHelper().put(PropertyKeys.columns, count);
}
+ public int getElements() {
+ return (Integer)getStateHelper().eval(PropertyKeys.elements);
+ }
+
+ public void setElements(int count) {
+ getStateHelper().put(PropertyKeys.elements, count);
+ }
+
public Iterator<UIComponent> columns() {
//DataGrid doesn't work with column components
return null;
@@ -73,5 +107,83 @@
return getFacet(NODATA_FACET_NAME);
}
+ //TODO: copy from UIDataTableBase
+ public void encodeMetaComponent(FacesContext context, String metaComponentId) throws IOException {
+ context.getApplication().publishEvent(context, PreRenderComponentEvent.class, this);
+ MetaComponentRenderer renderer = (MetaComponentRenderer) getRenderer(context);
+ renderer.encodeMetaComponent(context, this, metaComponentId);
+ }
+
+ protected boolean visitFixedChildren(VisitContext visitContext, VisitCallback callback) {
+ if (visitContext instanceof ExtendedVisitContext) {
+ ExtendedVisitContext extendedVisitContext = (ExtendedVisitContext) visitContext;
+ if (extendedVisitContext.getVisitMode() == ExtendedVisitContextMode.RENDER) {
+ //TODO nick - call preEncodeBegin(...) and emit PreRenderEvent
+ VisitResult visitResult;
+
+ visitResult = extendedVisitContext.invokeMetaComponentVisitCallback(this, callback, HEADER);
+
+ if (visitResult == VisitResult.ACCEPT){
+ //TODO:
+ } else if (visitResult == VisitResult.COMPLETE) {
+ return true;
+ }
+
+ visitResult = extendedVisitContext.invokeMetaComponentVisitCallback(this, callback, FOOTER);
+
+ if (visitResult == VisitResult.ACCEPT) {
+ //TODO nick - visit footer?
+ } else if (visitResult == VisitResult.COMPLETE) {
+ return true;
+ }
+
+ if (visitResult == VisitResult.REJECT) {
+ return false;
+ }
+ }
+ }
+
+ return super.visitFixedChildren(visitContext, callback);
+ }
+
+ protected boolean visitDataChildren(VisitContext visitContext, final VisitCallback callback, boolean visitRows) {
+ if (visitContext instanceof ExtendedVisitContext && visitRows) {
+ ExtendedVisitContext extendedVisitContext = (ExtendedVisitContext) visitContext;
+
+ if (extendedVisitContext.getVisitMode() == ExtendedVisitContextMode.RENDER) {
+ //TODO nick - call preEncodeBegin(...) and emit PreRenderEvent
+ setRowKey(visitContext.getFacesContext(), null);
+
+ VisitResult result = extendedVisitContext.invokeMetaComponentVisitCallback(this, callback, BODY);
+
+ if (result == VisitResult.ACCEPT) {
+ //TODO nick - visit body?
+ } else {
+ return result == VisitResult.COMPLETE;
+ }
+ }
+ }
+
+ return super.visitDataChildren(visitContext, callback, visitRows);
+ }
+
+ public String resolveClientId(FacesContext facesContext, UIComponent contextComponent, String metaComponentId) {
+ if (SUPPORTED_META_COMPONENTS.contains(metaComponentId)) {
+ Object oldRowKey = getRowKey();
+
+ try {
+ setRowKey(facesContext, null);
+ return getClientId(facesContext) + MetaComponentResolver.META_COMPONENT_SEPARATOR_CHAR + metaComponentId;
+ } finally {
+ try {
+ setRowKey(facesContext, oldRowKey);
+ } catch (Exception e) {
+ RENDERKIT_LOG.error(e.getMessage(), e);
+ }
+ }
+ }
+
+ return null;
+ }
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-07-12 16:51:04 UTC (rev 17969)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-07-12 17:17:45 UTC (rev 17970)
@@ -32,6 +32,7 @@
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.richfaces.component.UIDataGrid;
+import org.richfaces.component.UIDataTableBase;
/**
* @author Anton Belevich
@@ -42,17 +43,24 @@
@ResourceDependency(name = "jquery.js"), @ResourceDependency(name = "richfaces.js"),
@ResourceDependency(name = "richfaces-event.js"), @ResourceDependency(name = "richfaces-base-component.js"),
@ResourceDependency(name = "datagrid.ecss")})
-public class DataGridRenderer extends AbstractRowsRenderer {
+public class DataGridRenderer extends AbstractRowsRenderer implements MetaComponentRenderer {
private static final EncodeStrategy THEAD = new EncodeStrategy () {
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
throws IOException {
+ UIDataGrid dataGrid = (UIDataGrid)component;
+ String clientId = dataGrid.getClientId(context) + ":h";
+
+ boolean partial = (Boolean)(Boolean)params[0];
+ if(partial) {
+ context.getPartialViewContext().getPartialResponseWriter().startUpdate(clientId);
+ }
- UIDataGrid dataGrid = (UIDataGrid)component;
int columns = dataGrid.getColumns();
writer.startElement(HTML.THEAD_ELEMENT, component);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, clientId , null);
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg-thead", null);
writer.startElement(HTML.TR_ELEMENT, component);
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg-h", null);
@@ -66,6 +74,11 @@
writer.endElement(HTML.TH_ELEM);
writer.endElement(HTML.TR_ELEMENT);
writer.endElement(HTML.THEAD_ELEMENT);
+
+ boolean partial = (Boolean)(Boolean)params[0];
+ if(partial) {
+ context.getPartialViewContext().getPartialResponseWriter().endUpdate();
+ }
}
};
@@ -73,11 +86,18 @@
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
throws IOException {
-
+
UIDataGrid dataGrid = (UIDataGrid)component;
+ String clientId = dataGrid.getClientId(context) + ":f";
+
int columns = dataGrid.getColumns();
-
+ boolean partial = (Boolean)(Boolean)params[0];
+ if(partial) {
+ context.getPartialViewContext().getPartialResponseWriter().startUpdate(clientId);
+ }
+
writer.startElement(HTML.TFOOT_ELEMENT, component);
+
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg-tfoot", null);
writer.startElement(HTML.TR_ELEMENT, component);
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg-f", null);
@@ -90,7 +110,12 @@
throws IOException {
writer.endElement(HTML.TD_ELEM);
writer.endElement(HTML.TR_ELEMENT);
- writer.endElement(HTML.THEAD_ELEMENT);
+ writer.endElement(HTML.TFOOT_ELEMENT);
+
+ boolean partial = (Boolean)(Boolean)params[0];
+ if(partial) {
+ context.getPartialViewContext().getPartialResponseWriter().endUpdate();
+ }
}
};
@@ -110,13 +135,16 @@
private static final EncodeStrategy NODATA = new EncodeStrategy() {
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
throws IOException {
- writer.startElement(HTML.CAPTION_ELEMENT, component);
+ writer.startElement(HTML.TR_ELEMENT, component);
+ writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg-nd", null);
+ writer.startElement(HTML.TD_ELEM, component);
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg-nd-c", null);
}
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params)
throws IOException {
- writer.endElement(HTML.CAPTION_ELEMENT);
+ writer.endElement(HTML.TD_ELEM);
+ writer.endElement(HTML.TR_ELEMENT);
}
};
@@ -143,34 +171,55 @@
writer.endElement(HTML.TD_ELEM);
}
- public void encodeHeader(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid) throws IOException {
+ public void encodeHeader(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid, boolean partial) throws IOException {
UIComponent footerFacet = dataGrid.getHeaderFacet();
- encodeFacet(writer, facesContext, footerFacet, THEAD, dataGrid);
+ encodeFacet(writer, facesContext, footerFacet, THEAD, dataGrid, new Object[] {partial});
}
- public void encodeFooter(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid) throws IOException {
+ public void encodeFooter(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid, boolean partial) throws IOException {
UIComponent footerFacet = dataGrid.getFooterFacet();
- encodeFacet(writer, facesContext, footerFacet, TFOOT, dataGrid);
+ encodeFacet(writer, facesContext, footerFacet, TFOOT, dataGrid, new Object[] {partial});
}
public void encodeCaption(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid) throws IOException {
UIComponent captionFacet = dataGrid.getCaptionFacet();
- encodeFacet(writer, facesContext, captionFacet, CAPTION, dataGrid);
+ encodeFacet(writer, facesContext, captionFacet, CAPTION, dataGrid, null);
}
- private void encodeNoData(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid) throws IOException {
+ public void encodeNoData(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid) throws IOException {
UIComponent noDataFacet = dataGrid.getNoDataFacet();
- encodeFacet(writer, facesContext, noDataFacet, NODATA, dataGrid);
+ encodeFacet(writer, facesContext, noDataFacet, NODATA, dataGrid, null);
}
- private void encodeFacet(ResponseWriter writer, FacesContext facesContext, UIComponent facet, EncodeStrategy strategy, UIDataGrid dataGrid) throws IOException{
+ public void encodeFacet(ResponseWriter writer, FacesContext facesContext, UIComponent facet, EncodeStrategy strategy, UIDataGrid dataGrid, Object [] params) throws IOException{
if(facet != null && facet.isRendered()) {
- strategy.begin(writer, facesContext, dataGrid, null);
+ strategy.begin(writer, facesContext, dataGrid, params);
facet.encodeAll(facesContext);
- strategy.end(writer, facesContext, dataGrid, null);
+ strategy.end(writer, facesContext, dataGrid, params);
}
}
+
+ public void encodeTBody(ResponseWriter writer, FacesContext facesContext, UIDataGrid dataGrid, boolean partial) throws IOException {
+ String clientId = dataGrid.getClientId(facesContext) + ":dgb";
+ if(partial) {
+ facesContext.getPartialViewContext().getPartialResponseWriter().startUpdate(clientId);
+ }
+ writer.startElement(HTML.TBODY_ELEMENT, dataGrid);
+ writer.writeAttribute(HTML.ID_ATTRIBUTE, clientId , null);
+ writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg-body", null);
+ if(dataGrid.getRowCount() > 0) {
+ processRows(writer, facesContext, dataGrid, null);
+ } else {
+ encodeNoData(writer, facesContext, dataGrid);
+ }
+ writer.endElement(HTML.TBODY_ELEMENT);
+
+ if(partial) {
+ facesContext.getPartialViewContext().getPartialResponseWriter().endUpdate();
+ }
+ }
+
@Override
protected void doEncodeChildren(ResponseWriter writer, FacesContext facesContext, UIComponent component)
throws IOException {
@@ -180,17 +229,10 @@
writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg", null);
encodeCaption(writer, facesContext, dataGrid);
- encodeHeader(writer, facesContext, dataGrid);
- encodeFooter(writer, facesContext, dataGrid);
+ encodeHeader(writer, facesContext, dataGrid, false);
+ encodeFooter(writer, facesContext, dataGrid, false);
+ encodeTBody(writer, facesContext, dataGrid, false);
- writer.startElement(HTML.TBODY_ELEMENT, dataGrid);
- writer.writeAttribute(HTML.CLASS_ATTRIBUTE, "rf-dg", null);
- if(dataGrid.getRowCount() > 0) {
- processRows(writer, facesContext, dataGrid, null);
- } else {
- encodeNoData(writer, facesContext, dataGrid);
- }
- writer.endElement(HTML.TBODY_ELEMENT);
writer.endElement(HTML.TABLE_ELEMENT);
}
@@ -203,4 +245,19 @@
protected Class<? extends UIComponent> getComponentClass() {
return UIDataGrid.class;
}
+
+ public void encodeMetaComponent(FacesContext context, UIComponent component, String metaComponentId)
+ throws IOException {
+ UIDataGrid table = (UIDataGrid) component;
+
+ if (UIDataTableBase.HEADER.equals(metaComponentId)) {
+ encodeHeader(context.getResponseWriter(), context, table, true);
+ } else if (UIDataTableBase.FOOTER.equals(metaComponentId)) {
+ encodeFooter(context.getResponseWriter(), context, table, true);
+ } else if(UIDataTableBase.BODY.equals(metaComponentId)) {
+ encodeTBody(context.getResponseWriter(), context, table, true);
+ } else {
+ throw new IllegalArgumentException("Unsupported metaComponentIdentifier: " + metaComponentId);
+ }
+ }
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/tables.taglib.xml
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/tables.taglib.xml 2010-07-12 16:51:04 UTC (rev 17969)
+++ root/ui/iteration/trunk/tables/ui/src/main/resources/META-INF/tables.taglib.xml 2010-07-12 17:17:45 UTC (rev 17970)
@@ -51,6 +51,7 @@
<component>
<component-type>org.richfaces.DataGrid</component-type>
<renderer-type>org.richfaces.DataGridRenderer</renderer-type>
+ <handler-class>org.richfaces.taglib.DataGridHandler</handler-class>
</component>
</tag>
14 years, 6 months
JBoss Rich Faces SVN: r17969 - root/ui-sandbox/panels/trunk/ui.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-12 12:51:04 -0400 (Mon, 12 Jul 2010)
New Revision: 17969
Removed:
root/ui-sandbox/panels/trunk/ui/checkstyle-suppressions.xml
root/ui-sandbox/panels/trunk/ui/src/
Log:
Moved ui-sandbox/panels/ui module
Deleted: root/ui-sandbox/panels/trunk/ui/checkstyle-suppressions.xml
===================================================================
--- root/ui-sandbox/panels/trunk/ui/checkstyle-suppressions.xml 2010-07-12 16:50:31 UTC (rev 17968)
+++ root/ui-sandbox/panels/trunk/ui/checkstyle-suppressions.xml 2010-07-12 16:51:04 UTC (rev 17969)
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE suppressions PUBLIC
- "-//Puppy Crawl//DTD Suppressions 1.0//EN"
- "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-
-<suppressions>
- <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
-</suppressions>
14 years, 6 months
JBoss Rich Faces SVN: r17968 - root/ui/output/trunk/panels/ui.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-12 12:50:31 -0400 (Mon, 12 Jul 2010)
New Revision: 17968
Added:
root/ui/output/trunk/panels/ui/checkstyle-suppressions.xml
root/ui/output/trunk/panels/ui/src/
Modified:
root/ui/output/trunk/panels/ui/pom.xml
Log:
Moved ui-sandbox/panels/ui module
Copied: root/ui/output/trunk/panels/ui/checkstyle-suppressions.xml (from rev 17965, root/ui-sandbox/panels/trunk/ui/checkstyle-suppressions.xml)
===================================================================
--- root/ui/output/trunk/panels/ui/checkstyle-suppressions.xml (rev 0)
+++ root/ui/output/trunk/panels/ui/checkstyle-suppressions.xml 2010-07-12 16:50:31 UTC (rev 17968)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+ <suppress checks="IllegalCatch" files="AbstractTogglePanel.java" />
+</suppressions>
Modified: root/ui/output/trunk/panels/ui/pom.xml
===================================================================
--- root/ui/output/trunk/panels/ui/pom.xml 2010-07-12 16:46:54 UTC (rev 17967)
+++ root/ui/output/trunk/panels/ui/pom.xml 2010-07-12 16:50:31 UTC (rev 17968)
@@ -55,6 +55,11 @@
<artifactId>richfaces-core-impl</artifactId>
</dependency>
<dependency>
+ <!-- todo remove this dependency -->
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-ui</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>annotations</artifactId>
<scope>provided</scope>
Copied: root/ui/output/trunk/panels/ui/src (from rev 17965, root/ui-sandbox/panels/trunk/ui/src)
14 years, 6 months
JBoss Rich Faces SVN: r17966 - in root/ui: dist/trunk and 19 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-12 12:45:30 -0400 (Mon, 12 Jul 2010)
New Revision: 17966
Added:
root/ui/output/
root/ui/output/branches/
root/ui/output/tags/
root/ui/output/trunk/
root/ui/output/trunk/bom/
root/ui/output/trunk/bom/pom.xml
root/ui/output/trunk/dist/
root/ui/output/trunk/dist/pom.xml
root/ui/output/trunk/dist/richfaces-ui-output-api/
root/ui/output/trunk/dist/richfaces-ui-output-api/pom.xml
root/ui/output/trunk/dist/richfaces-ui-output-ui/
root/ui/output/trunk/dist/richfaces-ui-output-ui/pom.xml
root/ui/output/trunk/lgpl.txt
root/ui/output/trunk/panels/
root/ui/output/trunk/panels/api/
root/ui/output/trunk/panels/api/pom.xml
root/ui/output/trunk/panels/api/src/
root/ui/output/trunk/panels/api/src/main/
root/ui/output/trunk/panels/api/src/main/java/
root/ui/output/trunk/panels/api/src/main/java/org/
root/ui/output/trunk/panels/api/src/test/
root/ui/output/trunk/panels/api/src/test/java/
root/ui/output/trunk/panels/pom.xml
root/ui/output/trunk/panels/ui/
root/ui/output/trunk/panels/ui/pom.xml
root/ui/output/trunk/panels/ui/src/
root/ui/output/trunk/panels/ui/src/main/
root/ui/output/trunk/panels/ui/src/main/java/
root/ui/output/trunk/panels/ui/src/main/resources/
root/ui/output/trunk/panels/ui/src/main/templates/
root/ui/output/trunk/panels/ui/src/test/
root/ui/output/trunk/parent/
root/ui/output/trunk/parent/pom.xml
root/ui/output/trunk/pom.xml
root/ui/output/trunk/readme.txt
Modified:
root/ui/dist/trunk/bom/pom.xml
root/ui/dist/trunk/pom.xml
root/ui/dist/trunk/richfaces-components-api/pom.xml
root/ui/dist/trunk/richfaces-components-ui/pom.xml
Log:
Placeholder for ui/output module check-in
Modified: root/ui/dist/trunk/bom/pom.xml
===================================================================
--- root/ui/dist/trunk/bom/pom.xml 2010-07-12 16:23:51 UTC (rev 17965)
+++ root/ui/dist/trunk/bom/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -43,6 +43,7 @@
<org.richfaces.ui.core.version>4.0.0-SNAPSHOT</org.richfaces.ui.core.version>
<org.richfaces.ui.misc.version>4.0.0-SNAPSHOT</org.richfaces.ui.misc.version>
<org.richfaces.ui.iteration.version>4.0.0-SNAPSHOT</org.richfaces.ui.iteration.version>
+ <org.richfaces.ui.output.version>4.0.0-SNAPSHOT</org.richfaces.ui.output.version>
</properties>
<!-- Runtime dependency management -->
@@ -83,6 +84,13 @@
<scope>import</scope>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-bom</artifactId>
+ <version>${org.richfaces.ui.output.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
Modified: root/ui/dist/trunk/pom.xml
===================================================================
--- root/ui/dist/trunk/pom.xml 2010-07-12 16:23:51 UTC (rev 17965)
+++ root/ui/dist/trunk/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -82,6 +82,7 @@
<module>../../core/trunk</module>
<module>../../misc/trunk/dist</module>
<module>../../iteration/trunk/dist</module>
+ <module>../../output/trunk/dist</module>
</modules>
</profile>
</profiles>
Modified: root/ui/dist/trunk/richfaces-components-api/pom.xml
===================================================================
--- root/ui/dist/trunk/richfaces-components-api/pom.xml 2010-07-12 16:23:51 UTC (rev 17965)
+++ root/ui/dist/trunk/richfaces-components-api/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -44,6 +44,10 @@
<groupId>org.richfaces.ui.iteration</groupId>
<artifactId>richfaces-ui-iteration-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-api</artifactId>
+ </dependency>
<!-- for javadoc generation -->
<dependency>
@@ -144,7 +148,7 @@
<configuration>
<classifier>sources</classifier>
- <includeGroupIds>org.richfaces.ui.iteration</includeGroupIds>
+ <includeGroupIds>org.richfaces.ui.iteration, org.richfaces.ui.output</includeGroupIds>
<useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
<excludeTransitive>true</excludeTransitive>
</configuration>
Modified: root/ui/dist/trunk/richfaces-components-ui/pom.xml
===================================================================
--- root/ui/dist/trunk/richfaces-components-ui/pom.xml 2010-07-12 16:23:51 UTC (rev 17965)
+++ root/ui/dist/trunk/richfaces-components-ui/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -53,6 +53,10 @@
<groupId>org.richfaces.ui.iteration</groupId>
<artifactId>richfaces-ui-iteration-ui</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-ui</artifactId>
+ </dependency>
<!-- for javadoc generation -->
<dependency>
@@ -175,7 +179,7 @@
<configuration>
<classifier>sources</classifier>
- <includeGroupIds>${assembly.projects.group}.core, ${assembly.projects.group}.misc, ${assembly.projects.group}.iteration</includeGroupIds>
+ <includeGroupIds>${assembly.projects.group}.core, ${assembly.projects.group}.misc, ${assembly.projects.group}.iteration, ${assembly.projects.group}.output</includeGroupIds>
<useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
<excludeTransitive>true</excludeTransitive>
</configuration>
Added: root/ui/output/trunk/bom/pom.xml
===================================================================
--- root/ui/output/trunk/bom/pom.xml (rev 0)
+++ root/ui/output/trunk/bom/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-bom</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Richfaces UI Components: Output BOM</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <org.richfaces.core.version>4.0.0-SNAPSHOT</org.richfaces.core.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-bom</artifactId>
+ <version>${org.richfaces.core.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/bom</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/bom</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+</project>
Added: root/ui/output/trunk/dist/pom.xml
===================================================================
--- root/ui/output/trunk/dist/pom.xml (rev 0)
+++ root/ui/output/trunk/dist/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-assembler</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Richfaces UI Output Assembler</name>
+
+ <modules>
+ <!-- aggregate modules -->
+ <module>richfaces-ui-output-api</module>
+ <module>richfaces-ui-output-ui</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <!-- We need to disable the cdk plugin for the dist modules -->
+ <!-- <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <inherited>false</inherited>
+ </plugin>
+ -->
+ </plugins>
+ </build>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/dist</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/dist</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+</project>
Added: root/ui/output/trunk/dist/richfaces-ui-output-api/pom.xml
===================================================================
--- root/ui/output/trunk/dist/richfaces-ui-output-api/pom.xml (rev 0)
+++ root/ui/output/trunk/dist/richfaces-ui-output-api/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-assembler</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-api</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Richfaces UI Output API</name>
+
+ <properties>
+ <assembly.projects.group>org.richfaces.ui.output</assembly.projects.group>
+ <faces-shade-transformers.version>2</faces-shade-transformers.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-bom</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <!-- artifacts for aggregation -->
+ <dependency>
+ <groupId>${assembly.projects.group}</groupId>
+ <artifactId>panels-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- artifacts for javadoc generation -->
+ <dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.3.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>${assembly.projects.group}:*-api:*</include>
+ </includes>
+ </artifactSet>
+ <createSourcesJar>true</createSourcesJar>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.build.resources</groupId>
+ <artifactId>faces-shade-transformers</artifactId>
+ <version>${faces-shade-transformers.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- unpack necessary dependencies for collecting javadocs -->
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deps</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+
+ <includeGroupIds>${assembly.projects.group}</includeGroupIds>
+ <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <sourcepath>${basedir}/target/dependency</sourcepath>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/dis...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/dist/r...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+</project>
\ No newline at end of file
Added: root/ui/output/trunk/dist/richfaces-ui-output-ui/pom.xml
===================================================================
--- root/ui/output/trunk/dist/richfaces-ui-output-ui/pom.xml (rev 0)
+++ root/ui/output/trunk/dist/richfaces-ui-output-ui/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-assembler</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-ui</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Richfaces UI Output UI</name>
+
+ <properties>
+ <assembly.projects.group>org.richfaces.ui.output</assembly.projects.group>
+ <faces-shade-transformers.version>2</faces-shade-transformers.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-bom</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>richfaces-ui-output-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- artifacts for aggregation -->
+ <dependency>
+ <groupId>${assembly.projects.group}</groupId>
+ <artifactId>panels-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- artifacts for javadoc generation -->
+ <dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+ <dependency>
+ <!-- necessary for javadocs generation -->
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.3.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <artifactSet>
+ <includes>
+ <include>${assembly.projects.group}:*-ui:*</include>
+ </includes>
+ </artifactSet>
+ <createSourcesJar>true</createSourcesJar>
+ <transformers>
+ <transformer implementation="org.richfaces.build.shade.resource.TaglibXmlResourceTransformer">
+ <taglibs>
+ <taglib>
+ <targetNamespace>http://richfaces.org/output</targetNamespace>
+ <sourceNamespacesPattern>.*</sourceNamespacesPattern>
+ </taglib>
+ </taglibs>
+ </transformer>
+ <transformer implementation="org.richfaces.build.shade.resource.FacesConfigXmlResourceTransformer" />
+ </transformers>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.build.resources</groupId>
+ <artifactId>faces-shade-transformers</artifactId>
+ <version>${faces-shade-transformers.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- unpack necessary dependencies for collecting jsdoc and javadocs -->
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>deps</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+
+ <includeGroupIds>${assembly.projects.group}</includeGroupIds>
+ <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+<!-- <plugin>
+ <!– collecting jsdoc –>
+ <groupId>gr.abiss.mvn.plugins</groupId>
+ <artifactId>maven-jstools-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jsdoc</id>
+ <phase>prepare-package</phase>
+ <configuration>
+ <outputBaseDirectory>${basedir}/target</outputBaseDirectory>
+ <jsDir>${basedir}/target/dependency</jsDir>
+ <includes>**/*.js</includes>
+ <caseSensitive>true</caseSensitive>
+ </configuration>
+ <goals>
+ <goal>jsdoc</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!– pack jsdoc to jar –>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>pack-jsodcs</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <classesDirectory>${basedir}/target/jsdoc</classesDirectory>
+ <classifier>jsdoc</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>-->
+ <plugin>
+ <!-- collecting javadoc -->
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
+ <executions>
+ <execution>
+ <id>javadoc-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <sourcepath>${basedir}/target/dependency</sourcepath>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/dis...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/dist/r...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+</project>
\ No newline at end of file
Added: root/ui/output/trunk/lgpl.txt
===================================================================
--- root/ui/output/trunk/lgpl.txt (rev 0)
+++ root/ui/output/trunk/lgpl.txt 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
Added: root/ui/output/trunk/panels/api/pom.xml
===================================================================
--- root/ui/output/trunk/panels/api/pom.xml (rev 0)
+++ root/ui/output/trunk/panels/api/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>panels-aggregator</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>panels-api</artifactId>
+ <name>Richfaces UI Components: Panels API</name>
+ <packaging>jar</packaging>
+
+ <dependencies>
+ <!-- runtime -->
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+
+ <!-- JSF with dependencies -->
+ <dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- tests -->
+ <dependency>
+ <groupId>${jsf2.impl.groupid}</groupId>
+ <artifactId>${jsf2.impl.artifactid}</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <!-- todo api? -->
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-test-stage</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/pan...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/panels...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+
+</project>
\ No newline at end of file
Added: root/ui/output/trunk/panels/pom.xml
===================================================================
--- root/ui/output/trunk/panels/pom.xml (rev 0)
+++ root/ui/output/trunk/panels/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>panels-aggregator</artifactId>
+ <packaging>pom</packaging>
+ <name>Richfaces UI Components: Panels Aggregator</name>
+
+ <modules>
+ <module>api</module>
+ <module>ui</module>
+ </modules>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/panels</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/panels</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+</project>
\ No newline at end of file
Added: root/ui/output/trunk/panels/ui/pom.xml
===================================================================
--- root/ui/output/trunk/panels/ui/pom.xml (rev 0)
+++ root/ui/output/trunk/panels/ui/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>panels-aggregator</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>panels-ui</artifactId>
+ <name>Richfaces UI Components: Panels UI</name>
+ <packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- runtime -->
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <!-- todo remove this dependency or move to test scope -->
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>panels-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- JSF with dependencies -->
+ <dependency>
+ <groupId>${jsf2.api.groupid}</groupId>
+ <artifactId>${jsf2.api.artifactid}</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- tests -->
+ <dependency>
+ <groupId>${jsf2.impl.groupid}</groupId>
+ <artifactId>${jsf2.impl.artifactid}</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <!-- todo api? -->
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-test-stage</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>htmlunit-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/pan...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/panels/ui</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+
+</project>
\ No newline at end of file
Added: root/ui/output/trunk/parent/pom.xml
===================================================================
--- root/ui/output/trunk/parent/pom.xml (rev 0)
+++ root/ui/output/trunk/parent/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Richfaces UI Components: Output Parent</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <richfaces.checkstyle.version>1</richfaces.checkstyle.version>
+ <org.richfaces.cdk.version>4.0.0-SNAPSHOT</org.richfaces.cdk.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-bom</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <version>${org.richfaces.cdk.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>${org.richfaces.cdk.version}</version>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <uri>http://richfaces.org/output</uri>
+ <shortName>it</shortName>
+ <displayName>Output components tags</displayName>
+ </taglib>
+ </library>
+ </configuration>
+ <executions>
+ <execution>
+ <id>cdk-generate-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-build-checkstyle</artifactId>
+ <version>${richfaces.checkstyle.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ <configuration>
+ <fail>false</fail>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <javadocVersion>1.5</javadocVersion>
+ <aggregate>true</aggregate>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-javadoc</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk/parent</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk/parent</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+</project>
Added: root/ui/output/trunk/pom.xml
===================================================================
--- root/ui/output/trunk/pom.xml (rev 0)
+++ root/ui/output/trunk/pom.xml 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <groupId>org.richfaces.ui.output</groupId>
+ <artifactId>richfaces-ui-output-aggregator</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Richfaces UI Components: Output Aggregator</name>
+
+ <modules>
+ <module>bom</module>
+ <module>parent</module>
+ <module>panels</module>
+ <module>dist</module>
+ </modules>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <!--
+ The dist requires clean install for prepare
+ -->
+ <preparationGoals>clean install</preparationGoals>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <!--
+ The dist requires clean install for prepare
+ -->
+ <preparationGoals>clean install</preparationGoals>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/ui/output/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/output/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces</url>
+ </scm>
+</project>
\ No newline at end of file
Added: root/ui/output/trunk/readme.txt
===================================================================
--- root/ui/output/trunk/readme.txt (rev 0)
+++ root/ui/output/trunk/readme.txt 2010-07-12 16:45:30 UTC (rev 17966)
@@ -0,0 +1,3 @@
+This module contains of next components:
+
+panels
\ No newline at end of file
14 years, 6 months
JBoss Rich Faces SVN: r17965 - in root: commons/branches and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-12 12:23:51 -0400 (Mon, 12 Jul 2010)
New Revision: 17965
Removed:
root/cdk/branches/RF8755/
root/commons/branches/RF8755/
Modified:
root/ui/iteration/trunk/lists/
root/ui/iteration/trunk/lists/api/
root/ui/iteration/trunk/lists/ui/
Log:
remove working branches
Property changes on: root/ui/iteration/trunk/lists
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.project
.classpath
.clover
Property changes on: root/ui/iteration/trunk/lists/api
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.project
.classpath
.clover
Property changes on: root/ui/iteration/trunk/lists/ui
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.project
.classpath
.clover
14 years, 6 months
JBoss Rich Faces SVN: r17964 - in root/core/trunk/impl/src/main/java/org/richfaces: application and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-12 11:57:37 -0400 (Mon, 12 Jul 2010)
New Revision: 17964
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java
root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java
Log:
https://jira.jboss.org/browse/RF-8201
Modified: root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java 2010-07-12 15:37:03 UTC (rev 17963)
+++ root/core/trunk/impl/src/main/java/org/richfaces/VersionBean.java 2010-07-12 15:57:37 UTC (rev 17964)
@@ -189,7 +189,11 @@
@Override
public String toString() {
- return getVersion();
+ if (this.containsDataFromManifest()) {
+ return getImplementationTitle() + " by " + getImplementationVendor() + ", version " + getVersion();
+ } else {
+ return getVersion();
+ }
}
}
@@ -217,11 +221,7 @@
@Override
public String toString() {
- if (VERSION.containsDataFromManifest()) {
- return getTitle() + " by " + getVendor() + ", version " + VERSION.toString();
- } else {
- return VERSION.toString();
- }
+ return VERSION.toString();
}
}
Modified: root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-07-12 15:37:03 UTC (rev 17963)
+++ root/core/trunk/impl/src/main/java/org/richfaces/application/InitializationListener.java 2010-07-12 15:57:37 UTC (rev 17964)
@@ -31,11 +31,14 @@
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
-import org.richfaces.jsr330.Module;
+import org.richfaces.VersionBean;
import org.richfaces.jsr330.DependencyException;
import org.richfaces.jsr330.InjectorImpl;
+import org.richfaces.jsr330.Module;
import org.richfaces.jsr330.ServiceException;
import org.richfaces.jsr330.ServiceLoader;
+import org.richfaces.log.RichfacesLogger;
+import org.slf4j.Logger;
/**
* @author Nick Belaevski
@@ -43,6 +46,7 @@
*/
public class InitializationListener implements SystemEventListener {
+ private static final Logger LOGGER = RichfacesLogger.APPLICATION.getLogger();
/* (non-Javadoc)
* @see javax.faces.event.SystemEventListener#isListenerForSource(java.lang.Object)
@@ -54,6 +58,13 @@
protected void onStart() {
DependencyInjector injector = createInjector();
ServiceTracker.setInjector(injector);
+
+ if (LOGGER.isInfoEnabled()) {
+ String versionString = VersionBean.VERSION.toString();
+ if (versionString != null && versionString.length() != 0) {
+ LOGGER.info(versionString);
+ }
+ }
}
protected DependencyInjector createInjector() {
14 years, 6 months
JBoss Rich Faces SVN: r17963 - root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-07-12 11:37:03 -0400 (Mon, 12 Jul 2010)
New Revision: 17963
Modified:
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
Log:
fix th rendering in the tfoot elements
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-07-12 15:22:08 UTC (rev 17962)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-07-12 15:37:03 UTC (rev 17963)
@@ -137,6 +137,7 @@
setupTableStartElement(context, dataTable);
encodeHeaderFacet(writer, context, dataTable, false);
+ setupTableStartElement(context, dataTable, HTML.TD_ELEM);
encodeFooterFacet(writer, context, dataTable, false);
dataTable.setRowKey(context, key);
dataTable.restoreOrigValue(context);
@@ -569,19 +570,25 @@
public abstract String getNoDataClass();
protected abstract void setupTableStartElement(FacesContext context, UIComponent component);
+
+ protected void setupTableStartElement(FacesContext context, UIComponent component, String elementName) {
+ put(context, component.getClientId(context) + CELL_ELEMENT_KEY, elementName);
+ }
public void encodeMetaComponent(FacesContext context, UIComponent component, String metaComponentId)
throws IOException {
UIDataTableBase table = (UIDataTableBase) component;
- setupTableStartElement(context, component);
if (UIDataTableBase.HEADER.equals(metaComponentId)) {
+ setupTableStartElement(context, component);
encodeHeaderFacet(context.getResponseWriter(), context, table, true);
} else if (UIDataTableBase.FOOTER.equals(metaComponentId)) {
+ setupTableStartElement(context, component, HTML.TD_ELEM);
encodeFooterFacet(context.getResponseWriter(), context, table, true);
} else if(UIDataTableBase.BODY.equals(metaComponentId)) {
+ setupTableStartElement(context, component, HTML.TD_ELEM);
encodeTableRows(context.getResponseWriter(), context, table, true);
} else {
throw new IllegalArgumentException("Unsupported metaComponentIdentifier: " + metaComponentId);
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-07-12 15:22:08 UTC (rev 17962)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2010-07-12 15:37:03 UTC (rev 17963)
@@ -379,9 +379,9 @@
}
protected void setupTableStartElement(FacesContext context, UIComponent component) {
- put(context, component.getClientId(context) + CELL_ELEMENT_KEY, HTML.TH_ELEM);
+ setupTableStartElement(context, component, HTML.TH_ELEM);
}
-
+
public EncodeStrategy getHiddenContainerStrategy(UIDataTableBase dataTableBase) {
return new DataTableHiddenEncodeStrategy();
}
Modified: root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java
===================================================================
--- root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-07-12 15:22:08 UTC (rev 17962)
+++ root/ui/iteration/trunk/tables/ui/src/main/java/org/richfaces/renderkit/SubTableRenderer.java 2010-07-12 15:37:03 UTC (rev 17963)
@@ -383,9 +383,9 @@
}
protected void setupTableStartElement(FacesContext context, UIComponent component) {
- put(context, component.getClientId(context) + CELL_ELEMENT_KEY, HTML.TD_ELEM);
+ setupTableStartElement(context, component, HTML.TD_ELEM);
}
-
+
protected UIDataTableBase findParent(UISubTable subTable) {
UIComponent parent = subTable.getParent();
14 years, 6 months