If i put key="maxCoord" it continues taking the value from the listbox of the
first record...




styl9090 wrote:
> 
> Try changing this line,
> <s:select name="maxCoord" .../>
> to
> <s:select key="maxCoord" .../>
> then, your variable(maxCoord) will hold the selected value from the list
> box.
> 
> 
> 
> piltrafeta wrote:
>> 
>> Actually session.coordValues has a list with numbers from 1 to 10, and
>> this is correct...
>> The thing is that it takes maxCoord as an array. And it returns only the
>> first element, which means the value in the first select of the list of
>> records.
>> 
>> I've tried creating only one form for all the records and what i obtains
>> in my maxCoord is a list with the values for each record.
>> 
>> 
>> 
>> Laurie Harper wrote:
>>> 
>>> The most likely explanation would be that your option values collection 
>>> (session.coordValues) has empty or inconsistent key values. Check that 
>>> it contains what you think it does.
>>> 
>>> L.
>>> 
>>> piltrafeta wrote:
>>>> Hi ,
>>>> i have a jsp with some forms like this :
>>>> <s:form action="acceptUser" method="post">
>>>>   <tr>    
>>>>     <td>
>>>>            <s:a href="#" onclick="accept(%{#users.value._id})"> Accept 
>>>> </s:a>
>>>>    </td>
>>>>    <td><s:url id="url" action="rejectUser" includeParams="none" >
>>>>            <s:param name="idUser" value="%{#users.value._id}" />
>>>>            </s:url>
>>>>            <s:a href="%{url}"> Reject </s:a>
>>>>    <!--<s:form action="rejectUser" method="post">
>>>>    <s:a href="#" onclick="onLinkClick(%{#users.value._id})"> Reject
>>>> </s:a>
>>>>    </s:form>-->
>>>>    </td>
>>>>    <td><s:property value="#users.value._name"/></td>
>>>>     <td><s:property value="#users.value._username"/></td>
>>>>            <td><s:select name="maxCoord" 
>>>>                            headerValue="" headerKey="" 
>>>> list="#session.coordValues" 
>>>>                            size="1" multiple="false" />
>>>>            </td>
>>>>   </tr>
>>>>   <s:hidden name="idUser"/>
>>>>   </s:form>
>>>> 
>>>> and in my JavaActionClass i have a attribute with the same name as the
>>>> select element :
>>>>         private String maxCoord;
>>>>    public String accept() {
>>>>            print(maxCoord);
>>>>            return SUCCESS;
>>>>    }
>>>>         public String getMaxCoord() {
>>>>            return maxCoord;
>>>>    }
>>>>    public void setMaxCoord(String maxCoord) {
>>>>            this.maxCoord = maxCoord;
>>>>    }
>>>> when i'm printing the maxCoord value, i only obtanins the correct value
>>>> if i
>>>> select the first form in my jsp class... if i chose any of the other i
>>>> get
>>>> an empty string.
>>>> Can you halp me with this please ?
>>>> Thanks
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17654835.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to