myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r812756 - in /myfaces: core/trunk/api/src/main/java/javax/faces/component/html/ core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/ shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/
Date Wed, 09 Sep 2009 03:19:40 GMT
Author: lu4242
Date: Wed Sep  9 03:19:39 2009
New Revision: 812756

URL: http://svn.apache.org/viewvc?rev=812756&view=rev
Log:
MYFACES-2262 implement outcomtarget renderers

Added:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlOutcomeTargetButtonRenderer.java
  (with props)
    myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlOutcomeTargetButtonRendererBase.java
  (with props)
Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetButton.java
    myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetLink.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLinkRenderer.java
    myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetButton.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetButton.java?rev=812756&r1=812755&r2=812756&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetButton.java
(original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetButton.java
Wed Sep  9 03:19:39 2009
@@ -31,7 +31,8 @@
 (
 name="h:button",
 clazz = "javax.faces.component.html.HtmlOutcomeTargetButton",template=true,
-implementz = "javax.faces.component.behavior.ClientBehaviorHolder"
+implementz = "javax.faces.component.behavior.ClientBehaviorHolder",
+defaultRendererType = "javax.faces.Button"
 )
 abstract class _HtmlOutcomeTargetButton extends UIOutcomeTarget implements _FocusBlurProperties,
 _EventProperties, _StyleProperties, _UniversalProperties, _AccesskeyProperty,

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetLink.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetLink.java?rev=812756&r1=812755&r2=812756&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetLink.java
(original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/html/_HtmlOutcomeTargetLink.java
Wed Sep  9 03:19:39 2009
@@ -31,11 +31,12 @@
 (
 name="h:link",
 clazz = "javax.faces.component.html.HtmlOutcomeTargetLink",template=true,
-implementz = "javax.faces.component.behavior.ClientBehaviorHolder"
+implementz = "javax.faces.component.behavior.ClientBehaviorHolder",
+defaultRendererType = "javax.faces.Link"
 )
 abstract class _HtmlOutcomeTargetLink extends UIOutcomeTarget implements _FocusBlurProperties,
 _EventProperties, _StyleProperties, _UniversalProperties, _AccesskeyProperty,
-_TabindexProperty, _AltProperty, _LinkProperties
+_TabindexProperty, _LinkProperties
 {
 
   static public final String COMPONENT_FAMILY =

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLinkRenderer.java?rev=812756&r1=812755&r2=812756&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLinkRenderer.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLinkRenderer.java
Wed Sep  9 03:19:39 2009
@@ -36,7 +36,11 @@
     @JSFRenderer(
         renderKitId="HTML_BASIC",
         family="javax.faces.Command",
-        type="javax.faces.Link")
+        type="javax.faces.Link"),
+    @JSFRenderer(
+        renderKitId = "HTML_BASIC",
+        family = "javax.faces.OutcomeTarget",
+        type = "javax.faces.Link")
 })
 public class HtmlLinkRenderer
     extends HtmlLinkRendererBase

Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlOutcomeTargetButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlOutcomeTargetButtonRenderer.java?rev=812756&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlOutcomeTargetButtonRenderer.java
(added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlOutcomeTargetButtonRenderer.java
Wed Sep  9 03:19:39 2009
@@ -0,0 +1,40 @@
+/*
+ * 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.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
+import org.apache.myfaces.shared_impl.renderkit.html.HtmlOutcomeTargetButtonRendererBase;
+
+/**
+ * @since 2.0
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+@JSFRenderer(renderKitId = "HTML_BASIC",
+        family="javax.faces.OutcomeTarget",
+        type="javax.faces.Button")
+public class HtmlOutcomeTargetButtonRenderer extends HtmlOutcomeTargetButtonRendererBase
+{
+    
+}

Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlOutcomeTargetButtonRenderer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlOutcomeTargetButtonRenderer.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java?rev=812756&r1=812755&r2=812756&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
(original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
Wed Sep  9 03:19:39 2009
@@ -29,6 +29,7 @@
 import javax.faces.application.ViewHandler;
 import javax.faces.component.UICommand;
 import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutcomeTarget;
 import javax.faces.component.UIOutput;
 import javax.faces.component.UIParameter;
 import javax.faces.component.behavior.ClientBehaviorHolder;
@@ -108,6 +109,10 @@
                                    getStyle(facesContext, component),
                                    getStyleClass(facesContext, component));
         }
+        else if (component instanceof UIOutcomeTarget)
+        {
+            renderOutcomeLinkStart(facesContext, (UIOutcomeTarget)component);
+        }        
         else if (component instanceof UIOutput)
         {
             renderOutputLinkStart(facesContext, (UIOutput)component);
@@ -163,6 +168,10 @@
             HtmlFormRendererBase.renderScrollHiddenInputIfNecessary(
                 findNestingForm(component, facesContext).getForm(), facesContext, facesContext.getResponseWriter());
         }
+        else if (component instanceof UIOutcomeTarget)
+        {
+            renderOutcomeLinkEnd(facesContext, component);
+        }
         else if (component instanceof UIOutput)
         {
             renderOutputLinkEnd(facesContext, component);
@@ -461,17 +470,7 @@
         else
         {
             //calculate href
-            String href = null;
-            
-            if (output instanceof HtmlOutcomeTargetLink)
-            {
-                href = getOutcomeTargetLinkHref (facesContext, (HtmlOutcomeTargetLink) output);
-            }
-            
-            else
-            {
-                href = org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue(facesContext,
output);
-            }
+            String href = org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue(facesContext,
output);
             
             //check if there is an anchor # in it
             int index = href.indexOf('#');
@@ -504,6 +503,33 @@
             writer.flush();
         }
     }
+    
+    protected void renderOutcomeLinkStart(FacesContext facesContext, UIOutcomeTarget output)
+            throws IOException
+    {
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        if (HtmlRendererUtils.isDisabled(output))
+        {
+            writer.startElement(HTML.SPAN_ELEM, output);
+            HtmlRendererUtils.writeIdIfNecessary(writer, output, facesContext);
+            HtmlRendererUtils.renderHTMLAttributes(writer, output, HTML.ANCHOR_PASSTHROUGH_ATTRIBUTES);
+        }
+        else
+        {
+            //calculate href
+            String href = facesContext.getExternalContext().encodeResourceURL(
+                    getOutcomeTargetLinkHref (facesContext, writer, output));
+
+            //write anchor
+            writer.startElement(HTML.ANCHOR_ELEM, output);
+            HtmlRendererUtils.writeIdAndNameIfNecessary(writer, output, facesContext);
+            writer.writeURIAttribute(HTML.HREF_ATTR, href, null);
+            HtmlRendererUtils.renderHTMLAttributes(writer, output, org.apache.myfaces.shared.renderkit.html.HTML.ANCHOR_PASSTHROUGH_ATTRIBUTES);
+            writer.flush();
+        }
+    }
+    
 
     private void renderLinkParameter(String name,
                                      Object value,
@@ -553,7 +579,23 @@
         }
     }
 
-
+    protected void renderOutcomeLinkEnd(FacesContext facesContext, UIComponent component)
+            throws IOException
+    {
+        ResponseWriter writer = facesContext.getResponseWriter();
+        
+        if (HtmlRendererUtils.isDisabled(component))
+        {
+            writer.endElement(HTML.SPAN_ELEM);
+        }
+        else
+        {
+            writer.writeText (org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue
+                 (facesContext, component), null);
+            writer.endElement(HTML.ANCHOR_ELEM);
+        }
+    }
+    
     protected void renderOutputLinkEnd(FacesContext facesContext, UIComponent component)
             throws IOException
     {
@@ -565,20 +607,8 @@
         }
         else
         {
-            if (component instanceof HtmlOutcomeTargetLink)
-            {
-                // The value of an HtmlOutcomeTargetLink is the anchor text.
-                
-                writer.writeText (org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue
-                     (facesContext, component), null);
-            }
-            
-            else
-            {
-                // force separate end tag
-                writer.writeText("", null);
-            }
-            
+            // force separate end tag
+            writer.writeText("", null);
             writer.endElement(HTML.ANCHOR_ELEM);
         }
     }
@@ -599,20 +629,32 @@
         }
     }
     
-    private String getOutcomeTargetLinkHref (FacesContext facesContext, HtmlOutcomeTargetLink
component)
+    private String getOutcomeTargetLinkHref (FacesContext facesContext,
+            ResponseWriter writer, UIOutcomeTarget component) throws IOException
     {
         String fragment = (String) component.getAttributes().get ("fragment");
-        String result = component.getOutcome();
+        String href = component.getOutcome();
         ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
         
         // The href for an HtmlOutcomeTargetLink is outcome#fragment.
         
-        result = ((result == null) ? "" : result.trim());
+        href = ((href == null) ? "" : href.trim());
         
         // Get the correct URL for the outcome.
         
-        result = viewHandler.deriveViewId (facesContext, result);
-        result = viewHandler.getActionURL (facesContext, result);
+        href = viewHandler.deriveViewId (facesContext, href);
+        href = viewHandler.getActionURL (facesContext, href);
+        
+        //TODO: JSF 2.0 Deal with f:viewParam and f:metadata
+        //check if there is an anchor # in it
+        if (getChildCount(component) > 0)
+        {
+            StringBuffer hrefBuf = new StringBuffer(href);
+            addChildParametersToHref(facesContext, component, hrefBuf,
+                                 (href.indexOf('?') == -1), //first url parameter?
+                                 writer.getCharacterEncoding());
+            href = hrefBuf.toString();
+        }
         
         if (fragment != null)
         {
@@ -620,10 +662,10 @@
             
             if (fragment.length() > 0)
             {
-                result += "#" + fragment;
+                href += "#" + fragment;
             }
         }
         
-        return result;
+        return href;
     }
 }

Added: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlOutcomeTargetButtonRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlOutcomeTargetButtonRendererBase.java?rev=812756&view=auto
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlOutcomeTargetButtonRendererBase.java
(added)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlOutcomeTargetButtonRendererBase.java
Wed Sep  9 03:19:39 2009
@@ -0,0 +1,258 @@
+/*
+ *  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.shared.renderkit.html;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Iterator;
+
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutcomeTarget;
+import javax.faces.component.UIParameter;
+import javax.faces.component.html.HtmlOutcomeTargetButton;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.apache.myfaces.shared.config.MyfacesConfig;
+import org.apache.myfaces.shared.renderkit.JSFAttr;
+import org.apache.myfaces.shared.renderkit.RendererUtils;
+
+/**
+ * @since 2.0
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class HtmlOutcomeTargetButtonRendererBase extends HtmlRenderer
+{
+
+    public boolean getRendersChildren()
+    {
+        return true;
+    }
+
+    public void encodeBegin(FacesContext facesContext, UIComponent uiComponent)
+            throws IOException
+    {
+        super.encodeBegin(facesContext, uiComponent); //check for NP
+
+        String clientId = uiComponent.getClientId(facesContext);
+
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        writer.startElement(HTML.INPUT_ELEM, uiComponent);
+
+        writer.writeAttribute(HTML.ID_ATTR, clientId,
+                org.apache.myfaces.shared.renderkit.JSFAttr.ID_ATTR);
+        writer.writeAttribute(HTML.NAME_ATTR, clientId, JSFAttr.ID_ATTR);
+
+        String image = getImage(uiComponent);
+
+        ExternalContext externalContext = facesContext.getExternalContext();
+
+        if (image != null)
+        {
+            writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_IMAGE,
+                    org.apache.myfaces.shared.renderkit.JSFAttr.TYPE_ATTR);
+            String src = facesContext.getApplication().getViewHandler()
+                    .getResourceURL(facesContext, image);
+            writer.writeURIAttribute(HTML.SRC_ATTR, externalContext
+                    .encodeResourceURL(src),
+                    org.apache.myfaces.shared.renderkit.JSFAttr.IMAGE_ATTR);
+        }
+        else
+        {
+            writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_BUTTON,
+                    org.apache.myfaces.shared.renderkit.JSFAttr.TYPE_ATTR);
+            Object value = org.apache.myfaces.shared.renderkit.RendererUtils
+                    .getStringValue(facesContext, uiComponent);
+            if (value != null)
+            {
+                writer
+                        .writeAttribute(
+                                org.apache.myfaces.shared.renderkit.html.HTML.VALUE_ATTR,
+                                value,
+                                org.apache.myfaces.shared.renderkit.JSFAttr.VALUE_ATTR);
+            }
+        }
+
+        if (HtmlRendererUtils.isDisabled(uiComponent))
+        {
+            HtmlRendererUtils.renderHTMLAttribute(writer, HTML.DISABLED_ATTR,
+                    HTML.DISABLED_ATTR, true);
+        }
+        else
+        {
+            String href = facesContext.getExternalContext().encodeResourceURL(
+                    getOutcomeTargetLinkHref(facesContext, writer,
+                            (UIOutcomeTarget) uiComponent));
+
+            String commandOnClick = (String) uiComponent.getAttributes().get(
+                    HTML.ONCLICK_ATTR);
+            StringBuffer onClick = new StringBuffer();
+
+            if (commandOnClick != null)
+            {
+                onClick.append(commandOnClick);
+                onClick.append(';');
+            }
+
+            onClick.append("window.location.href = '" + href + "'");
+
+            writer.writeAttribute(HTML.ONCLICK_ATTR, onClick.toString(), null);
+        }
+
+        HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+                HTML.COMMON_PASSTROUGH_ATTRIBUTES);
+        HtmlRendererUtils
+                .renderHTMLAttributes(
+                        writer,
+                        uiComponent,
+                        HTML.COMMON_FIELD_EVENT_ATTRIBUTES_WITHOUT_ONSELECT_AND_ONCHANGE);
+        HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
+                HTML.COMMON_FIELD_ATTRIBUTES_WITHOUT_DISABLED);
+        HtmlRendererUtils.renderHTMLAttribute(writer, uiComponent,
+                HTML.ALT_ATTR, HTML.ALT_ATTR);
+
+        writer.flush();
+    }
+
+    private String getOutcomeTargetLinkHref(FacesContext facesContext,
+            ResponseWriter writer, UIOutcomeTarget component)
+            throws IOException
+    {
+        String fragment = (String) component.getAttributes().get("fragment");
+        String href = component.getOutcome();
+        ViewHandler viewHandler = facesContext.getApplication()
+                .getViewHandler();
+
+        // The href for an HtmlOutcomeTargetLink is outcome#fragment.
+
+        href = ((href == null) ? "" : href.trim());
+
+        // Get the correct URL for the outcome.
+
+        href = viewHandler.deriveViewId(facesContext, href);
+        href = viewHandler.getActionURL(facesContext, href);
+
+        //TODO: JSF 2.0 Deal with f:viewParam and f:metadata
+        //check if there is an anchor # in it
+        if (getChildCount(component) > 0)
+        {
+            StringBuffer hrefBuf = new StringBuffer(href);
+            addChildParametersToHref(facesContext, component, hrefBuf, (href
+                    .indexOf('?') == -1), //first url parameter?
+                    writer.getCharacterEncoding());
+            href = hrefBuf.toString();
+        }
+
+        if (fragment != null)
+        {
+            fragment = fragment.trim();
+
+            if (fragment.length() > 0)
+            {
+                href += "#" + fragment;
+            }
+        }
+        return href;
+    }
+
+    private void addChildParametersToHref(FacesContext facesContext,
+            UIComponent linkComponent, StringBuffer hrefBuf,
+            boolean firstParameter, String charEncoding) throws IOException
+    {
+        boolean strictXhtmlLinks = MyfacesConfig.getCurrentInstance(
+                facesContext.getExternalContext()).isStrictXhtmlLinks();
+        for (Iterator it = getChildren(linkComponent).iterator(); it.hasNext();)
+        {
+            UIComponent child = (UIComponent) it.next();
+            if (child instanceof UIParameter)
+            {
+                String name = ((UIParameter) child).getName();
+                Object value = ((UIParameter) child).getValue();
+                addParameterToHref(name, value, hrefBuf, firstParameter,
+                        charEncoding, strictXhtmlLinks);
+                firstParameter = false;
+            }
+        }
+    }
+
+    private static void addParameterToHref(String name, Object value,
+            StringBuffer hrefBuf, boolean firstParameter, String charEncoding,
+            boolean strictXhtmlLinks) throws UnsupportedEncodingException
+    {
+        if (name == null)
+        {
+            throw new IllegalArgumentException(
+                    "Unnamed parameter value not allowed within command link.");
+        }
+
+        if (firstParameter)
+        {
+            hrefBuf.append('?');
+        }
+        else
+        {
+            if (strictXhtmlLinks)
+            {
+                hrefBuf.append("&");
+            }
+            else
+            {
+                hrefBuf.append('&');
+            }
+        }
+
+        hrefBuf.append(URLEncoder.encode(name, charEncoding));
+        hrefBuf.append('=');
+        if (value != null)
+        {
+            //UIParameter is no ConvertibleValueHolder, so no conversion possible
+            hrefBuf.append(URLEncoder.encode(value.toString(), charEncoding));
+        }
+    }
+
+    private String getImage(UIComponent uiComponent)
+    {
+        if (uiComponent instanceof HtmlOutcomeTargetButton)
+        {
+            return ((HtmlOutcomeTargetButton) uiComponent).getImage();
+        }
+        return (String) uiComponent.getAttributes().get(JSFAttr.IMAGE_ATTR);
+    }
+
+    public void encodeChildren(FacesContext facesContext, UIComponent component)
+            throws IOException
+    {
+        RendererUtils.renderChildren(facesContext, component);
+    }
+
+    public void encodeEnd(FacesContext facesContext, UIComponent component)
+            throws IOException
+    {
+        super.encodeEnd(facesContext, component); //check for NP
+
+        ResponseWriter writer = facesContext.getResponseWriter();
+
+        writer.endElement(HTML.INPUT_ELEM);
+    }
+}

Propchange: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlOutcomeTargetButtonRendererBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlOutcomeTargetButtonRendererBase.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL



Mime
View raw message