You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by peteralen <pe...@earthlink.net> on 2002/10/16 17:49:19 UTC

and SELECTing an option - without access to ActionForm

Hello,

I have a portlet that has a select list.  The code looks like:

<html:select property="CC" size="10">
  <html:options collection="ctrypicklist" property="value"
labelProperty="label"/>
</html:select>

When a country is selected and the form is submitted, the selected
country is highlighted when the page is redrawn because the active
ActionForm has the value in the field CC (getCC()).  No problems there.
My problem comes when another form from another portlet is submitted.
When the portal is redrawn the country that was selected is no longer
selected because a different ActionForm was used in the submission.  I
do have the value of CC available via getAttribute() but I can't find a
way to let the <html:options> tag know which option to SELECT.

Does anyone know either how to pass an argument for SELECTion to the
taglib OR how I can put a value in the ActionForm used by the select
object when that ActionForm was not used on the page submission?  It
would seem that this is not an uncommon thing to do.

Thanks - Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>