You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by asd asd <jo...@eudoramail.com> on 2003/04/21 15:09:28 UTC

Nested Define Problem

Hello,

I'm trying to use nested define to grab hold of the id of a banana 
that's contained in a banana list:

BananaList | Id |
-----------------
Banana        1
Banana        2

So what I'm doing is iterating through the bananas and grabbing 
hol of the id using nested:define:

<nested:define id="value" name="BananaForm" 

Then what I'm trying to is to store this value in my value for a radio button:

<nested:define id="value" name="BananaForm" property="bananaId"/>					
The reason for this is so that I have a list of radio buttons that 
are mutually exclusive but have a different value so that I can 
work out which work has been clicked

* Banana A
* Banana B

If the user selects banana A then 1 will be stored, if they select 
B then 2 will be stored in an appropriate field (bananaChosen).  Full source code below:

<nested:iterate property="bananas" scope="session">	
<tr> 
<td
<nested:radio value="<%= value %>" property="bananaChosen"/>
<nested:define id="value" name="BananaForm" property="bananaId"/>					
<nested:write property="bananaId"/> ) 
<nested:write property="bananaName"/>	
</td>
</tr>
</nested:iterate>

The trouble is when I try to do this I get the following error:


[ServletException in:/myassessments/assessmentlivecontent.jsp] Unable 
to compile class for JSP An error occurred at line: 174 in the jsp 
file: /myassessments/assessmentlivecontent.jsp Generated servlet 
error: [javac] Compiling 1 source file I:\tomcat\jakarta-tomcat-4.1.18-LE-jdk14\work\Standalone\
localhost\TWEEKStudent\myassessments\assessmentlivecontent_jsp.java:328: 
cannot resolve symbol symbol : method setValue (java.lang.Object) 
location: class org.apache.struts.taglib.nested.html.NestedRadioTag 
_jspx_th_nested_radio_0.setValue( value ); ^ 1 error ' 

Anybody know why and whether I can solve it, I'm using Struts 1.1b2??

Many thanks,
Jon.




Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org