On Mon, 5 Jan 2004, Matthias Winkler wrote:

> Hello,
>
> I have some tags that create X+V form elements (mixed
> XHTML and VXML). To name my form elements I want to
> use names passed by an application. They are available
> inside a bean. (struts application - values passed by
> action form)
> Along with the name more information is passed on to
> the user. When the form is filled out the values of
> the fields have to be sent back with the same bean.
>
> If I use <% out.write() %> to write down my tag and
> add the information from the bean, my tag will not be
> evaluatet.
>
> JSTL uses the ${} syntax to access information from a
> bean and use it inside a jsp page.
> I would like to do something similar but I do not
> know, how to access the information from the bean when
> I evaluate my tag.
>
> At the end I would like to be able to do something
> like:  <xv:input id=${mybean.name} ... />.
>
> Where can I find information on how jstl handels this
> problem?

This isn't hard to do, assuming you're OK with using the Jakarta Taglibs
implementation of JSTL. For an example, you might want to take a look at
the implementation of the Struts-EL tag libraries. These are just like the
regular Struts tags except that they allow you to use JSTL expressions in
the attribute values.

You can get the Struts-EL code by downloading the Struts source distro,
and looking under contrib/struts-el.

Hope this helps.

--
Martin Cooper


> Maybe there is another, easier solution to this
> problem?
>
> Best regards.
>
> Matthias Winkler
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to