You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ZT...@za.safmarine.com on 2003/07/16 16:05:50 UTC

/ /OREF:CPTD1CA6 Re: options and properties

I have an implementation that does a similar thing.
I just declared a property with a getter and setter for that
particular drop-down's value.
Thus the form bean would store the value/name combination as one
string where the value is separated from the name by a character like
and asterisk.
Then in my action or business method I have a method that returns
iether the value split from the name or vice-versa.


|---------+--------------------------->
|         |           john@terriersyst|
|         |           ems.com         |
|         |                           |
|         |           2003/07/16 06:58|
|         |           PM              |
|         |           Please respond  |
|         |           to struts-user  |
|         |                           |
|---------+--------------------------->
  >---------------------------------------------------------------------------------------------------------------|
  |                                                                                                               |
  |        To:      struts-user@jakarta.apache.org                                                                |
  |        cc:                                                                                                    |
  |        Subject: options and properties                                                                        |
  >---------------------------------------------------------------------------------------------------------------|
|---------+--------------------------->
|         |                           |
|---------+--------------------------->
  >---------------------------------------------------------------------------------------------------------------|
  |                                                                                                               |
  |                                                                                                               |
  >---------------------------------------------------------------------------------------------------------------|




I have a table inside of a form. Each row in the table has a select
list. I
indexed the select so the submitted values contain the parameter
name[I].propertyName when submitted. I can pull the values out from
the
parameter name, but I was trying to create a setter in the
ActionForm. The
method setPropertyName( int I, String str) generates a
javax.servlet.ServletException: BeanUtils.populate
exception for reasons unknown. Is this the right signature for the
setter?
Should I just pull the data out of the parameters and get on with my
life?
TIA,
John







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