I think this is the only way, there is no html attribute for a <button> which will set the focus. A cleaner solution might be to create a "focus" mixin which adds the javascript I suggested.
Then you could do something like... <t:button ... mixins="focus" /> @see http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained Cheers, Lance. 2008/6/11 Kameswari <[EMAIL PROTECTED]>: > > Is there any othe solution? > > Lance Java wrote: > > > > You oculd do it with javascript: > > > > Event.observe(window, 'load', > > function() { $('buttonId').focus(); } > > ); > > > > 2008/6/10 Kameswari <[EMAIL PROTECTED]>: > > > >> > >> I have a form with 2 @Submit buttons. > >> By default while rendering the 1st button is set to focus. > >> But i need the 2nd button to be in focus. > >> I dont want to change the 1st button to be a @Button which fixes the > >> problem > >> Can anyone pls help.. > >> -- > >> View this message in context: > >> > http://www.nabble.com/Urgent-setting-focus-on-%40submit-buttons-tp17752598p17752598.html > >> Sent from the Tapestry - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Urgent-setting-focus-on-%40submit-buttons-tp17752598p17775567.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
