IPage name vs. pageName vs. qualifiedName
"Howard M. Lewis Ship" <[email protected]> Sun, 29 Dec 2002 21:35:00 -0500
| Newsgroups | gmane.comp.java.tapestry.contrib |
|---|---|
| Message-ID | <008201c2afac$0cde34c0$3dc41e42@howardczkz2sl3> |
This is a multi-part message in MIME format. ------=_NextPart_000_007F_01C2AF82.23CF9090 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Well, what I found throughout the framework code was that every place I = needed the page name, I needed the fully qualified name. ----- Original Message -----=20 From: Mind Bridge=20 To: Howard Lewis=20 Cc: tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org=20 Sent: Sunday, December 29, 2002 4:08 PM Subject: [Tapestry-contrib] Re: [Tapestry-developer] [ = tapestry-Bugs-653358 ] IPage.getName() =3D=3D qualified name Hi Howard,=20 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.=20 The change was extremely simple to make (I think it affected only two = other places in the code, everything else remained the same).=20 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?=20 Best regards,=20 -mb=20 [email protected] wrote:=20 Bugs item #653358, was opened at 2002-12-13 12:36 You can respond by visiting:=20 = https://sourceforge.net/tracker/?func=3Ddetail&atid=3D104754&aid=3D653358= &group_id=3D4754 Category: Tapestry Group: bug Status: Open Resolution: None Priority: 9 Submitted By: Mind Bridge (mindbridge) Assigned to: Howard Lewis Ship (hship) Summary: IPage.getName() =3D=3D qualified name Initial Comment: Suppose that you have a page name 'page' in the=20 library 'lib' and that library is included into the application. According to the IPage interface, the name-related=20 functions should return the following: IPage.getName() -> "page" (aka simple name) IPage.getQualifiedName() -> "lib:page" (aka qualified=20 name) Currently, however, things are somewhat different: AbstractPage.getName() returns "lib:page" (the qualified=20 name) AbstractPage.getQualifiedName() returns "lib:lib:name"=20 (clearly an invalid value since the lib name is doubled),=20 which prevents the code that uses it from working. Some remarks: This occurs since IRequestCycle.getPage() requires a=20 qualified name (since only it is unique) and does not=20 convert it to simplified before it is set. There are 28 invocations of IPage.getName() in the rest=20 of the framework and most of those require a qualified=20 name, since it is later used by a subsequent=20 IRequestCycle.getPage() call. Examples of that are the=20 services where the qualified page name is used as an=20 argument. I hope this helps, -mb = ---------------------------------------------------------------------- >Comment By: Howard Lewis Ship (hship) Date: 2002-12-29 10:24 Message: Logged In: YES=20 user_id=3D26816 "Fully qualified" means including namespace prefix, if=20 appropriate. Application pages will not have a namespace=20 prefix, but pages in libraries will. = ---------------------------------------------------------------------- Comment By: Howard Lewis Ship (hship) Date: 2002-12-29 10:23 Message: Logged In: YES=20 user_id=3D26816 I'm taking care of this in my branch, for 2.4. I'm fixing it so that IPage.getName() returns the simple=20 name. However, that's not useful anywhere, so I'm also=20 deprecatint getName() and setName(). I'm creating a new property, pageName, that will store the=20 page's fully qualified name. I'm changing getQualifiedName() to reteurn the pageName=20 property, and I'm deprecating it as well. = ---------------------------------------------------------------------- You can respond by visiting:=20 = https://sourceforge.net/tracker/?func=3Ddetail&atid=3D104754&aid=3D653358= &group_id=3D4754 ------------------------------------------------------- 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 ------=_NextPart_000_007F_01C2AF82.23CF9090 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2719.2200" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Well, what I found throughout the = framework code=20 was that every place I needed the page name, I needed the fully = qualified=20 name.</FONT></DIV> <DIV> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dmindbridgeweb-/[email protected] = href=3D"mailto:mindbridgeweb-/[email protected]">Mind=20 Bridge</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A [email protected] = href=3D"mailto:[email protected]">Howard Lewis</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A=20 title=3Dtapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org=20 = href=3D"mailto:tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org">tapestry-contrib@l= ists.sourceforge.net</A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, December 29, 2002 = 4:08=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Tapestry-contrib] Re: = [Tapestry-developer] [ tapestry-Bugs-653358 ] IPage.getName() =3D=3D = qualified=20 name</DIV> <DIV><BR></DIV> <P>Hi Howard,=20 <P>I actually made the simple name transposition change as discussed = earlier=20 (getName() returns the qualified name and getPageName() returns the = simple=20 page name without the namespace prefix; getQualifiedName() is removed = -- no=20 need to depricate it since it was not in 2.2 anyway). I checked this = in the=20 2.3 main tree around the 20th, I think, but SF was unavaible at = the time=20 and unfortunately I could not mark this bug 'Fixed' before I left.=20 <P>The change was extremely simple to make (I think it affected only = two other=20 places in the code, everything else remained the same).=20 <P>What you are suggesting is a pretty good long term solution for = clarity.=20 One small suggestion: if getName() is to be deprecated, does = it make=20 sense to change its semantics (make it return the simple page = name rather=20 than the qualified one)? If it is to be deprecated anyway, wouldn't it = be=20 better to leave it as it is now so that it would not affect existing = programs?=20 <P>Best regards,=20 <P>-mb=20 <P> <B><I>[email protected]</I></B> wrote:=20 <BLOCKQUOTE=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px = solid">Bugs=20 item #653358, was opened at 2002-12-13 12:36<BR>You can respond by = visiting:=20 = <BR>https://sourceforge.net/tracker/?func=3Ddetail&atid=3D104754&= aid=3D653358&group_id=3D4754<BR><BR>Category:=20 Tapestry<BR>Group: bug<BR>Status: Open<BR>Resolution: = None<BR>Priority:=20 9<BR>Submitted By: Mind Bridge (mindbridge)<BR>Assigned to: Howard = Lewis=20 Ship (hship)<BR>Summary: IPage.getName() =3D=3D qualified = name<BR><BR>Initial=20 Comment:<BR>Suppose that you have a page name 'page' in the = <BR>library=20 'lib' and that library is included into the = application.<BR><BR>According to=20 the IPage interface, the name-related <BR>functions should return = the=20 following:<BR><BR>IPage.getName() -> "page" (aka simple=20 name)<BR>IPage.getQualifiedName() -> "lib:page" (aka qualified=20 <BR>name)<BR><BR>Currently, however, things are somewhat=20 different:<BR><BR>AbstractPage.getName() returns "lib:page" (the = qualified=20 <BR>name)<BR><BR>AbstractPage.getQualifiedName() returns = "lib:lib:name"=20 <BR>(clearly an invalid value since the lib name is doubled), = <BR>which=20 prevents the code that uses it from working.<BR><BR>Some=20 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=20 simplified before it is set.<BR><BR>There are 28 invocations of=20 IPage.getName() in the rest <BR>of the framework and most of those = require a=20 qualified <BR>name, since it is later used by a subsequent=20 <BR>IRequestCycle.getPage() call. Examples of that are the = <BR>services=20 where the qualified page name is used as an <BR>argument.<BR><BR>I = hope this=20 = helps,<BR>-mb<BR><BR>----------------------------------------------------= ------------------<BR><BR>>Comment=20 By: Howard Lewis Ship (hship)<BR>Date: 2002-12-29=20 10:24<BR><BR>Message:<BR>Logged In: YES = <BR>user_id=3D26816<BR><BR>"Fully=20 qualified" means including namespace prefix, if <BR>appropriate. = Application=20 pages will not have a namespace <BR>prefix, but pages in libraries=20 = will.<BR><BR>------------------------------------------------------------= ----------<BR><BR>Comment=20 By: Howard Lewis Ship (hship)<BR>Date: 2002-12-29=20 10:23<BR><BR>Message:<BR>Logged In: YES = <BR>user_id=3D26816<BR><BR>I'm taking=20 care of this in my branch, for 2.4.<BR><BR>I'm fixing it so that=20 IPage.getName() returns the simple <BR>name. However, that's not = useful=20 anywhere, so I'm also <BR>deprecatint getName() and = setName().<BR><BR>I'm=20 creating a new property, pageName, that will store the <BR>page's = fully=20 qualified name.<BR><BR>I'm changing getQualifiedName() to reteurn = the=20 pageName <BR>property, and I'm deprecating it as=20 = well.<BR><BR><BR>--------------------------------------------------------= --------------<BR><BR>You=20 can respond by visiting:=20 = <BR>https://sourceforge.net/tracker/?func=3Ddetail&atid=3D104754&= aid=3D653358&group_id=3D4754<BR><BR><BR>-----------------------------= --------------------------<BR>This=20 sf.net email is sponsored by:ThinkGeek<BR>Welcome to geek=20 = heaven.<BR>http://thinkgeek.com/sf<BR>___________________________________= ____________<BR>Tapestry-developer=20 mailing=20 = list<BR>Tapestry-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org<BR>https://lists.sourcef= orge.net/lists/listinfo/tapestry-developer</BLOCKQUOTE></BLOCKQUOTE></BOD= Y></HTML> ------=_NextPart_000_007F_01C2AF82.23CF9090-- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf