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 10:45:02 UTC

svn commit: r292677 - in /myfaces/tomahawk/trunk: src/java/org/apache/myfaces/custom/fileupload/ src/java/org/apache/myfaces/custom/navmenu/jscookmenu/ tld/

Author: mmarinschek
Date: Fri Sep 30 01:44:56 2005
New Revision: 292677

URL: http://svn.apache.org/viewcvs?rev=292677&view=rev
Log:
fixed component/renderer type in file-upload. refactored data table attributes out of the tld for autoUpdateDataTable

Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUploadTag.java
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuRenderer.java
    myfaces/tomahawk/trunk/tld/tomahawk.tld

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java?rev=292677&r1=292676&r2=292677&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUpload.java Fri Sep 30 01:44:56 2005
@@ -31,7 +31,7 @@
         implements UserRoleAware
 {
     public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlInputFileUpload";
-    private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.FileUpload";
+    public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.FileUpload";
 
     private String _accept = null;
     private String _enabledOnUserRole = null;

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUploadTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUploadTag.java?rev=292677&r1=292676&r2=292677&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUploadTag.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/fileupload/HtmlInputFileUploadTag.java Fri Sep 30 01:44:56 2005
@@ -37,7 +37,7 @@
 
     public String getRendererType()
     {
-        return "org.apache.myfaces.FileUpload";
+        return HtmlInputFileUpload.DEFAULT_RENDERER_TYPE;
     }
 
     // UIComponent attributes --> already implemented in UIComponentTagBase

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuRenderer.java?rev=292677&r1=292676&r2=292677&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuRenderer.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuRenderer.java Fri Sep 30 01:44:56 2005
@@ -179,11 +179,6 @@
             if (item.isSplit())
             {
                 writer.append("_cmSplit,");
-                
-                if (item.getLabel().equals("0")) 
-                {
-                    continue;
-                }
             }
 
             writer.append("[");
@@ -255,18 +250,18 @@
         if (tempObj == null) {
             return;
         }
-        
+
         writer.append(";");
         writer.append(vbExpression);
         writer.append("=");
         writer.append(tempObj.toString());
     }
-    
+
     public void encodeEnd(FacesContext context, UIComponent component) throws IOException
     {
         RendererUtils.checkParamValidity(context, component, HtmlCommandJSCookMenu.class);
         HtmlCommandJSCookMenu menu = (HtmlCommandJSCookMenu)component;
-        
+
         String theme = menu.getTheme();
 
         addResourcesToHeader(theme,menu,context);
@@ -304,8 +299,16 @@
         String imageLocation = (String) menu.getAttributes().get(JSFAttr.IMAGE_LOCATION);
         String styleLocation = (String) menu.getAttributes().get(JSFAttr.STYLE_LOCATION);
 
-        AddResource.addJavaScriptToHeader(HtmlJSCookMenuRenderer.class, javascriptLocation, "JSCookMenu.js", false, context);
-        AddResource.addJavaScriptToHeader(HtmlJSCookMenuRenderer.class, javascriptLocation, "MyFacesHack.js", false, context);
+        if(javascriptLocation != null)
+        {
+            AddResource.addJavaScriptToHeader(javascriptLocation, "JSCookMenu.js", context);
+            AddResource.addJavaScriptToHeader(javascriptLocation, "MyFacesHack.js", context);
+        }
+        else
+        {
+            AddResource.addJavaScriptToHeader(HtmlJSCookMenuRenderer.class, "JSCookMenu.js", context);
+            AddResource.addJavaScriptToHeader(HtmlJSCookMenuRenderer.class, "MyFacesHack.js", context);
+        }
 
         addThemeSpecificResources(themeName, styleLocation, javascriptLocation, imageLocation, context);
     }

Modified: myfaces/tomahawk/trunk/tld/tomahawk.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tld/tomahawk.tld?rev=292677&r1=292676&r2=292677&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tld/tomahawk.tld (original)
+++ myfaces/tomahawk/trunk/tld/tomahawk.tld Fri Sep 30 01:44:56 2005
@@ -56,6 +56,7 @@
 <!ENTITY standard_command_button_attributes  SYSTEM "entities/standard_command_button_attributes.xml">
 <!ENTITY standard_command_link_attributes    SYSTEM "entities/standard_command_link_attributes.xml">
 <!ENTITY standard_data_table_attributes      SYSTEM "entities/standard_data_table_attributes.xml">
+<!ENTITY extended_data_table_attributes      SYSTEM "entities/extended_data_table_attributes.xml">
 <!ENTITY standard_input_text_attributes      SYSTEM "entities/standard_input_text_attributes.xml">
 <!ENTITY standard_input_textarea_attributes  SYSTEM "entities/standard_input_textarea_attributes.xml">
 <!ENTITY standard_message_attributes         SYSTEM "entities/standard_message_attributes.xml">
@@ -123,202 +124,10 @@
             sortColumn, sortAscending and preserveSort.
         </description>
         &standard_data_table_attributes;
+        &extended_data_table_attributes;
         <!-- MyFaces extensions -->
         &ext_forceId_attribute;
         &user_role_attributes;
-        <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>forceIdIndexFormula</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-				A formula that overrides the defaut row index in the construction of table's
-				body components.
-				Example : #{myRowVar.key}
-				Warning, the EL should evaluate to a unique value for each row !
-            </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>rowOnClick</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript onclick event handler for each table row
-            </description>
-        </attribute>
-        <attribute>
-            <name>rowOnDblClick</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript ondblclick event handler for each table row
-            </description>
-        </attribute>
-        <attribute>
-            <name>rowOnMouseDown</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript onmpusedown event handler for each table row
-            </description>
-        </attribute>
-        <attribute>
-            <name>rowOnMouseUp</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript onmouseup event handler for each table 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>rowOnMouseMove</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript onmousemove 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>rowOnKeyPress</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript onkeypress event handler for each table row
-            </description>
-        </attribute>
-        <attribute>
-            <name>rowOnKeyDown</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript onkeydown event handler for each table row
-            </description>
-        </attribute>
-        <attribute>
-            <name>rowOnKeyUp</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                Defines a JavaScript onkeyup event handler for each table row
-            </description>
-        </attribute>
-        <attribute>
-            <name>rowId</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>
-                The id to use for &lt;tr> elements that are generated by the table.
-            </description>
-        </attribute>        
-        <attribute>
-            <name>rowStyleClass</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>Corresponds to the HTML class attribute for the row tr tag.</description>
-        </attribute>
-        <attribute>
-            <name>rowStyle</name>
-            <required>false</required>
-            <rtexprvalue>false</rtexprvalue>
-            <description>Corresponds to the HTML style attribute for the row tr tag.</description>
-        </attribute>
      </tag>
 
     <!-- inputHidden -->