You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Elliott <hb...@gmail.com> on 2004/10/06 21:22:32 UTC

Modifying an object within the form bean?

I have a situation where the form bean contains objects inside it
which represent sets of things which will appear in an <html:select>
tag.  In particular, the objects have three properties:

selected_ndx
ndx_set
label_set

One of these objects is the 'moderator' property of the form bean.

The overall design intent was to have an object which could provide
the values and labels for an <html:select> statement and have
selected_ndx be the value which is changed via the selection process
in the web page.

If I write the JSP like this, it works:

  <html:select property="moderator.selected_ndx">
  <html:options property="moderator.ndx_set"
labelProperty="moderator.label_set"/>
  </html:select>

This generates the following HTML:
              
  <select name="moderator.selected_ndx"><option value="0"></option>
  <option value="1">First Selection</option>
  <option value="2">Second Selection</option>
  <option value="3">Third Selection</option></select>

This successfully displays the selected entity and allows it to be
changed via selection through the web page.

However, additionally I need to be able to set the value of this
select from a popup window.  That  generally means I need to specify
the form element as the target of a javascript assignment.  What has
worked in similar circumstances in the past is something like
   
   opener.document.formBean.selectElementName = newValue

where selectElementName is the value of the 'name' attribute from the
select element.  Here that name is "moderator.selected_ndx".  That
causes a problem.  When the javascript runs (from a popup window) the
following javascript error occurs:

   Error: opener.document.formBean.moderator has no properties

Which I interpret as the javascript interpreter being able to find the
formBean property (which I assume is being furnished by the
<html:form> tag) but that there is no attribute of that called
"moderator".  If I didn't use the dotted notation in the <html:select>
tag, the correct attribute gets created, or whatever, and the
javascript works OK.

So -- how can I solve this problem?  Assuming that the naming is the
problem, I've tried introducing a bean like this:

  <bean:define id="mod" name="formBean" property="moderator"/>   
  <html:select name="mod" property="selected_ndx">
  <html:options name="mod" property="ndx_set" 
    labelName="mod" labelProperty="label_set"/>
  </html:select>

Which generates HTML:
  <select name="selected_ndx"><option value="0"></option>
  etc.

But that causes the select element to be unselectable; that is, while
the getter method (getSelected_ndx()) gets invoked, the setter method
(setSelected_ndx()) does not, so that changes to the field no longer
get propagated back to the form bean.  Even if I could get this to
work, I'm dubious that I could have multiple select elements working
properly in the same form since they would all have the same name
attribute (selected_ndx).

While I'm unconvinced that the failure to invoke the setter method
isn't a bug, I still need to solve the problem through some
combination of Struts/JavaScript.

Any suggestions?

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


Re: Modifying an object within the form bean?

Posted by Mike Elliott <hb...@gmail.com>.
> Try opener.document.formBean["moderator.selected_ndx"]  The arrays are
> also hashtables.

Yes, that works.  Thanks a bunch.  Although I still think that the
bean approach *should* have worked -- it doesn't.  And I'll gladly
settle for this workaround.

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


Re: Modifying an object within the form bean?

Posted by Jason King <jh...@airmail.net>.
Ok,
I misunderstood the problem the first time, my bad.
Try opener.document.formBean["moderator.selected_ndx"]  The arrays are 
also hashtables.
Mike Elliott wrote:

>On Wed, 06 Oct 2004 14:38:36 -0500, Jason King <jh...@airmail.net> wrote:
>  
>
>>This is a javascript problem.  The DOM-compliant way to change the
>>selected option for a <select> element is:
>><selectObjectName>.selectedIndex = <newIndex> for your example that
>>would be:
>>
>>opener.document.formBean.selectElementName.selectedIndex = <newValue>;
>>    
>>
>
>No, I don't think so.  For my example I think it would be something more like:
>
>opener.document.formBean.moderator.select_ndx = <newValue>
>
>The problem appears to be the dotted notation that Struts uses to name
>the select element.  If Struts generated
>
><select name="moderator_selected_ndx">
>
>instead of
>
><select name="moderator.selected_ndx">
>
>I feel confident it would work like you said.  But that dot in the
>name apparently makes JavaScript view the field as being the
>'selected_ndx' attribute of the 'moderator' object which, of course,
>doesn't exist.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>  
>


Re: Modifying an object within the form bean?

