For this do the below
In your model define the property
To store the value use the below code
//storing all the selected regions
final HashMap
for(String region : selectedRegions){
regionMap.put(region, region);
}
_map.put(PowerGridContentModel.PROP_REGIONS, (Serializable)regionMap);
To retrieve use the below code, I am considering example of getting property from executionContext
HashMap
if(regionsMap != null){
for (Map.Entry
System.out.println("Region name::"+pair.getKey() + " = " + pair.getValue());
}
Hope it helps.
No comments:
Post a Comment