0

Which methodology is JSF using to access HashMap values in the view? I know the way to get HashMap value by using the EL Expression #{bean.map.key}, but I am curious as to how it works under the covers.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Arun
  • 825
  • 4
  • 14
  • 31

1 Answers1

0

This is not part of JSF. This is part of EL. EL has some default resolvers. One of them is the MapELResolver. You can of course homebrew your own and register it via <application><el-resolver>.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Thanks BalusC :) Can you plz guide me with links to have my own resolvers. – Arun Feb 04 '13 at 12:55
  • Just implement `ELResolver` class or subclass according its contract (click the link to see the javadoc) and register it as `` in `faces-config.xml`. You can find an example in those answers: http://stackoverflow.com/questions/9327479/how-do-i-use-a-java-util-set-with-uidata-in-jsf-specifically-hdatatable/9327572#9327572 and http://stackoverflow.com/questions/10694311/nesting-jsf-expression-strings/10695696#10695696 – BalusC Feb 04 '13 at 13:00
  • Thanks again BalusC :) I ll try out this... using the above links – Arun Feb 04 '13 at 13:13