and the value actually is an string[]
so making it this:
/** Creating a map for holding the selected tickets */
final Map<String, String[]> chosenTickets = new HashMap<String,
String[]>();
public Map<String, String[]> getA() {
return chosenTickets;
}
tibi wrote:
> i found it.
> the trick is there is no set method.
> there is a get method needed wich will need to get a map.
> the values are added to this map directly without the need of a set method.
>
> so this wil do the trick:
> public Map<String, String> getA() {
> return map;
> }
>
> and it the map is prefilled. like this map.put("1","2");
> the vlue 2 will be selected of the second select box.
>
> nice :)
>
> tibi
>
> tibi wrote:
>
>> and now the next step howto post the data to the action:
>> i have this working nice:
>> <s:iterator id="price" value="%{prices}" status="status">
>> <c:out value="${price.name}"/>
>> <s:select list="priceAmounts" id="a[%{#status.index}]"
>> name="a[%{#status.index}]"></s:select>
>> </s:iterator>
>> this wil give select boxes with name a[0] and a[1] etc...
>> in my action i have a method like this:
>> public void setA(Object o){
>>
>> }
>>
>> this method is called nicely 3 times (i have 3 select boxes) and i get
>> object. but this object is not a list or a map.
>> does someone knows howto recieve the multiple values??
>>
>> thanks
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]