You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by aw...@apache.org on 2007/04/24 23:30:01 UTC

svn commit: r532135 - in /incubator/adffaces/trunk/trinidad: trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/ trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ trinidad-impl/src/mai...

Author: awiner
Date: Tue Apr 24 16:29:59 2007
New Revision: 532135

URL: http://svn.apache.org/viewvc?view=rev&rev=532135
Log:
Make ImportScript Faces-major

Added:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ImportScriptRenderer.java
Removed:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/ImportScriptRenderer.java
Modified:
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreImportScript.xml
    incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ImportScript.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties

Modified: incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreImportScript.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreImportScript.xml?view=diff&rev=532135&r1=532134&r2=532135
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreImportScript.xml (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/components/trinidad/core/CoreImportScript.xml Tue Apr 24 16:29:59 2007
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you 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.
-	   
--->
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+	   
+-->
 <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:tr="http://myfaces.apache.org/trinidad"
               xmlns:xi="http://www.w3.org/2001/XInclude"
@@ -37,7 +37,6 @@
       <property-name>names</property-name>
       <property-class>java.lang.String[]</property-class>
       <property-extension>
-        <mfp:alternate-class>java.lang.String</mfp:alternate-class>
         <mfp:property-metadata>
           <mfp:initial-value>{localName} {0}</mfp:initial-value>
           <mfp:preferred>true</mfp:preferred>
@@ -64,7 +63,6 @@
         <mfp:favorite-property>names</mfp:favorite-property>
         <mfp:group>${md:getTranslatedString("PALETTE_OTHER")}</mfp:group>
       </mfp:component-metadata>
-      <mfp:uix2-local-name>importScript</mfp:uix2-local-name>
       <mfp:unsupported-agents>pda phone voice</mfp:unsupported-agents>
     </component-extension>
   </component>

Modified: incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ImportScript.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ImportScript.xml?view=diff&rev=532135&r1=532134&r2=532135
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ImportScript.xml (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-build/src/main/resources/META-INF/maven-faces-plugin/renderers/trinidad/ImportScript.xml Tue Apr 24 16:29:59 2007
@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you 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.
-	   
--->
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+	   
+-->
 <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin">
   <render-kit>
@@ -25,7 +25,7 @@
     <renderer>
       <component-family>org.apache.myfaces.trinidad.ImportScript</component-family>
       <renderer-type>org.apache.myfaces.trinidad.ImportScript</renderer-type>
-      <renderer-class>org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase</renderer-class>
+      <renderer-class>org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ImportScriptRenderer</renderer-class>
       <renderer-extension>
         <mfp:component-type>org.apache.myfaces.trinidad.CoreImportScript</mfp:component-type>
         <mfp:unsupported-agents>pda phone voice</mfp:unsupported-agents>

Added: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ImportScriptRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ImportScriptRenderer.java?view=auto&rev=532135
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ImportScriptRenderer.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ImportScriptRenderer.java Tue Apr 24 16:29:59 2007
@@ -0,0 +1,76 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.trinidadinternal.renderkit.core.xhtml;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.bean.FacesBean;
+import org.apache.myfaces.trinidad.bean.PropertyKey;
+
+import org.apache.myfaces.trinidad.component.core.CoreImportScript;
+
+import org.apache.myfaces.trinidad.context.RenderingContext;
+
+/**
+ *
+ */
+public class ImportScriptRenderer extends XhtmlRenderer
+{
+  public ImportScriptRenderer()
+  {
+    super(CoreImportScript.TYPE);
+  }
+
+  @Override
+  protected void findTypeConstants(FacesBean.Type type)
+  {
+    _namesKey = type.findKey("names");
+  }
+
+  @Override
+  public boolean getRendersChildren()
+  {
+    return true;
+  }
+
+  @Override
+  protected void encodeAll(
+    FacesContext        context,
+    RenderingContext    rc,
+    UIComponent         component,
+    FacesBean           bean) throws IOException
+  {
+    Object names = bean.getProperty(_namesKey);
+    if (names instanceof Object[])
+    {
+      Object[] array = (Object[]) names;
+      for (Object name : array)
+        XhtmlUtils.addLib(context, rc, name);
+    }
+    else if (names != null)
+    {
+      XhtmlUtils.addLib(context, rc, names);
+    }
+  }
+
+  private PropertyKey _namesKey;
+}

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java?view=diff&rev=532135&r1=532134&r2=532135
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/UIConstants.java Tue Apr 24 16:29:59 2007
@@ -423,7 +423,6 @@
   public static final String ICON_NAME  = "icon";
   public static final String ICON_KEY_NAME  = "iconKey";
   public static final String IMAGE_NAME  = "image";
-  public static final String IMPORT_SCRIPT_NAME  = "importScript";
   public static final String INCLUDE_NAME = "include";
   public static final String INSERTED_NODE_LIST_NAME = "insertedNodeList";
   public static final String INLINE_DATE_PICKER_NAME = "inlineDatePicker";

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java?view=diff&rev=532135&r1=532134&r2=532135
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/PdaHtmlLookAndFeel.java Tue Apr 24 16:29:59 2007
@@ -146,7 +146,6 @@
   private static final String[] _UNSUPPORTED_NAMES =
   {
 //    APPLICATION_SWITCHER_NAME,
-    //IMPORT_SCRIPT_NAME,
     SIDE_NAV_NAME,
     //SUB_TAB_BAR_NAME,
     //TREE_NAME,                // Support?

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java?view=diff&rev=532135&r1=532134&r2=532135
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLookAndFeel.java Tue Apr 24 16:29:59 2007
@@ -107,7 +107,6 @@
     ICON_NAME,
     ICON_KEY_NAME,
     IMAGE_NAME,
-    IMPORT_SCRIPT_NAME,
     LINK_NAME,
     NAVIGATION_PATH_NAME,
     OPTION_NAME,

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties?view=diff&rev=532135&r1=532134&r2=532135
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/resources/META-INF/faces-bean.properties Tue Apr 24 16:29:59 2007
@@ -30,7 +30,6 @@
 org.apache.myfaces.trinidad.component.html.HtmlTableLayout=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.html.HtmlScript=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.input.CoreChooseColor=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
-org.apache.myfaces.trinidad.component.core.CoreImportScript=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.CoreSubform=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.output.CoreLegend=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean
 org.apache.myfaces.trinidad.component.core.layout.CorePanelPage=org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean