Re: [Tapestry-developer] [ tapestry-Bugs-653358 ] IPage.getName() == qualified name

Mind Bridge <mindbridgeweb-/[email protected]> Sun, 29 Dec 2002 13:08:36 -0800 (PST)
Newsgroups gmane.comp.java.tapestry.contrib
Message-ID <[email protected]>
--0-1454067679-1041196116=:10633
Content-Type: text/plain; charset=us-ascii


Hi Howard,
I actually made the simple name transposition change as discussed earlier (getName() returns the qualified name and getPageName() returns the simple page name without the namespace prefix; getQualifiedName() is removed -- no need to depricate it since it was not in 2.2 anyway). I checked this in the 2.3 main tree around the 20th, I think, but SF was unavaible at the time and unfortunately I could not mark this bug 'Fixed' before I left.
The change was extremely simple to make (I think it affected only two other places in the code, everything else remained the same).
What you are suggesting is a pretty good long term solution for clarity. One small suggestion: if getName() is to be deprecated, does it make sense to change its semantics (make it return the simple page name rather than the qualified one)? If it is to be deprecated anyway, wouldn't it be better to leave it as it is now so that it would not affect existing programs?
Best regards,
-mb
 [email protected] wrote:Bugs item #653358, was opened at 2002-12-13 12:36
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104754&aid=653358&group_id=4754

Category: Tapestry
Group: bug
Status: Open
Resolution: None
Priority: 9
Submitted By: Mind Bridge (mindbridge)
Assigned to: Howard Lewis Ship (hship)
Summary: IPage.getName() == qualified name

Initial Comment:
Suppose that you have a page name 'page' in the 
library 'lib' and that library is included into the application.

According to the IPage interface, the name-related 
functions should return the following:

IPage.getName() -> "page" (aka simple name)
IPage.getQualifiedName() -> "lib:page" (aka qualified 
name)

Currently, however, things are somewhat different:

AbstractPage.getName() returns "lib:page" (the qualified 
name)

AbstractPage.getQualifiedName() returns "lib:lib:name" 
(clearly an invalid value since the lib name is doubled), 
which prevents the code that uses it from working.

Some remarks:

This occurs since IRequestCycle.getPage() requires a 
qualified name (since only it is unique) and does not 
convert it to simplified before it is set.

There are 28 invocations of IPage.getName() in the rest 
of the framework and most of those require a qualified 
name, since it is later used by a subsequent 
IRequestCycle.getPage() call. Examples of that are the 
services where the qualified page name is used as an 
argument.

I hope this helps,
-mb

----------------------------------------------------------------------

>Comment By: Howard Lewis Ship (hship)
Date: 2002-12-29 10:24

Message:
Logged In: YES 
user_id=26816

"Fully qualified" means including namespace prefix, if 
appropriate. Application pages will not have a namespace 
prefix, but pages in libraries will.

----------------------------------------------------------------------

Comment By: Howard Lewis Ship (hship)
Date: 2002-12-29 10:23

Message:
Logged In: YES 
user_id=26816

I'm taking care of this in my branch, for 2.4.

I'm fixing it so that IPage.getName() returns the simple 
name. However, that's not useful anywhere, so I'm also 
deprecatint getName() and setName().

I'm creating a new property, pageName, that will store the 
page's fully qualified name.

I'm changing getQualifiedName() to reteurn the pageName 
property, and I'm deprecating it as well.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104754&aid=653358&group_id=4754


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
Tapestry-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tapestry-developer
--0-1454067679-1041196116=:10633
Content-Type: text/html; charset=us-ascii

