You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ignacio de Córdoba (JIRA)" <ji...@apache.org> on 2006/12/27 17:22:57 UTC

[jira] Created: (STR-2990) doesn't change module scope when including a different module action result forward

<tiles:insert> doesn't change module scope when including a different module action result forward
--------------------------------------------------------------------------------------------------

                 Key: STR-2990
                 URL: http://issues.apache.org/struts/browse/STR-2990
             Project: Struts 1
          Issue Type: Bug
          Components: Tiles
    Affects Versions: 1.3.5
         Environment: JDK 5 / JDK 6, Struts 1.3.5
            Reporter: Ignacio de Córdoba


If you insert the forward result of an action:
<tiles:insert attribute="userservice"/> which maps to a page that has an <html:form>, if userservice is an attribute mapping to a page or action in a different module as current action's module, <html:form> will never find corresponding action, as the page is for the external module, but struts considers we are in current module.
As tiles can have common tiles definitions, maybe an extra parameter to <tiles:insert> is needed, to specify that supplied attribute is to be rendered in a different module scope (¿<tiles:insert attribute="userservice" module="/user"/>?) Or just make tiles detect module using the attribute path.

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

       

[jira] Commented: (STR-2990) doesn't change module scope when including a different module action result forward

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/STR-2990?page=comments#action_39218 ] 
            
Antonio Petrelli commented on STR-2990:
---------------------------------------

Please post:
* the way you use the <tiles:insert attribute="userservice" /> tag inside your JSP page;
* the action mapping in your struts-config.xml file.

> <tiles:insert> doesn't change module scope when including a different module action result forward
> --------------------------------------------------------------------------------------------------
>
>                 Key: STR-2990
>                 URL: http://issues.apache.org/struts/browse/STR-2990
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Tiles
>    Affects Versions: 1.3.5
>         Environment: JDK 5 / JDK 6, Struts 1.3.5
>            Reporter: Ignacio de Córdoba
>
> If you insert the forward result of an action:
> <tiles:insert attribute="userservice"/> which maps to a page that has an <html:form>, if userservice is an attribute mapping to a page or action in a different module as current action's module, <html:form> will never find corresponding action, as the page is for the external module, but struts considers we are in current module.
> As tiles can have common tiles definitions, maybe an extra parameter to <tiles:insert> is needed, to specify that supplied attribute is to be rendered in a different module scope (¿<tiles:insert attribute="userservice" module="/user"/>?) Or just make tiles detect module using the attribute path.

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

       

[jira] Commented: (STR-2990) doesn't change module scope when including a different module action result forward

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42192 ] 

Antonio Petrelli commented on STR-2990:
---------------------------------------

I think that we need a test case, so we can debug it.
Ignacio, could you provide a simple test case for it?

> <tiles:insert> doesn't change module scope when including a different module action result forward
> --------------------------------------------------------------------------------------------------
>
>                 Key: STR-2990
>                 URL: https://issues.apache.org/struts/browse/STR-2990
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Tiles 1 Plugin
>    Affects Versions: 1.3.5
>         Environment: JDK 5 / JDK 6, Struts 1.3.5
>            Reporter: Ignacio de Córdoba
>
> If you insert the forward result of an action:
> <tiles:insert attribute="userservice"/> which maps to a page that has an <html:form>, if userservice is an attribute mapping to a page or action in a different module as current action's module, <html:form> will never find corresponding action, as the page is for the external module, but struts considers we are in current module.
> As tiles can have common tiles definitions, maybe an extra parameter to <tiles:insert> is needed, to specify that supplied attribute is to be rendered in a different module scope (¿<tiles:insert attribute="userservice" module="/user"/>?) Or just make tiles detect module using the attribute path.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STR-2990) doesn't change module scope when including a different module action result forward

Posted by "Ignacio de Córdoba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/STR-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39810 ] 

Ignacio de Córdoba commented on STR-2990:
-----------------------------------------

Hi again,
I use <tiles:insert attribute="userservice" /> in a Page which has an <html:form> belonging to a certain module (module X). It renders OK.

"userservice" attribute is a forward defined in this module as:
		<forward name="shareduserservice" module="/" path="/user/shareduserservice.jsp"/> (Main module)

The point is that while <forward> tag is pointing to another module (main module in this example), tiles renders the inserted attribute belonging to the original module X.
This is usually no problem, but if in the inserted page (userservice attribute) there is an <html:form> it should be lookedup on main module, as stated int he module="/" of the forward, but it won't find it. Tiles places that page in the module X scope.

I've seen this bug only if two (or more I guess) <html:form> belonging to different modules are rendered into the same action using tiles:insert with forwards & different module parameter.

> <tiles:insert> doesn't change module scope when including a different module action result forward
> --------------------------------------------------------------------------------------------------
>
>                 Key: STR-2990
>                 URL: https://issues.apache.org/struts/browse/STR-2990
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Tiles
>    Affects Versions: 1.3.5
>         Environment: JDK 5 / JDK 6, Struts 1.3.5
>            Reporter: Ignacio de Córdoba
>
> If you insert the forward result of an action:
> <tiles:insert attribute="userservice"/> which maps to a page that has an <html:form>, if userservice is an attribute mapping to a page or action in a different module as current action's module, <html:form> will never find corresponding action, as the page is for the external module, but struts considers we are in current module.
> As tiles can have common tiles definitions, maybe an extra parameter to <tiles:insert> is needed, to specify that supplied attribute is to be rendered in a different module scope (¿<tiles:insert attribute="userservice" module="/user"/>?) Or just make tiles detect module using the attribute path.

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