You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Rich Feit (JIRA)" <be...@incubator.apache.org> on 2005/02/13 02:22:12 UTC

[jira] Resolved: (BEEHIVE-290) UseFormBean fails to bind to the proper bean in some cases

     [ http://issues.apache.org/jira/browse/BEEHIVE-290?page=history ]
     
Rich Feit resolved BEEHIVE-290:
-------------------------------

    Resolution: Fixed

It turns out that the cleanest way (I think) to solve this was to generate two different form beans in the Struts config file.  This means that the form tag doesn't need to know anything more than it already does.  The solution turned out to be more involved than I thought (for instance, putting a form bean on a Forward should initialize *all* form beans of the right type), but I think it's right.  What do you think?

> UseFormBean fails to bind to the proper bean in some cases
> ----------------------------------------------------------
>
>          Key: BEEHIVE-290
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-290
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1Beta
>     Reporter: Daryl Olander
>     Assignee: Rich Feit
>      Fix For: V1Beta

>
> I have a JSP page that has two forms on it binding to two different actions.  Both actions take the same type of bean (Bean).  The second form on the page, has a useFormBean annotation that points to a PageFlow version of the bean. 
> When you run the page, you should see values from the PageFlow bean in the second form, but that version is hidden by putting the newly created bean for the first form.  The reason this happens is that we call mapping.getAttribute() from struts to name the bean.  Both beans have the same name, so when we check pageContext for the bean on the second form, it is already defined by the first form.
> Not sure how we can fix this. It seems like the tags should check the meta data on the form to see if there is a useFormBean specified and override the value of the beanName.
> If you want me to fix this bug, I can take a crack at it because the work is most likely in the form tag.
> I'll put a repo into the DRT app for you. 

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira