You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2006/08/01 19:44:01 UTC

svn commit: r427657 [13/42] - in /myfaces: core/trunk/api/src/main/java/javax/faces/component/ core/trunk/api/src/test/java/javax/faces/ core/trunk/api/src/test/java/javax/faces/application/ core/trunk/api/src/test/java/javax/faces/component/ core/trun...

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java Tue Aug  1 10:43:28 2006
@@ -1,359 +1,359 @@
-/*
- * Copyright 2004-2006 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.navmenu.htmlnavmenu;
-
-import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils;
-import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
-import org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils;
-import org.apache.myfaces.custom.navmenu.UINavigationMenuItem;
-import org.apache.myfaces.shared_tomahawk.el.SimpleActionMethodBinding;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIOutput;
-import javax.faces.component.UIViewRoot;
-import javax.faces.el.MethodBinding;
-import javax.faces.el.ValueBinding;
-import javax.faces.webapp.UIComponentTag;
-import javax.faces.event.ActionEvent;
-import java.util.List;
-import java.util.Iterator;
-import java.util.Map;
-import java.io.IOException;
-
-import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
-
-/**
- * @author Thomas Spiegl
- * @author Manfred Geiler
- */
-class HtmlNavigationMenuRendererUtils {
-    private static final Log log = LogFactory.getLog(HtmlNavigationMenuRendererUtils.class);
-
-    private static final Class[] ACTION_LISTENER_ARGS = {ActionEvent.class};
-
-    private HtmlNavigationMenuRendererUtils() {
-    }
-
-    public static void renderChildrenListLayout(FacesContext facesContext,
-                                                ResponseWriter writer,
-                                                HtmlPanelNavigationMenu panelNav,
-                                                List children,
-                                                int level) throws IOException {
-        for (Iterator it = children.iterator(); it.hasNext();) {
-            UIComponent child = (UIComponent) it.next();
-            if (!child.isRendered()) continue;
-
-            if (child instanceof UINavigationMenuItem) {
-                UINavigationMenuItem navItem = (UINavigationMenuItem) child;
-                renderChildrenListLayout(facesContext, writer, panelNav, child.getChildren(), level);
-            }
-            if (child instanceof HtmlCommandNavigationItem) {
-                //navigation item
-                HtmlRendererUtils.writePrettyLineSeparator(facesContext);
-
-                HtmlCommandNavigationItem navItem = (HtmlCommandNavigationItem) child;
-
-                String externalLink = navItem.getExternalLink();
-
-                String style = HtmlNavigationMenuRendererUtils.getNavigationItemStyle(panelNav, navItem);
-                String styleClass = HtmlNavigationMenuRendererUtils.getNavigationItemClass(panelNav, navItem);
-
-                writer.startElement(HTML.LI_ELEM, panelNav);
-                HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, style, styleClass);
-
-                Object value = navItem.getValue();
-                boolean renderAsOutputLink = externalLink != null && value != null;
-
-                if (!renderAsOutputLink) {
-                    //if there is an external link specified don't render the command nav item, its content
-                    //will be wrapped by a output link in the renderChildren() method
-                    if (externalLink == null) {
-                        navItem.setValue(null); // unset value, value must not be rendered
-                        navItem.encodeBegin(facesContext);
-                    }
-                    HtmlNavigationMenuRendererUtils.renderChildren(facesContext, navItem, panelNav);
-                    if (externalLink == null) {
-                        navItem.encodeEnd(facesContext);
-                        navItem.setValue(value); // restore value
-                    }
-                }
-                else {
-                    //there is an external link value and display value exists, so, just render its children
-                    renderChildren(facesContext, navItem, panelNav);
-                }
-
-                if (hasCommandNavigationItemChildren(navItem)) {
-                    writer.startElement(HTML.UL_ELEM, panelNav);
-
-                    if (panelNav.isRenderAll())
-                        HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, navItem.getStyle(), navItem.getStyleClass());
-
-                    HtmlRendererUtils.renderHTMLAttributes(writer, panelNav, HTML.UL_PASSTHROUGH_ATTRIBUTES);
-                    renderChildrenListLayout(facesContext, writer, panelNav, child.getChildren(), level + 1);
-                    writer.endElement(HTML.UL_ELEM);
-                }
-
-                writer.endElement(HTML.LI_ELEM);
-            }
-        }
-    }
-
-    private static boolean hasCommandNavigationItemChildren(HtmlCommandNavigationItem item) {
-        List children = item.getChildren();
-        for (int i = 0, sizei = children.size(); i < sizei; i++) {
-            if (children.get(i) instanceof HtmlCommandNavigationItem) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public static void renderChildrenTableLayout(FacesContext facesContext,
-                                                 ResponseWriter writer,
-                                                 HtmlPanelNavigationMenu panelNav,
-                                                 List children,
-                                                 int level) throws IOException {
-        for (Iterator it = children.iterator(); it.hasNext();) {
-            UIComponent child = (UIComponent) it.next();
-            if (!child.isRendered()) continue;
-            if (child instanceof HtmlCommandNavigationItem) {
-                //navigation item
-                HtmlRendererUtils.writePrettyLineSeparator(facesContext);
-
-                String style = getNavigationItemStyle(panelNav, (HtmlCommandNavigationItem) child);
-                String styleClass = getNavigationItemClass(panelNav, (HtmlCommandNavigationItem) child);
-
-                writer.startElement(HTML.TR_ELEM, panelNav);
-                writer.startElement(HTML.TD_ELEM, panelNav);
-                writeStyleAttributes(writer, style, styleClass);
-
-                if (style != null || styleClass != null) {
-                    writer.startElement(HTML.SPAN_ELEM, panelNav);
-                    writeStyleAttributes(writer, style, styleClass);
-                }
-                indent(writer, level);
-                child.encodeBegin(facesContext);
-
-                child.encodeEnd(facesContext);
-                if (style != null || styleClass != null) {
-                    writer.endElement(HTML.SPAN_ELEM);
-                }
-
-                writer.endElement(HTML.TD_ELEM);
-                writer.endElement(HTML.TR_ELEM);
-
-                if (child.getChildCount() > 0) {
-                    renderChildrenTableLayout(facesContext, writer, panelNav, child.getChildren(), level + 1);
-                }
-            }
-            else {
-                //separator
-                HtmlRendererUtils.writePrettyLineSeparator(facesContext);
-
-                String style = panelNav.getSeparatorStyle();
-                String styleClass = panelNav.getSeparatorClass();
-
-                writer.startElement(HTML.TR_ELEM, panelNav);
-                writer.startElement(HTML.TD_ELEM, panelNav);
-                writeStyleAttributes(writer, style, styleClass);
-
-                if (style != null || styleClass != null) {
-                    writer.startElement(HTML.SPAN_ELEM, panelNav);
-                    writeStyleAttributes(writer, style, styleClass);
-                }
-                indent(writer, level);
-                RendererUtils.renderChild(facesContext, child);
-                if (style != null || styleClass != null) {
-                    writer.endElement(HTML.SPAN_ELEM);
-                }
-
-                writer.endElement(HTML.TD_ELEM);
-                writer.endElement(HTML.TR_ELEM);
-            }
-        }
-    }
-
-    public static void indent(ResponseWriter writer, int level) throws IOException {
-        StringBuffer buf = new StringBuffer();
-        for (int i = 0; i < level; i++) {
-            buf.append("&#160;&#160;&#160;&#160;");
-        }
-        writer.write(buf.toString());
-    }
-
-    public static String getNavigationItemStyle(HtmlPanelNavigationMenu navPanel, HtmlCommandNavigationItem navItem) {
-        if (navItem.isActive()) {
-            return navPanel.getActiveItemStyle();
-        }
-        else if (navItem.isOpen()) {
-            return navPanel.getOpenItemStyle();
-        }
-        else {
-            return navPanel.getItemStyle();
-        }
-    }
-
-    public static String getNavigationItemClass(HtmlPanelNavigationMenu navPanel,
-                                                HtmlCommandNavigationItem navItem) {
-        // MYFACES-117, if a styleClass is supplied for a HtmlCommandNavigationItem,
-        // panelNavigation active/open/normal styles for items will be overriden                       
-        if (navItem.getStyleClass() != null) {
-            return navItem.getStyleClass();
-        }
-        if (navItem.isActive()) {
-            return navPanel.getActiveItemClass();
-        }
-        else if (navItem.isOpen()) {
-            return navPanel.getOpenItemClass();
-        }
-        else {
-            return navPanel.getItemClass();
-        }
-    }
-
-    public static void writeStyleAttributes(ResponseWriter writer,
-                                            String style,
-                                            String styleClass) throws IOException {
-        HtmlRendererUtils.renderHTMLAttribute(writer, HTML.STYLE_ATTR, HTML.STYLE_ATTR, style);
-        HtmlRendererUtils.renderHTMLAttribute(writer, HTML.STYLE_CLASS_ATTR, HTML.STYLE_CLASS_ATTR, styleClass);
-    }
-
-    public static UIComponent getPanel(UIComponent link) {
-        UIComponent navPanel = link.getParent();
-        while (navPanel != null && !(navPanel instanceof HtmlPanelNavigationMenu)) {
-            navPanel = navPanel.getParent();
-        }
-        if (navPanel == null) {
-            throw new IllegalStateException("HtmlCommandNavigationItem not nested in HtmlPanelNavigation!?");
-        }
-        return navPanel;
-    }
-
-    public static boolean isListLayout(HtmlPanelNavigationMenu panelNav) {
-        return !"Table".equalsIgnoreCase(panelNav.getLayout());
-    }
-
-    public static void renderChildren(FacesContext facesContext, HtmlCommandNavigationItem component, HtmlPanelNavigationMenu parentPanelNav) throws IOException {
-        if (component.getChildCount() > 0) {
-            //if there is an external link value, wrapp the content with an output link
-            if (component.getExternalLink() != null) {
-                ResponseWriter writer = facesContext.getResponseWriter();
-
-                writer.startElement(HTML.ANCHOR_ELEM, null);
-                writer.writeAttribute(HTML.HREF_ATTR, component.getExternalLink(), null);
-                if (component.getTarget() != null)
-                    writer.writeAttribute(HTML.TARGET_ATTR, component.getTarget(), null);
-
-                //the style attributes need to be taken from the parent panel nav, because the command panel navigation item
-                //is not rendered in this case which would have render them
-                String style = HtmlNavigationMenuRendererUtils.getNavigationItemStyle(parentPanelNav, component);
-                String styleClass = HtmlNavigationMenuRendererUtils.getNavigationItemClass(parentPanelNav, component);
-                HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, style, styleClass);
-            }
-
-            for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
-                UIComponent child = (UIComponent) it.next();
-                if (!(child instanceof HtmlCommandNavigationItem)) {
-                    RendererUtils.renderChild(facesContext, child);
-                }
-            }
-
-            //end wrapper output link
-            if (component.getExternalLink() != null) {
-                ResponseWriter writer = facesContext.getResponseWriter();
-                writer.endElement(HTML.ANCHOR_ELEM);
-            }
-        }
-    }
-
-    public static void debugTree(Log log, FacesContext facesContext, List children, int level) {
-        for (Iterator it = children.iterator(); it.hasNext();) {
-            UIComponent child = (UIComponent) it.next();
-            if (child instanceof UINavigationMenuItem) {
-                UINavigationMenuItem item = (UINavigationMenuItem) child;
-                StringBuffer buf = new StringBuffer();
-                for (int i = 0; i < level * 4; i++) buf.append(' ');
-                log.debug(buf.toString() + "--> " + item.getItemLabel() + " id:" + item.getClientId(facesContext));
-                debugTree(log, facesContext, child.getChildren(), level + 1);
-            }
-            else if (child instanceof HtmlCommandNavigationItem) {
-                HtmlCommandNavigationItem item = (HtmlCommandNavigationItem) child;
-                StringBuffer buf = new StringBuffer();
-                for (int i = 0; i < level * 4; i++) buf.append(' ');
-                String value;
-                if (item.getChildren().size() > 0 && item.getChildren().get(0) instanceof UIOutput) {
-                    UIOutput uiOutput = (UIOutput) item.getChildren().get(0);
-                    value = uiOutput.getValue() != null ? uiOutput.getValue().toString() : "?";
-                }
-                else {
-                    value = item.getValue() != null ? item.getValue().toString() : "";
-                }
-                log.debug(buf.toString() + value + " id:" + item.getClientId(facesContext));
-                debugTree(log, facesContext, child.getChildren(), level + 1);
-            }
-        }
-    }
-
-    public static HtmlCommandNavigationItem findPreviousItem(UIViewRoot previousViewRoot, String clientId) {
-        HtmlCommandNavigationItem previousItem = null;
-        if (previousViewRoot != null) {
-            UIComponent previousComp = previousViewRoot.findComponent(clientId);
-            if (previousComp instanceof HtmlCommandNavigationItem) {
-                previousItem = (HtmlCommandNavigationItem) previousComp;
-            }
-        }
-        return previousItem;
-    }
-
-    public static MethodBinding getMethodBinding(FacesContext facesContext, String value, boolean actionListener) {
-        MethodBinding mb;
-        if (HtmlNavigationMenuRendererUtils.isValueReference(value)) {
-            mb = facesContext.getApplication().createMethodBinding(value, actionListener ? ACTION_LISTENER_ARGS : null);
-        }
-        else {
-            if (actionListener) {
-                log.error("Invalid actionListener value " + value + " (has to be ValueReference!)");
-                mb = null;
-            }
-            else {
-                mb = new SimpleActionMethodBinding(value);
-            }
-        }
-        return mb;
-    }
-
-    public static void setAttributeValue(FacesContext facesContext, UIComponent comp, String attribute, String value) {
-        if (value == null)
-            return;
-        if (HtmlNavigationMenuRendererUtils.isValueReference(value)) {
-            ValueBinding vb = facesContext.getApplication().createValueBinding(value);
-            comp.setValueBinding(attribute, vb);
-        }
-        else {
-            comp.getAttributes().put(attribute, value);
-        }
-    }
-
-    public static boolean isValueReference(String value) {
-        if (value == null)
-            return false;
-        return UIComponentTag.isValueReference(value);
-    }
-}
+/*
+ * Copyright 2004-2006 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.navmenu.htmlnavmenu;
+
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils;
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
+import org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils;
+import org.apache.myfaces.custom.navmenu.UINavigationMenuItem;
+import org.apache.myfaces.shared_tomahawk.el.SimpleActionMethodBinding;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
+import javax.faces.component.UIViewRoot;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.faces.webapp.UIComponentTag;
+import javax.faces.event.ActionEvent;
+import java.util.List;
+import java.util.Iterator;
+import java.util.Map;
+import java.io.IOException;
+
+import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
+
+/**
+ * @author Thomas Spiegl
+ * @author Manfred Geiler
+ */
+class HtmlNavigationMenuRendererUtils {
+    private static final Log log = LogFactory.getLog(HtmlNavigationMenuRendererUtils.class);
+
+    private static final Class[] ACTION_LISTENER_ARGS = {ActionEvent.class};
+
+    private HtmlNavigationMenuRendererUtils() {
+    }
+
+    public static void renderChildrenListLayout(FacesContext facesContext,
+                                                ResponseWriter writer,
+                                                HtmlPanelNavigationMenu panelNav,
+                                                List children,
+                                                int level) throws IOException {
+        for (Iterator it = children.iterator(); it.hasNext();) {
+            UIComponent child = (UIComponent) it.next();
+            if (!child.isRendered()) continue;
+
+            if (child instanceof UINavigationMenuItem) {
+                UINavigationMenuItem navItem = (UINavigationMenuItem) child;
+                renderChildrenListLayout(facesContext, writer, panelNav, child.getChildren(), level);
+            }
+            if (child instanceof HtmlCommandNavigationItem) {
+                //navigation item
+                HtmlRendererUtils.writePrettyLineSeparator(facesContext);
+
+                HtmlCommandNavigationItem navItem = (HtmlCommandNavigationItem) child;
+
+                String externalLink = navItem.getExternalLink();
+
+                String style = HtmlNavigationMenuRendererUtils.getNavigationItemStyle(panelNav, navItem);
+                String styleClass = HtmlNavigationMenuRendererUtils.getNavigationItemClass(panelNav, navItem);
+
+                writer.startElement(HTML.LI_ELEM, panelNav);
+                HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, style, styleClass);
+
+                Object value = navItem.getValue();
+                boolean renderAsOutputLink = externalLink != null && value != null;
+
+                if (!renderAsOutputLink) {
+                    //if there is an external link specified don't render the command nav item, its content
+                    //will be wrapped by a output link in the renderChildren() method
+                    if (externalLink == null) {
+                        navItem.setValue(null); // unset value, value must not be rendered
+                        navItem.encodeBegin(facesContext);
+                    }
+                    HtmlNavigationMenuRendererUtils.renderChildren(facesContext, navItem, panelNav);
+                    if (externalLink == null) {
+                        navItem.encodeEnd(facesContext);
+                        navItem.setValue(value); // restore value
+                    }
+                }
+                else {
+                    //there is an external link value and display value exists, so, just render its children
+                    renderChildren(facesContext, navItem, panelNav);
+                }
+
+                if (hasCommandNavigationItemChildren(navItem)) {
+                    writer.startElement(HTML.UL_ELEM, panelNav);
+
+                    if (panelNav.isRenderAll())
+                        HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, navItem.getStyle(), navItem.getStyleClass());
+
+                    HtmlRendererUtils.renderHTMLAttributes(writer, panelNav, HTML.UL_PASSTHROUGH_ATTRIBUTES);
+                    renderChildrenListLayout(facesContext, writer, panelNav, child.getChildren(), level + 1);
+                    writer.endElement(HTML.UL_ELEM);
+                }
+
+                writer.endElement(HTML.LI_ELEM);
+            }
+        }
+    }
+
+    private static boolean hasCommandNavigationItemChildren(HtmlCommandNavigationItem item) {
+        List children = item.getChildren();
+        for (int i = 0, sizei = children.size(); i < sizei; i++) {
+            if (children.get(i) instanceof HtmlCommandNavigationItem) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static void renderChildrenTableLayout(FacesContext facesContext,
+                                                 ResponseWriter writer,
+                                                 HtmlPanelNavigationMenu panelNav,
+                                                 List children,
+                                                 int level) throws IOException {
+        for (Iterator it = children.iterator(); it.hasNext();) {
+            UIComponent child = (UIComponent) it.next();
+            if (!child.isRendered()) continue;
+            if (child instanceof HtmlCommandNavigationItem) {
+                //navigation item
+                HtmlRendererUtils.writePrettyLineSeparator(facesContext);
+
+                String style = getNavigationItemStyle(panelNav, (HtmlCommandNavigationItem) child);
+                String styleClass = getNavigationItemClass(panelNav, (HtmlCommandNavigationItem) child);
+
+                writer.startElement(HTML.TR_ELEM, panelNav);
+                writer.startElement(HTML.TD_ELEM, panelNav);
+                writeStyleAttributes(writer, style, styleClass);
+
+                if (style != null || styleClass != null) {
+                    writer.startElement(HTML.SPAN_ELEM, panelNav);
+                    writeStyleAttributes(writer, style, styleClass);
+                }
+                indent(writer, level);
+                child.encodeBegin(facesContext);
+
+                child.encodeEnd(facesContext);
+                if (style != null || styleClass != null) {
+                    writer.endElement(HTML.SPAN_ELEM);
+                }
+
+                writer.endElement(HTML.TD_ELEM);
+                writer.endElement(HTML.TR_ELEM);
+
+                if (child.getChildCount() > 0) {
+                    renderChildrenTableLayout(facesContext, writer, panelNav, child.getChildren(), level + 1);
+                }
+            }
+            else {
+                //separator
+                HtmlRendererUtils.writePrettyLineSeparator(facesContext);
+
+                String style = panelNav.getSeparatorStyle();
+                String styleClass = panelNav.getSeparatorClass();
+
+                writer.startElement(HTML.TR_ELEM, panelNav);
+                writer.startElement(HTML.TD_ELEM, panelNav);
+                writeStyleAttributes(writer, style, styleClass);
+
+                if (style != null || styleClass != null) {
+                    writer.startElement(HTML.SPAN_ELEM, panelNav);
+                    writeStyleAttributes(writer, style, styleClass);
+                }
+                indent(writer, level);
+                RendererUtils.renderChild(facesContext, child);
+                if (style != null || styleClass != null) {
+                    writer.endElement(HTML.SPAN_ELEM);
+                }
+
+                writer.endElement(HTML.TD_ELEM);
+                writer.endElement(HTML.TR_ELEM);
+            }
+        }
+    }
+
+    public static void indent(ResponseWriter writer, int level) throws IOException {
+        StringBuffer buf = new StringBuffer();
+        for (int i = 0; i < level; i++) {
+            buf.append("&#160;&#160;&#160;&#160;");
+        }
+        writer.write(buf.toString());
+    }
+
+    public static String getNavigationItemStyle(HtmlPanelNavigationMenu navPanel, HtmlCommandNavigationItem navItem) {
+        if (navItem.isActive()) {
+            return navPanel.getActiveItemStyle();
+        }
+        else if (navItem.isOpen()) {
+            return navPanel.getOpenItemStyle();
+        }
+        else {
+            return navPanel.getItemStyle();
+        }
+    }
+
+    public static String getNavigationItemClass(HtmlPanelNavigationMenu navPanel,
+                                                HtmlCommandNavigationItem navItem) {
+        // MYFACES-117, if a styleClass is supplied for a HtmlCommandNavigationItem,
+        // panelNavigation active/open/normal styles for items will be overriden                       
+        if (navItem.getStyleClass() != null) {
+            return navItem.getStyleClass();
+        }
+        if (navItem.isActive()) {
+            return navPanel.getActiveItemClass();
+        }
+        else if (navItem.isOpen()) {
+            return navPanel.getOpenItemClass();
+        }
+        else {
+            return navPanel.getItemClass();
+        }
+    }
+
+    public static void writeStyleAttributes(ResponseWriter writer,
+                                            String style,
+                                            String styleClass) throws IOException {
+        HtmlRendererUtils.renderHTMLAttribute(writer, HTML.STYLE_ATTR, HTML.STYLE_ATTR, style);
+        HtmlRendererUtils.renderHTMLAttribute(writer, HTML.STYLE_CLASS_ATTR, HTML.STYLE_CLASS_ATTR, styleClass);
+    }
+
+    public static UIComponent getPanel(UIComponent link) {
+        UIComponent navPanel = link.getParent();
+        while (navPanel != null && !(navPanel instanceof HtmlPanelNavigationMenu)) {
+            navPanel = navPanel.getParent();
+        }
+        if (navPanel == null) {
+            throw new IllegalStateException("HtmlCommandNavigationItem not nested in HtmlPanelNavigation!?");
+        }
+        return navPanel;
+    }
+
+    public static boolean isListLayout(HtmlPanelNavigationMenu panelNav) {
+        return !"Table".equalsIgnoreCase(panelNav.getLayout());
+    }
+
+    public static void renderChildren(FacesContext facesContext, HtmlCommandNavigationItem component, HtmlPanelNavigationMenu parentPanelNav) throws IOException {
+        if (component.getChildCount() > 0) {
+            //if there is an external link value, wrapp the content with an output link
+            if (component.getExternalLink() != null) {
+                ResponseWriter writer = facesContext.getResponseWriter();
+
+                writer.startElement(HTML.ANCHOR_ELEM, null);
+                writer.writeAttribute(HTML.HREF_ATTR, component.getExternalLink(), null);
+                if (component.getTarget() != null)
+                    writer.writeAttribute(HTML.TARGET_ATTR, component.getTarget(), null);
+
+                //the style attributes need to be taken from the parent panel nav, because the command panel navigation item
+                //is not rendered in this case which would have render them
+                String style = HtmlNavigationMenuRendererUtils.getNavigationItemStyle(parentPanelNav, component);
+                String styleClass = HtmlNavigationMenuRendererUtils.getNavigationItemClass(parentPanelNav, component);
+                HtmlNavigationMenuRendererUtils.writeStyleAttributes(writer, style, styleClass);
+            }
+
+            for (Iterator it = component.getChildren().iterator(); it.hasNext();) {
+                UIComponent child = (UIComponent) it.next();
+                if (!(child instanceof HtmlCommandNavigationItem)) {
+                    RendererUtils.renderChild(facesContext, child);
+                }
+            }
+
+            //end wrapper output link
+            if (component.getExternalLink() != null) {
+                ResponseWriter writer = facesContext.getResponseWriter();
+                writer.endElement(HTML.ANCHOR_ELEM);
+            }
+        }
+    }
+
+    public static void debugTree(Log log, FacesContext facesContext, List children, int level) {
+        for (Iterator it = children.iterator(); it.hasNext();) {
+            UIComponent child = (UIComponent) it.next();
+            if (child instanceof UINavigationMenuItem) {
+                UINavigationMenuItem item = (UINavigationMenuItem) child;
+                StringBuffer buf = new StringBuffer();
+                for (int i = 0; i < level * 4; i++) buf.append(' ');
+                log.debug(buf.toString() + "--> " + item.getItemLabel() + " id:" + item.getClientId(facesContext));
+                debugTree(log, facesContext, child.getChildren(), level + 1);
+            }
+            else if (child instanceof HtmlCommandNavigationItem) {
+                HtmlCommandNavigationItem item = (HtmlCommandNavigationItem) child;
+                StringBuffer buf = new StringBuffer();
+                for (int i = 0; i < level * 4; i++) buf.append(' ');
+                String value;
+                if (item.getChildren().size() > 0 && item.getChildren().get(0) instanceof UIOutput) {
+                    UIOutput uiOutput = (UIOutput) item.getChildren().get(0);
+                    value = uiOutput.getValue() != null ? uiOutput.getValue().toString() : "?";
+                }
+                else {
+                    value = item.getValue() != null ? item.getValue().toString() : "";
+                }
+                log.debug(buf.toString() + value + " id:" + item.getClientId(facesContext));
+                debugTree(log, facesContext, child.getChildren(), level + 1);
+            }
+        }
+    }
+
+    public static HtmlCommandNavigationItem findPreviousItem(UIViewRoot previousViewRoot, String clientId) {
+        HtmlCommandNavigationItem previousItem = null;
+        if (previousViewRoot != null) {
+            UIComponent previousComp = previousViewRoot.findComponent(clientId);
+            if (previousComp instanceof HtmlCommandNavigationItem) {
+                previousItem = (HtmlCommandNavigationItem) previousComp;
+            }
+        }
+        return previousItem;
+    }
+
+    public static MethodBinding getMethodBinding(FacesContext facesContext, String value, boolean actionListener) {
+        MethodBinding mb;
+        if (HtmlNavigationMenuRendererUtils.isValueReference(value)) {
+            mb = facesContext.getApplication().createMethodBinding(value, actionListener ? ACTION_LISTENER_ARGS : null);
+        }
+        else {
+            if (actionListener) {
+                log.error("Invalid actionListener value " + value + " (has to be ValueReference!)");
+                mb = null;
+            }
+            else {
+                mb = new SimpleActionMethodBinding(value);
+            }
+        }
+        return mb;
+    }
+
+    public static void setAttributeValue(FacesContext facesContext, UIComponent comp, String attribute, String value) {
+        if (value == null)
+            return;
+        if (HtmlNavigationMenuRendererUtils.isValueReference(value)) {
+            ValueBinding vb = facesContext.getApplication().createValueBinding(value);
+            comp.setValueBinding(attribute, vb);
+        }
+        else {
+            comp.getAttributes().put(attribute, value);
+        }
+    }
+
+    public static boolean isValueReference(String value) {
+        if (value == null)
+            return false;
+        return UIComponentTag.isValueReference(value);
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlNavigationMenuRendererUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java Tue Aug  1 10:43:28 2006
@@ -1,358 +1,358 @@
-/*
- * 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.navmenu.htmlnavmenu;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.component.html.ext.HtmlPanelGroup;
-import org.apache.myfaces.shared_tomahawk.util._ComponentUtils;
-
-import javax.faces.component.NamingContainer;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-
-/**
- * Many thanks to the guys from Swiss Federal Institute of Intellectual Property & Marc Bouquet
- * for helping to develop this component.
- * @author Manfred Geiler
- * @author Thomas Spiegl
- */
-public class HtmlPanelNavigationMenu extends HtmlPanelGroup implements NamingContainer
-{
-    private static final Log log = LogFactory.getLog(HtmlPanelNavigationMenu.class);
-
-    static final String PREVIOUS_VIEW_ROOT = HtmlPanelNavigationMenu.class.getName() + ".PREVIOUS_VIEW_ROOT";
-    private boolean _itemOpenActiveStatesRestored = false;
-    private Boolean _disabled;
-    private String _disabledStyle;
-    private String _disabledStyleClass;
-
-    public void decode(FacesContext context)
-    {
-        super.decode(context);    //To change body of overridden methods use File | Settings | File Templates.
-
-        //Save the current view root for later reference...
-        context.getExternalContext().getRequestMap().put(PREVIOUS_VIEW_ROOT, context.getViewRoot());
-        //...and remember that this instance needs NO special treatment on rendering:
-        _itemOpenActiveStatesRestored = true;
-    }
-
-    public void encodeBegin(FacesContext context) throws IOException
-    {
-        if (!_itemOpenActiveStatesRestored && getChildCount() > 0)
-        {
-            UIViewRoot previousRoot = (UIViewRoot)context.getExternalContext().getRequestMap().get(PREVIOUS_VIEW_ROOT);
-            if (previousRoot != null)
-            {
-                if(previousRoot.findComponent(getClientId(context)) instanceof HtmlPanelNavigationMenu)
-                {
-                    restoreOpenActiveStates(context, previousRoot, getChildren());
-                }
-            }
-            else
-            {
-                //no previous root, means no decode was done
-                //--> a new request
-            }
-        }
-
-        super.encodeBegin(context);    //To change body of overridden methods use File | Settings | File Templates.
-    }
-
-    public void restoreOpenActiveStates(FacesContext facesContext,
-                                        UIViewRoot previousRoot,
-                                        List children)
-    {
-        for (Iterator it = children.iterator(); it.hasNext(); )
-        {
-            UIComponent child = (UIComponent)it.next();
-            if (child instanceof HtmlCommandNavigationItem)
-            {
-                HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
-                if (previousItem != null)
-                {
-                    ((HtmlCommandNavigationItem)child).setOpen(previousItem.isOpen());
-                    ((HtmlCommandNavigationItem)child).setActive(previousItem.isActive());
-                }
-                else
-                {
-                    log.debug("Navigation item " + child.getClientId(facesContext) + " not found in previous view.");
-                }
-                if (child.getChildCount() > 0)
-                {
-                    restoreOpenActiveStates(facesContext, previousRoot, child.getChildren());
-                }
-            }
-        }
-    }
-
-    public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlPanelNavigationMenu";
-    public static final String COMPONENT_FAMILY = "javax.faces.Panel";
-    private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.NavigationMenu";
-
-    private String _itemClass = null;
-    private String _openItemClass = null;
-    private String _activeItemClass = null;
-    private String _separatorClass = null;
-    private String _itemStyle = null;
-    private String _openItemStyle = null;
-    private String _activeItemStyle = null;
-    private String _separatorStyle = null;
-    private String _layout = null;
-    private Boolean _preprocessed = Boolean.FALSE;
-    private Boolean _expandAll = null;
-    private Boolean _renderAll = null;
-
-    public HtmlPanelNavigationMenu()
-    {
-        setRendererType(DEFAULT_RENDERER_TYPE);
-    }
-
-    public String getFamily()
-    {
-        return COMPONENT_FAMILY;
-    }
-
-    public void setItemClass(String itemClass)
-    {
-        _itemClass = itemClass;
-    }
-
-    public String getItemClass()
-    {
-        if (_itemClass != null) return _itemClass;
-        ValueBinding vb = getValueBinding("itemClass");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setOpenItemClass(String openItemClass)
-    {
-        _openItemClass = openItemClass;
-    }
-
-    public String getOpenItemClass()
-    {
-        if (_openItemClass != null) return _openItemClass;
-        ValueBinding vb = getValueBinding("openItemClass");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setActiveItemClass(String activeItemClass)
-    {
-        _activeItemClass = activeItemClass;
-    }
-
-    public String getActiveItemClass()
-    {
-        if (_activeItemClass != null) return _activeItemClass;
-        ValueBinding vb = getValueBinding("activeItemClass");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setSeparatorClass(String separatorClass)
-    {
-        _separatorClass = separatorClass;
-    }
-
-    public String getSeparatorClass()
-    {
-        if (_separatorClass != null) return _separatorClass;
-        ValueBinding vb = getValueBinding("separatorClass");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setItemStyle(String itemStyle)
-    {
-        _itemStyle = itemStyle;
-    }
-
-    public String getItemStyle()
-    {
-        if (_itemStyle != null) return _itemStyle;
-        ValueBinding vb = getValueBinding("itemStyle");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setOpenItemStyle(String openItemStyle)
-    {
-        _openItemStyle = openItemStyle;
-    }
-
-    public String getOpenItemStyle()
-    {
-        if (_openItemStyle != null) return _openItemStyle;
-        ValueBinding vb = getValueBinding("openItemStyle");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setActiveItemStyle(String activeItemStyle)
-    {
-        _activeItemStyle = activeItemStyle;
-    }
-
-    public String getActiveItemStyle()
-    {
-        if (_activeItemStyle != null) return _activeItemStyle;
-        ValueBinding vb = getValueBinding("activeItemStyle");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setSeparatorStyle(String separatorStyle)
-    {
-        _separatorStyle = separatorStyle;
-    }
-
-    public String getSeparatorStyle()
-    {
-        if (_separatorStyle != null) return _separatorStyle;
-        ValueBinding vb = getValueBinding("separatorStyle");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public String getLayout()
-    {
-        if (_layout != null) return _layout;
-        ValueBinding vb = getValueBinding("layout");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setLayout(String layout)
-    {
-        _layout = layout;
-    }
-
-    public Boolean getPreprocessed()
-    {
-        return _preprocessed;
-    }
-
-    public void setPreprocessed(Boolean preprocessed)
-    {
-        _preprocessed = preprocessed;
-    }
-
-    public boolean isExpandAll()
-    {
-        if (_expandAll != null) return _expandAll.booleanValue();
-        ValueBinding vb = getValueBinding("expandAll");
-        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
-        return v != null && v.booleanValue();
-    }
-
-    public void setExpandAll(boolean expandAll)
-    {
-        _expandAll = expandAll ? Boolean.TRUE : Boolean.FALSE;
-    }
-    
-    public boolean isRenderAll()
-    {
-        if (_renderAll != null) return _renderAll.booleanValue();
-        ValueBinding vb = getValueBinding("renderAll");
-        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
-        return v != null && v.booleanValue();
-    }
-
-    public void setRenderAll(boolean renderAll)
-    {
-        _renderAll = renderAll ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    public boolean isDisabled()
-    {
-        if (_disabled != null) return _disabled.booleanValue();
-        ValueBinding vb = getValueBinding("disabled");
-        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
-        return v != null && v.booleanValue();
-    }
-
-    public void setDisabled(boolean disabled)
-    {
-        _disabled = disabled ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    public String getDisabledStyle()
-    {
-        if (_disabledStyle != null) return _disabledStyle;
-        ValueBinding vb = getValueBinding("disabledStyle");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setDisabledStyle(String disabledStyle)
-    {
-        _disabledStyle = disabledStyle;
-    }
-
-    public String getDisabledStyleClass()
-    {
-        if (_disabledStyleClass != null) return _disabledStyleClass;
-        ValueBinding vb = getValueBinding("disabledStyleClass");
-        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
-    }
-
-    public void setDisabledStyleClass(String disabledStyleClass)
-    {
-        _disabledStyleClass = disabledStyleClass;
-    }
-
-    public Object saveState(FacesContext context)
-    {
-        Object values[] = new Object[16];
-        values[0] = super.saveState(context);
-        values[1] = _itemClass;
-        values[2] = _openItemClass;
-        values[3] = _activeItemClass;
-        values[4] = _separatorClass;
-        values[5] = _itemStyle;
-        values[6] = _openItemStyle;
-        values[7] = _activeItemStyle;
-        values[8] = _separatorStyle;
-        values[9] = _layout;
-        values[10] = _preprocessed;
-        values[11] = _expandAll;
-        values[12] = _disabled;
-        values[13] = _disabledStyle;
-        values[14] = _disabledStyleClass;
-        values[15] = _renderAll;
-        return values;
-    }
-
-    public void restoreState(FacesContext context, Object state)
-    {
-        Object values[] = (Object[])state;
-        super.restoreState(context, values[0]);
-        _itemClass = (String)values[1];
-        _openItemClass = (String)values[2];
-        _activeItemClass = (String)values[3];
-        _separatorClass = (String)values[4];
-        _itemStyle = (String)values[5];
-        _openItemStyle = (String)values[6];
-        _activeItemStyle = (String)values[7];
-        _separatorStyle = (String)values[8];
-        _layout = (String)values[9];
-        _preprocessed = (Boolean)values[10];
-        _expandAll = (Boolean)values[11];
-        _disabled = (Boolean) values[12];
-        _disabledStyle = (String) values[13];
-        _disabledStyleClass = (String) values[14];
-        _renderAll = (Boolean) values[15];
-    }
-}
+/*
+ * 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.navmenu.htmlnavmenu;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.component.html.ext.HtmlPanelGroup;
+import org.apache.myfaces.shared_tomahawk.util._ComponentUtils;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * Many thanks to the guys from Swiss Federal Institute of Intellectual Property & Marc Bouquet
+ * for helping to develop this component.
+ * @author Manfred Geiler
+ * @author Thomas Spiegl
+ */
+public class HtmlPanelNavigationMenu extends HtmlPanelGroup implements NamingContainer
+{
+    private static final Log log = LogFactory.getLog(HtmlPanelNavigationMenu.class);
+
+    static final String PREVIOUS_VIEW_ROOT = HtmlPanelNavigationMenu.class.getName() + ".PREVIOUS_VIEW_ROOT";
+    private boolean _itemOpenActiveStatesRestored = false;
+    private Boolean _disabled;
+    private String _disabledStyle;
+    private String _disabledStyleClass;
+
+    public void decode(FacesContext context)
+    {
+        super.decode(context);    //To change body of overridden methods use File | Settings | File Templates.
+
+        //Save the current view root for later reference...
+        context.getExternalContext().getRequestMap().put(PREVIOUS_VIEW_ROOT, context.getViewRoot());
+        //...and remember that this instance needs NO special treatment on rendering:
+        _itemOpenActiveStatesRestored = true;
+    }
+
+    public void encodeBegin(FacesContext context) throws IOException
+    {
+        if (!_itemOpenActiveStatesRestored && getChildCount() > 0)
+        {
+            UIViewRoot previousRoot = (UIViewRoot)context.getExternalContext().getRequestMap().get(PREVIOUS_VIEW_ROOT);
+            if (previousRoot != null)
+            {
+                if(previousRoot.findComponent(getClientId(context)) instanceof HtmlPanelNavigationMenu)
+                {
+                    restoreOpenActiveStates(context, previousRoot, getChildren());
+                }
+            }
+            else
+            {
+                //no previous root, means no decode was done
+                //--> a new request
+            }
+        }
+
+        super.encodeBegin(context);    //To change body of overridden methods use File | Settings | File Templates.
+    }
+
+    public void restoreOpenActiveStates(FacesContext facesContext,
+                                        UIViewRoot previousRoot,
+                                        List children)
+    {
+        for (Iterator it = children.iterator(); it.hasNext(); )
+        {
+            UIComponent child = (UIComponent)it.next();
+            if (child instanceof HtmlCommandNavigationItem)
+            {
+                HtmlCommandNavigationItem previousItem = (HtmlCommandNavigationItem)previousRoot.findComponent(child.getClientId(facesContext));
+                if (previousItem != null)
+                {
+                    ((HtmlCommandNavigationItem)child).setOpen(previousItem.isOpen());
+                    ((HtmlCommandNavigationItem)child).setActive(previousItem.isActive());
+                }
+                else
+                {
+                    log.debug("Navigation item " + child.getClientId(facesContext) + " not found in previous view.");
+                }
+                if (child.getChildCount() > 0)
+                {
+                    restoreOpenActiveStates(facesContext, previousRoot, child.getChildren());
+                }
+            }
+        }
+    }
+
+    public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlPanelNavigationMenu";
+    public static final String COMPONENT_FAMILY = "javax.faces.Panel";
+    private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.NavigationMenu";
+
+    private String _itemClass = null;
+    private String _openItemClass = null;
+    private String _activeItemClass = null;
+    private String _separatorClass = null;
+    private String _itemStyle = null;
+    private String _openItemStyle = null;
+    private String _activeItemStyle = null;
+    private String _separatorStyle = null;
+    private String _layout = null;
+    private Boolean _preprocessed = Boolean.FALSE;
+    private Boolean _expandAll = null;
+    private Boolean _renderAll = null;
+
+    public HtmlPanelNavigationMenu()
+    {
+        setRendererType(DEFAULT_RENDERER_TYPE);
+    }
+
+    public String getFamily()
+    {
+        return COMPONENT_FAMILY;
+    }
+
+    public void setItemClass(String itemClass)
+    {
+        _itemClass = itemClass;
+    }
+
+    public String getItemClass()
+    {
+        if (_itemClass != null) return _itemClass;
+        ValueBinding vb = getValueBinding("itemClass");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setOpenItemClass(String openItemClass)
+    {
+        _openItemClass = openItemClass;
+    }
+
+    public String getOpenItemClass()
+    {
+        if (_openItemClass != null) return _openItemClass;
+        ValueBinding vb = getValueBinding("openItemClass");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setActiveItemClass(String activeItemClass)
+    {
+        _activeItemClass = activeItemClass;
+    }
+
+    public String getActiveItemClass()
+    {
+        if (_activeItemClass != null) return _activeItemClass;
+        ValueBinding vb = getValueBinding("activeItemClass");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setSeparatorClass(String separatorClass)
+    {
+        _separatorClass = separatorClass;
+    }
+
+    public String getSeparatorClass()
+    {
+        if (_separatorClass != null) return _separatorClass;
+        ValueBinding vb = getValueBinding("separatorClass");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setItemStyle(String itemStyle)
+    {
+        _itemStyle = itemStyle;
+    }
+
+    public String getItemStyle()
+    {
+        if (_itemStyle != null) return _itemStyle;
+        ValueBinding vb = getValueBinding("itemStyle");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setOpenItemStyle(String openItemStyle)
+    {
+        _openItemStyle = openItemStyle;
+    }
+
+    public String getOpenItemStyle()
+    {
+        if (_openItemStyle != null) return _openItemStyle;
+        ValueBinding vb = getValueBinding("openItemStyle");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setActiveItemStyle(String activeItemStyle)
+    {
+        _activeItemStyle = activeItemStyle;
+    }
+
+    public String getActiveItemStyle()
+    {
+        if (_activeItemStyle != null) return _activeItemStyle;
+        ValueBinding vb = getValueBinding("activeItemStyle");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setSeparatorStyle(String separatorStyle)
+    {
+        _separatorStyle = separatorStyle;
+    }
+
+    public String getSeparatorStyle()
+    {
+        if (_separatorStyle != null) return _separatorStyle;
+        ValueBinding vb = getValueBinding("separatorStyle");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public String getLayout()
+    {
+        if (_layout != null) return _layout;
+        ValueBinding vb = getValueBinding("layout");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setLayout(String layout)
+    {
+        _layout = layout;
+    }
+
+    public Boolean getPreprocessed()
+    {
+        return _preprocessed;
+    }
+
+    public void setPreprocessed(Boolean preprocessed)
+    {
+        _preprocessed = preprocessed;
+    }
+
+    public boolean isExpandAll()
+    {
+        if (_expandAll != null) return _expandAll.booleanValue();
+        ValueBinding vb = getValueBinding("expandAll");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null && v.booleanValue();
+    }
+
+    public void setExpandAll(boolean expandAll)
+    {
+        _expandAll = expandAll ? Boolean.TRUE : Boolean.FALSE;
+    }
+    
+    public boolean isRenderAll()
+    {
+        if (_renderAll != null) return _renderAll.booleanValue();
+        ValueBinding vb = getValueBinding("renderAll");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null && v.booleanValue();
+    }
+
+    public void setRenderAll(boolean renderAll)
+    {
+        _renderAll = renderAll ? Boolean.TRUE : Boolean.FALSE;
+    }
+
+    public boolean isDisabled()
+    {
+        if (_disabled != null) return _disabled.booleanValue();
+        ValueBinding vb = getValueBinding("disabled");
+        Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+        return v != null && v.booleanValue();
+    }
+
+    public void setDisabled(boolean disabled)
+    {
+        _disabled = disabled ? Boolean.TRUE : Boolean.FALSE;
+    }
+
+    public String getDisabledStyle()
+    {
+        if (_disabledStyle != null) return _disabledStyle;
+        ValueBinding vb = getValueBinding("disabledStyle");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setDisabledStyle(String disabledStyle)
+    {
+        _disabledStyle = disabledStyle;
+    }
+
+    public String getDisabledStyleClass()
+    {
+        if (_disabledStyleClass != null) return _disabledStyleClass;
+        ValueBinding vb = getValueBinding("disabledStyleClass");
+        return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
+    }
+
+    public void setDisabledStyleClass(String disabledStyleClass)
+    {
+        _disabledStyleClass = disabledStyleClass;
+    }
+
+    public Object saveState(FacesContext context)
+    {
+        Object values[] = new Object[16];
+        values[0] = super.saveState(context);
+        values[1] = _itemClass;
+        values[2] = _openItemClass;
+        values[3] = _activeItemClass;
+        values[4] = _separatorClass;
+        values[5] = _itemStyle;
+        values[6] = _openItemStyle;
+        values[7] = _activeItemStyle;
+        values[8] = _separatorStyle;
+        values[9] = _layout;
+        values[10] = _preprocessed;
+        values[11] = _expandAll;
+        values[12] = _disabled;
+        values[13] = _disabledStyle;
+        values[14] = _disabledStyleClass;
+        values[15] = _renderAll;
+        return values;
+    }
+
+    public void restoreState(FacesContext context, Object state)
+    {
+        Object values[] = (Object[])state;
+        super.restoreState(context, values[0]);
+        _itemClass = (String)values[1];
+        _openItemClass = (String)values[2];
+        _activeItemClass = (String)values[3];
+        _separatorClass = (String)values[4];
+        _itemStyle = (String)values[5];
+        _openItemStyle = (String)values[6];
+        _activeItemStyle = (String)values[7];
+        _separatorStyle = (String)values[8];
+        _layout = (String)values[9];
+        _preprocessed = (Boolean)values[10];
+        _expandAll = (Boolean)values[11];
+        _disabled = (Boolean) values[12];
+        _disabledStyle = (String) values[13];
+        _disabledStyleClass = (String) values[14];
+        _renderAll = (Boolean) values[15];
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenu.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java Tue Aug  1 10:43:28 2006
@@ -1,275 +1,275 @@
-/*
- * 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.navmenu.htmlnavmenu;
-
-import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
-import org.apache.myfaces.taglib.html.ext.HtmlPanelGroupTag;
-
-import javax.faces.component.UIComponent;
-
-/**
- * @author Manfred Geiler
- * @author Thomas Spiegl
- */
-public class HtmlPanelNavigationMenuTag extends HtmlPanelGroupTag
-{
-    public String getComponentType()
-    {
-        return HtmlPanelNavigationMenu.COMPONENT_TYPE;
-    }
-
-    public String getRendererType()
-    {
-        return "org.apache.myfaces.NavigationMenu";
-    }
-
-    // UIComponent attributes --> already implemented in UIComponentBodyTagBase
-
-    // HTML universal attributes --> already implemented in MyFacesTag
-
-    // HTML event handler attributes --> already implemented in MyFacesTag
-
-    // UIPanel attributes --> value attribute already implemented in UIComponentBodyTagBase
-
-    // HtmlPanelNavigationMenu attributes
-    private String _itemClass;
-    private String _openItemClass;
-    private String _activeItemClass;
-    private String _separatorClass;
-    private String _itemStyle;
-    private String _openItemStyle;
-    private String _activeItemStyle;
-    private String _separatorStyle;
-    private String _layout;
-    private String _expandAll;
-    private String _renderAll;
-    private String _disabled;
-    private String _disabledStyle;
-    private String _disabledStyleClass;
-
-    // HTML table attributes
-    private String _align;
-    private String _bgcolor;
-    private String _border;
-    private String _cellpadding;
-    private String _cellspacing;
-    private String _datafld;
-    private String _datasrc;
-    private String _dataformatas;
-    private String _frame;
-    private String _rules;
-    private String _summary;
-    private String _width;
-
-    public void release() {
-        super.release();
-
-        _itemClass=null;
-        _openItemClass=null;
-        _activeItemClass=null;
-        _separatorClass=null;
-        _itemStyle=null;
-        _openItemStyle=null;
-        _activeItemStyle=null;
-        _separatorStyle=null;
-        _align=null;
-        _bgcolor=null;
-        _border=null;
-        _cellpadding=null;
-        _cellspacing=null;
-        _datafld=null;
-        _datasrc=null;
-        _dataformatas=null;
-        _frame=null;
-        _rules=null;
-        _summary=null;
-        _width=null;
-        _layout = null;
-        _expandAll = null;
-        _renderAll = null;
-    }
-
-    // User Role support --> already handled by HtmlPanelGroupTag
-
-
-    protected void setProperties(UIComponent component)
-    {
-        super.setProperties(component);
-
-        setStringProperty(component, "itemClass", _itemClass);
-        setStringProperty(component, "openItemClass", _openItemClass);
-        setStringProperty(component, "activeItemClass", _activeItemClass);
-        setStringProperty(component, "separatorClass", _separatorClass);
-        setStringProperty(component, "itemStyle", _itemStyle);
-        setStringProperty(component, "openItemStyle", _openItemStyle);
-        setStringProperty(component, "activeItemStyle", _activeItemStyle);
-        setStringProperty(component, "separatorStyle", _separatorStyle);
-        setStringProperty(component, "layout", _layout);
-        setBooleanProperty(component, "expandAll", _expandAll);
-        setBooleanProperty(component, "renderAll", _renderAll);
-        setBooleanProperty(component, "disabled", _disabled);
-        setStringProperty(component, "disabledStyle", _disabledStyle);
-        setStringProperty(component, "disabledStyleClass", _disabledStyleClass);
-
-        setStringProperty(component, HTML.ALIGN_ATTR, _align);
-        setStringProperty(component, HTML.BGCOLOR_ATTR, _bgcolor);
-        setStringProperty(component, HTML.BORDER_ATTR, _border);
-        setStringProperty(component, HTML.CELLPADDING_ATTR, _cellpadding);
-        setStringProperty(component, HTML.CELLSPACING_ATTR, _cellspacing);
-        setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
-        setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
-        setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
-        setStringProperty(component, HTML.FRAME_ATTR, _frame);
-        setStringProperty(component, HTML.RULES_ATTR, _rules);
-        setStringProperty(component, HTML.SUMMARY_ATTR, _summary);
-        setStringProperty(component, HTML.WIDTH_ATTR, _width);
-    }
-
-    public void setItemClass(String itemClass)
-    {
-        _itemClass = itemClass;
-    }
-
-    public void setOpenItemClass(String openItemClass)
-    {
-        _openItemClass = openItemClass;
-    }
-
-    public void setActiveItemClass(String activeItemClass)
-    {
-        _activeItemClass = activeItemClass;
-    }
-
-    public void setSeparatorClass(String separatorClass)
-    {
-        _separatorClass = separatorClass;
-    }
-
-    public void setItemStyle(String itemStyle)
-    {
-        _itemStyle = itemStyle;
-    }
-
-    public void setOpenItemStyle(String openItemStyle)
-    {
-        _openItemStyle = openItemStyle;
-    }
-
-    public void setActiveItemStyle(String activeItemStyle)
-    {
-        _activeItemStyle = activeItemStyle;
-    }
-
-    public void setSeparatorStyle(String separatorStyle)
-    {
-        _separatorStyle = separatorStyle;
-    }
-
-    public void setAlign(String align)
-    {
-        _align = align;
-    }
-
-    public void setBgcolor(String bgcolor)
-    {
-        _bgcolor = bgcolor;
-    }
-
-    public void setBorder(String border)
-    {
-        _border = border;
-    }
-
-    public void setCellpadding(String cellpadding)
-    {
-        _cellpadding = cellpadding;
-    }
-
-    public void setCellspacing(String cellspacing)
-    {
-        _cellspacing = cellspacing;
-    }
-
-    public void setDatafld(String datafld)
-    {
-        _datafld = datafld;
-    }
-
-    public void setDatasrc(String datasrc)
-    {
-        _datasrc = datasrc;
-    }
-
-    public void setDataformatas(String dataformatas)
-    {
-        _dataformatas = dataformatas;
-    }
-
-    public void setFrame(String frame)
-    {
-        _frame = frame;
-    }
-
-    public void setRules(String rules)
-    {
-        _rules = rules;
-    }
-
-    public void setSummary(String summary)
-    {
-        _summary = summary;
-    }
-
-    public void setWidth(String width)
-    {
-        _width = width;
-    }
-
-    public String getLayout()
-    {
-        return _layout;
-    }
-
-    public void setLayout(String layout)
-    {
-        _layout = layout;
-    }
-
-    public void setExpandAll(String expandAll)
-    {
-        _expandAll = expandAll;
-    }
-    
-    public void setRenderAll(String renderAll)
-    {
-        _renderAll = renderAll;
-    }
-
-    public void setDisabled(String disabled)
-    {
-        _disabled = disabled;
-    }
-
-    public void setDisabledStyle(String disabledStyle)
-    {
-        _disabledStyle = disabledStyle;
-    }
-
-    public void setDisabledStyleClass(String disabledStyleClass)
-    {
-        _disabledStyleClass = disabledStyleClass;
-    }
-}
+/*
+ * 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.navmenu.htmlnavmenu;
+
+import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
+import org.apache.myfaces.taglib.html.ext.HtmlPanelGroupTag;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * @author Manfred Geiler
+ * @author Thomas Spiegl
+ */
+public class HtmlPanelNavigationMenuTag extends HtmlPanelGroupTag
+{
+    public String getComponentType()
+    {
+        return HtmlPanelNavigationMenu.COMPONENT_TYPE;
+    }
+
+    public String getRendererType()
+    {
+        return "org.apache.myfaces.NavigationMenu";
+    }
+
+    // UIComponent attributes --> already implemented in UIComponentBodyTagBase
+
+    // HTML universal attributes --> already implemented in MyFacesTag
+
+    // HTML event handler attributes --> already implemented in MyFacesTag
+
+    // UIPanel attributes --> value attribute already implemented in UIComponentBodyTagBase
+
+    // HtmlPanelNavigationMenu attributes
+    private String _itemClass;
+    private String _openItemClass;
+    private String _activeItemClass;
+    private String _separatorClass;
+    private String _itemStyle;
+    private String _openItemStyle;
+    private String _activeItemStyle;
+    private String _separatorStyle;
+    private String _layout;
+    private String _expandAll;
+    private String _renderAll;
+    private String _disabled;
+    private String _disabledStyle;
+    private String _disabledStyleClass;
+
+    // HTML table attributes
+    private String _align;
+    private String _bgcolor;
+    private String _border;
+    private String _cellpadding;
+    private String _cellspacing;
+    private String _datafld;
+    private String _datasrc;
+    private String _dataformatas;
+    private String _frame;
+    private String _rules;
+    private String _summary;
+    private String _width;
+
+    public void release() {
+        super.release();
+
+        _itemClass=null;
+        _openItemClass=null;
+        _activeItemClass=null;
+        _separatorClass=null;
+        _itemStyle=null;
+        _openItemStyle=null;
+        _activeItemStyle=null;
+        _separatorStyle=null;
+        _align=null;
+        _bgcolor=null;
+        _border=null;
+        _cellpadding=null;
+        _cellspacing=null;
+        _datafld=null;
+        _datasrc=null;
+        _dataformatas=null;
+        _frame=null;
+        _rules=null;
+        _summary=null;
+        _width=null;
+        _layout = null;
+        _expandAll = null;
+        _renderAll = null;
+    }
+
+    // User Role support --> already handled by HtmlPanelGroupTag
+
+
+    protected void setProperties(UIComponent component)
+    {
+        super.setProperties(component);
+
+        setStringProperty(component, "itemClass", _itemClass);
+        setStringProperty(component, "openItemClass", _openItemClass);
+        setStringProperty(component, "activeItemClass", _activeItemClass);
+        setStringProperty(component, "separatorClass", _separatorClass);
+        setStringProperty(component, "itemStyle", _itemStyle);
+        setStringProperty(component, "openItemStyle", _openItemStyle);
+        setStringProperty(component, "activeItemStyle", _activeItemStyle);
+        setStringProperty(component, "separatorStyle", _separatorStyle);
+        setStringProperty(component, "layout", _layout);
+        setBooleanProperty(component, "expandAll", _expandAll);
+        setBooleanProperty(component, "renderAll", _renderAll);
+        setBooleanProperty(component, "disabled", _disabled);
+        setStringProperty(component, "disabledStyle", _disabledStyle);
+        setStringProperty(component, "disabledStyleClass", _disabledStyleClass);
+
+        setStringProperty(component, HTML.ALIGN_ATTR, _align);
+        setStringProperty(component, HTML.BGCOLOR_ATTR, _bgcolor);
+        setStringProperty(component, HTML.BORDER_ATTR, _border);
+        setStringProperty(component, HTML.CELLPADDING_ATTR, _cellpadding);
+        setStringProperty(component, HTML.CELLSPACING_ATTR, _cellspacing);
+        setStringProperty(component, HTML.DATAFLD_ATTR, _datafld);
+        setStringProperty(component, HTML.DATASRC_ATTR, _datasrc);
+        setStringProperty(component, HTML.DATAFORMATAS_ATTR, _dataformatas);
+        setStringProperty(component, HTML.FRAME_ATTR, _frame);
+        setStringProperty(component, HTML.RULES_ATTR, _rules);
+        setStringProperty(component, HTML.SUMMARY_ATTR, _summary);
+        setStringProperty(component, HTML.WIDTH_ATTR, _width);
+    }
+
+    public void setItemClass(String itemClass)
+    {
+        _itemClass = itemClass;
+    }
+
+    public void setOpenItemClass(String openItemClass)
+    {
+        _openItemClass = openItemClass;
+    }
+
+    public void setActiveItemClass(String activeItemClass)
+    {
+        _activeItemClass = activeItemClass;
+    }
+
+    public void setSeparatorClass(String separatorClass)
+    {
+        _separatorClass = separatorClass;
+    }
+
+    public void setItemStyle(String itemStyle)
+    {
+        _itemStyle = itemStyle;
+    }
+
+    public void setOpenItemStyle(String openItemStyle)
+    {
+        _openItemStyle = openItemStyle;
+    }
+
+    public void setActiveItemStyle(String activeItemStyle)
+    {
+        _activeItemStyle = activeItemStyle;
+    }
+
+    public void setSeparatorStyle(String separatorStyle)
+    {
+        _separatorStyle = separatorStyle;
+    }
+
+    public void setAlign(String align)
+    {
+        _align = align;
+    }
+
+    public void setBgcolor(String bgcolor)
+    {
+        _bgcolor = bgcolor;
+    }
+
+    public void setBorder(String border)
+    {
+        _border = border;
+    }
+
+    public void setCellpadding(String cellpadding)
+    {
+        _cellpadding = cellpadding;
+    }
+
+    public void setCellspacing(String cellspacing)
+    {
+        _cellspacing = cellspacing;
+    }
+
+    public void setDatafld(String datafld)
+    {
+        _datafld = datafld;
+    }
+
+    public void setDatasrc(String datasrc)
+    {
+        _datasrc = datasrc;
+    }
+
+    public void setDataformatas(String dataformatas)
+    {
+        _dataformatas = dataformatas;
+    }
+
+    public void setFrame(String frame)
+    {
+        _frame = frame;
+    }
+
+    public void setRules(String rules)
+    {
+        _rules = rules;
+    }
+
+    public void setSummary(String summary)
+    {
+        _summary = summary;
+    }
+
+    public void setWidth(String width)
+    {
+        _width = width;
+    }
+
+    public String getLayout()
+    {
+        return _layout;
+    }
+
+    public void setLayout(String layout)
+    {
+        _layout = layout;
+    }
+
+    public void setExpandAll(String expandAll)
+    {
+        _expandAll = expandAll;
+    }
+    
+    public void setRenderAll(String renderAll)
+    {
+        _renderAll = renderAll;
+    }
+
+    public void setDisabled(String disabled)
+    {
+        _disabled = disabled;
+    }
+
+    public void setDisabledStyle(String disabledStyle)
+    {
+        _disabledStyle = disabledStyle;
+    }
+
+    public void setDisabledStyleClass(String disabledStyleClass)
+    {
+        _disabledStyleClass = disabledStyleClass;
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/navmenu/htmlnavmenu/HtmlPanelNavigationMenuTag.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/prototype/PrototypeResourceLoader.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/prototype/PrototypeResourceLoader.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/prototype/PrototypeResourceLoader.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/prototype/PrototypeResourceLoader.java Tue Aug  1 10:43:28 2006
@@ -1,30 +1,30 @@
-/*
- * 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.prototype;
-
-/**Marker interface which is a mere locator
- * for the AddResource class to find the
- * prototype Resources in the resources package.
- *
- * @author Martin Marinschek
- * @version $Revision: $ $Date: $
- *          <p/>
- *          $Log: $
- */
-public interface PrototypeResourceLoader
-{
-
+/*
+ * 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.prototype;
+
+/**Marker interface which is a mere locator
+ * for the AddResource class to find the
+ * prototype Resources in the resources package.
+ *
+ * @author Martin Marinschek
+ * @version $Revision: $ $Date: $
+ *          <p/>
+ *          $Log: $
+ */
+public interface PrototypeResourceLoader
+{
+
 }

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/prototype/PrototypeResourceLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native