Your code that was posted never created the map -- it is null. If it
is null it can't hold values
On 8/4/06, Jorge Vásquez <[EMAIL PROTECTED]> wrote:
Hi,
I have some form elements mapped to the same map attribute of a bean but
with different keys each and in theory when a post is done the map keys
should each be set with the values entered in each element in the form but
the map always arrives empty.
In order to make myself clear here goes a simplified example of what I am
trying (by the way, the possibility of creating a direct setter and getter
for each property is not possible in my case which is a little more complex
than this example):
In the jsp I have something like the following:
<h:inputText
value="#{searchTreeBean.returnCheckBoxesMap['prueba']}"/>
Then, when I invoke an action method on the bean which has the attribute and
getter method:
private Map returnCheckBoxesMap;
public Map getReturnCheckBoxesMap() {
return returnCheckBoxesMap;
}
I notice that the returnCheckBoxesMap remains empty without the values that
I inputted on the textbox, I imagined that by doing the mapping the map
attribute is automatically updated with the values that are sent on the
page?
Can anyone explain this to me? How is the value-binding process done with
map attributes, is this a bug or am I missing something?
Regards,
Jorge Vásquez