I am getting the following: org.apache.jasper.JasperException: No getter method for property stringMapped(102_price) of bean bean
I did get this to work with indexed properties, but I need to access the values by name not an index number. Have you ever used mapped properties? I am hoping this is just some stupid syntax error. Jason Long - CEO and Chief Software Engineer Supernova Software - supernovasoftware.com BS Physics, MS Chemical Engineering -----Original Message----- From: Mark [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 8:13 AM To: [EMAIL PROTECTED] Subject: Re: mapped propeties problem and need advice yes, thats the correct way to reference mapped properties. what exactly is the problem you're having? *********** REPLY SEPARATOR *********** On 03/13/2003 at 3:47 AM Jason Long wrote: >I have been trying to set up some mapped properties in a form. >It is currently not working. >Would someone please look over what I am trying to do and comment on the >technique? > >This was taken from the following: >http://jakarta.apache.org/struts/faqs/indexedprops.html > >I modified the code from the faq slightly, but it is essentially the same. > >If this works I was hoping to populate the map with the request parameters. >Since I am using XSL to generate the pages, I can easily add <bean:write >property="stringMapped(XXXXXXXX)" name="bean" /> >in order to repopulate the fields as the JSP recompiles. > >This method seems to solve the problems I am having. I would appreciate any >advice anyone has. > >Thank you for your time, > >Jason Long - CEO and Chief Software Engineer >Supernova Software - supernovasoftware.com >BS Physics, MS Chemical Engineering > >*************************************************************************** * >****** >My setup >*************************************************************************** * >****** > >ManagerForm.java >*************************************************************************** * >****** >public final class ManagerForm > extends ActionForm { > private HashMap map = new HashMap(); > > public ManagerForm() { > map.put("102_price", "578854"); > } > > public Object getStringMapped(String key) { > return (map.get(key)); > } > > public void setStringMapped(String key, Object value) { > map.put(key, value); > } > > public void reset(ActionMapping mapping, HttpServletRequest request) { > } > > public ActionErrors validate(ActionMapping mapping, > HttpServletRequest request) { > > ActionErrors errors = new ActionErrors(); > return errors; > } >} > >JSP Code >*************************************************************************** * >****** ><jsp:useBean class="org.apache.struts.webapp.example.ManagerForm" id="bean" >/> ><bean:write property="stringMapped(102_price)" name="bean" /> > >Error: >*************************************************************************** * >****** >org.apache.jasper.JasperException: No getter method for property >stringMapped(102_price) of bean bean > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]