This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.tag file - nested tags

 
Garrett Smith
Ranch Hand
Posts: 401
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Garrett Smith
Ranch Hand
Posts: 401
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic