Yes.  Use the iterator indexId.

-----Original Message-----
From: Ray [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 16, 2002 1:58 PM
To: Struts Users Mailing List
Subject: RE: Passing Struts parameters to JavaScript functions.


Mmm .. I get it .... :-)

Ok, another question.

If I have:

name="myCollectionElement" property="id"

from my collection iteration; is there any way I can get at the underlying 
object as a JSP call?

Something like:

(elementType)myCollection.elementAt(x).getId();


At 11:52 16/08/2002 -0700, you wrote:
>Please see if the attached example code can help.
>
>Mei
>
>-----Original Message-----
>From: Ray [mailto:[EMAIL PROTECTED]]
>Sent: Friday, August 16, 2002 8:06 AM
>To: Struts Users Mailing List
>Subject: Re: Passing Struts parameters to JavaScript functions.
>
>
>Yes, that would be great, except that I'm reading the stuf from a
>collection, which might be quite large. I was wondering if there was a way
>to do it, without having to have twenty or thirty hidden fields on the
form.
>
>At 08:39 16/08/2002 -0500, you wrote:
> >Ray....
> >
> >Don't pass the value to Javascript. Put the value of "id" in a hidden
> >field in the form then Javascript can get the value via
> >document.formName.hiddenFiledName.value.
> >
> >
> >Later, aj
> >
> >
> >
> >Ray wrote:
> >
> >>Hi there ... :-)
> >>I was hoping someone could help me with a validation problem.
> >>I'm trying to build a simple page that deletes an item from a database,
> >>when the user clicks on the "delete" link.
> >>Before going on to delete the item though, I need to ask the user if
> >>she's sure that she wants to delete the item.
> >>I thought the easiest way to do this, was a JavaScript call that would
> >>display a dialog:
> >><html:link onclick="askDelete(<bean:write name="myCollectionElement"
> >>property="id"/>)">delete</html:link>
> >>I'm trying to pass the bean value to the askDelete function, but the
> >>syntax is shafted. How do I go about doing this? My next problem would
be
> >>calling the deleteItem.do method from Javascript, whilst making sure
that
> >>the URL-rewriting stuff stays intact.
> >>Is there in fact, a better way to do this? I've heard of something
called
> >>the Validation Framework, which works clientside. Are there any
tutorials
> >>on using it?
> >>
> >>__________________________________________________
> >>Do You Yahoo!?
> >>HotJobs - Search Thousands of New Jobs
> >>http://www.hotjobs.com
> >>-- To unsubscribe, e-mail:
> >><mailto:[EMAIL PROTECTED]>
> >>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>__________________________________________________
>Do You Yahoo!?
>HotJobs - Search Thousands of New Jobs
>http://www.hotjobs.com
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


__________________________________________________

Do You Yahoo!?

Sign up for SBC Yahoo! Dial - First Month Free

http://sbc.yahoo.com


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

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

Reply via email to