On Wed, 2006-04-26 at 14:29 -0400, Jim Steinberger wrote: During the lifetime of a loop, the component does resolve under its given name, thus :
<div jwcid ="@For" source = "ognl: ..." value = "ognl: ..." > <img src="#" jwcid ="[EMAIL PROTECTED]"/> <span script = "foo.script" jwcid ="@Script" imageReference = "ognl: components.customName" /> </div> so on ech iteration of the for loop, your script does get a reference to the currently rendering component instance. It then can get and store the idpath or whatever you please from the component in some javascript array. Or you could just pass the component reference to some other rendering component, like you might a block to a renderblock. that also works... hth, Joshua > Hello, > > > > I'm creating components inside a @For component. How can I refer to > these components from JavaScript? i.e. I have to leave them anonymous > since there are several of them being created. > > > > I thought about using the Script component to do this - passing in the > component as a symbol so I could dynamically query its name -- but I > have the same problem - I can't pass in the component if I don't know > its name. > > > > Thanks, > > Jim > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]