beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers (JIRA)" <...@beehive.apache.org>
Subject [jira] Resolved: (BEEHIVE-1141) Form bean implmenting Serializable can not populate its property attributes from HTTP GET request parameters
Date Tue, 29 Aug 2006 22:10:22 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-1141?page=all ]

Carlin Rogers resolved BEEHIVE-1141.
------------------------------------

    Resolution: Fixed
      Assignee: Julie Zhuo  (was: Carlin Rogers)

Turns out that a page with a form that uses a POST will also have the behavior if the name
of the field is not an expression. The NetUI tags usually create an expression from a data
source (like actionForm.someParam). However, if a developer had a bean that just implemented
Serializable, and had a page with a form that used did not have expressions for the name of
the field, the bean would not be populated as desired. So this was broken with both GET and
POST. Good catch!

The implementation for the NetUI process populate, defers to the commons BeanUtils for non-NetUI
expression keys, which is what Struts uses. Before doing the populate,
a Serializable form beans gets wrapped in a NetUI AnyBeanActionForm object where as the FormData
form bean is just passed through.

This issue is fixed with SVN revision 438250...
http://svn.apache.org/viewvc?rev=438250&view=rev

Modified ProcessPopulate to make sure it passes the original bean to the commons BeanUtils.populate()
method, rather than the NetUI AnyBeanActionForm object. There's also a new test that uses
form beans in both Get and POST requests.

> Form bean implmenting Serializable can not populate its property attributes from HTTP
GET request parameters
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: BEEHIVE-1141
>                 URL: http://issues.apache.org/jira/browse/BEEHIVE-1141
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: 1.0.1
>         Environment: WIndows XP SP2, Linux, w/ JDK 1.5
>            Reporter: Yongqin Xu
>         Assigned To: Julie Zhuo
>             Fix For: v.next
>
>
> a url link with request parameters like "someAction.do?param1=1&param2=3" invokes
the action method "someAction" in
> a controller class. The action method takes a form bean with property attributes "param1"
and "param2". If the form bean extends
> deprecated FormData, those bean attributes got populated correctly, otherwise, if the
form bean just implements Serializable
> interface as those created from weblogic workshop 9.2 IDE wizard, its attributes can
not get populated at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message