You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Hajratwala, Nayan (N.)" <nh...@ford.com> on 2003/09/19 17:21:35 UTC

Problem updating values from html:select

Folks, I have the following jsp that is giving me a headache.

My ActionForm contains a Collection of Device objects.  The outer loop iterates over each device.

Each Device contains a Collection of Parameter objects.  The inner loop iterates over each parameter.

The problem comes in the <html:select>  The values are displaying properly on the screen, but they are not updating during the submit.

I am not getting any errors or anything .. Just no updated values.

Can anyone provide some insight?

Thanks!


  <logic:iterate name="configureWorkstationForm" property="devices" id="device">

    <html:form action="/configureWorkstationAction">

    <b>Device Name:</b> <bean:write name="device" property="name" /><br />
    <b>Device Type:</b> <bean:write name="device" property="type.name" /><br />
  
    <b>Settings:</b>
    <table>
      <logic:iterate name="device" property="type.parameters" id="parameter">
        <td><bean:define id="parameterId" name="parameter" property="id" />
        <tr>
          <td><bean:write name="parameter" property="name" />:</td>
          
          <td>
            <html:select name="device" property='<%="deviceParameterValue[" + parameterId + "]"%>'>
              <html:optionsCollection name="parameter" property="parameterValues" label="value" value="value" />
            </html:select>

          </td>
        </tr>
      
      </logic:iterate>
    </table>

	<input type="hidden" name="currentDevice" value="<%=((DeviceVO)device).getId()%>" />
    <html:submit property="submitButton" value="Delete" />
    <html:submit property="submitButton" value="Save" />
    
	</html:form>

  </logic:iterate>

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


Re: Problem updating values from html:select

Posted by Michael Ruppin <mr...@yahoo.com>.
You did make the indexed setters in your Form, right? 

m

Hajratwala, Nayan (N.)" <nh...@ford.com>wrote: 
Folks, I have the following jsp that is giving me a headache.

My ActionForm contains a Collection of Device objects. The outer loop iterates over each device.

Each Device contains a Collection of Parameter objects. The inner loop iterates over each parameter.

The problem comes in the The values are displaying properly on the screen, but they are not updating during the submit.

I am not getting any errors or anything .. Just no updated values.

Can anyone provide some insight?

Thanks!






Device Name: 

Device Type: 


Settings:




:


'>









 [input] " name=currentDevice>







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


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software