On 12/19/05, Srini Pillai <[EMAIL PROTECTED]> wrote:
> Thanks Rick, for responding quickly.
>
> >>I'm not sure what you are attempting to do with:
> value="${request['FAEditorForm'].id_${counter}}"
>
<snip/>

Thumb rule: EL expressions that look like this are invalid:

${...${...}...}

(unless you have appropriate escapes in place).

Replace with (JSP 2.0):

<c:set var="formProperty" value="id_${counter}" />

Then, the "id" param for your URL is here:

${FAEditorForm.formProperty}

And c:url, c:param will make it cleaner as already suggested below.

-Rahul


> I am trying to access the value from the ActionForm for property
> 'id_0', 'id_1' etc... depending on the value of the ${counter}. The
> example you had suggested using the 'url' tag will not work for me since
> the 'id' parameter will pass the value of the counter but I require the
> value in the form for the 'id_?' (where '?' is any number from 0...n) as
> mentioned above. Hope I am clear. Really appreciate your help.
>
> Thanks,
> Srini
>
> >>> [EMAIL PROTECTED] 12/19/2005 10:45 AM >>>
> On 12/19/05, Srini Pillai <[EMAIL PROTECTED]> wrote:
> >
> >
> > This is the code I tried to display a link with a value in the
> dynamic
> > form:
> >
> > <c:forEach var="counter" begin="0" end="${numTextFields}" >
> > .....
> >         <a href="<html-el:rewrite
> > page="/FAEditor.do"/>?methodToCall=removeElement&id=<c:out
> > value="${request['FAEditorForm'].id_${counter}}" />">Remove</a>
> > .....
> > </c:forEach>
>
>
> struts tags (from what I remember) I don't believe mix that well when
> used
> within standard html tags.
>
> I think it'll look cleaner anyway using the c:url tag:
>
> <c:url var="url" value="FAEditor.do">
>   <c:param  name="methodToCall" value="removeElement"/>
>  <c:param name="id" value="${counter}"/>
> </c:url>
> <a href="${url}">Remove</a>
>
> I'm not sure what you are attempting to do with:
> value="${request['FAEditorForm
> >
> > '].id_${counter}}"
>
>
> but  I doubt you  need that . You just probably need the id from the
> counter, if not you'll have to explain why not and I could try to
> help.
>
> --
> Rick
>

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

Reply via email to