Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HashMap, contains a key ?  RSS feed

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a HashMap, how can I test if it contains a key or not ? fn:contains doesn't work. Do we have another way out ?

Thanks.

 
Devaka Cooray
Marshal
Posts: 5322
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HashMap returns a null value if the key doesn't exist. You can check for that via EL:
<c:if test="${not empty activityGrid.telephone}">
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!