Posted by Mike Elliott <hb...@gmail.com>.
On Wed, 06 Oct 2004 14:38:36 -0500, Jason King <jh...@airmail.net> wrote:
> This is a javascript problem.  The DOM-compliant way to change the
> selected option for a <select> element is:
> <selectObjectName>.selectedIndex = <newIndex> for your example that
> would be:
> 
> opener.document.formBean.selectElementName.selectedIndex = <newValue>;

No, I don't think so.  For my example I think it would be something more like:

opener.document.formBean.moderator.select_ndx = <newValue>

The problem appears to be the dotted notation that Struts uses to name
the select element.  If Struts generated

<select name="moderator_selected_ndx">

instead of

<select name="moderator.selected_ndx">

I feel confident it would work like you said.  But that dot in the
name apparently makes JavaScript view the field as being the
'selected_ndx' attribute of the 'moderator' object which, of course,
doesn't exist.

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


Re: Bad XML?

Posted by Matt Bathje <mp...@ntsource.com>.
e-denton Java Programmer wrote:

> I am getting this Tomcat error on my remote server (It runs on my local
> server):
> 
> "Oct 6, 2004 12:35:25 PM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 321 column 17: The content of element type
> "struts-config" must match
> "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
> ngs?,controller?,message-resources*,plug-in*)".
> org.xml.sax.SAXParseException: The content of element type "struts-config"
> must match
> "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
> ngs?,controller?,message-resources*,plug-in*)".
>  at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)"
> 
> But, I can't see what's wrong with my XML below:
> 

[snip]
> 
> <controller
>  maxFileSize="50K"
>  nocache="true"
>  tempDir="WEB-INF/upload"/>;
> 

Here is my first guess...

[snip]

Matt

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


Bad XML?

Posted by e-denton Java Programmer <ja...@e-denton.com>.
I am getting this Tomcat error on my remote server (It runs on my local
server):

"Oct 6, 2004 12:35:25 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 321 column 17: The content of element type
"struts-config" must match
"(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
ngs?,controller?,message-resources*,plug-in*)".
org.xml.sax.SAXParseException: The content of element type "struts-config"
must match
"(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappi
ngs?,controller?,message-resources*,plug-in*)".
 at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)"

But, I can't see what's wrong with my XML below:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
 "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
 "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>

<form-beans>
 <form-bean name="categoryForm"  type="com.cnw.portal.form.CategoryForm"/>
 <form-bean name="clientForm"    type="com.cnw.portal.form.ClientForm"/>
 <form-bean name="hierarchyForm" type="com.cnw.portal.form.HierarchyForm"/>
 <form-bean name="listingForm"   type="com.cnw.portal.form.ListingForm"/>
 <form-bean name="quoteForm"     type="com.cnw.portal.form.QuoteForm"/>
 <form-bean name="eventForm"     type="com.cnw.portal.form.EventForm"/>
 </form-beans>


<global-exceptions></global-exceptions>


<global-forwards>
 <forward   name="about"      path="/about.do"/>
 <forward   name="aboutSite"  path="/aboutSite.do"/>
 <forward   name="adDesign"      path="/adDesign.do"/>
 <forward   name="adRates"      path="/adRates.do"/>
 <forward   name="advertise"  path="/advertise.do"/>
 <forward   name="apply"      path="/apply.do"/>
 <forward   name="bannerClick"  path="/bannerClick.do"/>
 <forward   name="beAnEditor"  path="/beAnEditor.do"/>
 <forward   name="community"  path="/community.do"/>
 <forward   name="contact"      path="/contact.do"/>
 <forward   name="daysEvents"  path="/daysEvents.do"/>
 <forward   name="directory"  path="/directory.do"/>
 <forward   name="event"      path="/event.do"/>
 <forward   name="link2us"      path="/link2us.do"/>
    <forward   name="login"         path="/login.do"/>
    <forward   name="logout"      path="/logout.do"/>
    <forward   name="maintenance"  path="/maintenance.do"/>
 <forward   name="privacy"      path="/privacy.do"/>
 <forward   name="root"          path="/root.do"/>
 <forward   name="terms"      path="/terms.do"/>
 <forward   name="weather"      path="/weather.do"/>
    <forward   name="welcome"     path="/welcome.do"/>
</global-forwards>


