Package javango.core

Examples of javango.core.SubappUrl


  List<Url> l = new ArrayList<Url>();
 
  @Inject
  public Urls(Injector injector) {
    l.add(new RegUrl("^$", Main.class, "index"));
    l.add(new SubappUrl(injector, "^jquery/", JqueryUrls.class));
    l.add(new RegUrl("^resetdb/$", Main.class, "resetdb"));
    l.add(new RegUrl("^([^/]+)/search/$", Main.class, "search"));
    l.add(new RegUrl("^([^/]+)/$", Main.class, "changeList"));
    l.add(new RegUrl("^([^/]+)/add/$", Main.class, "add"));
    l.add(new RegUrl("^([^/]+)/([^/]+)/delete/$", Main.class, "delete"));
View Full Code Here


      // nothing to do.
    }
  }
  public void testSuburl() throws Exception {
    Injector injector = Guice.createInjector(new MyModule());
    SubappUrl url = new SubappUrl(injector, "^subapp/", SubAppUrls.class);
   
    assertTrue(url.matches("subapp/view/"));
    assertFalse(url.matches("subapp/view1/"));
    assertFalse(url.matches("subapp1/view/"));
   
    try {
      MethodObjectParams map = url.getMethodObjectParams("subapp/view/", new HttpRequest());
      RequestProcessor.invoke(map, injector);
      fail ("Exception did not get thrown");
    } catch (HttpException e) {
      assertEquals("IGOTCALLED", e.getMessage());
    }
View Full Code Here

  public Urls() {
    l.add(new RegUrl("^$", Views.class, "index"));
      l.add(new RegUrl("^(\\d+)/$", Views.class, "detail"));
      l.add(new RegUrl("^(\\d+)/results/$", Views.class, "results"));
      l.add(new RegUrl("^(\\d+)/vote/$", Views.class, "vote"));
      l.add(new SubappUrl(injector, "^admin/", javango.contrib.admin.Urls.class));
  }
View Full Code Here

public class AdminTestUrls implements javango.api.Urls {
  List<Url> l = new ArrayList<Url>();
 
  @Inject
  public AdminTestUrls(Injector injector) {
    l.add(new SubappUrl(injector,"^admin/", Urls.class));
  }
View Full Code Here

TOP

Related Classes of javango.core.SubappUrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.