Hi,
 
I think i discovered a bug in the nested:root tag when used in combination with tiles 
or even dynamic includes of jsp pages.
 
Let's considere the following scenario :
 
You have a main tile where your nested:form tag is defined and there you include you 
tiles through tiles:input
 
<nested:form action="action">
 
<tiles:input value="tile1"/>
 
<tiles:input value="tiles2"/>
 
</nested:form>
 
In the tiles you want to refere to the actionForm bean of your nested:form.
This can be done easily just through <nested:root> without specifying a name.
 
tile1:
<nested:root>
<nested:nest property="view">
 
</nested:nest>
</nested:root>
 
Tile2: the same thing as tile1:
<nested:root> <!--failure: bean not found in context -->
<nested:nest property="anotherView">
 
</nested:nest>
</nested:root>
 
 
The problem here is, that in the doEndTag, there is only checked if previous nesting 
is null and then to delete the nestedreference from the request.
 
 public int doEndTag() throws JspException {
    /* reset the reference */
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
 
    if (originalNesting == null) {
      NestedPropertyHelper.deleteReference(request);
    } else {
      NestedPropertyHelper.setName(request, originalNestingName);
      NestedPropertyHelper.setProperty(request, "nestOne");
    }
    this.name = originalName;
 
    return (EVAL_PAGE);
}
 
I think the first bug is that the end of a root tag should not check the 
originalNesting==null, but the originalNestingName==null, because the property would 
always be null?? (You're on the root right??).
 
The second bug or remark, would be that if you didn't specify a bean Name, you 
absolutely don't want the nestedReference being deleted, because you are depending on 
another reference, declared above this root tag.
 
 
 
Please post your opinions, and if enough people think this is a bug, i will make a 
bugzilla report of this.
 
Greetings
jimmy
 

Jimmy Van Broeck 

email:  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] 
Consultant 
BT 

CITS 
DE POST - LA POSTE 
ICT-Development 
WTC II - Kantoor 307 
email: [EMAIL PROTECTED] 

 


STRICTLY PERSONAL AND CONFIDENTIAL
This message may contain confidential and proprietary material for the sole use of the 
intended recipient. Any review or distribution by others is strictly prohibited. If 
you are not the intended recipient please contact the sender and delete all copies.

Ce Message est uniquement destin� aux destinataires indiqu�s et peut contenir des 
informations confidentielles. Si vous n'�tes pas le destinataire, vous ne devez pas 
r�v�ler le contenu de ce message ou en prendre copie. Si vous avez re�u ce message par 
erreur, veuillez en informer l'exp�diteur, ou La Poste imm�diatement, avant de le 
supprimer.

Dit bericht is enkel bestemd voor de aangeduide ontvangers en kan vertrouwelijke 
informatie bevatten. Als u niet de ontvanger bent, dan mag u de inhoud van dit bericht 
niet bekendmaken noch kopi�ren. Als u dit bericht per vergissing heeft ontvangen, 
gelieve er de afzender of De Post onmiddellijk van op de hoogte te brengen en het 
bericht vervolgens te verwijderen.

Reply via email to