<!-- Action Mapping Definitions -->
<action-mappings>

 <!-- Default Action -->
    <action path="/default"
            type="com.cnw.portal.action.Forward"
            scope="request"
   unknown="true"
   parameter="/welcome.jsp"/>

 <!-- Process a root directory query -->
 <action path="/root"
      type="com.cnw.portal.action.RootDirectory"
   scope="request">
  <forward name="success" path="/rootDirectory.jsp"/>
 </action>

 <!-- Process a directory query -->
    <action path="/directory"
      type="com.cnw.portal.action.Directory"
   scope="request">
  <forward name="success" path="/directory.jsp"/>
    </action>

 <!-- Process a banner click -->
    <action path="/bannerClick"
      type="com.cnw.portal.action.BannerClick"
   scope="request">
  <forward name="failure" path="/advertise.jsp"/>
  <forward name="success" path="/welcome.jsp"/>
    </action>

 <!-- Process a user logout -->
    <action path="/logout"
            type="com.cnw.portal.action.LogoutAction">
  <forward name="success" path="/welcome.jsp"/>
    </action>

 <!-- Process a calendar event -->
    <action path="/event"
            type="com.cnw.portal.action.Event"
    parameter="event"
            scope="request">
  <forward name="success" path="/event.jsp"/>
    </action>

 <!-- Process a particular day's events -->
    <action path="/daysEvents"
            type="com.cnw.portal.action.Event"
    parameter="events"
            scope="request">
  <forward name="success" path="/daysEvents.jsp"/>
    </action>

 <!-- Process a user login -->
    <action path="/login"
            type="portal.action.Login"
            name="loginForm"
            scope="request"
            input="/login.jsp">
  <forward name="success" path="/welcome.jsp"/>
    </action>

 <!-- Process a user logoff -->
    <action path="/logoff"
            type="portal.action.Logoff"
            name="loginForm"
            scope="request"
            input="/login.jsp">
  <forward name="success" path="/welcome.jsp"/>
    </action>

<!-- ************************************ -->
 <!-- Portal datastore maintenance -->
    <action path="/maintenance"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
   parameter="/maint/maintenance.jsp"/>

    <!-- Process category table maintenance -->
    <action path="/maintCategory"
            type="com.cnw.portal.action.Category"
    parameter="maint"
            name="categoryForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maint/maintCategory.jsp"/>
    </action>

    <!-- Process delete category maintenance -->
    <action path="/maintDeleteCategory"
            type="com.cnw.portal.action.Category"
    parameter="delete"
            name="categoryForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maintCategory.do"/>
    </action>

    <!-- Process new category -->
    <action path="/maintNewCategory"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
            parameter="/maint/editCategory.jsp"/>

    <!-- Process edit category -->
    <action path="/maintEditCategory"
            type="com.cnw.portal.action.Category"
     parameter="edit"
            name="categoryForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maint/editCategory.jsp"/>
    </action>

    <!-- Process update category -->
    <action path="/maintUpdateCategory"
            type="com.cnw.portal.action.Category"
     parameter="update"
            name="categoryForm"
            scope="request"
            input="/maint/editCategory.jsp">
  <forward name="success" path="/maintCategory.do"/>
    </action>


    <!-- Process client table maintenance -->
    <action path="/maintClient"
            type="com.cnw.portal.action.Client"
     parameter="maint"
            name="clientForm"
            scope="request"
            input="/maint/maintClient.jsp">
  <forward name="success" path="/maint/maintClient.jsp"/>
    </action>


    <!-- Process hierarchy table maintenance -->
    <action path="/maintHierarchy"
            type="com.cnw.portal.action.MaintHierarchy"
            name="hierarchyForm"
            scope="request"
            input="/maint/maintHierarchy.jsp">
  <forward name="success" path="/maintenance.do"/>
    </action>

    <!-- Process listing table maintenance -->
    <action path="/maintListing"
            type="com.cnw.portal.action.Listing"
     parameter="maint"
            name="listingForm"
            scope="request"
            input="/maint/maintListing.jsp">
  <forward name="success" path="/maintenance.do"/>
    </action>

