Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for 
change notification.

The following page has been changed by ErikVullings:
http://wiki.apache.org/tapestry/EasyBrowserRedirection

------------------------------------------------------------------------------
  The following extended RedirectException makes this very easy. Thanks to Paul 
Ferraro for posting this gem to the mailing list.
  === Example ===
  {{{
- public class TapestryRedirectException extends RedirectException
- {
-     private static final long serialVersionUID = 4049918285694842678L;
  
+ import org.apache.tapestry.IDirect;
+ import org.apache.tapestry.IRequestCycle;
+ import org.apache.tapestry.RedirectException;
+ import org.apache.tapestry.Tapestry;
+ import org.apache.tapestry.engine.ILink;
+ import org.apache.tapestry.link.DirectLink;
+ 
+ public class TapestryRedirectException extends RedirectException {
+ 
+       private static final long serialVersionUID = 4049918285694842678L;
+ 
-     public RedirectException(String url)
+     public TapestryRedirectException(String url)
      {
          super(url);
      }
     
-     public RedirectException(ILink link)
+     public TapestryRedirectException(ILink link)
      {
          this(link.getURL());
      }
@@ -28, +36 @@

      /**
       * Use this to redirect the browser to the specified page
       */
-     public RedirectException(IRequestCycle cycle, String page)
+     public TapestryRedirectException(IRequestCycle cycle, String page)
      {
          
this(cycle.getEngine().getService(Tapestry.PAGE_SERVICE).getLink(cycle, 
            cycle.getPage(), new String[] { page }));
@@ -38, +46 @@

       * Use this to redirect the browser to the specified page that implements 
the IExternalPage
       * interface
       */
-     public RedirectException(IRequestCycle cycle, String page, Object 
+     public TapestryRedirectException(IRequestCycle cycle, String page, Object 
          parameters)
      {
           
this(cycle.getEngine().getService(Tapestry.EXTERNAL_SERVICE).getLink(cycle, 
@@ -49, +57 @@

       * Use this to redirect the browser to the specified listenener on the 
component 
       * that implements the IDirect interface.
       */    
-     public RedirectException(IRequestCycle cycle, IDirect direct, Object 
+     public TapestryRedirectException(IRequestCycle cycle, IDirect direct, 
Object 
          parameters)
      {
          
this(cycle.getEngine().getService(Tapestry.DIRECT_SERVICE).getLink(cycle, 

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

Reply via email to