How to parse and map URLs?

2009-03-26 Thread dpark

I'm looking for any suggestions on the below:

Business Need:
A new partner client would like to leverage our current web application but
allow for some dynamic rebranding (through images).

The application will know which brand images to show based on the format of
the URL.

For example, given the following current request A:
http://domain.com/Login.page

How can I also map the following request B, to go to the exact same page?
http://domain.com/partner/Login.page

(presumably, whatever is going to be parsing the URL will set some sort of
brand context in a session object so that assets can then query it to know
what to show)

Is this a job for a custom Service Encoder (friendly URL)?

Any suggestions are welcome...
(sadly, i think i'll be able to hear a pin drop...)

DP

-- 
View this message in context: 
http://www.nabble.com/How-to-parse-and-map-URLs--tp22730051p22730051.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



ASO, Persistent Fields and Restart Service

2008-12-01 Thread dpark

If I call the restart service, shouldn't all my session-scoped ASOs and
persistent page fields be cleaned up?
Correct me if i'm wrong, but the restart service simply invalidates the
backing HttpSession which in turn should do the cleanup mentioned above.

Thanks,

Dave Park
-- 
View this message in context: 
http://www.nabble.com/ASO%2C-Persistent-Fields-and-Restart-Service-tp20774512p20774512.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Throw PageRedirectException from within Custom Exception Page

2008-07-31 Thread dpark

Is it possible to throw a PageRedirectException from within a custom
ExceptionPage.pageBeginRender?

Tapestry doesn't seem to like it.
I get a: 
Unable to present exception page: org.apache.tapestry.PageRedirectException
-- 
View this message in context: 
http://www.nabble.com/Throw-PageRedirectException-from-within-Custom-Exception-Page-tp18762228p18762228.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Localization

2008-05-07 Thread dpark

I understand the following:
* in order to set the locale programmatically, you call the following:
getEngine().setLocale( new Locale( language ) );
* then I call getRequestCycle().activate( SOME_PAGE );
* Voila, I see the SOME_PAGE loaded with the locale specific properties and
assets.

HOWEVER, when I then navigate to another page, I suddenly lose the locale i
just set.

Upon further investigation I see that the RequestLocaleManagerImpl is
working correctly by reading the cookie and setting the ThreadLocale
appropriately.

I'm guessing there's something about the pool of pages that need to be reset
to the appropriate locale.

Can anyone shed some light on how (if at all) there's a way to do this?

Thanks!

DP
-- 
View this message in context: 
http://www.nabble.com/Localization-tp17106010p17106010.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Localization

2008-05-07 Thread dpark

Thanks for the help but unfortunately that doesn't seem to work.  Here's what
I do:

  public void setLanguage( String language )
  {
getEngine().setLocale( new Locale( language ) );
getRequestCycle().cleanup();
throw new PageRedirectException( Login );
  }

Are you telling me that for your application, every subsequent page (not
just the one immediately after), after setting the locale, renders in the
appropriate Locale?

Must be something with my pool(i haven't done any customizations around
that...)

I'll keep poking around

DP




Jonathan Barker wrote:
 
 Try executing cycle.cleanup() after you set the Locale.
 
 
 -Original Message-
 From: dpark [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 07, 2008 10:14 AM
 To: users@tapestry.apache.org
 Subject: Localization
 
 
 I understand the following:
 * in order to set the locale programmatically, you call the following:
 getEngine().setLocale( new Locale( language ) );
 * then I call getRequestCycle().activate( SOME_PAGE );
 * Voila, I see the SOME_PAGE loaded with the locale specific properties
 and
 assets.
 
 HOWEVER, when I then navigate to another page, I suddenly lose the locale
 i
 just set.
 
 Upon further investigation I see that the RequestLocaleManagerImpl is
 working correctly by reading the cookie and setting the ThreadLocale
 appropriately.
 
 I'm guessing there's something about the pool of pages that need to be
 reset
 to the appropriate locale.
 
 Can anyone shed some light on how (if at all) there's a way to do this?
 
 Thanks!
 
 DP
 --
 View this message in context: http://www.nabble.com/Localization-
 tp17106010p17106010.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Localization-tp17106010p17106173.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]