Пример #1
0
 /**
  * Tests binding a single absolute package resource.
  *
  * @throws Exception
  */
 @Test
 public void bindAbsolutePackageResource() throws Exception {
   final SharedResources sharedResources = Application.get().getSharedResources();
   assertNotNull(
       "resource packaged1.txt should be available as a packaged resource",
       sharedResources.get(PackageResourceTest.class, "packaged1.txt", null, null, null, true));
 }
Пример #2
0
  public void onBeforeRender() {
    super.onBeforeRender();
    // make sure that the icon for the RequiredBorder is registered
    SharedResources sr = getApplication().getSharedResources();
    if (null == sr.get(Application.class, RequiredBorder.ICON_NAME, null, null, false)) {
      Resource icon =
          new BrixFileNodeResource(
              IconFactory.createStarSmallIconReference().getName(),
              (BricketApplication) getApplication());
      sr.add(RequiredBorder.ICON_NAME, icon);
    }

    visitChildren(shinyVisitor);
  }