struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emi Lu <em...@encs.concordia.ca>
Subject Re: how to set default focus field in <s:form> ?
Date Wed, 12 May 2010 14:00:53 GMT
>>> Struts1, I use<html:form focus="field_name" to focus a default field.
>>>
>>> For *struts2.1.8.1*, may I know the grammar of setting focus value for
>>> "s:form" please?
>>>
>>> <s:form focus="field_name">  does not work.
>>
>>
>
> I just use<body onload=xxxxxx>  e.g;
>
> <body onLoad="document.login.j_username.focus()">
> <form action="j_spring_security_check" method="post" name="login">
> 	
> 	
> 	<label for="j_username">Username</label>
> <input type="text" name="j_username" id="j_username" value="<s:property
> value="%{#session.SPRING_SECURITY_LAST_USERNAME}"/>"/>

I would prefer that s:form supports focus.

By using tiles, <body> is in global_layout.jsp page, for decedent pages, 
I will not be able to set body onload.

Why <s:form> does not support focus? This is strange :-(

--
Lu Ying




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message