You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/08/30 23:20:04 UTC
svn commit: r438628 - in /myfaces/tomahawk/trunk/sandbox/core/src/main:
java/org/apache/myfaces/custom/dojolayouts/ resources-facesconfig/META-INF/
tld/
Author: werpu
Date: Wed Aug 30 14:20:03 2006
New Revision: 438628
URL: http://svn.apache.org/viewvc?rev=438628&view=rev
Log:
dojo split pane added to the sandbox
Added:
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.java
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.xml_
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneRenderer.java
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneTag.java
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.java
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.xml_
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneRenderer.java
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneTag.java
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml
myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.java?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.java Wed Aug 30 14:20:03 2006
@@ -0,0 +1,81 @@
+package org.apache.myfaces.custom.dojolayouts;
+
+import javax.faces.component.UIOutput;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+import org.apache.myfaces.custom.div.Div;
+
+public class DojoContentPane extends UIOutput {
+
+ public static final String DEFAULT_COMPONENT_TYPE = "org.apache.myfaces.DojoContentPane";
+
+ public static final String DEFAULT_COMPONENT_FAMILY = "javax.faces.Output";
+
+ public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.DojoContentPaneRenderer";
+
+ private Integer _sizeShare = null;
+
+ private String _style = null;
+
+ private String _styleClass = null;
+
+ public DojoContentPane() {
+ super();
+ setRendererType(DEFAULT_RENDERER_TYPE);
+ }
+
+ public String getFamily() {
+ return DEFAULT_COMPONENT_FAMILY;
+ }
+
+ public void setSizeShare(Integer sizeShare) {
+ _sizeShare = sizeShare;
+ }
+
+ public void setStyle(String style) {
+ _style = style;
+ }
+
+ public void setSTyleClass(String styleClass) {
+ _styleClass = styleClass;
+ }
+
+ public Integer getSizeShare() {
+ if (_sizeShare != null)
+ return _sizeShare;
+ ValueBinding vb = getValueBinding("sizeShare");
+ return vb != null ? (Integer) vb.getValue(getFacesContext()) : null;
+ }
+
+ public String getStyle() {
+ if (_style != null)
+ return _style;
+ ValueBinding vb = getValueBinding("style");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public String getStyleClass() {
+ if (_style != null)
+ return _styleClass;
+ ValueBinding vb = getValueBinding("styleClass");
+ return vb != null ? (String) vb.getValue(getFacesContext()) : null;
+ }
+
+ public Object saveState(FacesContext context) {
+ Object values[] = new Object[4];
+ values[0] = super.saveState(context);
+ values[1] = _sizeShare;
+ values[2] = _style;
+ values[3] = _styleClass;
+ return ((Object) (values));
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+ _sizeShare = (Integer) values[1];
+ _style = (String) values[2];
+ _styleClass = (String) values[3];
+ }
+}
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.xml_
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.xml_?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.xml_ (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPane.xml_ Wed Aug 30 14:20:03 2006
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE component PUBLIC
+ "-//MyFaces//DTD MyFaces component def 1.0//EN"
+ "http://myfaces.apache.org/dtd/Component.dtd">
+<component>
+ <component-class>org.apache.myfaces.custom.dojolayouts.DojoContentPane</component-class>
+ <base-class>javax.faces.component.UIOutput</base-class>
+ <component-type>org.apache.myfaces.DojoContentPane</component-type>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>org.apache.myfaces.DojoContentPaneRenderer</renderer-type>
+ <field>
+ <name>sizeShare</name>
+ <type>Integer</type>
+ </field>
+</component>
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneRenderer.java?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneRenderer.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneRenderer.java Wed Aug 30 14:20:03 2006
@@ -0,0 +1,97 @@
+package org.apache.myfaces.custom.dojolayouts;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.apache.commons.collections.map.HashedMap;
+import org.apache.myfaces.custom.dojo.DojoConfig;
+import org.apache.myfaces.custom.dojo.DojoUtils;
+import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
+import org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils;
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRenderer;
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils;
+
+public class DojoContentPaneRenderer extends HtmlRenderer {
+
+ public void decode(FacesContext context, UIComponent component) {
+ super.decode(context, component);
+
+ }
+
+
+ protected void encodeJavascriptBegin(FacesContext context, UIComponent component) throws IOException {
+ String javascriptLocation = (String) component.getAttributes().get(JSFAttr.JAVASCRIPT_LOCATION);
+ try {
+ if (javascriptLocation != null) {
+ DojoUtils.addMainInclude(context, component, javascriptLocation, new DojoConfig());
+ } else {
+ DojoUtils.addMainInclude(context, component, null, new DojoConfig());
+ }
+ }
+
+ catch (IOException e) {
+ e.printStackTrace();
+ }
+ DojoUtils.addRequire(context, component, "dojo.widget.ContentPane");
+ }
+
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+ if ((context == null) || (component == null)) {
+ throw new NullPointerException();
+ }
+
+ Boolean rendered = (Boolean) component.getAttributes().get("rendered");
+
+ if ((rendered != null) && (!rendered.booleanValue()))
+ return;
+ encodeJavascriptBegin(context, component);
+
+ super.encodeBegin(context, component);
+
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.DIV_ELEM, component);
+ HtmlRendererUtils.writeIdIfNecessary(writer, component, context);
+
+ DojoContentPane pane = (DojoContentPane) component;
+
+ String styleClass = pane.getStyleClass();
+ String style = pane.getStyle();
+ if (null != styleClass) {
+ writer.writeAttribute(HTML.CLASS_ATTR, styleClass, null);
+ }
+ if (null != style) {
+ writer.writeAttribute(HTML.STYLE_ATTR, style, null);
+ }
+
+ }
+
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+// RendererUtils.renderChildren(context, component);
+// HtmlRendererUtils.writePrettyLineSeparator(context);
+ super.encodeChildren(context, component);
+ }
+
+ public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
+ super.encodeEnd(context, component);
+ ResponseWriter writer = context.getResponseWriter();
+ writer.endElement(HTML.DIV_ELEM);
+ encodeJavascriptEnd(context, component);
+ }
+
+ protected void encodeJavascriptEnd(FacesContext context, UIComponent component) throws IOException {
+ DojoContentPane pane = (DojoContentPane) component;
+ Map attributes = new HashedMap();
+ attributes.put("sizeShare", pane.getSizeShare());
+ DojoUtils.renderWidgetInitializationCode(context, component, "ContentPane", attributes);
+ }
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+}
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneTag.java?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneTag.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoContentPaneTag.java Wed Aug 30 14:20:03 2006
@@ -0,0 +1,57 @@
+package org.apache.myfaces.custom.dojolayouts;
+
+import javax.faces.component.UIComponent;
+
+import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlOutputTextTagBase;
+
+public class DojoContentPaneTag extends HtmlOutputTextTagBase {
+
+ private static final String TAG_PARAM_STYLE_CLASS = "styleClass";
+
+ private static final String TAG_PARAM_STYLE = "style";
+
+ public static String TAG_PARAM_SIZESHARE = "sizeShare";
+
+ private String _sizeShare = null;
+ private String _style = null;
+ private String _styleClass = null;
+
+ protected void setProperties(UIComponent component) {
+ super.setProperties(component);
+ super.setIntegerProperty(component, TAG_PARAM_SIZESHARE, _sizeShare);
+ super.setStringProperty(component, TAG_PARAM_STYLE, _style);
+ super.setStringProperty(component, TAG_PARAM_STYLE_CLASS, _styleClass);
+ }
+
+
+
+ public void release() {
+ super.release();
+ _style = null;
+ _styleClass = null;
+ _sizeShare = null;
+ }
+
+
+
+ public void setSizeShare(String sizeShare) {
+ this._sizeShare = sizeShare;
+ }
+
+ public String getRendererType() {
+ return DojoContentPane.DEFAULT_RENDERER_TYPE;
+ }
+
+ public String getComponentType() {
+ return DojoContentPane.DEFAULT_COMPONENT_TYPE;
+ }
+
+ public void setStyle(String style) {
+ this._style = style;
+ }
+
+ public void setStyleClass(String styleClass) {
+ this._styleClass = styleClass;
+ }
+
+}
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.java?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.java Wed Aug 30 14:20:03 2006
@@ -0,0 +1,85 @@
+package org.apache.myfaces.custom.dojolayouts;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+public class DojoSplitPane extends DojoContentPane {
+ //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
+
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.DojoSplitPane";
+ public static final String COMPONENT_FAMILY = "javax.faces.Output";
+ public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.DojoSplitPaneRenderer";
+
+ private String _splitOrientation = null;
+ private Integer _sizerWidth = null;
+ private Integer _activeSizing = null;
+
+ public DojoSplitPane()
+ {
+ super();
+ setRendererType(DEFAULT_RENDERER_TYPE);
+ }
+
+ public String getFamily()
+ {
+ return COMPONENT_FAMILY;
+ }
+
+ public void setSplitOrientationation(String orientation)
+ {
+ _splitOrientation = orientation;
+ }
+
+ public String getSplitOrientationation()
+ {
+ if (_splitOrientation != null) return _splitOrientation;
+ ValueBinding vb = getValueBinding("orientation");
+ return vb != null ? (String)vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setSizerWidth(Integer sizerWidth)
+ {
+ _sizerWidth = sizerWidth;
+ }
+
+ public Integer getSizerWidth()
+ {
+ if (_sizerWidth != null) return _sizerWidth;
+ ValueBinding vb = getValueBinding("sizerWidth");
+ return vb != null ? (Integer)vb.getValue(getFacesContext()) : null;
+ }
+
+ public void setActiveSizing(Integer activeSizing)
+ {
+ _activeSizing = activeSizing;
+ }
+
+ public Integer getActiveSizing()
+ {
+ if (_activeSizing != null) return _activeSizing;
+ ValueBinding vb = getValueBinding("activeSizing");
+ return vb != null ? (Integer)vb.getValue(getFacesContext()) : null;
+ }
+
+
+
+ public Object saveState(FacesContext context)
+ {
+ Object values[] = new Object[4];
+ values[0] = super.saveState(context);
+ values[1] = _splitOrientation;
+ values[2] = _sizerWidth;
+ values[3] = _activeSizing;
+ return ((Object) (values));
+ }
+
+ public void restoreState(FacesContext context, Object state)
+ {
+ Object values[] = (Object[])state;
+ super.restoreState(context, values[0]);
+ _splitOrientation = (String)values[1];
+ _sizerWidth = (Integer)values[2];
+ _activeSizing = (Integer)values[3];
+ }
+ //------------------ GENERATED CODE END ---------------------------------------
+}
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.xml_
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.xml_?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.xml_ (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPane.xml_ Wed Aug 30 14:20:03 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE component PUBLIC
+ "-//MyFaces//DTD MyFaces component def 1.0//EN"
+ "http://myfaces.apache.org/dtd/Component.dtd">
+<component>
+ <component-class>org.apache.myfaces.custom.dojolayouts.DojoSplitPane</component-class>
+ <base-class>org.apache.myfaces.custom.dojolayouts.DojoContentPane</base-class>
+ <component-type>org.apache.myfaces.DojoSplitPane</component-type>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>org.apache.myfaces.DojoSplitPaneRenderer</renderer-type>
+ <field>
+ <name>orientation</name>
+ <type>String</type>
+ </field>
+ <field>
+ <name>sizerWidth</name>
+ <type>Integer</type>
+ </field>
+ <field>
+ <name>activeSizing</name>
+ <type>Integer</type>
+ </field>
+</component>
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneRenderer.java?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneRenderer.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneRenderer.java Wed Aug 30 14:20:03 2006
@@ -0,0 +1,100 @@
+package org.apache.myfaces.custom.dojolayouts;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.collections.map.HashedMap;
+import org.apache.myfaces.custom.dojo.DojoUtils;
+import org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils;
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils;
+
+public class DojoSplitPaneRenderer extends DojoContentPaneRenderer {
+ protected void encodeJavascriptBegin(FacesContext context, UIComponent component) throws IOException {
+ super.encodeJavascriptBegin(context, component);
+ DojoUtils.addRequire(context, component, "dojo.widget.SplitContainer");
+ }
+
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+ if ((context == null) || (component == null)) {
+ throw new NullPointerException();
+ }
+
+ Boolean rendered = (Boolean) component.getAttributes().get("rendered");
+
+ if ((rendered != null) && (!rendered.booleanValue()))
+ return;
+
+ super.encodeBegin(context, component);
+ }
+
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+ RendererUtils.renderChildren(context, component);
+ HtmlRendererUtils.writePrettyLineSeparator(context);
+ Stack stack = getChildsStack(context, component);
+ List children = component.getChildren();
+
+ for (Iterator cit = children.iterator(); cit.hasNext();) {
+ UIComponent child = (UIComponent) cit.next();
+ if (!child.isRendered())
+ continue;
+ if (child instanceof DojoContentPane) {
+ stack.push(DojoUtils.calculateWidgetVarName(child.getClientId(context)));
+ }
+ }
+ }
+
+ private Stack getChildsStack(FacesContext context, UIComponent component) {
+ Stack menuStack = (Stack) ((HttpServletRequest) context.getExternalContext().getRequest()).getAttribute(component.getClientId(context)
+ + DojoSplitPaneRenderer.class.toString());
+ if (menuStack != null)
+ return menuStack;
+
+ menuStack = new Stack();
+ ((HttpServletRequest) context.getExternalContext().getRequest()).setAttribute(component.getClientId(context) + DojoSplitPaneRenderer.class.toString(),
+ menuStack);
+ return menuStack;
+ }
+
+ public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
+ super.encodeEnd(context, component);
+ }
+
+ protected void encodeJavascriptEnd(FacesContext context, UIComponent component) throws IOException {
+ // called by super.encodeEnd
+ DojoSplitPane pane = (DojoSplitPane) component;
+ Map attributes = new HashedMap();
+
+ attributes.put("sizeShare", pane.getSizeShare());
+ attributes.put("activeSizing", pane.getActiveSizing());
+ attributes.put("orientation", pane.getSplitOrientationation());
+ attributes.put("sizerWidth", pane.getSizerWidth());
+
+ DojoUtils.renderWidgetInitializationCode(context, component, "SplitContainer", attributes);
+ ResponseWriter writer = context.getResponseWriter();
+ writer.startElement(HTML.SCRIPT_ELEM, component);
+ writer.writeAttribute(HTML.TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
+
+ Stack stack = this.getChildsStack(context, component);
+ String panelComponentVar = DojoUtils.calculateWidgetVarName(component.getClientId(context));
+ while (!stack.isEmpty()) {
+ String javascriptVar = (String) stack.pop();
+ writer.write(panelComponentVar + ".addChild(" + javascriptVar + ");\n");
+ }
+ ;
+ writer.endElement(HTML.SCRIPT_ELEM);
+ }
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+}
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneTag.java?rev=438628&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneTag.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojolayouts/DojoSplitPaneTag.java Wed Aug 30 14:20:03 2006
@@ -0,0 +1,53 @@
+package org.apache.myfaces.custom.dojolayouts;
+
+import javax.faces.component.UIComponent;
+
+public class DojoSplitPaneTag extends DojoContentPaneTag {
+
+ private static final String TAG_PARAM_ORIENTATION = "orientation";
+
+ private static final String TAG_PARAM_SIZERWIDTH = "sizerwidth";
+
+ private static final String TAG_PARAM_ACTIVESIZING = "activesizing";
+
+ private String _orientation = null;
+
+ private String _sizerWidth = null;
+
+ private String _activeSizing = null;
+
+ public void setActiveSizing(String activeSizing) {
+ this._activeSizing = activeSizing;
+ }
+
+ public void setOrientation(String orientation) {
+ this._orientation = orientation;
+ }
+
+ public void setSizerWidth(String sizerWidth) {
+ this._sizerWidth = sizerWidth;
+ }
+
+ public String getComponentType() {
+ return DojoSplitPane.COMPONENT_TYPE;
+ }
+ public String getRendererType() {
+ return DojoSplitPane.DEFAULT_RENDERER_TYPE;
+ }
+
+
+ protected void setProperties(UIComponent component) {
+
+ super.setProperties(component);
+ super.setIntegerProperty(component, TAG_PARAM_ACTIVESIZING, _activeSizing);
+ super.setIntegerProperty(component, TAG_PARAM_ORIENTATION, _orientation);
+ super.setIntegerProperty(component, TAG_PARAM_SIZERWIDTH, _sizerWidth);
+ }
+
+ public void release() {
+ super.release();
+ _activeSizing = null;
+ _orientation = null;
+ _sizerWidth = null;
+ }
+}
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml?rev=438628&r1=438627&r2=438628&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml Wed Aug 30 14:20:03 2006
@@ -195,6 +195,16 @@
<component-class>org.apache.myfaces.custom.ppr.PPRPanelGroup</component-class>
</component>
+ <component>
+ <component-type>org.apache.myfaces.DojoContentPane</component-type>
+ <component-class>org.apache.myfaces.custom.dojolayouts.DojoContentPane</component-class>
+ </component>
+
+ <component>
+ <component-type>org.apache.myfaces.DojoSplitPane</component-type>
+ <component-class>org.apache.myfaces.custom.dojolayouts.DojoSplitPane</component-class>
+ </component>
+
<!-- sandbox converters -->
<converter>
@@ -403,6 +413,20 @@
<renderer-type>org.apache.myfaces.PPRPanelGroup</renderer-type>
<renderer-class>org.apache.myfaces.custom.ppr.PPRPanelGroupRenderer</renderer-class>
</renderer>
+
+ <renderer>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>org.apache.myfaces.DojoContentPaneRenderer</renderer-type>
+ <renderer-class>org.apache.myfaces.custom.dojolayouts.DojoContentPaneRenderer</renderer-class>
+ </renderer>
+
+ <renderer>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>org.apache.myfaces.DojoSplitPaneRenderer</renderer-type>
+ <renderer-class>org.apache.myfaces.custom.dojolayouts.DojoSplitPaneRenderer</renderer-class>
+ </renderer>
+
+
<!-- <renderer>
<component-family>javax.faces.Messages</component-family>
<renderer-type>org.apache.myfaces.MessagesSandbox</renderer-type>
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld?rev=438628&r1=438627&r2=438628&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld Wed Aug 30 14:20:03 2006
@@ -1204,6 +1204,84 @@
</attribute>
</tag>
+ <tag>
+ <name>dojoContentPane</name>
+ <tag-class>org.apache.myfaces.custom.dojolayouts.DojoContentPaneTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>PanelGroup which supports a partialTriggers Attribute similar to the one in Trinidad</description>
+ &ui_output_attributes;
+ <attribute>
+ <name>sizeShare</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.Integer</type>
+ <description>Size share value describing the place the content pane wants from its parent</description>
+ </attribute>
+ <attribute>
+ <name>styleClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
+ </attribute>
+ <attribute>
+ <name>style</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
+ </attribute>
+
+ </tag>
+ <tag>
+ <name>dojoSplitPane</name>
+ <tag-class>org.apache.myfaces.custom.dojolayouts.DojoSplitPaneTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>PanelGroup which supports a partialTriggers Attribute similar to the one in Trinidad</description>
+ &ui_output_attributes;
+ <attribute>
+ <name>styleClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
+ </attribute>
+ <attribute>
+ <name>style</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description>
+ </attribute>
+
+ <attribute>
+ <name>sizeShare</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.Integer</type>
+ <description>Size share value describing the place the content pane wants from its parent</description>
+ </attribute>
+ <attribute>
+ <name>activeSizing</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.Integer</type>
+ <description>Size share value describing the place the content pane wants from its parent</description>
+ </attribute>
+ <attribute>
+ <name>sizerWidth</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.Integer</type>
+ <description>width of the sizer bar</description>
+ </attribute>
+ <attribute>
+ <name>splitOrientation</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>horizontal or vertical</description>
+ </attribute>
+ </tag>
+
+
+
<!-- Validator for csv validation items -->
<tag>
<name>validateCSV</name>
@@ -1213,4 +1291,6 @@
&ext_validator_base_attributes;
&csvvalidator_attributes;
</tag>
+
+
</taglib>