struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mei Zhu" <m...@goperiscope.com>
Subject RE: JavaScript / struts submit problems
Date Tue, 28 Jan 2003 19:34:03 GMT
It is obvious that struts does not populate the form bean value from request
if you name your property like "XMLQueryString" (but it can be populated to
your input field from form bean). I do not understand exactly why. If you
just want to make it work I would not use a property name with the first and
second charaters being uppercase, e.g. in your jsp page, use
property="xmlQueryString" while in your form define methods
getXmlQueryString(), setXmlQueryString().

Mei

-----Original Message-----
From: tbachta@kcp.com [mailto:tbachta@kcp.com]
Sent: Tuesday, January 28, 2003 12:50 PM
To: Struts Users Mailing List
Subject: RE: JavaScript / struts submit problems



Sorry forgot to add this code to the fray, here is the ActionForm class
where I have the get and set methods

  private void setXMLQueryString(String sXML)
  {
    this.XMLQueryString = sXML;
  }

  public String getXMLQueryString()
  {
    return XMLQueryString;
  }


Tim Bachta
Information Technology
MC 48
816-997-7137



                      "Nelson, Laird"
                      <Laird.Nelson@FMR        To:       "'Struts Users
Mailing List'" <struts-user@jakarta.apache.org>
                      .COM>                    cc:
                                               Subject:  RE: JavaScript /
struts submit problems
                      01/28/2003 11:36
                      AM
                      Please respond to
                      "Struts Users
                      Mailing List"






> -----Original Message-----
> From: Mei Zhu [mailto:mzhu@goperiscope.com]
>
> In your jsp page, the hidden field should be:
> <html:hidden property="xMLQueryString"/> The first character
> of the property
> name should be lower case.

No; see
http://java.sun.com/j2se/1.4.1/docs/api/java/beans/Introspector.html#decapit

alize(java.lang.String) for the exception cases, of which this is one.
"XMLQueryString" will result in a getXMLQueryString() and a
setXMLQueryString(String) method being sought.  If either is not present,
then the BeanUtils code will skip it.

Cheers,
Laird

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







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


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


Mime
View raw message