Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can also use the portletMode parameter to change to a different portlet mode.

s:url and s:form tags

URLs in a portlet is handled quite different than for a regular web application. There's no such thing as "extension", there's simply an action name and a namespace, and they have to be specified using the respective tag attributes. URLs using the value attribute will be encoded as a resource URL and is only suitable for additional resources such as images and style sheets.

Example:

Servlet

Portlet

<s:url value="hello.action"/>

<s:url action="hello"/>

<s:url value="style.css"/>

<s:url value="style.css"/>

In addition, there are some additional tag attributes that are portlet specific. These are:

Name

Description

portletMode

The resulting portlet mode of the url

windowState

The resulting window state of the url

portletUrlType

Specifies if this is a render or an action url. Typical usage is if you have a delete link that removes something from a database. To ensure this is done in the event phase, as recommended by the portlet specification (since it is a change of state), the url can use this attribute: <s:url action="deleteEntry" portletUrlType="action"/>