Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:getProperty

 
Abhijith Prabhakar
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

It is mentioned in HFSJ that the property of a bean should be a type that is either a String or primitive. If it isn't, it can still be a legal bean, but won't be able to rely on standard actions and you might have to use scripting.

Question:
If I override toString() method to get what I want, then Can I use that object as property in Standard actions?
 
Collins Mbianda
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Abhijith

You can ovveride toString() if you are using your own objects.
If you are using Map or List you will not ovverides toString().

If your property is not a String or a primitive type, switch to EL.

Hope it help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic