You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kirby Vandivort <kv...@gmail.com> on 2005/02/18 00:47:17 UTC

multiple bean params getting clobbered on form submit

so i have a couple of beans that i'm sending to the frontend.  They
are getting their initial values just like they should.  (the jsp is
behind an action that saves values to bean1 and bean2.

The jsp page looks something like:

-----------------------------------------------------
This is for bean 1
<html:input name="bean1" property="enabled" />

This is for bean 2
<html:input name="bean2" property="enabled" />
----------------------------------------------------------

When the html gets created, I get two form entries that look like:

-----------------------------------------
This is for bean 1
<input type="text" name="enabled" value="correct value from bean1.getEnabled()">

This is for bean 2
<input type="text" name="enabled" value="correct value from bean2.getEnabled()">
---------------------------------------------

But, since both inputs have the name 'enabled' they are getting
clobbered on bean submit.

How can I get around this?  

Thanks!

-- 

Kirby Vandivort

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