aspose file tools*
The moose likes JSP and the fly likes .tag file - nested tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark ".tag file - nested tags" Watch ".tag file - nested tags" New topic
Author

.tag file - nested tags

Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
Classic Tag Handlers are a pain.

Is there a way to enforce a .tag file so that it can only be invoked from another tag?

For example, can I enforce that tab.tag only be invoked from tabs.tag?

What's the best way to do it?



Is gonna output:


comp.lang.javascript FAQ: http://jibbering.com/faq/
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Originally posted by Garrett Smith:
Classic Tag Handlers are a pain.


The Simple Tag Handlers are much easier to deal with. I use a mix of Simple tags (for tags best implemented in Java), and tag files (for tags best implemented in JSP).


Is there a way to enforce a .tag file so that it can only be invoked from another tag?


I assume you mean "within" rather than "from".

This would be much easier in a Simple tag handler. Is there a reason you want to use tag files for this -- or is that choice merely to avoid Classic tag handlers?
[ March 24, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
Originally posted by Bear Bibeault:


I assume you mean "within" rather than "from".

That's what I mean.

Is there a reason you want to use tag files for this -- or is that choice merely to avoid Classic tag handlers?

tag files are easy.

[ March 24, 2006: Message edited by: Bear Bibeault ]

It made it using dynamic attributes and a tokenized value (delim is "|").


<a:m4 id="myEventsTabs" bundle="${resBundle}"
selectedId="MyHistory"
MyCalendar="label.myCalendar|#"
MyHistory="label.myHistory|#"
></a:m4>

In the tag file, the undeclared attributes end up in the map, The map is iterated over.

Each entry.key is a tab id, the entry.value is split. The first part is the resource-bundle key, the second key is the href (just "#" for now).

I don't actually like using | to delimit data. It's obvious w/o explanation. It works. It could be cleaner.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: .tag file - nested tags