You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ad...@cyberspaceroad.com on 2002/06/14 10:50:59 UTC
select dropdown with a nested name-attribute doesnt work in any browser - sends wrong value in request
Neither Mozilla nor IE are handling my HTML produced from nested tags.
They ignore any selection I make in a select dropdown when I submit. The
incoming parameters at the server show that the original value is always
sent.
My HTML:
<select name="operationList[0].locationIdString">
<option value="0" selected="selected">-- please select --</option>
<option value="1">Strange Location</option>
<option value="2">Up a tree</option>
<option value="3">Kebabhouse</option>
</select>
In my debug logging, I see all the other parameters with correct values,
but I get operation[0].locationIdString=0 no matter what I select.
Is anybody successfully using nested dropdowns / select boxes? Why does
this affect both browsers? Am I going mad?
Adam
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: select dropdown with a nested name-attribute doesnt work in any
browser - sends wrong value in request
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
How many rows do you generally iterate? More than one I presume on
average? I mean, is it possible that you've only ever tried it with just
one row and never with more than one row?
SATISH.T wrote:
>This is the html produced, since I put it in the iterate tag the array
>index changes...
>Nested:define does not generate any html but I use it to hold the
>collection which
>I set in the form for each of my combo box .
>
><select name="holdingCentreList[0].bandName" onchange="trial(1)">
><option value="Doors">Doors</option>
><option value="Zepplin">Zepplin</option>
><option value="Floyd">Floyd</option>
></select>
>
>-----Original Message-----
>From: Adam Hardy [mailto:adam.hardy@cyberspaceroad.com]
>Sent: Friday, June 14, 2002 6:10 PM
>To: Struts Users Mailing List
>Subject: Re: select dropdown with a nested name-attribute doesnt work in
>any browser - sends wrong value in request
>
>Oh! It's a mystery to me then why my HTML doesn't work. Can you send the
>
>HTML that these tags produce? Does that nested:define produce html? What
>
>role does it play?
>
>thanks
>Adam
>
>SATISH.T wrote:
>
>
>
>>Hi I have tried out nested:select in both IE and netscape and it works
>>fine. The property bandList is the one I set in my nested beans which
>>
>>
>is
>
>
>>a collection (Arraylist ) of label Value beans(name-value pairs).
>>This is the syntax I use and the values are returned properly.
>><nested:define id="Y" property="bandList"/>
>> <nested:select property="bandName"
>>onchange="<%=\"trial(\"+counter+\")\"%>" >
>> <html:options collection="Y" property="label"
>>labelProperty="value"/>
>></nested:select>
>>
>>
>>-----Original Message-----
>>From: adam.hardy@cyberspaceroad.com
>>[mailto:adam.hardy@cyberspaceroad.com]
>>Sent: Friday, June 14, 2002 2:21 PM
>>To: Struts Users Mailing List
>>Subject: select dropdown with a nested name-attribute doesnt work in
>>
>>
>any
>
>
>>browser - sends wrong value in request
>>
>>Neither Mozilla nor IE are handling my HTML produced from nested tags.
>>They ignore any selection I make in a select dropdown when I submit.
>>
>>
>The
>
>
>>incoming parameters at the server show that the original value is
>>
>>
>always
>
>
>>sent.
>>
>>My HTML:
>>
>><select name="operationList[0].locationIdString">
>><option value="0" selected="selected">-- please select --</option>
>><option value="1">Strange Location</option>
>><option value="2">Up a tree</option>
>><option value="3">Kebabhouse</option>
>></select>
>>
>>In my debug logging, I see all the other parameters with correct
>>
>>
>values,
>
>
>>but I get operation[0].locationIdString=0 no matter what I select.
>>
>>Is anybody successfully using nested dropdowns / select boxes? Why does
>>this affect both browsers? Am I going mad?
>>
>>Adam
>>
>>--
>>To unsubscribe, e-mail:
>><ma...@jakarta.apache.org>
>>For additional commands, e-mail:
>><ma...@jakarta.apache.org>
>>
>>
>>
>>-----------------------------------------------------------------------
>>
>>
>-
>
>
>>**************************Disclaimer***********************************
>>
>>
>*
>
>
>>Information contained in this E-MAIL being proprietary to Wipro Limited
>>
>>
>is
>
>
>>'privileged' and 'confidential' and intended for use only by the
>>
>>
>individual
>
>
>>or entity to which it is addressed. You are notified that any use,
>>
>>
>copying
>
>
>>or dissemination of the information contained in the E-MAIL in any
>>
>>
>manner
>
>
>>whatsoever is strictly prohibited.
>>
>>***********************************************************************
>>
>>
>****
>
>
>>
>>
>>-----------------------------------------------------------------------
>>
>>
>-
>
>
>>--
>>To unsubscribe, e-mail:
>>
>>
><ma...@jakarta.apache.org>
>
>
>>For additional commands, e-mail:
>>
>>
><ma...@jakarta.apache.org>
>
>
>
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>
>
>------------------------------------------------------------------------
>
>**************************Disclaimer************************************
>
>Information contained in this E-MAIL being proprietary to Wipro Limited is
>'privileged' and 'confidential' and intended for use only by the individual
> or entity to which it is addressed. You are notified that any use, copying
>or dissemination of the information contained in the E-MAIL in any manner
>whatsoever is strictly prohibited.
>
>***************************************************************************
>
>
>
>------------------------------------------------------------------------
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: select dropdown with a nested name-attribute doesnt work in any browser - sends wrong value in request
Posted by "SATISH.T" <sa...@wipro.com>.
This is the html produced, since I put it in the iterate tag the array
index changes...
Nested:define does not generate any html but I use it to hold the
collection which
I set in the form for each of my combo box .
<select name="holdingCentreList[0].bandName" onchange="trial(1)">
<option value="Doors">Doors</option>
<option value="Zepplin">Zepplin</option>
<option value="Floyd">Floyd</option>
</select>
-----Original Message-----
From: Adam Hardy [mailto:adam.hardy@cyberspaceroad.com]
Sent: Friday, June 14, 2002 6:10 PM
To: Struts Users Mailing List
Subject: Re: select dropdown with a nested name-attribute doesnt work in
any browser - sends wrong value in request
Oh! It's a mystery to me then why my HTML doesn't work. Can you send the
HTML that these tags produce? Does that nested:define produce html? What
role does it play?
thanks
Adam
SATISH.T wrote:
>Hi I have tried out nested:select in both IE and netscape and it works
>fine. The property bandList is the one I set in my nested beans which
is
>a collection (Arraylist ) of label Value beans(name-value pairs).
>This is the syntax I use and the values are returned properly.
><nested:define id="Y" property="bandList"/>
> <nested:select property="bandName"
>onchange="<%=\"trial(\"+counter+\")\"%>" >
> <html:options collection="Y" property="label"
>labelProperty="value"/>
> </nested:select>
>
>
>-----Original Message-----
>From: adam.hardy@cyberspaceroad.com
>[mailto:adam.hardy@cyberspaceroad.com]
>Sent: Friday, June 14, 2002 2:21 PM
>To: Struts Users Mailing List
>Subject: select dropdown with a nested name-attribute doesnt work in
any
>browser - sends wrong value in request
>
>Neither Mozilla nor IE are handling my HTML produced from nested tags.
>They ignore any selection I make in a select dropdown when I submit.
The
>incoming parameters at the server show that the original value is
always
>sent.
>
>My HTML:
>
><select name="operationList[0].locationIdString">
><option value="0" selected="selected">-- please select --</option>
><option value="1">Strange Location</option>
><option value="2">Up a tree</option>
><option value="3">Kebabhouse</option>
></select>
>
>In my debug logging, I see all the other parameters with correct
values,
>but I get operation[0].locationIdString=0 no matter what I select.
>
>Is anybody successfully using nested dropdowns / select boxes? Why does
>this affect both browsers? Am I going mad?
>
>Adam
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>
>
>-----------------------------------------------------------------------
-
>
>**************************Disclaimer***********************************
*
>
>Information contained in this E-MAIL being proprietary to Wipro Limited
is
>'privileged' and 'confidential' and intended for use only by the
individual
> or entity to which it is addressed. You are notified that any use,
copying
>or dissemination of the information contained in the E-MAIL in any
manner
>whatsoever is strictly prohibited.
>
>***********************************************************************
****
>
>
>
>-----------------------------------------------------------------------
-
>
>--
>To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
>For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
Re: select dropdown with a nested name-attribute doesnt work in any
browser - sends wrong value in request
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Oh! It's a mystery to me then why my HTML doesn't work. Can you send the
HTML that these tags produce? Does that nested:define produce html? What
role does it play?
thanks
Adam
SATISH.T wrote:
>Hi I have tried out nested:select in both IE and netscape and it works
>fine. The property bandList is the one I set in my nested beans which is
>a collection (Arraylist ) of label Value beans(name-value pairs).
>This is the syntax I use and the values are returned properly.
><nested:define id="Y" property="bandList"/>
> <nested:select property="bandName"
>onchange="<%=\"trial(\"+counter+\")\"%>" >
> <html:options collection="Y" property="label"
>labelProperty="value"/>
> </nested:select>
>
>
>-----Original Message-----
>From: adam.hardy@cyberspaceroad.com
>[mailto:adam.hardy@cyberspaceroad.com]
>Sent: Friday, June 14, 2002 2:21 PM
>To: Struts Users Mailing List
>Subject: select dropdown with a nested name-attribute doesnt work in any
>browser - sends wrong value in request
>
>Neither Mozilla nor IE are handling my HTML produced from nested tags.
>They ignore any selection I make in a select dropdown when I submit. The
>incoming parameters at the server show that the original value is always
>sent.
>
>My HTML:
>
><select name="operationList[0].locationIdString">
><option value="0" selected="selected">-- please select --</option>
><option value="1">Strange Location</option>
><option value="2">Up a tree</option>
><option value="3">Kebabhouse</option>
></select>
>
>In my debug logging, I see all the other parameters with correct values,
>but I get operation[0].locationIdString=0 no matter what I select.
>
>Is anybody successfully using nested dropdowns / select boxes? Why does
>this affect both browsers? Am I going mad?
>
>Adam
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>
>
>------------------------------------------------------------------------
>
>**************************Disclaimer************************************
>
>Information contained in this E-MAIL being proprietary to Wipro Limited is
>'privileged' and 'confidential' and intended for use only by the individual
> or entity to which it is addressed. You are notified that any use, copying
>or dissemination of the information contained in the E-MAIL in any manner
>whatsoever is strictly prohibited.
>
>***************************************************************************
>
>
>
>------------------------------------------------------------------------
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
help needed - default selection in dynamic select boxes.
Posted by Yaman Kumar <ya...@nous.soft.net>.
Hi,
I am using struts v1.0.2 and heard this does not support generation of
dynamic html controls through struts tags(????).
I have a collection of ComboBoxBeans with name-value pair in a Vector to
show
html options and would like to use it with 2nd collection .
I have a problem in rendering default selection in select boxes that are
rendered by 2nd collection.
( In mvc lt looks like this ).
<%for(int k=0;(vectStudents!=null && k<vectStudents.size());k++){
Student student = (student)vectStudents.elementAt(k);
String type = student.getType();
%>
<select name="studentType" >
<% LinkedList studentTypes = myBean.getAllTypes();
String strSelected = "";
for(int I=0;i<studentTypes.size();i++){
ComboBoxBean objCombBean = (ComboBoxBean)studentTypes.get(i);
String code = objCombBean.getCode();
String description = objCombBean.getDescription();
strSelected = description.trim().equals(type .trim())?"selected":"";
%>
<option <%= strSelected %> value="<%= code %>"> <%= description %>
</option>
<% }%>
</select>
<%}%>
Can I get the above code in struts implemented ? is it possible with 1.0.2?"
Is there any nested tag information available .
TIA
rayaku
-----Original Message-----
From: SATISH.T [mailto:satish.terala@wipro.com]
Sent: Friday, 14 June 2002 2:36 PM
To: 'Struts Users Mailing List'
Subject: RE: select dropdown with a nested name-attribute doesnt work in
any browser - sends wrong value in request
Hi I have tried out nested:select in both IE and netscape and it works
fine. The property bandList is the one I set in my nested beans which is
a collection (Arraylist ) of label Value beans(name-value pairs).
This is the syntax I use and the values are returned properly.
<nested:define id="Y" property="bandList"/>
<nested:select property="bandName"
onchange="<%=\"trial(\"+counter+\")\"%>" >
<html:options collection="Y" property="label"
labelProperty="value"/>
</nested:select>
-----Original Message-----
From: adam.hardy@cyberspaceroad.com
[mailto:adam.hardy@cyberspaceroad.com]
Sent: Friday, June 14, 2002 2:21 PM
To: Struts Users Mailing List
Subject: select dropdown with a nested name-attribute doesnt work in any
browser - sends wrong value in request
Neither Mozilla nor IE are handling my HTML produced from nested tags.
They ignore any selection I make in a select dropdown when I submit. The
incoming parameters at the server show that the original value is always
sent.
My HTML:
<select name="operationList[0].locationIdString">
<option value="0" selected="selected">-- please select --</option>
<option value="1">Strange Location</option>
<option value="2">Up a tree</option>
<option value="3">Kebabhouse</option>
</select>
In my debug logging, I see all the other parameters with correct values,
but I get operation[0].locationIdString=0 no matter what I select.
Is anybody successfully using nested dropdowns / select boxes? Why does
this affect both browsers? Am I going mad?
Adam
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: select dropdown with a nested name-attribute doesnt work in any browser - sends wrong value in request
Posted by "SATISH.T" <sa...@wipro.com>.
Hi I have tried out nested:select in both IE and netscape and it works
fine. The property bandList is the one I set in my nested beans which is
a collection (Arraylist ) of label Value beans(name-value pairs).
This is the syntax I use and the values are returned properly.
<nested:define id="Y" property="bandList"/>
<nested:select property="bandName"
onchange="<%=\"trial(\"+counter+\")\"%>" >
<html:options collection="Y" property="label"
labelProperty="value"/>
</nested:select>
-----Original Message-----
From: adam.hardy@cyberspaceroad.com
[mailto:adam.hardy@cyberspaceroad.com]
Sent: Friday, June 14, 2002 2:21 PM
To: Struts Users Mailing List
Subject: select dropdown with a nested name-attribute doesnt work in any
browser - sends wrong value in request
Neither Mozilla nor IE are handling my HTML produced from nested tags.
They ignore any selection I make in a select dropdown when I submit. The
incoming parameters at the server show that the original value is always
sent.
My HTML:
<select name="operationList[0].locationIdString">
<option value="0" selected="selected">-- please select --</option>
<option value="1">Strange Location</option>
<option value="2">Up a tree</option>
<option value="3">Kebabhouse</option>
</select>
In my debug logging, I see all the other parameters with correct values,
but I get operation[0].locationIdString=0 no matter what I select.
Is anybody successfully using nested dropdowns / select boxes? Why does
this affect both browsers? Am I going mad?
Adam
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>