• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL and removal of id attribute  RSS feed

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone explain the significance of the 'id' parameter. Sun has replaced it with(maybe sometime ago) 'var'. I would really appreciate it if someone could please give me an explanation as to why and why did the 'id' attribute have draw backs.

Thank you
david
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They didn't replace anything. As a general rule, "id" is used to refer to an already-declared variable. "var" is used in tags that store the variable themselves. You can always check the JSTL tag documentation if things are unclear.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!