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 attribute declarations: defaultValue ?

 
Garrett Smith
Ranch Hand
Posts: 401
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wish.

Seems like there should be a way to specify the default value for non-required attributes within the tag attribute declaration.

I know only this way:


It is kind of cumbersome.

It would be clearer (easier to read and maintain) to use this hypothetical syntax:
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Such a construct could not generally work. It could only be applied to extremely simple cases, such as your example. What would you specify if the attribute is a Map, or a List, or some custom bean (such as Person or SomeOtherComplexClass)?

Even in your simple case, is the attribute a boolean or the string "false"?
[ December 12, 2006: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic