• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: PageWithName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PageWithName


  • Subject: Re: PageWithName
  • From: "Lon Varscsak" <email@hidden>
  • Date: Mon, 29 Sep 2008 14:32:34 -0700

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);

On Mon, Sep 29, 2008 at 2:26 PM, David Holt <email@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
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

  • Follow-Ups:
    • Re: PageWithName
      • From: Chuck Hill <email@hidden>
References: 
 >PageWithName (From: David Holt <email@hidden>)

  • Prev by Date: PageWithName
  • Next by Date: Re: PageWithName
  • Previous by thread: PageWithName
  • Next by thread: Re: PageWithName
  • Index(es):
    • Date
    • Thread