struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erez Efrati <er...@netmedia.net.il>
Subject RE: Action Form: HashMap
Date Fri, 06 Jun 2003 17:31:27 GMT
I mean the HTML view source after the page has been generated. I am
working with the Mapped Properties methods and it works fine so hang on
there, it will work at the end... :)

-- Erez

-----Original Message-----
From: Erez Efrati [mailto:ereze@netmedia.net.il] 
Sent: Friday, June 06, 2003 7:28 PM
To: 'Struts Users Mailing List'
Subject: RE: Action Form: HashMap

Try looking at the source of the generate page. See that all looks
correct. I am also not sure if leading spaces between the name of the
property name 'stringMapped' and the () chars are legal...
-- Erez

-----Original Message-----
From: Zhu He [mailto:hez@cisco.com] 
Sent: Friday, June 06, 2003 4:04 PM
To: Struts Users Mailing List
Subject: Re: Action Form: HashMap

if you are using map backed actionForm, make sure getXXX() setXXX()
where
XXX matches the name of the map.
In you case function names should be getMap() setMap()
----- Original Message -----
From: "Ray Madigan" <ray@madigans.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, June 06, 2003 9:37 AM
Subject: RE: Action Form: HashMap


> OK,  I made the following changes, and it didn't do what I expected.
> HELP!
>
> I added to the ActionForm:
>
>     /**
>      * The form HashMap
>      */
>     private HashMap map = new HashMap ( );
>
>     public Object getStringMapped ( String key ) {
>         return map.get ( key );
>     }
>
>     public void setStringMapped ( String key, String value ) {
>         map.put ( key, value );
>     }
>
> I modified the jsp as:
> <html:form action='Foo.do'>
>
>     <c:forEach var='element' items='${elements}' >
>         <html-el:text property='stringMapped ( ${element.element} )'
>                       value='${element.value}'/>
>     </c:forEach>
>
> ...
>
> </thml:form>
>
> When I look at the form in my DispatchAction map is always empty.
>
> Any help would be appreciated!
>
> -----Original Message-----
> From: David Graham [mailto:dgraham1980@hotmail.com]
> Sent: Thursday, June 05, 2003 11:13 AM
> To: struts-user@jakarta.apache.org
> Subject: Re: Action Form: HashMap
>
>
> Read the mapped properties section here:
> http://jakarta.apache.org/struts/faqs/indexedprops.html
>
> David
>
>
> >From: "Ray Madigan" <ray@madigans.org>
> >Reply-To: "Struts Users Mailing List"
<struts-user@jakarta.apache.org>
> >To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> >Subject: Action Form: HashMap
> >Date: Thu, 5 Jun 2003 11:00:12 -0700
> >
> >I have a form that has elements that I do not know the names of ahead
> >of time.
> >
> >I want to have struts scrape the form into a map so the key is the
name
> >of the element and the value is the value of the element when it was
> >submitted.
> >
> >I looked for an action form that acted like this.  Has anyone done it
> >before, or is there a better way?
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
> _________________________________________________________________
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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



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




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


Mime
View raw message