You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alexander Jesse <al...@csfs.com> on 2001/04/27 17:51:58 UTC
Customtag calling a struts tag
Hi,
I try to replace a jsp file which was included into other jsp-files to
provide a common design pattern with a custom tag. Within the
jsp-file I used the struts message tag to do i18n.
Writing the custom tag for the design element was a breeze, BUT...
I do not want to reinvent the message-tag's i18n support. I would like
to call the standard struts-tag to do the job for me. My tag has no body
and the information I need to "convert" using the message tag is
dynamically provided by a session bean, so the standard tag-interaction
mechanism do not work...
For the moment I use a workaround: I copied the struts-java-code into
my custom-tag. Fortunately struts is open-source...
To come to an end: How can I call a tag from within the java-sourcecode
of a custom tag?
All ides welcome
thanx
Alexander Jesse
Re: Customtag calling a struts tag
Posted by Martin Cooper <ma...@tumbleweed.com>.
Instead of trying to reuse the Struts tag itself, perhaps you could call
RequestUtils.message() from within your tag to get the localized text. This
is what the <bean:message> tag does to get its job done.
--
Martin Cooper
----- Original Message -----
From: "Alexander Jesse" <al...@csfs.com>
To: "struts-user" <st...@jakarta.apache.org>
Sent: Friday, April 27, 2001 8:51 AM
Subject: Customtag calling a struts tag
> Hi,
>
> I try to replace a jsp file which was included into other jsp-files to
> provide a common design pattern with a custom tag. Within the
> jsp-file I used the struts message tag to do i18n.
>
> Writing the custom tag for the design element was a breeze, BUT...
> I do not want to reinvent the message-tag's i18n support. I would like
> to call the standard struts-tag to do the job for me. My tag has no body
> and the information I need to "convert" using the message tag is
> dynamically provided by a session bean, so the standard tag-interaction
> mechanism do not work...
>
> For the moment I use a workaround: I copied the struts-java-code into
> my custom-tag. Fortunately struts is open-source...
>
> To come to an end: How can I call a tag from within the java-sourcecode
> of a custom tag?
>
> All ides welcome
>
> thanx
> Alexander Jesse
>
>