Achim,

Using the 'var' attribute, you can expose a scripting variable and then
use the current value within a scriptlet.  In your case, it should be as
simple as

        <%= projects %>

The 'jx' version of the library has tags to support this function, but
'jr' users should be more comfortable with scriptlets anyway.

Do you have a suggestion about how the documentation might be improved?  
We should probably provide more examples for 'jr'.  (Our initial focus was
on emphasizing 'jx'.)

Thanks again for the comments and testing.  I hope you're finding it
useful,

Shawn

On Wed, 12 Sep 2001, Achim We�ling wrote:

> Hallo,
> 
> thanks to Craig and Shawn, now I get it to work! But I also have the next 
> question. I'd like to use forEach-Tag like follows:
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <%@ page contentType="text/html" %>
> <%@ taglib uri="http://jakarta.apache.org/taglibs/datetime"; prefix="dt" %>
> <%@ taglib uri="http://java.sun.com/jsptl/ea/jr"; prefix="jr" %>
> <jsp:useBean id="reader" class="org.infokomGT.beans.SD_IMS_Reader" 
> scope="application"/>
> <html>
> <head>
>      <title>SD-IMS Katalog</title>
> </head>
> <body>
>      <H1>verf�gbare Karten:</H1>
>      <TABLE width='100%' cellpadding='5' border='0' cellspacing='0'>
>          <TR>
>              <TH>Name/Datum</TH>
>              <TH>Titel</TH>
>              <TH>Beschreibung</TH>
>          </TR>
>          <jr:forEach var="projects" items="<%= reader.getProjects() %>">
>              <TD colspan='3' align='center'>
>                  ??????????????????????????????????
>              </TD>
>          </jr:forEach>
>          <TR>
>              <TD colspan='3' bgcolor='lightgrey' align='right'>
>                  <FONT size='-1'><dt:format pattern="EEEEE, dd. MMMMM yyyy 
> '['HH:mm:ss z']'"><dt:currentTime/></dt:format></FONT>
>              </TD>
>          </TR>
>      </TABLE>
> </body>
> </html>
> 
> 
>  From the bean I get an Array of Strings and now I want to add each String 
> to its own row, but I didn't know how I can get the value at the marked 
> point. I think the documentation is a little bit weak at this point.
> 
> Thanks a lot!
> 
> ++++++++++++++++++++++++++++++++
> Achim We�ling
> [EMAIL PROTECTED]
> 

Reply via email to