logic:iterate problem: NullPointerException

2008-09-06 Thread cacodemon79
Hi to all. I have a problem with a logic:iterate tag. I'm using Struts 1.3. I have to populate a select with data read from db (by invoking the first Action). When a select option is selected in the jsp, I have to invoke a second Action (on the same jsp page) which has to perform some operations a

Re: logic:iterate - problem

2007-07-10 Thread Andreas Hartmann
Hello Chad, hello Yoge, thanks for your hints! meanwhile, I could find a third solution: Another solution should be to use EL: But this solution doesn't work for me (the string ${object.rows} appears unchanged after rows=) , though I'm using tomcat 5.5 and struts 1.2.9.. May be,

Re: logic:iterate - problem

2007-07-10 Thread Chad S. Lauritsen
Another way to do it (with a little bit less java) is: [EMAIL PROTECTED] wrote: Hello! I've got a problem to get a value within a logic:iterate construction (foo is an ArrayList ): This does not work. How must it been written to address the method getRows() in the object,

Re: logic:iterate - problem

2007-07-10 Thread Yoge
Try following tag... On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello! I've got a problem to get a value within a logic:iterate construction (foo is an ArrayList ): This does not work. How must it been written to address the method getRows() in the object, which has bee

logic:iterate - problem

2007-07-09 Thread andihartmann
Hello! I've got a problem to get a value within a logic:iterate construction (foo is an ArrayList ): This does not work. How must it been written to address the method getRows() in the object, which has been defined by id in logic:iterate? Kind regards, Andreas Hartmann "Jetzt Handy

Re: logic:iterate problem...

2005-04-21 Thread Lucas Bern
Great! it works fine... thanks Jeff and Erik. Lucas Jeff Beal <[EMAIL PROTECTED]> wrote: >From http://struts.apache.org/userGuide/struts-logic.html#iterate: collection: A runtime expression that evaluates to a collection probably evaluates to a String. What you need is name='' On 4/21/05, Luc

Re: logic:iterate problem...

2005-04-21 Thread Jeff Beal
>From http://struts.apache.org/userGuide/struts-logic.html#iterate: collection: A runtime expression that evaluates to a collection <%=Globales.AreaPersonal.MODULOS_KEY%> probably evaluates to a String. What you need is name='<%=Globales.AreaPersonal.MODULOS_KEY%>' On 4/21/05, Lucas Bern <[EMA

Re: logic:iterate problem...

2005-04-21 Thread Erik Weber
Hmm I didn't even notice that. However, this is the section of code that throws that Exception (from 1.2.4 src): /** * Construct an iterator for the specified collection, and begin * looping through the body once per element. * * @exception JspException if a JSP exception has o

Re: logic:iterate problem...

2005-04-21 Thread Michael Jouravlev
Looks like you are trying to iterate over string. How about this: Michael. On 4/21/05, Lucas Bern <[EMAIL PROTECTED]> wrote: > > Hi all... > > I get this exception trying to render options with logic iterate tag... > > javax.servlet.jsp.JspException: Cannot create iterator for this collecti

Re: logic:iterate problem...

2005-04-21 Thread Lucas Bern
I would like to get a null pointer exception or a "can not set bean to null" when my list is null... I use to solve this kind of problem with html:options and html:optionsCollection but what i have to do in this page is very complex for this tags... thanks for your answer Erik Lucas Erik W

Re: logic:iterate problem...

2005-04-21 Thread Erik Weber
I think your List reference is probably null. Also, have you looked at html:options and html:optionsCollection? Erik Lucas Bern wrote: Hi all... I get this exception trying to render options with logic iterate tag... javax.servlet.jsp.JspException: Cannot create iterator for this collection My act

logic:iterate problem...

2005-04-21 Thread Lucas Bern
Hi all... I get this exception trying to render options with logic iterate tag... javax.servlet.jsp.JspException: Cannot create iterator for this collection My action just get a List form a Srevice layer and store it in session scope under Globales.AreaPersonal.MODULOS_KEY. <%=((Contenibl

R: Logic:Iterate Problem

2004-06-23 Thread Amleto Di Salle
ot;applicationScope" depending on the "pageRecords" is stored. BR /Amleto -Messaggio originale- Da: Eddie Yan [mailto:[EMAIL PROTECTED] Inviato: mercoledì 23 giugno 2004 18.06 A: [EMAIL PROTECTED] Oggetto: Logic:Iterate Problem Hi guys, Say I have a JSP as follows:

RE: Logic:Iterate Problem

2004-06-23 Thread Robert Taylor
Assuming you have a scoped Collection named "pageRecords": Struts tags: JSTL: robert > -Original Message- > From: Eddie Yan [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 23, 2004 12:06 PM > To: [EMAIL PROTECTED] > Subject: Logic:Iterate Problem

R: Logic:Iterate Problem

2004-06-23 Thread Amleto Di Salle
ot;applicationScope" depending on the "pageRecords" is stored. -Messaggio originale- Da: Eddie Yan [mailto:[EMAIL PROTECTED] Inviato: mercoledì 23 giugno 2004 18.06 A: [EMAIL PROTECTED] Oggetto: Logic:Iterate Problem Hi guys, Say I have a JSP as follows:

Logic:Iterate Problem

2004-06-23 Thread Eddie Yan
Hi guys, Say I have a JSP as follows: <% Iterator iter = pageRecords.iterator(); while(iter.hasNext()) { UserDetail detail = (UserDetail)iter.next(); %> <%= detail.getId() %> <% } %> pageRecords is a Collection of UserDetail object. UserDetail is my data tr