Alexader says...
> > I am looking for a way to call a tag from within the
> > source-code of my
> > own custom tag.
> > Example: call a i18n-tag in a custom tag
> >
> > So far I have not found a solution to this problem...
You have to replicate the tag handler/container protocol calls.
This is manageable for simple Tag tag handlers, but it gets
somewhta touchy for a BodyTag. Sorry. The complexity of the
protocol is a consequence of multiple conflicting design constraints.
- eduard/o
Alexander Jesse wrote:
>
> Hi,
>
> I stumbled on this problem when I wrote a small application using struts.
> I used the struts i18n support, with its resource-file. Later on I wanted
> that the UI got fancier and wrote my own custom tag. Now within this
> custom tag I found the need to put some information that was i18n-sensitive.
> Of course in this case there was an easy solution (struts being OpenSource):
> I copied over their code into my tag.
> BUT
> What is the tag, whose functionality one needs, is not open source?
> What if struts changes there i18n implementation, will I need to re-engineer
> their changes?
>
> Does this make the use case clearer? i18n is just a sample...
>
> regards
> Alexander Jesse
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 02, 2001 10:57 PM
> To: [EMAIL PROTECTED]
> Subject: RE: calling a tag from custom-tag source
>
> I'm not quite following... could you provide a little more info on what
> you're trying to do? e.g. what i18n-tag do you want to use & what about it?
>
> Some things might have simple solutions that you don't need to actually call
> the i18n-tag source itself, but work in conjunction with it... e.g. if
> you're just trying to get a value for a key from the bundle, just use the
> i18n:bundle tag's id attribute to define an attribute in the scripting
> language, provide that attribute name to your tag, then use
> pageContext.getAttribute inside your tag to get at the bundle that i18n is
> using.
>
> Most of what the i18n tags are doing are standard java calls
> (java.text.MessageFormat, etc) once you've got the right ResourceBundle
> object.
>
> Tim
>
> > -----Original Message-----
> > From: Alexander Jesse [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 02, 2001 1:47 PM
> > To: taglibs-dev
> > Subject: calling a tag from custom-tag source
> >
> >
> > Hi,
> >
> > I am looking for a way to call a tag from within the
> > source-code of my
> > own custom tag.
> > Example: call a i18n-tag in a custom tag
> >
> > So far I have not found a solution to this problem...
> >
> > all hints are welcome
> > Alexander Jesse
> >