You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/18 02:38:34 UTC
[jira] Updated: (STR-1530) Error with nesting tags in separate
pages
[ https://issues.apache.org/struts/browse/STR-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated STR-1530:
-------------------------------
Fix Version/s: 1.4.0
> Error with nesting tags in separate pages
> -----------------------------------------
>
> Key: STR-1530
> URL: https://issues.apache.org/struts/browse/STR-1530
> Project: Struts 1
> Issue Type: Bug
> Components: Taglibs
> Affects Versions: 1.1.0
> Environment: Operating System: other
> Platform: PC
> Reporter: Deniss Parhomenkoo
> Priority: Minor
> Fix For: 1.4.0
>
>
> Struts RC2 & Struts Nightly Build(jakarta-struts-20030605)
> When I create a simple application, which use nested tags in 2 pages, struts
> can lose NestedReference object.
> For example if I have 2 JSP :
> test.jsp
> <%@ page language="java" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %
> >
> <html:html>
> <head>
> </head>
> <body >
> <nested:form action='/dummy/event.do' >
> <div id="main">
> <tiles:insert page="test1.jsp"> </tiles:insert>
> </div>
> </nested:form>
> </body>
> </html:html>
> test1.jsp
> <%@ page language="java" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %
> >
> <table border="1">
> <tr>
> <td>First Name </td>
> <td><nested:text property="firstName"/></td>
> </tr>
> <tr>
> <td>Last Name</td>
> <td><nested:text property="lastName"/></td>
> </tr>
> <tr>
> <td>Phones</td>
> <td>
> <nested:iterate property="phones">
> <nested:text property="./"/><br/>
> </nested:iterate>
> </td>
> </tr>
> <tr>
> <td>Date </td>
> <td><nested:text property="birthDate"/></td>
> </tr>
> <tr>
> <td>Agree</td>
> <td><nested:text property="agree"/></td>
> </tr>
> </table>
> When Server start processing second jsp file, I recive "[ServletException
> in:test1.jsp] Cannot find bean in any scope'"
> if I change NestedReference.java with the following code everything work fine
> public String getNestedProperty() {
> //added line
> if (this.property == null) this.property =".";
> return this.property;
> }
> Probably error are in the folowing code (NestedIterateTag)
> doStartTag()
> originalNesting = NestedPropertyHelper.getCurrentProperty(request);
> if we are in test2.jsp we can't find parent nested form and nested property
> is 'null'
> doEndTag()
> if (originalNesting == null) {
> NestedPropertyHelper.deleteReference(request);
> } else {
> the similar situatin with nested:root, nested:form tags.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.