Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed footnote problem by doing away with it.

...

You are allowed to create sub-packages, to help organize your code better and more logically. For example, you might have root-package.pages.account.ViewAccount, which would have the page name "account/viewaccount" Wiki Markup{footnote}Tapestry would also create an alias . (Tapestry would also create an alias "account/view", by stripping off the redundant "account" suffix. Either name is equally valid in your code, and Tapestry will use the shorter name, "account/view" in URLs.{footnote})

In addition, it is possible to define additional root packages for the application:

Code Block
controlstrue
linenumberstrue

public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration) {
       configuration.add(new LibraryMapping("", "com.example.app.tasks"));
       configuration.add(new LibraryMapping("", "com.example.app.chat"));
}

...

Code Block
controlstrue
linenumberstrue

@SupportsInformalParameters
public class DBImage
{
  @Parameter(required=true)
  private Image image;

  @Inject
  private ComponentResources resources;

  boolean beginRender(MarkupWriter writer)
  {
    writer.element("img", "src", image.toClientURL(), "class", "db-image");

    resources.renderInformalParameters(writer);

    writer.end();

    return false;
  }
}

...

Although these two classes have the same fully qualified class name, they are distinct classes because they are loaded by different class loaders.

Gliffy Diagram
sizeL
nameClass Loaders

In a Tapestry application, most application classes are loaded from the middle class loader. Additional class loaders are used
to support live service reloading, and live component reloading (along with component class transformation).

...

Code Block
controlstrue
linenumberstrue

  @OnEvent(value=EventConstants.SUCCESS, component="loginForm")
  Object storeUserCredentialsAndReturnToProductsPage()
  {
    . . .
  }

...

Wiki Markup
{scrollbar}

____

 

 

Wiki Markup
{display-footnotes}