This discussion is archived
2 Replies Latest reply: Oct 24, 2012 4:26 AM by Oracle ITself RSS

EL with HashMap

Oracle ITself Newbie
Currently Being Moderated
Dear All

i have HashMap in Back Bean with this structure private Map<String, Boolean> UserMap = new HashMap<String, Boolean>();

and i can access this hashmap from EL Expression like this #{UserRolesBean.userMap["P0001"] != true}

but if i have this hashmap private Map<String, Customer> UserMap = new HashMap<String, Customer>();

with customer Object contains Customer ID & Customer Name

how to call this Hashmap using EL Expression to get Customer ID & Customer Name ?
  • 1. Re: EL with HashMap
    gimbal2 Guru
    Currently Being Moderated
    Oracle ITself wrote:
    Dear All

    i have HashMap in Back Bean with this structure private Map<String, Boolean> UserMap = new HashMap<String, Boolean>();

    and i can access this hashmap from EL Expression like this #{UserRolesBean.userMap["P0001"] != true}

    but if i have this hashmap private Map<String, Customer> UserMap = new HashMap<String, Customer>();

    with customer Object contains Customer ID & Customer Name

    how to call this Hashmap using EL Expression to get Customer ID & Customer Name ?
    The same, but this time referring to the properties of the bean.
    #{someBean.userMap["P0001"].name}
  • 2. Re: EL with HashMap
    Oracle ITself Newbie
    Currently Being Moderated
    thanks

    solved ..

    Edited by: Oracle ITself on Oct 24, 2012 4:25 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points