<!-- Process quote table maintenance -->
    <action path="/maintQuote"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
   parameter="/maint/maintQuote.jsp"/>

    <!-- Process new quote -->
    <action path="/maintNewQuote"
            type="org.apache.struts.actions.ForwardAction"
            scope="request"
            parameter="/maint/editQuote.jsp"/>

    <!-- Process edit quote -->
    <action path="/maintEditQuote"
            type="com.cnw.portal.action.Quote"
   parameter="edit"
            name="quoteForm"
            scope="request"
            validate="false">
  <forward name="success" path="/maint/editQuote.jsp"/>
    </action>

    <!-- Process update quote -->
    <action path="/maintUpdateQuote"
            type="com.cnw.portal.action.Quote"
    parameter="update"
            name="quoteForm"
            scope="request"
            input="/maint/editQuote.jsp">
  <forward name="success" path="/maintQuote.do"/>
    </action>

 <!-- Simple forward so caller is saved -->
    <action path="/about"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/about.jsp"/>

    <action path="/aboutSite"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/aboutSite.jsp"/>

    <action path="/adDesign"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/adDesign.jsp"/>

    <action path="/adRates"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/adRates.jsp"/>

    <action path="/advertise"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/advertise.jsp"/>

    <action path="/apply"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/apply.jsp"/>

    <action path="/beAnEditor"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/beAnEditor.jsp"/>

    <action path="/community"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/community.jsp"/>

    <action path="/contact"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/contact.jsp"/>

    <action path="/offsite"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/offsiteFrameset.jsp"/>

    <action path="/link2us"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/link2us.jsp"/>

    <action path="/privacy"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/privacy.jsp"/>

    <action path="/terms"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/terms.jsp"/>

    <action path="/weather"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/weather.jsp"/>

    <action path="/welcome"
            type="com.cnw.portal.action.Forward"
            scope="request"
   parameter="/welcome.jsp"/>

</action-mappings>

<controller
 maxFileSize="50K"
 nocache="true"
 tempDir="WEB-INF/upload"/>;

<message-resources parameter="PortalMessages"  null="false"/>
<message-resources parameter="PortalResources" null="false"
key="PortalResources"/>

</struts-config>


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


Re: Modifying an object within the form bean?

Posted by Jason King <jh...@airmail.net>.
This is a javascript problem.  The DOM-compliant way to change the 
selected option for a <select> element is:
<selectObjectName>.selectedIndex = <newIndex> for your example that 
would be:

opener.document.formBean.selectElementName.selectedIndex = <newValue>;
If your popup has the same <select> element then its easy:
opener.document.formBean.selectElementName.selectedIndex = document.popupform.selectElementName.selectedIndex ;
If what you have is text that matches a label in the destination try this:

// assign references so we don't have to type x.y.z so much
var text  = popup.document.popupform.input.text ;
var oDest = opener.document.formBean.selectElementName ; 
// iterate through options collection to find matching text attribute
for ( var x = 0 ; x < oDest.options.length ; x++ ) {
    if ( text == oDest.options[x].text ) {  // I think text.equals(oDest.options[x].text) also
                                            // works, but I was using JS before java so I generally
                                            // write this as ==
       oDest.selectedIndex = x ; 
    }  
}

Warning, I just typed this code in, it may have syntax problems.



Mike Elliott wrote:

>I have a situation where the form bean contains objects inside it
>which represent sets of things which will appear in an <html:select>
>tag.  In particular, the objects have three properties:
>
>selected_ndx
>ndx_set
>label_set
>
>One of these objects is the 'moderator' property of the form bean.
>
>The overall design intent was to have an object which could provide
>the values and labels for an <html:select> statement and have
>selected_ndx be the value which is changed via the selection process
>in the web page.
>
>If I write the JSP like this, it works:
>
>  <html:select property="moderator.selected_ndx">
>  <html:options property="moderator.ndx_set"
>labelProperty="moderator.label_set"/>
>  </html:select>
>
>This generates the following HTML:
>              
>  <select name="moderator.selected_ndx"><option value="0"></option>
>  <option value="1">First Selection</option>
>  <option value="2">Second Selection</option>
>  <option value="3">Third Selection</option></select>
>
>This successfully displays the selected entity and allows it to be
>changed via selection through the web page.
>
>However, additionally I need to be able to set the value of this
>select from a popup window.  That  generally means I need to specify
>the form element as the target of a javascript assignment.  What has
>worked in similar circumstances in the past is something like
>   
>   opener.document.formBean.selectElementName = newValue
>
>where selectElementName is the value of the 'name' attribute from the
>select element.  Here that name is "moderator.selected_ndx".  That
>causes a problem.  When the javascript runs (from a popup window) the
>following javascript error occurs:
>
>   Error: opener.document.formBean.moderator has no properties
>
>Which I interpret as the javascript interpreter being able to find the
>formBean property (which I assume is being furnished by the
><html:form> tag) but that there is no attribute of that called
>"moderator".  If I didn't use the dotted notation in the <html:select>
>tag, the correct attribute gets created, or whatever, and the
>javascript works OK.
>
>So -- how can I solve this problem?  Assuming that the naming is the
>problem, I've tried introducing a bean like this:
>
>  <bean:define id="mod" name="formBean" property="moderator"/>   
>  <html:select name="mod" property="selected_ndx">
>  <html:options name="mod" property="ndx_set" 
>    labelName="mod" labelProperty="label_set"/>
>  </html:select>
>
>Which generates HTML:
>  <select name="selected_ndx"><option value="0"></option>
>  etc.
>
>But that causes the select element to be unselectable; that is, while
>the getter method (getSelected_ndx()) gets invoked, the setter method
>(setSelected_ndx()) does not, so that changes to the field no longer
>get propagated back to the form bean.  Even if I could get this to
>work, I'm dubious that I could have multiple select elements working
>properly in the same form since they would all have the same name
>attribute (selected_ndx).
>
>While I'm unconvinced that the failure to invoke the setter method
>isn't a bug, I still need to solve the problem through some
>combination of Struts/JavaScript.
>
>Any suggestions?
>
>---------------------------------------------------------------------
>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


