[Jakarta-tapestry Wiki] Update of "EasyBrowserRedirection" by Patrick Casey

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Jakarta-tapestry Wiki] Update of "EasyBrowserRedirection" by Patrick Casey

Apache Wiki
Dear Wiki user,

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

The following page has been changed by Patrick Casey:
http://wiki.apache.org/jakarta-tapestry/EasyBrowserRedirection

The comment on the change is:
It compiles now :)

------------------------------------------------------------------------------
  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: [hidden email]
For additional commands, e-mail: [hidden email]