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 Tue, 11 May 2010 13:47:21 GMT
Good morning List,

> I use to do this "manually" with javascript, didn't know it was part of
> s:form tag. So today I decided to give it a try but it is not working
> for me... how does this works? Does it need some plugin or additional
> config to make it work?

I tried focusElement as shown in "id of element that will receive the 
focus when page loads."

No luck; it doesn't work for me either :-(

<s:form theme="simple" focusElement="col1"... >
    <s:textfield name="col1" id="col1" />
... ...
</s:form>

col1 is not focused.

Any clue and comments how "s:form" setups focus as default? struts1 
html:form just saying focus, why s:form does not support this?

Thank you,
--
Lu Ying







>> Hi Lu,
>> does this help http://struts.apache.org/2.1.8.1/docs/form.html ?
>> Search for focusElement in this text.
>>
>> Best greetings,
>> PaweĊ‚ Wielgus.
>>
>>
>> 2010/5/10 Emi Lu<emilu@encs.concordia.ca>:
>>> Good afternoon,
>>>
>>> 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.
>>>
>>> Thanks a lot!
>>>
>>> --
>>> Lu Ying
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


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


Mime
View raw message