You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Borut BolĨina <bo...@gmail.com> on 2009/08/05 14:54:17 UTC
formfragment and autofocus
Hi,
if form has formfragments, wouldn't it be nice if there was a property to
autofocus first field in visible fragment?
Right now I am trying to:
@AfterRender
public void afterRender() {
if (step.equals(Step.CAPTCHA)) {
renderSupport.addScript("Field.activate('captchaText');");
}
}
but the generated html includes
<!--
Tapestry.DEBUG_ENABLED = true;
Tapestry.onDOMLoaded(function() {
...
Field.activate('captchaText');
$('firstname').activate();
...
});
// -->
Because I have autofocus on the form, the Field.activate('captchaText') does
not have any effect.
Cheers,
Borut