problems passing form input to the services

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

problems passing form input to the services

nashrul
I created a tiering master data using ftl for the incentive calculation for sales team.
The display is like this.

SALES LEVEL MAX_NO INCENTIVE_AMOUNT
A |add_row|
B |add_row|

The sales level data is taken from the table sales_level in database.
The max_no column displays the maximum number of application submitted by each sales level,
while incentive_amount column displays the incentives that each sales level gets for
each application submitted.
There is also add_row button for each sales_level, so every time this button is clicked,
a new row is inserted for the corresponding sales_level.

Here is the display after I input some tiering data into the form.
SALES LEVEL MAX_NO INCENTIVE_AMOUNT
A 10 1000 |add_row|
                                50 5000
                                100 20000
B 20 1000 |add_row|
                                60 10000
                                100 50000

The form input will be passed to the service as a list.
The problem is, it is possible for one sales level to have
only one tiering (no row is added). When I don't add row (that means I only pass String to the service, not a list),
there is a service invocation error (I declared the form input in the services.xml file as a list type, not
a string type). .How can I avoid this problem ??