• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quick EL function question.

 
Stephen Nixon
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ref: Page 389 HFSJ book.

When mapping the JSP to the TLD we use:
${mine:rollIt()}

This maps to <name>rollIt</name>

In the JSP we use () after rollIt. I assume that we add on the () after all names (and don't put the () in the <name> element). Or have I got the wrong end of the stick?!?
 
Bryan Basham
author
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Stephen,

The use of the parenthesis characters "()" tells EL that the name before the parens is an EL function. So, you only use () before a function name. You would not use parens before a property name on a bean, for example. So, ${user.phoneNumber()} would not make any sense.

The parens are not used in the <name> tag in the TLD file.

Does this answer your question?

Cheers,
Bryan
[ October 05, 2006: Message edited by: Bryan Basham ]
 
Stephen Nixon
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bryan - that's answered my question fully. Thanks for your time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic