You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2006/08/31 10:14:11 UTC
HtmlFocusRenderer questions
Hi!
*) Any reason why the HtmlFocusRenderer imports dojo?
DojoUtils.addMainInclude(facesContext, uiComponent,
javascriptLocation, new DojoConfig());
DojoUtils.addRequire(facesContext, uiComponent, "dojo.event.*");
The only thing it do afterwards is something like
document.getElementById("").focus();
Should work without dojo too, no?
*) What about "rememberClientFocus", from looking at the renderer it
looks like this code wont work!? From decode:
if(focus.isRememberClientFocus())
{
focus.setSubmittedValue(RendererUtils.getStringValue(facesContext,
component));
}
*) Why render a input hidden field? I think this was a try to make
rememberClientFocus work, but it looks like it is incomplete code.
I'll make the import of dojo optional (in case of rememberClientFocus)
and open a jira about the broken code if I am right with the above.
Any comments?
Thanks!
Ciao,
Mario
Re: HtmlFocusRenderer questions
Posted by Werner Punz <we...@gmx.at>.
Mario Ivankovits schrieb:
> Hi!
>
> *) Any reason why the HtmlFocusRenderer imports dojo?
>
> DojoUtils.addMainInclude(facesContext, uiComponent,
> javascriptLocation, new DojoConfig());
> DojoUtils.addRequire(facesContext, uiComponent, "dojo.event.*");
>
> The only thing it do afterwards is something like
> document.getElementById("").focus();
>
> Should work without dojo too, no?
>
if it uses only document.getElementyById and not dojo.byId then yes...