I have a text box in a JSP.
Value of the textbox is present in a DO.
DO is present inside a HashMap.
How do I write the expression in the textbox {#.. blah blah..} to point to the value and display it? Below is my code:
DataObject:
public class PageNameDO {
private String whereAmI = "";
public PageNameDO(String val){
whereAmI = val;
}
//getters and setters
}
BackingBean with HashMap inside it:
public class HashBind extends PageCodeBase {
private HashMap<String, PageNameDO> hash1 = null;
public HashBind(){
hash1 = new HashMap<String, PageNameDO>();
hash1.put("A", new PageNameDO("Apple"));
}
//getters and setters for hashmap
}
JSP Page:
<h:inputText styleClass="inputText"
id="text1"
value="#{pc_HashBind.hash1[0].pageNameDO.whereAmI}">
</h:inputText>
How to display the value inside the text box?
Help!!