struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "VAN BROECK Jimmy" <>
Subject Probable bug with nested:root and tiles context
Date Thu, 02 Sep 2004 13:37:03 GMT
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"/>
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.
<nested:nest property="view">
Tile2: the same thing as tile1:
<nested:root> <!--failure: bean not found in context -->
<nested:nest property="anotherView">
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) {
    } else {
      NestedPropertyHelper.setName(request, originalNestingName);
      NestedPropertyHelper.setProperty(request, "nestOne");
    } = 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.

Jimmy Van Broeck 

email:  <mailto:jimmy.van.broeck@e> 

WTC II - Kantoor 307 


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.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message