You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Klein <pa...@bi-so.de> on 2007/01/16 09:50:13 UTC

Setting Focus to a formcomponent (4.1.2 SNAPSHOT)

Hi!

I'm trying to set the focus using the example script on tapestry's 
@Script-component page but every time i try the resulting page using 
firefox firebug shows me the error "document.reportForm has no 
properties" even though the script is completely defined after the form. 
I checked the generated JavaScript where the code looks correct 
(componentId is correctly set)
I also recognized that the focus is set previous the @Script-caused 
include by tapestry itself to the first form-component of the page.

Anyone could help me out here? Or is there maybe a way to manipulate 
tapestry's own focus-setting?

Regards,
    Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Setting Focus to a formcomponent (4.1.2 SNAPSHOT)

Posted by Patrick Klein <pa...@bi-so.de>.
Hi again!

Found a working solution for my case
Emptying the body part and simplifying the initalization part to 
document.getElemtentById("submittedId").focus() does the trick 
(parameters have to be adjusted, too)

Regards,
    Patrick

> Hi!
>
> I'm trying to set the focus using the example script on tapestry's 
> @Script-component page but every time i try the resulting page using 
> firefox firebug shows me the error "document.reportForm has no 
> properties" even though the script is completely defined after the 
> form. I checked the generated JavaScript where the code looks correct 
> (componentId is correctly set)
> I also recognized that the focus is set previous the @Script-caused 
> include by tapestry itself to the first form-component of the page.
>
> Anyone could help me out here? Or is there maybe a way to manipulate 
> tapestry's own focus-setting?
>
> Regards,
>    Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org