Re: Modifying an object within the form bean?

Posted by wi...@freddiemac.com.
Dear Mike:

Within your Javascript, try to find your drop down by Id or Name.  I think 
the statement looks something like:

        mySelectBox = document.findElementById("yourIdHere")
or
        mySelectBox = document.findElementByName("yourIdHere")

Hope that helps!
 
Wiwit Tjahjana

The information transmitted in this Email is for the exclusive use of the 
person or entity to which it is addressed and may contain confidential 
information.  If you are not the intended recipient of this Email, you are 
prohibited from reading, printing, duplicating, disseminating or otherwise 
using this information.  If you have received this information in error, 
please notify the sender at Freddie Mac immediately, delete this 
information from your computer, and destroy all copies of the information.
 




"Mike Elliott" <hb...@gmail.com> 
10/06/2004 03:22 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>; Please respond to
"Mike Elliott" <hb...@gmail.com>


To
"Struts Users Mailing List" <us...@struts.apache.org>
cc

Subject
Modifying an object within the form bean?






I have a situation where the form bean contains objects inside it
which represent sets of things which will appear in an <html:select>
tag.  In particular, the objects have three properties:

selected_ndx
ndx_set
label_set

One of these objects is the 'moderator' property of the form bean.

The overall design intent was to have an object which could provide
the values and labels for an <html:select> statement and have
selected_ndx be the value which is changed via the selection process
in the web page.

If I write the JSP like this, it works:

  <html:select property="moderator.selected_ndx">
  <html:options property="moderator.ndx_set"
labelProperty="moderator.label_set"/>
  </html:select>

This generates the following HTML:
 
  <select name="moderator.selected_ndx"><option value="0"></option>
  <option value="1">First Selection</option>
  <option value="2">Second Selection</option>
  <option value="3">Third Selection</option></select>

This successfully displays the selected entity and allows it to be
changed via selection through the web page.

However, additionally I need to be able to set the value of this
select from a popup window.  That  generally means I need to specify
the form element as the target of a javascript assignment.  What has
worked in similar circumstances in the past is something like
 
   opener.document.formBean.selectElementName = newValue

where selectElementName is the value of the 'name' attribute from the
select element.  Here that name is "moderator.selected_ndx".  That
causes a problem.  When the javascript runs (from a popup window) the
following javascript error occurs:

   Error: opener.document.formBean.moderator has no properties

Which I interpret as the javascript interpreter being able to find the
formBean property (which I assume is being furnished by the
<html:form> tag) but that there is no attribute of that called
"moderator".  If I didn't use the dotted notation in the <html:select>
tag, the correct attribute gets created, or whatever, and the
javascript works OK.

So -- how can I solve this problem?  Assuming that the naming is the
problem, I've tried introducing a bean like this:

  <bean:define id="mod" name="formBean" property="moderator"/> 
  <html:select name="mod" property="selected_ndx">
  <html:options name="mod" property="ndx_set" 
    labelName="mod" labelProperty="label_set"/>
  </html:select>

Which generates HTML:
  <select name="selected_ndx"><option value="0"></option>
  etc.

But that causes the select element to be unselectable; that is, while
the getter method (getSelected_ndx()) gets invoked, the setter method
(setSelected_ndx()) does not, so that changes to the field no longer
get propagated back to the form bean.  Even if I could get this to
work, I'm dubious that I could have multiple select elements working
properly in the same form since they would all have the same name
attribute (selected_ndx).

While I'm unconvinced that the failure to invoke the setter method
isn't a bug, I still need to solve the problem through some
combination of Struts/JavaScript.

Any suggestions?

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