[
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