You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/09/30 11:04:31 UTC
svn commit: r292683 - in /myfaces/sandbox/trunk:
src/java/org/apache/myfaces/custom/accordion/
src/java/org/apache/myfaces/custom/autoupdatedatatable/
src/java/org/apache/myfaces/custom/inputsuggestajax/ tld/
Author: mmarinschek
Date: Fri Sep 30 02:04:23 2005
New Revision: 292683
URL: http://svn.apache.org/viewcvs?rev=292683&view=rev
Log:
fixed renderer&component type statements for autoupdatedatatable and inputsuggestajax, made sure extendedDataTable and autoUpdateDataTable use the same parameters, further work on HtmlAccordionPanel
Added:
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelTag.java
Modified:
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTable.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTableTag.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjax.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java
myfaces/sandbox/trunk/tld/myfaces_sandbox.tld
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java?rev=292683&r1=292682&r2=292683&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanel.java Fri Sep 30 02:04:23 2005
@@ -17,6 +17,10 @@
import org.apache.myfaces.component.html.ext.HtmlPanelGroup;
+import javax.faces.el.ValueBinding;
+import javax.faces.el.MethodBinding;
+import javax.faces.context.FacesContext;
+
/**
* @author Martin Marinschek
* @version $Revision: $ $Date: $
@@ -24,4 +28,47 @@
*/
public class HtmlAccordionPanel extends HtmlPanelGroup
{
+ public static String ACCORDION_LAYOUT = "accordion";
+ public static String TOGGLING_LAYOUT = "toggling";
+
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlAccordionPanel";
+ public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.AccordionPanel";
+
+ private String _layout;
+
+ public Object saveState(FacesContext context)
+ {
+ Object[] values = new Object[2];
+ values[0] = super.saveState(context);
+ values[1] = _layout;
+
+ return values;
+ }
+
+ public void restoreState(FacesContext context, Object state)
+ {
+ Object values[] = (Object[])state;
+ super.restoreState(context, values[0]);
+ _layout = (String) values[1];
+ }
+
+ public HtmlAccordionPanel()
+ {
+ super();
+
+ setRendererType(DEFAULT_RENDERER_TYPE);
+ }
+
+ public String getLayout()
+ {
+ if (_layout != null)
+ return _layout;
+ ValueBinding vb = getValueBinding("layout");
+ return vb != null ? vb.getValue(getFacesContext()).toString() : ACCORDION_LAYOUT;
+ }
+
+ public void setLayout(String layout)
+ {
+ _layout = layout;
+ }
}
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java?rev=292683&r1=292682&r2=292683&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java Fri Sep 30 02:04:23 2005
@@ -15,16 +15,25 @@
*/
package org.apache.myfaces.custom.accordion;
-import org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer;
-import org.apache.myfaces.renderkit.JSFAttr;
import org.apache.myfaces.component.html.util.AddResource;
+import org.apache.myfaces.custom.div.Div;
+import org.apache.myfaces.renderkit.JSFAttr;
+import org.apache.myfaces.renderkit.RendererUtils;
+import org.apache.myfaces.renderkit.html.HTML;
+import org.apache.myfaces.renderkit.html.HtmlRendererUtils;
+import org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer;
-import javax.faces.context.FacesContext;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
import java.io.IOException;
+import java.util.Iterator;
/**
* @author Martin Marinschek
+ *
+ *
+ *
* @version $Revision: $ $Date: $
* <p/>
*/
@@ -34,45 +43,91 @@
public void encodeBegin(FacesContext context, UIComponent component) throws IOException
{
+ encodeJavascript(context, component);
+
super.encodeBegin(context, component);
}
public void encodeChildren(FacesContext context, UIComponent component) throws IOException
{
- super.encodeChildren(context, component);
}
public void encodeEnd(FacesContext context, UIComponent component) throws IOException
{
- super.encodeEnd(context, component);
+ RendererUtils.checkParamValidity(context, component, HtmlAccordionPanel.class);
+
+ HtmlAccordionPanel panel = (HtmlAccordionPanel) component;
+
+ ResponseWriter writer = context.getResponseWriter();
+
+ writer.startElement(HTML.DIV_ELEM, component);
+ writer.writeAttribute(HTML.ID_ATTR,component.getClientId(context),JSFAttr.ID_ATTR);
+ HtmlRendererUtils.renderHTMLAttributes(writer, component, HTML.COMMON_PASSTROUGH_ATTRIBUTES);
+
+ if (component.getChildCount() > 0)
+ {
+ for (Iterator it = component.getChildren().iterator(); it.hasNext(); )
+ {
+ UIComponent child = (UIComponent)it.next();
+
+ if(child instanceof Div)
+ {
+ RendererUtils.renderChild(context, child);
+ }
+ else
+ {
+ writer.startElement(HTML.DIV_ELEM, child);
+ writer.writeAttribute(HTML.ID_ATTR,child.getClientId(context)+"_DIV",JSFAttr.ID_ATTR);
+ RendererUtils.renderChild(context, child);
+ writer.endElement(HTML.DIV_ELEM);
+ }
+ }
+ }
+
+ writer.endElement(HTML.DIV_ELEM);
+
+ writer.startElement(HTML.SCRIPT_ELEM, component);
+ writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
+
+ if(panel.getLayout().equals(HtmlAccordionPanel.ACCORDION_LAYOUT))
+ {
+ writer.writeText("new Rico.Accordion('"+component.getClientId(context)+"');",null);
+ }
+ else if(panel.getLayout().equals(HtmlAccordionPanel.TOGGLING_LAYOUT))
+ {
+ writer.writeText("new Rico.Toggler('"+component.getClientId(context)+"');",null);
+ }
+ else
+ throw new IllegalStateException("nothing known about layout : "+panel.getLayout());
+
+ writer.endElement(HTML.SCRIPT_ELEM);
}
/**
- * Encodes any stand-alone javascript functions that are needed. Uses either the extension filter, or a
+ * Encodes any stand-alone javascript functions that are needed.
+ * Uses either the extension filter, or a
* user-supplied location for the javascript files.
*
* @param context FacesContext
* @param component UIComponent
- * @throws java.io.IOException
*/
- private void encodeJavascript(FacesContext context, UIComponent component) throws IOException
- {
- // check to see if javascript has already been written
- // (which could happen if more than one AccordionPanel on the same page)
- if (context.getExternalContext().getRequestMap().containsKey(JAVASCRIPT_ENCODED))
- {
- return;
- }
+ private void encodeJavascript(FacesContext context, UIComponent component)
+ {
+ // check to see if javascript has already been written
+ // (which could happen if more than one AccordionPanel on the same page)
+ if (context.getExternalContext().getRequestMap().containsKey(JAVASCRIPT_ENCODED))
+ {
+ return;
+ }
+
+ String javascriptLocation = (String)component.getAttributes().get(JSFAttr.JAVASCRIPT_LOCATION);
+
+ AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "prototype.js", false, context);
+ AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "rico.js", false, context);
+ AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "toggler.js", false, context);
+ AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "controls.js", false, context);
+ AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "myFaces.js", false, context);
- String javascriptLocation = (String)component.getAttributes().get(JSFAttr.JAVASCRIPT_LOCATION);
- String styleLocation = (String)component.getAttributes().get(JSFAttr.STYLE_LOCATION);
-
- AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "prototype.js", false, context);
- AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "rico.js", false, context);
- AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "toggler.js", false, context);
- AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "controls.js", false, context);
- AddResource.addJavaScriptToHeader(HtmlAccordionPanelRenderer.class, javascriptLocation, "myFaces.js", false, context);
-
- context.getExternalContext().getRequestMap().put(JAVASCRIPT_ENCODED, Boolean.TRUE);
- }
+ context.getExternalContext().getRequestMap().put(JAVASCRIPT_ENCODED, Boolean.TRUE);
+ }
}
Added: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelTag.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelTag.java?rev=292683&view=auto
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelTag.java (added)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelTag.java Fri Sep 30 02:04:23 2005
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.custom.accordion;
+
+import org.apache.myfaces.taglib.html.HtmlPanelGroupTag;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * @author Martin Marinschek
+ *
+ *
+ *
+ * @version $Revision: $ $Date: $
+ * <p/>
+ */
+public class HtmlAccordionPanelTag extends HtmlPanelGroupTag
+{
+ private String _layout;
+
+ public String getComponentType()
+ {
+ return HtmlAccordionPanel.COMPONENT_TYPE;
+ }
+
+ public String getRendererType()
+ {
+ return HtmlAccordionPanel.DEFAULT_RENDERER_TYPE;
+ }
+
+ public void release()
+ {
+
+ super.release();
+
+ _layout = null;
+
+ }
+
+ protected void setProperties(UIComponent component)
+ {
+
+ super.setProperties(component);
+
+ setStringProperty(component,"layout",_layout);
+ }
+
+ public void setLayout(String layout)
+ {
+ _layout = layout;
+ }
+
+}
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTable.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTable.java?rev=292683&r1=292682&r2=292683&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTable.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTable.java Fri Sep 30 02:04:23 2005
@@ -32,7 +32,16 @@
*/
public class AutoUpdateDataTable extends HtmlDataTable implements AjaxComponent{
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.AutoUpdateDataTable";
+ public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.AutoUpdateDataTable";
+
private String _frequency;
+
+ public AutoUpdateDataTable()
+ {
+ super();
+ setRendererType(DEFAULT_RENDERER_TYPE);
+ }
/**
* @param context FacesContext
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTableTag.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTableTag.java?rev=292683&r1=292682&r2=292683&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTableTag.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/autoupdatedatatable/AutoUpdateDataTableTag.java Fri Sep 30 02:04:23 2005
@@ -30,32 +30,26 @@
private String _frequency;
- /**
- * @return the _frequency String
- */
- public String getFrequency() {
- return _frequency;
- }
/**
- * @param _frequency String
+ * @param frequency String
*/
- public void setFrequency(String _frequency) {
- this._frequency = _frequency;
+ public void setFrequency(String frequency) {
+ _frequency = frequency;
}
/**
* @return the ComponentType String
*/
public String getComponentType() {
- return "org.apache.myfaces.AutoUpdateDataTable";
+ return AutoUpdateDataTable.COMPONENT_TYPE;
}
/**
* @return the RendererType String
*/
public String getRendererType() {
- return "org.apache.myfaces.AutoUpdateDataTable";
+ return AutoUpdateDataTable.DEFAULT_RENDERER_TYPE;
}
public void release() {
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjax.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjax.java?rev=292683&r1=292682&r2=292683&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjax.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjax.java Fri Sep 30 02:04:23 2005
@@ -34,6 +34,9 @@
public class InputSuggestAjax extends HtmlInputText implements AjaxComponent
{
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.InputSuggestAjax";
+ public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.InputSuggestAjax";
+
private MethodBinding _suggestedItemsMethod;
private String _popupId;
@@ -50,6 +53,13 @@
private String _layout;
private Integer _maxSuggestedItems;
+
+ public InputSuggestAjax()
+ {
+ super();
+
+ setRendererType(DEFAULT_RENDERER_TYPE);
+ }
public Object saveState(FacesContext context)
{
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java?rev=292683&r1=292682&r2=292683&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java Fri Sep 30 02:04:23 2005
@@ -52,11 +52,11 @@
private String _layout;
public String getComponentType() {
- return "org.apache.myfaces.InputSuggestAjax";
+ return InputSuggestAjax.COMPONENT_TYPE;
}
public String getRendererType() {
- return "org.apache.myfaces.InputSuggestAjax";
+ return InputSuggestAjax.DEFAULT_RENDERER_TYPE;
}
public void release() {
Modified: myfaces/sandbox/trunk/tld/myfaces_sandbox.tld
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/tld/myfaces_sandbox.tld?rev=292683&r1=292682&r2=292683&view=diff
==============================================================================
--- myfaces/sandbox/trunk/tld/myfaces_sandbox.tld (original)
+++ myfaces/sandbox/trunk/tld/myfaces_sandbox.tld Fri Sep 30 02:04:23 2005
@@ -36,7 +36,7 @@
<!ENTITY html_button_attributes SYSTEM "entities-share/html_button_attributes.xml">
<!ENTITY html_event_handler_attributes SYSTEM "entities-share/html_event_handler_attributes.xml">
<!ENTITY html_form_attributes SYSTEM "entities-share/html_form_attributes.xml">
-<!ENTITY html_img_attributes SYSTEM "entities-share/html_img_attributes.xml">
+<!ENTITY html_img_attributes SYSTEM "entities-share/html_img_attributes.xml">
<!ENTITY spec_img_attributes SYSTEM "entities-share/spec_img_attributes.xml">
<!ENTITY html_input_attributes SYSTEM "entities-share/html_input_attributes.xml">
<!ENTITY html_input_help_attributes SYSTEM "entities-share/html_input_help_attributes.xml">
@@ -67,6 +67,7 @@
<!ENTITY standard_command_button_attributes SYSTEM "entities-share/standard_command_button_attributes.xml">
<!ENTITY standard_command_link_attributes SYSTEM "entities-share/standard_command_link_attributes.xml">
<!ENTITY standard_data_table_attributes SYSTEM "entities-share/standard_data_table_attributes.xml">
+<!ENTITY extended_data_table_attributes SYSTEM "entities-share/extended_data_table_attributes.xml">
<!ENTITY standard_input_text_attributes SYSTEM "entities-share/standard_input_text_attributes.xml">
<!ENTITY standard_input_textarea_attributes SYSTEM "entities-share/standard_input_textarea_attributes.xml">
<!ENTITY standard_message_attributes SYSTEM "entities-share/standard_message_attributes.xml">
@@ -319,263 +320,13 @@
data_table action: see attribute descriptions for preserveDataModel,
sortColumn, sortAscending and preserveSort.
</description>
- <!-- all standard attributes of the dataTable tag -->
- <!-- UIPanel attributes -->
- <!-- UIComponent attributes -->
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>Every component may have an unique id. Automatically created if omitted.</description>
- </attribute>
- <attribute>
- <name>rendered</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>If false, this component will not be rendered.</description>
- </attribute>
- <attribute>
- <name>binding</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>Component binding.</description>
- </attribute>
-
- <!-- HTML 4.0 universal attributes -->
- <attribute><name>dir</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>lang</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>style</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>title</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Corresponds to the HTML class attribute.</description>
- </attribute>
-
- <!-- HTML 4.0 event-handler attributes -->
- <attribute><name>onclick</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>ondblclick</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onmousedown</name><required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onmouseup</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onmouseover</name><required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onmousemove</name><required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onmouseout</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onkeypress</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onkeydown</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>onkeyup</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
-
- <!-- HTML 4.0 table attributes -->
- <attribute><name>align</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>border</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>bgcolor</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>cellpadding</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>cellspacing</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>datafld</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>datasrc</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>dataformatas</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>frame</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>rules</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>summary</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
- <attribute><name>width</name> <required>false</required> <rtexprvalue>false</rtexprvalue></attribute>
-
- <!-- UIData attributes -->
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>Supported types see JSF Spec 4.1.3</description>
- </attribute>
- <attribute>
- <name>var</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <name>rows</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <name>first</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <!-- TableRenderer attributes -->
- <attribute>
- <name>columnClasses</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <name>footerClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <name>headerClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
- <attribute>
- <name>rowClasses</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- </attribute>
+ &standard_data_table_attributes;
<!-- MyFaces extensions -->
- <!--
- This attribute indicates that the component should be forced to use the specified id instead of
- using the one that faces generates. Components contained within a "list" will include a '[n]'
- suffix where 'n' is the row index (unless the forceIdIndex attribute is set to false).
- -->
- <attribute>
- <name>forceId</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>If true, this component will force the use of the specified id when rendering.</description>
- </attribute>
-
- <!--
- If the component is contained within an "list" (such as dataTable), this attribute indicates whether or not a
- '[n]' suffix should be added where 'n' is the row index. Default is true. The attribute is ignored if forceId
- is false (or not specified)
- -->
- <attribute>
- <name>forceIdIndex</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- If false, this component will not append a '[n]' suffix (where 'n' is the row index) to components
- that are contained within a "list." This value will be true by default and the value will be ignored if
- the value of forceId is false (or not specified.)
- </description>
- </attribute>
+ &extended_data_table_attributes;
+ &ext_forceId_attribute;
+ &user_role_attributes;
- <!-- MyFaces extension: user role attributes -->
- <attribute>
- <name>enabledOnUserRole</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- If user is in given role, this component will be rendered
- normally. If not, no hyperlink is rendered but all nested
- tags (=body) are rendered.
- </description>
- </attribute>
- <attribute>
- <name>visibleOnUserRole</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- If user is in given role, this component will be rendered
- normally. If not, nothing is rendered and the body of this tag
- will be skipped.
- </description>
- </attribute>
- <attribute>
- <name>preserveDataModel</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Indicates whether the state of the whole DataModel should be saved and
- restored.
- Default: false
- </description>
- </attribute>
- <attribute>
- <name>sortColumn</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Value reference to a model property that gives the current sort column name.
- </description>
- </attribute>
- <attribute>
- <name>sortAscending</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Value reference to a model property that gives the current sort direction.
- </description>
- </attribute>
- <attribute>
- <name>preserveSort</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Indicates whether the state of the sortColumn and sortAscending attribute
- should be saved and restored and written back to the model during the
- update model phase.
- Default: true
- </description>
- </attribute>
- <attribute>
- <name>renderedIfEmpty</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Indicates whether this table should be rendered if the underlying DataModel is
- empty.
- You could as well use rendered="#{not empty bean.list}", but this one causes
- the getList method of your model bean beeing called up to five times per
- request, which is not optimal when the list is backed by a DB table.
- Using renderedIfEmpty="false" solves this problem, because the MyFaces
- extended HtmlDataTable automatically caches the DataModel and calles the
- model getter only once per request.
- Default: true
- </description>
- </attribute>
- <attribute>
- <name>rowIndexVar</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- A parameter name, under which the current rowIndex is set in request scope
- similar to the var parameter.
- </description>
- </attribute>
- <attribute>
- <name>rowCountVar</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- A parameter name, under which the rowCount is set in request scope
- similar to the var parameter.
- </description>
- </attribute>
- <attribute>
- <name>previousRowDataVar</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- A parameter name, under which the previous RowData Object is set in request scope
- similar to the rowIndexVar and rowCountVar parameters.
- Mind that the value of this request scope attribute is null in the first row
- or when isRowAvailable returns false for the previous row.
- </description>
- </attribute>
- <attribute>
- <name>rowOnMouseOver</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Defines a JavaScript onmouseover event handler for each table row
- </description>
- </attribute>
- <attribute>
- <name>rowOnMouseOut</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- Defines a JavaScript onmouseout event handler for each table row
- </description>
- </attribute>
<attribute>
<name>frequency</name>
<required>false</required>
@@ -609,86 +360,86 @@
<description>Value representing a boolean false, e.g. FALSE, no, 0, etc.</description>
</attribute>
</tag>
-
- <!-- fieldset -->
- <tag>
- <name>fieldset</name>
- <tag-class>org.apache.myfaces.custom.fieldset.FieldsetTag</tag-class>
- <body-content>JSP</body-content>
- <description>Renders an HTML Fieldset</description>
- &ui_component_attributes;
- &ext_forceId_attribute;
- &user_role_attributes;
- <attribute>
- <name>style</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The style to use for this div.
- </description>
- </attribute>
- <attribute>
- <name>styleClass</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The class to use for this div.
- </description>
- </attribute>
- <attribute>
- <name>legend</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <description>
- The fieldset's legend.
- </description>
- </attribute>
+
+ <!-- fieldset -->
+ <tag>
+ <name>fieldset</name>
+ <tag-class>org.apache.myfaces.custom.fieldset.FieldsetTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>Renders an HTML Fieldset</description>
+ &ui_component_attributes;
+ &ext_forceId_attribute;
+ &user_role_attributes;
+ <attribute>
+ <name>style</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ The style to use for this div.
+ </description>
+ </attribute>
+ <attribute>
+ <name>styleClass</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ The class to use for this div.
+ </description>
+ </attribute>
+ <attribute>
+ <name>legend</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>
+ The fieldset's legend.
+ </description>
+ </attribute>
</tag>
-
- <!-- graphicImage -->
- <tag>
- <name>graphicImageDynamic</name>
- <tag-class>org.apache.myfaces.custom.graphicimagedynamic.GraphicImageDynamicTag</tag-class>
- <body-content>JSP</body-content>
- <description>
- Extends standard graphicImage.
- </description>
- &ui_component_attributes;
- &html_universal_attributes;
- &html_event_handler_attributes;
- &html_img_attributes;
- &spec_img_attributes;
- &user_role_attributes;
- &ext_forceId_attribute;
-
- <attribute>
- <name>initializationParameters</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- Optional URL fragment to initialize the backing bean.
- If you use this, the JSF tree won't be serialized in the URL, and so the URL will be MUCH smaller.
- This could solve some 414 errors with some containers and/or clients.
- </description>
- </attribute>
-
- <attribute>
- <name>getContentTypeMethod</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>Reference to the method which returns the image's content type as a String.</description>
- </attribute>
-
- <attribute>
- <name>getBytesMethod</name>
- <required>true</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>Reference to the method which returns the image's bytes as a byte[].</description>
- </attribute>
-
- </tag>
+
+ <!-- graphicImage -->
+ <tag>
+ <name>graphicImageDynamic</name>
+ <tag-class>org.apache.myfaces.custom.graphicimagedynamic.GraphicImageDynamicTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Extends standard graphicImage.
+ </description>
+ &ui_component_attributes;
+ &html_universal_attributes;
+ &html_event_handler_attributes;
+ &html_img_attributes;
+ &spec_img_attributes;
+ &user_role_attributes;
+ &ext_forceId_attribute;
+
+ <attribute>
+ <name>initializationParameters</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>
+ Optional URL fragment to initialize the backing bean.
+ If you use this, the JSF tree won't be serialized in the URL, and so the URL will be MUCH smaller.
+ This could solve some 414 errors with some containers and/or clients.
+ </description>
+ </attribute>
+
+ <attribute>
+ <name>getContentTypeMethod</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>Reference to the method which returns the image's content type as a String.</description>
+ </attribute>
+
+ <attribute>
+ <name>getBytesMethod</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>Reference to the method which returns the image's bytes as a byte[].</description>
+ </attribute>
+
+ </tag>
</taglib>