Re: pageWithName
Re: pageWithName
- Subject: Re: pageWithName
- From: Simon McLean <email@hidden>
- Date: Sat, 21 Jun 2008 10:15:53 +0100
you should do
pageWithName(MyPageClass.class.getName());
if anything, because then it will be "seen" by all the refactoring tools in eclipse. So change the page name, move it to a different package etc. and you can confidently expect refactor to get it right.
the compiler will also pick up dead references if you ever deleted that page.
just about anywhere where you use strings in the old-fashioned wo-way you should no longer be doing so.
another example is
addobjectToBothSidesOfRelationshipWithKey(myObject, "myRelationship");
should now be
addobjectToBothSidesOfRelationshipWithKey(myObject, MyObject.MYRELATINOSHIP_KEY);
where MYRELATINOSHIP_KEY is a static string in the private super of your EO, which are automatically generated if you are using the standard veogen templates that come with wolips now.
i guess the modern motto is "avoid strings at all costs". they only bite you later :-) Simon On 21 Jun 2008, at 09:59, Neil MacLennan wrote: then what's wrong with pageWithName("ClassName"), could I be using something different/better? |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden