You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sony Thomas <so...@genialgenetics.com> on 2005/12/23 16:41:53 UTC

Drop down list focusing problem

Hi friends,

I am populating   a dropdown list from an arraylist. but I wan to focus 
on one of the values. Is there is any way to say the focus from jsp.

Eg:  I have English and Portughese as language. When I edit a user with 
language "portughese" the one which I have to show is Portughese. But I 
am adding english first to the dropdown and then portughese. Even I am 
adding portughese second, the focus should be on portughese when jsp load.

Please help me in this matter. 


Thanks in advance,


Sony

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


Re: Drop down list focusing problem

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/23/05, Sony Thomas <so...@genialgenetics.com> wrote:

> I am populating   a dropdown list from an arraylist. but I wan to focus
> on one of the values. Is there is any way to say the focus from jsp.
>
> Eg:  I have English and Portughese as language. When I edit a user with
> language "portughese" the one which I have to show is Portughese. But I
> am adding english first to the dropdown and then portughese. Even I am
> adding portughese second, the focus should be on portughese when jsp load.

In the Action, before forwarding to the JSP, set the form bean
property to the correct value, and the framework will automatically
pre-select that item when the page is displayed.

(If you want this form element to have focus when the page loads,
<html:form> has a 'focus' attribute you can set.)

--
Wendy

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