RE: easy question... logic:iterate

2004-02-19 Thread Slattery, Tim - BLS
I have the following code: logic:iterate id=users name=userInfo bean:write name=users property=userName/ /logic:iterate How can i get the first record ? JSTL makes this easy: c:out value=${userInfo[0].userName} / Or, to write out only the first one while iterating the loop:

RE: Easy question: iterate

2003-12-24 Thread Nguyen, Hien
I think life would be easier if you store your Category_VO objects in a java.util.Collection, then use JSTL forEach tag. Something like this: % Collection v = new Vector(); v.add( new Category_VO(cat 1) ); //Assuming your constructor takes a String which is the shortTitle

Re: Easy question: iterate

2003-12-24 Thread Mark Lowe
//psuedo code. List categoryList = Category.getList(); request.setAttribute(categories, categoryList.toArray()); logic:iterate id=category name=categories /logic:iterate I made the first bit up. But should give you the idea. jsp:useBean id=categories

RE: Easy question: iterate

2003-12-24 Thread Daniel Lipofsky
% LabelValueBean[] lvArray = new LabelValueBean[] { new LabelValueBean(label1, value1), new LabelValueBean(label2, value2), new LabelValueBean(label3, value3), new LabelValueBean(label4, value4) }; request.setAttribute(lvArray, lvArray); % logic:iterate

Re: Easy question: iterate

2003-12-24 Thread e-denton Java Programmer
Mailing List [EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 12:31 PM Subject: Re: Easy question: iterate //psuedo code. List categoryList = Category.getList(); request.setAttribute(categories, categoryList.toArray()); logic:iterate id=category name=categories /logic:iterate I made

Re: Easy question: iterate

2003-12-24 Thread Mark Lowe
for this collection Will - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 12:31 PM Subject: Re: Easy question: iterate //psuedo code. List categoryList = Category.getList(); request.setAttribute(categories

Re: Easy question: iterate

2003-12-24 Thread e-denton Java Programmer
I's iteratin'! Thanks for all the help. - Original Message - From: Daniel Lipofsky [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; e-denton Java Programmer [EMAIL PROTECTED] Sent: Wednesday, December 24, 2003 1:07 PM Subject: RE: Easy question: iterate

RE: Easy Question

2003-09-16 Thread Mainguy, Mike
The property attribute of the tag should point to a boolean property of the FormBean. If that property is true the box will be checked. ...unless you're using an old(er) version of the checkbox tag... I know in the older (1.0x) versions this was rather broken (i.e. only a string of 'T' or 'F' or

RE: Easy Question

2003-09-13 Thread Andrew Hill
snip Non-String Form bean properties are evil though, you'll thank yourself later if you use Strings /snip +1 -Original Message- From: Michael Ruppin [mailto:[EMAIL PROTECTED] Sent: Saturday, 13 September 2003 04:14 To: Struts Users Mailing List Subject: RE: Easy Question Non-String

RE: Easy Question

2003-09-12 Thread Slattery, Tim - BLS
Sorry for emailing so many questions. My last one (i promise) is, how do I set an html:checkbox to display as checked? The property attribute of the tag should point to a boolean property of the FormBean. If that property is true the box will be checked. -- Tim Slattery [EMAIL PROTECTED]

RE: Easy Question

2003-09-12 Thread Michael Ruppin
Non-String Form bean properties are evil though, you'll thank yourself later if you use Strings. As long as the String is set to something sensible like true or false, your checkbox will be properly set. I'm sure there are ample posts on the pros cons of this approach, here's one pro

RE: Easy Question

2003-09-12 Thread Edgar P Dollin
Boolean form properties are cool too (at least in my experience)... Edgar -Original Message- From: Michael Ruppin [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 3:14 PM To: Struts Users Mailing List Subject: RE: Easy Question Non-String Form bean properties

RE: Easy Question

2003-09-12 Thread Michael Ruppin
: Friday, September 12, 2003 3:14 PM To: Struts Users Mailing List Subject: RE: Easy Question Non-String Form bean properties are evil though, you'll thank yourself later if you use Strings. As long as the String is set to something sensible like true or false, your checkbox

RE: Easy Question

2002-11-26 Thread Karr, David
Do you have a valid action element in your struts-config.xml file specifying the editRecord.do action (assuming you're using extension mapping)? -Original Message- From: John Mattos [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 2:29 PM To: [EMAIL PROTECTED] Subject:

RE: Easy Question

2002-11-26 Thread John Mattos
Yes, here it is... actionpath=/editRecord type=com.thoughtworks.clearinghouse.web.servlet.EditRecordAction name=recordForm scope=request input=editRecord.jsp forward name=edit path=/editErrorFields.jsp/ forward name=confirm path=/prepareRecordsManagement.do/ forward

RE: Easy Question

2002-11-26 Thread Karr, David
What do you mean by inside a jar file that is referenced in the classpath explicitly? Aren't you putting your application classes in the WEB-INF/classes or WEB-INF/lib directory? You will always get into trouble if you try to externally control the CLASSPATH. -Original Message- From:

RE: Easy Question

2002-11-26 Thread John Mattos
Hey The jar file, called iNDemandCH.jar lives in this directory. C:\Tomcat\webapps\indemand\WEB-INF\lib the weird thing about this is that some .do actions work, and others don't. Do you think it might be that it can't see the class files? Karr, David [EMAIL PROTECTED] wrote:What do you mean

RE: Easy Question

2002-11-26 Thread Karr, David
, 2002 3:08 PM To: Struts Users Mailing List Subject: RE: Easy Question Hey The jar file, called iNDemandCH.jar lives in this directory. C:\Tomcat\webapps\indemand\WEB-INF\lib the weird thing about this is that some .do actions work, and others don't. Do you think it might

RE: Easy Question

2002-11-26 Thread John Mattos
cause stack trace? -Original Message- From: John Mattos [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 3:08 PM To: Struts Users Mailing List Subject: RE: Easy Question Hey The jar file, called iNDemandCH.jar lives in this directory. C:\Tomcat\webapps\indemand\WEB

RE: Easy Question

2002-11-26 Thread Karr, David
- From: John Mattos [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 3:08 PM To: Struts Users Mailing List Subject: RE: Easy Question Hey The jar file, called iNDemandCH.jar lives in this directory. C:\Tomcat\webapps\indemand\WEB-INF\lib the weird thing about