Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

 

 

Wiki Markup
{scrollbar}

Link Components

Main Articles: Page Navigation, Component Parameters

Contents

Table of Contents
excludeContents|Link Components
printablefalse

How do I add query parameters to a PageLink or ActionLink?

These components do not have parameters to allow you to specify query parameters for the link; they both allow you to specify a context (one or more values to encode into the request path).

...

Code Block
controlstrue
languagejava
titleDisplayProfile.java (partial)
public class DisplayProfile
{
  void onActivate(@RequestParameter("detail") boolean detail)
  {
    . . .
  }
}

...

Since
since5.3
You may also bind a link component's {{parameters}} parameter; this is a Map of additional query parameters to add to the URL. The Map keys should be strings, and the Map values will be encoded to strings. Tapestry 5.3 also adds a literal map syntax to the [property expression language|TAPESTRY:Property Expressions].

How do I create a Link back to the current page from a component?

Sometimes it is useful to create a link back to the current page, but you don't always know the name of the page (the link may appear inside a deeply nested subcomponent). Fortunately, this is easy.

...

As an added benefit, if the page class is ever renamed or moved to a different package, the pageName property will automatically adjust to the new name.

Wiki Markup
{scrollbar}