You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Srinivas Surapaneni (JIRA)" <de...@beehive.apache.org> on 2006/06/17 01:08:29 UTC

[jira] Created: (BEEHIVE-1125) behavior of derived actions

behavior of derived actions 
----------------------------

         Key: BEEHIVE-1125
         URL: http://issues.apache.org/jira/browse/BEEHIVE-1125
     Project: Beehive
        Type: Bug

    Reporter: Srinivas Surapaneni


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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (BEEHIVE-1125) behavior of derived actions

Posted by "Eddie O'Neil (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1125?page=all ]

Eddie O'Neil updated BEEHIVE-1125:
----------------------------------

      Component: NetUI
    Fix Version: v.next
        Version: V1
                 1.0.1

Just fixing up fields here...

> behavior of derived actions
> ---------------------------
>
>          Key: BEEHIVE-1125
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-1125
>      Project: Beehive
>         Type: Bug

>   Components: NetUI
>     Versions: V1, 1.0.1
>     Reporter: Srinivas Surapaneni
>      Fix For: v.next

>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (BEEHIVE-1125) behavior of derived actions

Posted by "Julie Zhuo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEEHIVE-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julie Zhuo closed BEEHIVE-1125.
-------------------------------

    Assignee: Julie Zhuo  (was: Carlin Rogers)

Close - work as designed.

> behavior of derived actions
> ---------------------------
>
>                 Key: BEEHIVE-1125
>                 URL: https://issues.apache.org/jira/browse/BEEHIVE-1125
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: 1.0, 1.0.1
>            Reporter: Srinivas Surapaneni
>         Assigned To: Julie Zhuo
>             Fix For: 1.0.2
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BEEHIVE-1125) behavior of derived actions

Posted by "Carlin Rogers (JIRA)" <de...@beehive.apache.org>.
     [ http://issues.apache.org/jira/browse/BEEHIVE-1125?page=all ]

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(com.foo.BeanOne form) {
        ....
    }

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

    <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. -->
        ...
    </action>

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">
        ...
    </netui:form>


Hope that helps. Kind regards,
Carlin

> behavior of derived actions
> ---------------------------
>
>                 Key: BEEHIVE-1125
>                 URL: http://issues.apache.org/jira/browse/BEEHIVE-1125
>             Project: Beehive
>          Issue Type: Bug
>          Components: NetUI
>    Affects Versions: V1, 1.0.1
>            Reporter: Srinivas Surapaneni
>         Assigned To: Carlin Rogers
>             Fix For: v.next
>
>
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira