beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers (JIRA)" <>
Subject [jira] Resolved: (BEEHIVE-1125) behavior of derived actions
Date Fri, 22 Sep 2006 17:07:23 GMT
     [ ]

Carlin Rogers resolved BEEHIVE-1125.

    Resolution: Won't Fix
      Assignee: Carlin Rogers

Hi Srinivas,

The overloading of action methods was designed to support returning different form beans from
nested page flow or a forward from one action to another action. In this case the form bean
has already been identified and populated in an initial page flow action. Then in the forward
(such as a return from a nested page flow) we can get the form bean from the request to help
identify which action mapping to use... the one that takes the given form bean as the parameter.

However, the use of overloaded action methods does not work in the same way on a request submitted
from a page because the form bean type has not been identified. The request processor has
the action name to look up the mapping but no information about the bean type that needs to
be created and populated.
The limitation is that through the underlying struts, the path attribute of each action element
in a struts module config must be unique so that the runtime can find the correct action from
the mappings in the config. With overloaded methods, the NetUI annotation processor disambiguates
(and generates) path names by appending the form bean class type to the action name. The ordering
of the mapping to determine which gets the 'natural' path name as follows...

- action mapping takes no form, then it has the highest precedence, and replaces the existing
'natural' mapping for the given path.
- Otherwise, replace the existing one if the existing one has a form bean and if the new mapping's
form bean type comes alphabetically before the existing one's.

Take a look in your generated struts-config-*.xml file to see the paths of the actions. When
there are overloaded action methods, NetUI notes in the module config file that there is more
than one action with the same path and has a comment that you can use a form-qualified action
path if you want your page to use a different action mapping.

For example, given the action declarations...
    public Forward actionOne() {

    public Forward actionOne( form) {

The generated struts-config will contain action mappings with paths...
    <action ...  path="/actionOne"  ...>

    <action ...  path="/actionOne_com_foo_BeanOne"  ...>
      <!-- Note that there is more than one action with path "/actionOne".  Use a form-qualified
action path if this is not the one you want. -->

So, to make your scenario work, you can have the netui:form tag in your page refer directly
to the form-qualified action path. From the example above the form tag would be...

    <netui:form action="actionOne_com_foo_BeanOne">

Hope that helps. Kind regards,

> behavior of derived actions
> ---------------------------
>                 Key: BEEHIVE-1125
>                 URL:
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: V1, 1.0.1
>            Reporter: Srinivas Surapaneni
>         Assigned To: Carlin Rogers
>             Fix For:
> I had an action in Base pageflow controller which takes no form bean object
> I had the same action in the Derived Page Flow controller which extends the base and
takes form bean object
> It is always going to the Base class. It does not go to derived class action

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message