<P>Hi Howard,
<P>I actually made the simple name transposition change as discussed earlier (getName() returns the qualified name and getPageName() returns the simple page name without the namespace prefix; getQualifiedName() is removed -- no need to depricate it since it was not in 2.2 anyway). I checked this in the 2.3 main tree around the 20th, I think, but SF&nbsp;was unavaible at the time and unfortunately I could not mark this bug 'Fixed' before I left.
<P>The change was extremely simple to make (I think it affected only two other places in the code, everything else remained the same).
<P>What you are suggesting is a pretty good long term solution for clarity. One small suggestion:&nbsp;if getName() is&nbsp;to be deprecated, does it make sense to change its&nbsp;semantics (make it return the simple page name rather than the qualified one)? If it is to be deprecated anyway, wouldn't it be better to leave it as it is now so that it would not affect existing programs?
<P>Best regards,
<P>-mb
<P>&nbsp;<B><I>[email protected]</I></B> wrote:
<BLOCKQUOTE style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">Bugs item #653358, was opened at 2002-12-13 12:36<BR>You can respond by visiting: <BR>https://sourceforge.net/tracker/?func=detail&amp;atid=104754&amp;aid=653358&amp;group_id=4754<BR><BR>Category: Tapestry<BR>Group: bug<BR>Status: Open<BR>Resolution: None<BR>Priority: 9<BR>Submitted By: Mind Bridge (mindbridge)<BR>Assigned to: Howard Lewis Ship (hship)<BR>Summary: IPage.getName() == qualified name<BR><BR>Initial Comment:<BR>Suppose that you have a page name 'page' in the <BR>library 'lib' and that library is included into the application.<BR><BR>According to the IPage interface, the name-related <BR>functions should return the following:<BR><BR>IPage.getName() -&gt; "page" (aka simple name)<BR>IPage.getQualifiedName() -&gt; "lib:page" (aka qualified <BR>name)<BR><BR>Currently, however, things are somewhat different:<BR><BR>AbstractPage.getName() returns "lib:page" (the qualified <BR>name)<
 BR><BR>AbstractPage.getQualifiedName() returns "lib:lib:name" <BR>(clearly an invalid value since the lib name is doubled), <BR>which prevents the code that uses it from working.<BR><BR>Some remarks:<BR><BR>This occurs since IRequestCycle.getPage() requires a <BR>qualified name (since only it is unique) and does not <BR>convert it to simplified before it is set.<BR><BR>There are 28 invocations of IPage.getName() in the rest <BR>of the framework and most of those require a qualified <BR>name, since it is later used by a subsequent <BR>IRequestCycle.getPage() call. Examples of that are the <BR>services where the qualified page name is used as an <BR>argument.<BR><BR>I hope this helps,<BR>-mb<BR><BR>----------------------------------------------------------------------<BR><BR>&gt;Comment By: Howard Lewis Ship (hship)<BR>Date: 2002-12-29 10:24<BR><BR>Message:<BR>Logged In: YES <BR>user_id=26816<BR><BR>"Fully qualified" means including namespace prefix, if <BR>appropriate. Appli
 cation pages will not have a namespace <BR>prefix, but pages in libraries will.<BR><BR>----------------------------------------------------------------------<BR><BR>Comment By: Howard Lewis Ship (hship)<BR>Date: 2002-12-29 10:23<BR><BR>Message:<BR>Logged In: YES <BR>user_id=26816<BR><BR>I'm taking care of this in my branch, for 2.4.<BR><BR>I'm fixing it so that IPage.getName() returns the simple <BR>name. However, that's not useful anywhere, so I'm also <BR>deprecatint getName() and setName().<BR><BR>I'm creating a new property, pageName, that will store the <BR>page's fully qualified name.<BR><BR>I'm changing getQualifiedName() to reteurn the pageName <BR>property, and I'm deprecating it as well.<BR><BR><BR>----------------------------------------------------------------------<BR><BR>You can respond by visiting: <BR>https://sourceforge.net/tracker/?func=detail&amp;atid=104754&amp;aid=653358&amp;group_id=4754<BR><BR><BR>------------------------------------------------------
 -<BR>This sf.net email is sponsored by:ThinkGeek<BR>Welcome to geek heaven.<BR>http://thinkgeek.com/sf<BR>_______________________________________________<BR>Tapestry-developer mailing list<BR>Tapestry-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org<BR>https://lists.sourceforge.net/lists/listinfo/tapestry-developer</BLOCKQUOTE>
--0-1454067679-1041196116=:10633--


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf