• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

.tag file - nested tags

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic