You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chatzinikos, Fotis, VF-GR Consultant" <Fo...@vodafone.net.gr> on 2005/08/23 11:00:13 UTC

auto selection

Hello again, 

Some days ago I sent a mail here (Title: Pre-population of <html:select>
tag using multiple<html:option> tags) and got no reply.

Could somebody provide a working example of a combination of a
FormAction and a jsp page that correctly set an html list (select) tag
to the correct (selected) value?

Thanks in advance,
Fotis


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


Re: auto selection

Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Chatzinikos, Fotis, VF-GR Consultant" 
<Fo...@vodafone.net.gr>

> Some days ago I sent a mail here (Title: Pre-population of <html:select>
> tag using multiple<html:option> tags) and got no reply.

Try re-posting just the <html:select> section and the resulting HTML when 
you 'view source' on the page.  If your form bean has a matching String 
property, the framework ought to pre-select the right option for you.  If 
you haven't already, add a <bean:write> tag to prove that the form property 
is set to what you think it is.

Also, it's possible that some people didn't get past the first sentence 
where you said you're using 'reset' to preopulate a form bean.  (Normally, 
the only thing you need to do in 'reset' is set checkboxes to false, and 
then only for a session-scoped form bean.  A 'SetupAction' or some variant 
of DispatchAction can help with form pre-population.)


HTH,
-- 
Wendy Smoak 


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