I don't believe that <logic:iterate .../> is "smart" enough to know that
if the value for the offset or length attribute is not an integer then
attempt to "find" the named value in all scopes.

You can do something like this:

<bean:define id="pageOffset" name="formName" property="pageOffset"/>
<bean:define id="pageLength" name="formName" property="pageLength"/>

<logic:iterate id="item"
               name="bfData"
               type="...lc.web.dto.BfFullEntryData"
               offset="<%=pageOffset%>"
               length="<%=pageLength%>"
               indexId="index">

Or you could use Struts-EL which provides a JSTL like syntax.

robert

> -----Original Message-----
> From: Gregory F. March [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 15, 2003 12:00 PM
> To: [EMAIL PROTECTED]
> Subject: Passing variables for logic:iterate
> 
> 
> 
> Ok, this is probably a dumb questio, but here it goes...
> 
> I am trying to iterate over a portion of a list.  I have calculated the
> portion (the offset and length) in my action.  I have two entries in my
> DynaValidatorForm:
> 
>       <form-property name="pageOffset"          type="java.lang.String"/>
>       <form-property name="pageLength"          type="java.lang.String"/>
> 
> And I am doing a myform.set("pageOffset", String.valueOf(myCalcOffset));
> etc.
> 
> The iterate is:
> 
>   <logic:iterate id="item"
>                  name="bfData"
>                  type="...lc.web.dto.BfFullEntryData"
>                  offset="pageOffset"
>                  length="pageLength"
>                  indexId="index">
> 
> It just plain doesn't work.  If I substitute something like "5" for
> pageOffset or pageLength,  it works like a champ.
> 
> What am I missing?  It's got to be something simple...
> 
> Thanks,
> 
> /greg
> 
> --
> Gregory F. March    -=-    http://www.gfm.net:81/~march    -=-    
> AIM:GfmNet
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

Reply via email to