Yes, but let it as is do not cause any problem.

On Wed, Jun 4, 2008 at 3:01 PM, Paul Spencer <[EMAIL PROTECTED]>
wrote:

> Leonardo,
> Should HtmlHiddenRenderer.java be removed when we update to Shale 1.1?
>
> Paul Spencer
>
>
> Leonardo Uribe wrote:
>
>> On Wed, Jun 4, 2008 at 2:28 PM, Paul Spencer <[EMAIL PROTECTED]> wrote:
>>
>>  Leonardo,
>>> Was HtmlHiddenRenderer.java add just to make the test pass, or is it
>>> need to when Tomahawk is run with the RI?
>>>
>>>
>> Really it is not necessary to tomahawk runs with the RI, but it is
>> necessary
>> to make the test pass, because TestUtils.addDefaultRenderers()  add this
>> as
>> javax.faces.Hidden renderer:
>>
>>        addRenderer(facesContext, "javax.faces.Input",
>> "javax.faces.Hidden",
>>
>>                "org.apache.myfaces.renderkit.html.HtmlHiddenRenderer");
>>
>> If the test can read the faces-config.xml file there is no problem, but in
>> that case the class referred on jsf ri does not exists.
>>
>>
>>  Paul Spencer
>>>
>>>
>>>
>>> [EMAIL PROTECTED] wrote:
>>>
>>>  Author: lu4242
>>>> Date: Wed Jun  4 11:53:57 2008
>>>> New Revision: 663341
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=663341&view=rev
>>>> Log:
>>>> TOMAHAWK-1023 HtmlInputHidden fails unit test when using RI
>>>>
>>>> Added:
>>>>
>>>>
>>>>  
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlHiddenRenderer.java
>>>>  (with props)
>>>> Modified:
>>>>
>>>>
>>>>  
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputHidden.java
>>>>
>>>>
>>>>  
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java
>>>>
>>>>
>>>>  
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java
>>>>
>>>> Modified:
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputHidden.java
>>>> URL:
>>>>
>>>> http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputHidden.java?rev=663341&r1=663340&r2=663341&view=diff
>>>>
>>>>
>>>> ==============================================================================
>>>> ---
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputHidden.java
>>>> (original)
>>>> +++
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/ext/AbstractHtmlInputHidden.java
>>>> Wed Jun  4 11:53:57 2008
>>>> @@ -42,7 +42,7 @@
>>>>    implements ForceIdAware
>>>>  {
>>>>    public static final String COMPONENT_TYPE =
>>>> "org.apache.myfaces.HtmlInputHidden";
>>>> -    public static final String DEFAULT_RENDERER_TYPE =
>>>> "javax.faces.Hidden";
>>>> +    public static final String DEFAULT_RENDERER_TYPE =
>>>> "org.apache.myfaces.Hidden";
>>>>      public AbstractHtmlInputHidden()
>>>>    {
>>>>
>>>> Added:
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlHiddenRenderer.java
>>>> URL:
>>>>
>>>> http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlHiddenRenderer.java?rev=663341&view=auto
>>>>
>>>>
>>>> ==============================================================================
>>>> ---
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlHiddenRenderer.java
>>>> (added)
>>>> +++
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlHiddenRenderer.java
>>>> Wed Jun  4 11:53:57 2008
>>>> @@ -0,0 +1,90 @@
>>>> +/*
>>>> + * 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.ext;
>>>> +
>>>> +import java.io.IOException;
>>>> +
>>>> +import javax.faces.component.UIComponent;
>>>> +import javax.faces.component.UIInput;
>>>> +import javax.faces.component.UIOutput;
>>>> +import javax.faces.context.FacesContext;
>>>> +import javax.faces.context.ResponseWriter;
>>>> +import javax.faces.convert.ConverterException;
>>>> +
>>>> +import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
>>>> +import org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils;
>>>> +import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
>>>> +import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRenderer;
>>>> +import
>>>> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils;
>>>> +
>>>> +
>>>> +/**
>>>> + * @JSFRenderer
>>>> + *   renderKitId="HTML_BASIC"
>>>> + *   family="javax.faces.Input"
>>>> + *   type="org.apache.myfaces.Hidden"
>>>> + *   + * @author Thomas Spiegl (latest modification by $Author$)
>>>> + * @author Anton Koinov
>>>> + * @version $Revision$ $Date$
>>>> + */
>>>> +public class HtmlHiddenRenderer
>>>> +extends HtmlRenderer
>>>> +{
>>>> +    public void encodeEnd(FacesContext facesContext, UIComponent
>>>> uiComponent)
>>>> +        throws IOException
>>>> +    {
>>>> +        RendererUtils.checkParamValidity(facesContext, uiComponent,
>>>> UIInput.class);
>>>> +
>>>> +        ResponseWriter writer = facesContext.getResponseWriter();
>>>> +
>>>> +        writer.startElement(HTML.INPUT_ELEM, uiComponent);
>>>> +        writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN,
>>>> null);
>>>> +
>>>> +        String clientId = uiComponent.getClientId(facesContext);
>>>> +        writer.writeAttribute(HTML.ID_ATTR, clientId, null);
>>>> +        writer.writeAttribute(HTML.NAME_ATTR, clientId, null);
>>>> +
>>>> +        String value = RendererUtils.getStringValue(facesContext,
>>>> uiComponent);
>>>> +        if (value != null)
>>>> +        {
>>>> +            writer.writeAttribute(HTML.VALUE_ATTR, value,
>>>> JSFAttr.VALUE_ATTR);
>>>> +        }
>>>> +
>>>> +        writer.endElement(HTML.INPUT_ELEM);
>>>> +    }
>>>> +
>>>> +    public Object getConvertedValue(FacesContext facesContext,
>>>> UIComponent uiComponent, Object submittedValue) throws
>>>> ConverterException
>>>> +    {
>>>> +        RendererUtils.checkParamValidity(facesContext, uiComponent,
>>>> UIOutput.class);
>>>> +        return RendererUtils.getConvertedUIOutputValue(facesContext,
>>>> +
>>>> (UIOutput)uiComponent,
>>>> +                                                       submittedValue);
>>>> +    }
>>>> +
>>>> +
>>>> +    public void decode(FacesContext facesContext, UIComponent
>>>> component)
>>>> +     {
>>>> +
>>>> RendererUtils.checkParamValidity(facesContext,component,UIInput.class);
>>>> +
>>>> +         HtmlRendererUtils.decodeUIInput(facesContext, component);
>>>> +
>>>> +     }
>>>> +
>>>> +}
>>>>
>>>> Propchange:
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlHiddenRenderer.java
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>   svn:eol-style = native
>>>>
>>>> Propchange:
>>>>
>>>> myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlHiddenRenderer.java
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>   svn:keywords = Date Author Id Revision HeadURL
>>>>
>>>> Modified:
>>>>
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java
>>>> URL:
>>>>
>>>> http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java?rev=663341&r1=663340&r2=663341&view=diff
>>>>
>>>>
>>>> ==============================================================================
>>>> ---
>>>>
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java
>>>> (original)
>>>> +++
>>>>
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/component/html/ext/HtmlInputHiddenTest.java
>>>> Wed Jun  4 11:53:57 2008
>>>> @@ -48,7 +48,9 @@
>>>>    {
>>>>        // Define the component
>>>>        UIComponent component = new HtmlInputHidden();
>>>> -        component.setParent(new HtmlForm());
>>>> +        component.setId("TestComponent");
>>>> +        HtmlForm form = new HtmlForm();
>>>> +        form.getChildren().add(component);
>>>>          // Render the component
>>>>        try
>>>>
>>>> Modified:
>>>>
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java
>>>> URL:
>>>>
>>>> http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java?rev=663341&r1=663340&r2=663341&view=diff
>>>>
>>>>
>>>> ==============================================================================
>>>> ---
>>>>
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java
>>>> (original)
>>>> +++
>>>>
>>>> myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/test/utils/TestUtils.java
>>>> Wed Jun  4 11:53:57 2008
>>>> @@ -73,6 +73,9 @@
>>>>        addRenderer(facesContext, "javax.faces.Input",
>>>> "javax.faces.Hidden",
>>>>                "org.apache.myfaces.renderkit.html.HtmlHiddenRenderer");
>>>>  +        addRenderer(facesContext, "javax.faces.Input",
>>>> "org.apache.myfaces.Hidden",
>>>> +
>>>>  "org.apache.myfaces.renderkit.html.ext.HtmlHiddenRenderer");
>>>> +                 addRenderer(facesContext, "javax.faces.Graphic",
>>>> "javax.faces.Image",
>>>>                "org.apache.myfaces.renderkit.html.HtmlImageRenderer");
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

Reply via email to