Mind Bridge
2002-12-29 21:08:36 UTC
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
noreply-***@public.gmane.org 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
----------------------------------------------------------------------
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
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
noreply-***@public.gmane.org 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:24Message:
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