[ http://www.stripesframework.org/jira/browse/STS-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12136#comment-12136 ]
Ben Gunter commented on STS-788: -------------------------------- Believe me, I know how confusing it can get. I've had my mind twisted in knots while working on it. :) The basic idea behind how these things work is this. The layout rendering process can only be initiated by executing a render tag. That render tag creates a layout context and silently executes its body one time so that the component tags within it can register themselves with the current context. That is the component registration phase. Then the render tag then executes the definition tag via include. The definition tag executes it body, writing out the body content. When a component tag is encountered within the definition, the component locates a like-named component in the current context, sets the context current component to its name and then executes the page containing the render tag inside of which the located component was registered. This is the component render phase. When the render tag executes during component render phase, components with names not matching the context current component do not execute (no-op) while those that do match write their body content out. Back in the definition tag, if no component is found with the correct name or the component tag that does execute produces no output, then the contents of that component tag (the one within the definition tag) are written out instead. Then the definition tag continues executing. What is described above is the simplest case, where you have a render that executes a definition that executes a component. However, over the years people have really stretched the capabilities of the layout tags so that they have components within components and renders within components and renders within definitions. It is those kinds of cases that really complicate matters. In the second example attached to this issue, what we have is a render within a component. The crux of the problem is that during the component render phase, the outer render executes and looks for a component with a name matching a component tag that is not a direct child of the outer render but a child of a render within a component within the outer render. Since none of the components within the outer render match the current component name, they do not execute and thus the render within the child component does not execute so the named component tag within that render does not execute either. I plan to fix this by tracking not just the render page path and component name but a path to the component tag that includes the render page path and the names of all the components that need to execute to get to the actual component we're trying to execute. > Layout issues after upgrade from 1.5.3 > -------------------------------------- > > Key: STS-788 > URL: http://www.stripesframework.org/jira/browse/STS-788 > Project: Stripes > Issue Type: Bug > Components: Tag Library > Affects Versions: Release 1.5.4 > Environment: jetty-6.1.15, Java(TM) SE Runtime Environment (build > 1.6.0_22-b04-307-10M3261) > Reporter: David Dundua > Assignee: Ben Gunter > Fix For: Release 1.5.5 > > Attachments: stripes-bug.zip > > > Guys, I have a couple of layout scenarios which stopped working after > upgrading to 1.5.4. I have created a couple of test cases demonstrating > these issues. I am attaching maven2 project. > 1. mvn jetty:run > 2. http://localhost:8080/stripes-bug > 3. take a look at the output of each test under 1.5.4 > 4. change the stripes dependency to 1.5.3 > 5. mvn clean jetty:run > 6. observe the difference in the output -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Stripes-development mailing list Stripes-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-development