design question -using struts

have String array's which have values in them.

dbValues[]

newValues[]

Have an object Customer which is the row obj in a table in jsp page. This row obj basically has

dbValues[0] , newValues[0] ...... etc.

In Prepare Action.

Creating the list of Customer obj's that is put in the form-bean.

struts-config.

<form-bean name="Form" type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">

<form-property name="custs" type="java.util.ArrayList"/>

.............

</form-bean>

jsp:

the customers are shown in the jsp in a table.

I have to check if it's new customer then have to ask user if they want to put dbValues in the newValues. If the user presses 'yes' then have to put the dbValues in newValues and then create the rowObjects(i.e Customer Objects) and display them in jsp.

Not sure how to do this. Before asking the user if they want to replace newValues, the rowsObjects are created. somehow have to create new rowObjects again. Using LookupDispatchAction. when the user presses 'yes' how is the user values 'yes' will be passed as i am using LookupDispatchAction which method gets executed?

How to do this? Thanks.

[1275 byte] By [Rxyza] at [2007-10-3 1:37:14]
# 1

I am giving how to work with LookDispatchAction.

It gives the solution for ur problem.

->firtst it get the value from the button.

-> That value is used to identify the key from the resource bundle.

->That key is used to get the method name from getKeyMethodMap()of

lookdispatchaction.

that's why we say that it looks in reverse manner.

What I said above is theretical.

From this u can understood how to do it.

Cheers

Sudha.

sudha_1234a at 2007-7-14 18:35:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks for your response. But, I know how to use LookupDispatchAction. that's not what I want. Please read my posting completely.Thanks.
Rxyza at 2007-7-14 18:35:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...