You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ray Madigan <ra...@madigans.org> on 2005/11/04 18:08:20 UTC

html:checkbox

Greetings,

I remember getting something like this to work in the past, I have searched
and cannot find what is missing, or what I'm doing wrong, or if it is even
possible.

I want to connect a set of checkboxes to a HashMap in my action form.

In my ActionForm I have a two methods like

public void setValue ( String key, boolean value );
public boolean getValue ( String key );

in the form reset method I clear the HashMap.

For the Action Class method of the class I initialize the hashmap like:

theForm.setValue ( "Foo", false );
theForm.setValue ( "Bar", true );

In my JSP i have tried many things like

<html:form action='/Foo.do'>
...

<html:checkbox property='value("Foo")'/>

...
</html:form>

When I do this I get a an exception
no getter method for property 'value("Foo")' of bean
org.apache.struts.taglib.html.BEAN

I have tried many alternatives, too many to post here.  Is this supposed to
work?

Thanks in advance


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org