You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Murray Brandon <mu...@hotmagna.com> on 2006/04/19 08:12:32 UTC
Re: clear_formname( ) javascript
Any more hints on this one guys?
I've run out of ideas.
Murray Brandon wrote:
> Hey no worries Mario, I'll check out the latest nightly to see if it
> gets rid of the warning.
>
> Can any of you guys fill me in on the source of this clear_formname( )
> method?
> I mean, I can see where it is called from, but is it the myfaces
> filter that's responsible for generating the method?
> >From what I read, my filter-mapping warnings can be ignored - it is
> still processed ok, so the clear_formname( ) should be being created.
> Yet I suspect my myfaces filter is not being loaded correctly. How
> can I tell? Wouldn't that stop the date chooser buttons appearing?
> Mine appear.
>
> Looking at the source of HtmlFormRendererBase it looks like it
> /optionally/ outputs the javascript for the clear_formname( ) method,
> but HtmlButtonRendererBase /always/ adds the call to the method
> onClick= regardless. So I get the javascript error on my page when I
> click on a commandButton saying that clear_formname( ) is not defined.
>
> Have I missed something? Are there circumstances where "set" would be
> empty?
> Maybe I need to set the HIDDEN_COMMAND_INPUTS_SET_ATTR attribute somehow?
>
> eg. (my source is a nightly from a few weeks ago, so forgive me if
> it's not quite the same)
>
> *HtmlFormRendererBase.java *
> //render hidden command inputs
> Set set =
> (Set)component.getAttributes().get(HIDDEN_COMMAND_INPUTS_SET_ATTR);
> *if (set != null && !set.isEmpty()) *
> {
> HtmlRendererUtils.renderHiddenCommandFormParams(writer, set);
>
> String target;
> if (component instanceof HtmlForm)
> {
> target = ((HtmlForm)component).getTarget();
> }
> else
> {
> target =
> (String)component.getAttributes().get(HTML.TARGET_ATTR);
> }
>
> HtmlRendererUtils.renderClearHiddenCommandFormParamsFunction(writer,
>
> component.getClientId(facesContext),
>
> set,
>
> target);
> }
>
> *HtmlButtonRendererBase.java* /always /puts in the javascript for the
> call to the method
>
> /*/call the clear_<formName> method
>
> onClick.append(HtmlRendererUtils.getClearHiddenCommandFormParamsFunctionName(formName)).append("();");*
>
>
> Regards, Murray
>
> PS. I noticed you all working over easter. tsk tsk. ;-)
>
> Mario Ivankovits wrote:
>> Hi!
>>
>> Yes, it was only a warning - no other side effect. It should be fixed now.
>>
>> Sorry for the inconvenience.
>>
>> Ciao,
>> Mario
>>
>>> On 4/14/06, Mike Kienenberger <mk...@gmail.com> wrote:
>>>
>>>
>>>> I've opened http://issues.apache.org/jira/browse/TOMAHAWK-257 on this issue.
>>>>
>>>> I know things work if you use the proposed 1.1.2 MyFaces-core release
>>>> even with the warnings. It's possible that things are breaking if you
>>>> use the 1.1.3 MyFaces-core trunk.
>>>>
>>>>
>>> I ran a quick test, and it doesn't seem to matter if I use 1.1.3 core.
>>> I get the warnings at startup that way, but my filter-mappings are
>>> still correctly used. As near as I can tell, the only effect is an
>>> incorrect warning message, but everything is working as expected.
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@facelets.dev.java.net
>> For additional commands, e-mail: users-help@facelets.dev.java.net
>>
>>
>>
>