ok ... thanx ...
but does anybody know how I can replace my code
with jsp ?
I am very thankful if somebody help me ....
because my time is too short ...
thanx a lot
marc
On Mon, 22 Oct 2001, Sandeep Takhar wrote:
> I believe someone mentioned that indexed properties
> don't work even though the documentation says it does.
>
> The nightly downloads contain this functionality or
> this is an add on that you can download and install:
>
> http://husted.com/struts/resources.htm
>
> Go to Contributor Extensions and look at BeanUtils
> with Extension Strings.
>
> --- Marc Gassmann <[EMAIL PROTECTED]> wrote:
> >
> >
> > I would like to have a line with items
> > this items should be able to delete or to show the
> > hole info. so you have
> > to press on a button "show" or
> > "del"
> >
> > and for each col the informations are saved in a
> > ArrayList in a
> > form bean
> >
> > at the moment I have all items in one cell, so I
> > would like to index the
> > bean:write tag ... like
> >
> > <bean:write name="description[index]" />
> > but this doesnt work
> >
> >
> > this is the main part of my jsp page:
> >
> >
> > <body>
> > <html:form action="/report">
> > <h1><bean:message key="report.heading"/><html:hidden
> > property="action"
> > value="query"/></h1>
> > <br>
> > <table border="1" cellspacing="0" width="100%">
> > <logic:iterate id="date" name="reportDataBean"
> > property="dateList"
> > indexId="index" scope="request">
> > <bean:define id="description" name="reportDataBean"
> > property="descriptionList" scope="request"/>
> > <bean:define id="algorithm" name="reportDataBean"
> > property="algorithmList" scope="request"/>
> > <tr>
> > <td>[ <bean:write name="index"/> ]</td><!--
> > index -->
> > <td><bean:write name="date"/></td> <!-- date
> > -->
> > <td><bean:write name="description" /></td> <!--
> > description -->
> > <td><bean:write name="algorithm"/></td> <!--
> > algorithm -->
> > <td><html:link page="/report.do" paramId="id"
> > paramName="index">
> > <html:button property="showButton"
> > value="Show"
> > onmouseup="javascript:submit()"/>
> > </html:link>
> >
> > </td>
> > </tr>
> > </logic:iterate>
> > </table>
> > </html:form>
> > </body>
> >
> >
> > snipplet of form bean (rdb):
> >
> > public void setDateList(ArrayList dateList) {
> > this.dateList = dateList;
> > }
> > public ArrayList getDateList() {
> > return dateList;
> > }
> >
> >
> > snipplet of action:
> >
> > --
> > ResultValueObject[] vo
> > this holds the datas
> > --
> >
> > for (int i=0; i < vo.length; i++)
> > {
> > dateList.add(vo[i].getTheDate());
> > descriptionList.add(vo[i].getDescription());
> > algorithmList.add(vo[i].getAlgorithmType());
> > }
> > rdb.setDateList(dateList);
> > rdb.setDescriptionList(descriptionList);
> > rdb.setAlgorithmList(algorithmList);
> >
> >
> >
> >
> > this is my solution at the moment ...
> > or do you know a better solution ?
> > at the moment a have no idea ...
> >
> >
> >
> > thanx a lot
> >
> >
> > <marc>
> >
> >
> >
> >
> > On Mon, 22 Oct 2001, Tom Klaasen (TeleRelay) wrote:
> >
> > > For the first part of the question, I'm not sure
> > what you want. Please
> > > describe the structure of the bean(s) you're
> > trying to display.
> > >
> > > For the second part: what do you mean by "write
> > url"? And the code looks
> > > a bit weird too: an html:button nested in an
> > html:link. What is that
> > > supposed to do? It is like writing in html: <a
> > href="..."><input
> > > type="button"...></a>. Doesn't make much sense to
> > me. Moreover,
> > > html:button should be nested in an html:form tag.
> > Maybe you just didn't
> > > copy that snippet, otherwise have a look at the
> > html:form tag
> > > description.
> > >
> > > hth,
> > > tomK
> > >
> > > > -----Original Message-----
> > > > From: Marc Gassmann [mailto:[EMAIL PROTECTED]]
> > > > Sent: maandag 22 oktober 2001 9:11
> > > > To: struts-user
> > > > Subject: iterate with 3 array lists (urgent)
> > > >
> > > >
> > > >
> > > >
> > > > hi all
> > > >
> > > > I would like to iterate with 3 array lists.
> > > >
> > > > <logic:iterate id="date"
> > name="reportDataBean"
> > > > property="dateList"
> > > > indexId="index" scope="request">
> > > > <bean:define id="description"
> > name="reportDataBean"
> > > > property="descriptionList" scope="request"/>
> > > > <bean:define id="algorithm"
> > name="reportDataBean"
> > > > property="algorithmList" scope="request"/>
> > > > <tr>
> > > > <td>[ <bean:write name="index"/> ]</td><!--
> > index -->
> > > > <td><bean:write name="date"/></td> <!--
> > date -->
> > > > <td><bean:write name="description" /></td>
> > <!-- description -->
> > > > <td><bean:write name="algorithm"/></td>
> > <!-- algorithm -->
> > > > <td><html:link page="/report"
> > paramId="index">
> > > > <html:button property="showButton"
> > value="Show"/></html:link>
> > > >
> > > > </td>
> > > > </tr>
> > > > </logic:iterate>
> > > >
> > > > but I dont know, how it take the right index for
> > the ie
> > > > descriptionList.
> > > > at the moment, all items of the list are
> > included in the <td>
> > > >
> > > > the second problem ... I would like to have a
> > button, which is a link,
> > > > which take the index as atribute
> > > >
> > > > at the moment the link shows only the write url,
> > without the parameter
> > > >
> > > >
> > > > thanx a lot
> > > >
> > > >
> > > > <marc>
> > > >
> > > >
> > > >
> > > >
> > > > Content Security by MailMarshal
> > > >
> > >
> >
> > < marc > < n : 01 / 844 35 69 >
> > < gassmann > < x : 01 / 844 35 69
> > >
> > < buchserstrasse 9 > < icq# : 15 00 33
> > 05 >
> >
> === message truncated ===
>
>
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>
< marc > < n : 01 / 844 35 69 >
< gassmann > < x : 01 / 844 35 69 >
< buchserstrasse 9 > < icq# : 15 00 33 05 >
< ch-8113 boppelsen > < mailto:[EMAIL PROTECTED] >
linux - where do you want to go tomorrow ?
Content Security by MailMarshal