Thanks for confirming that!
David
On 29-Sep-08, at 2:43 PM, Chuck Hill wrote:
On Sep 29, 2008, at 2:32 PM, Lon Varscsak wrote:
You would need to do something like:
return pageWithName(Class.forName(pageName));
But I'm not sure what that buys you compared to just using the
"string" versions of pageWithName and doing:
return pageWithName(pageName);
I agree. Using Class in this case is of no value (other than
making the code much more complicated than it wants to be). In
this situation, this best practice does not apply.
Chuck
On Mon, Sep 29, 2008 at 2:26 PM, David Holt
<[EMAIL PROTECTED]> wrote:
Is it possible to use a variable to replace "Component" in the
pageWithName(Component.class.getName()); syntax?
For example how would I change the code below to the syntax above?
String usergroupcodestring = session.currentUser.group().code();
String pageName = "Main"+usergroupcodestring;
return pageWithName(pageName);
The following doesn't work.
String usergroupcodestring = session.currentUser.group().code();
String pageName = "Main"+usergroupcodestring;
return pageWithName(pageName.class.getName());
Thanks,
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/varscsak%
40smarthealth.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%
40global-village.net
This email sent to [EMAIL PROTECTED]
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]