You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Pfeiffer <ws...@tampabay.rr.com> on 2002/08/23 04:53:42 UTC

Had to back away from 1.1 beta 2 to 1.1 beta 1

I was forced by my team to back out of beta 2 back to beta 1 today.  Various weirdness, but one problem I pinpointed in a previous posting I will repost here.  Sorry for the repetition, but my last post is past its 2 day, no answer, expiration date ;)

Problem as posted previously:

----------------
I just converted from 1.1 b1 to 1.1 b2 and encountered this problem.

We have several tags that we coded to live nested within the struts form tag.  They do a getParent, check for instanceof FormTag and do a getName().  This use to work fine.  With 1.1 b2, the FormTag.getName() method started returning null.  When checked in the debugger, the name property on FormTag was indeed null.  This is occurring on jsp's where the FormTag attribute is not beoing explicitly set.  The docs indicate that the name and object type will be pulled from the struts-config.  This does not appear to be the case for the name property/attribute.

Any ideas?

TIA,

Bill Pfeiffer

-----------------
Failing code:

public static String getParentFormName(TagSupport tag)
{
  String retval = null;

  // find the parent tag that is a struts form
  Tag parentFormTag = null;
  try
  {
   parentFormTag = TagSupport.findAncestorWithClass(tag, Class.forName("org.apache.struts.taglib.html.FormTag"));
  }
  catch (ClassNotFoundException e)
  {
            cat.error("FormTag not found", e);
  }

  // if found
  if (parentFormTag != null)
  {
   // get the form name
   retval = ((FormTag) parentFormTag).getName();
  }
  return retval;
 }



Re: Had to back away from 1.1 beta 2 to 1.1 beta 1

Posted by Bill Pfeiffer <ws...@tampabay.rr.com>.
Done.  Bug report can be found at:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11959


----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, August 22, 2002 11:06 PM
Subject: Re: Had to back away from 1.1 beta 2 to 1.1 beta 1


>
>
> On Thu, 22 Aug 2002, Bill Pfeiffer wrote:
>
> > Date: Thu, 22 Aug 2002 22:53:42 -0400
> > From: Bill Pfeiffer <ws...@tampabay.rr.com>
> > Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> > To: Struts-User <st...@jakarta.apache.org>
> > Subject: Had to back away from 1.1 beta 2 to 1.1 beta 1
> >
> > I was forced by my team to back out of beta 2 back to beta 1 today.
> > Various weirdness, but one problem I pinpointed in a previous posting I
> > will repost here.  Sorry for the repetition, but my last post is past
> > its 2 day, no answer, expiration date ;)
> >
>
> Please submit a bug report to the bug tracking system:
>
>   http://nagoya.apache.org/bugzilla/
>
> That way, you'll be able to track the progress towards a solution.
>
> Craig
>
>
> > Problem as posted previously:
> >
> > ----------------
> > I just converted from 1.1 b1 to 1.1 b2 and encountered this problem.
> >
> > We have several tags that we coded to live nested within the struts form
tag.  They do a getParent, check for instanceof FormTag and do a getName().
This use to work fine.  With 1.1 b2, the FormTag.getName() method started
returning null.  When checked in the debugger, the name property on FormTag
was indeed null.  This is occurring on jsp's where the FormTag attribute is
not beoing explicitly set.  The docs indicate that the name and object type
will be pulled from the struts-config.  This does not appear to be the case
for the name property/attribute.
> >
> > Any ideas?
> >
> > TIA,
> >
> > Bill Pfeiffer
> >
> > -----------------
> > Failing code:
> >
> > public static String getParentFormName(TagSupport tag)
> > {
> >   String retval = null;
> >
> >   // find the parent tag that is a struts form
> >   Tag parentFormTag = null;
> >   try
> >   {
> >    parentFormTag = TagSupport.findAncestorWithClass(tag,
Class.forName("org.apache.struts.taglib.html.FormTag"));
> >   }
> >   catch (ClassNotFoundException e)
> >   {
> >             cat.error("FormTag not found", e);
> >   }
> >
> >   // if found
> >   if (parentFormTag != null)
> >   {
> >    // get the form name
> >    retval = ((FormTag) parentFormTag).getName();
> >   }
> >   return retval;
> >  }
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Had to back away from 1.1 beta 2 to 1.1 beta 1

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 22 Aug 2002, Bill Pfeiffer wrote:

> Date: Thu, 22 Aug 2002 22:53:42 -0400
> From: Bill Pfeiffer <ws...@tampabay.rr.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts-User <st...@jakarta.apache.org>
> Subject: Had to back away from 1.1 beta 2 to 1.1 beta 1
>
> I was forced by my team to back out of beta 2 back to beta 1 today.
> Various weirdness, but one problem I pinpointed in a previous posting I
> will repost here.  Sorry for the repetition, but my last post is past
> its 2 day, no answer, expiration date ;)
>

Please submit a bug report to the bug tracking system:

  http://nagoya.apache.org/bugzilla/

That way, you'll be able to track the progress towards a solution.

Craig


> Problem as posted previously:
>
> ----------------
> I just converted from 1.1 b1 to 1.1 b2 and encountered this problem.
>
> We have several tags that we coded to live nested within the struts form tag.  They do a getParent, check for instanceof FormTag and do a getName().  This use to work fine.  With 1.1 b2, the FormTag.getName() method started returning null.  When checked in the debugger, the name property on FormTag was indeed null.  This is occurring on jsp's where the FormTag attribute is not beoing explicitly set.  The docs indicate that the name and object type will be pulled from the struts-config.  This does not appear to be the case for the name property/attribute.
>
> Any ideas?
>
> TIA,
>
> Bill Pfeiffer
>
> -----------------
> Failing code:
>
> public static String getParentFormName(TagSupport tag)
> {
>   String retval = null;
>
>   // find the parent tag that is a struts form
>   Tag parentFormTag = null;
>   try
>   {
>    parentFormTag = TagSupport.findAncestorWithClass(tag, Class.forName("org.apache.struts.taglib.html.FormTag"));
>   }
>   catch (ClassNotFoundException e)
>   {
>             cat.error("FormTag not found", e);
>   }
>
>   // if found
>   if (parentFormTag != null)
>   {
>    // get the form name
>    retval = ((FormTag) parentFormTag).getName();
>   }
>   return retval;
>  }
>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>