This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes tag attributes shortcut Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "tag attributes shortcut" Watch "tag attributes shortcut" New topic
Author

tag attributes shortcut

Phil Chuang
Ranch Hand

Joined: Feb 15, 2003
Posts: 251
Is there a way to do some kind of shortcut attribute passing? Let me give you an HTML example:

So if I wanted to pass along a boolean value in this way, is it possible?
Instead of

could I do

?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63208
    
  69

No.
JSP custom tags must follow strict XML rules. That means no "shortcuts".
In fact, in xhtml your td tag would need to be written as <td nowrap="true">. I code this way for completeness even when coding the page as HTML4.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Have you checked out Aspose?
 
subject: tag attributes shortcut
 
It's not a secret anymore!