[ http://issues.apache.org/struts/browse/STR-1530?page=all ]
     
David Evans closed STR-1530:
----------------------------

    Resolution: Incomplete

> Error with nesting tags in separate pages
> -----------------------------------------
>
>          Key: STR-1530
>          URL: http://issues.apache.org/struts/browse/STR-1530
>      Project: Struts Action 1
>         Type: Bug

>   Components: Taglibs
>     Versions: 1.1 Final
>  Environment: Operating System: other
> Platform: PC
>     Reporter: Deniss Parhomenkoo
>     Priority: Minor

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to