public void <methodName>(RenderRequest, RenderResponse)
This corresponds to the render method.
public String <methodName>()
The String returned by the method will be written to the response unchanged.
public void <methodName>()
Intended for use when only a resource include is needed.
The method declaration may contain a throws clause. Exceptions declared in the
throws clause should be of type javax.portlet.PortletException or
java.io.IOException.
Checked exceptions of any other type will be caught, wrapped with a PortletException,
and rethrown.
Portlet#render
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The content type
Sets the content type, or the MIME type, of content generated by the method.
|
| public String | Returns: The resource to be included
Specifies a resource, such as a JSP, an HTML file, or a servlet to be included.
|
| public int | |
| public String | |
| public String[] |
| contentType | back to summary |
|---|---|
| public String contentType()
Sets the content type, or the MIME type, of content generated by the method.
The content type will be set before the annotated method body is executed.
If this field is empty or set to the wildcard, no content type will be set.
The portlet can then set the content type using the portlet API
| |
| include | back to summary |
|---|---|
| public String include()
Specifies a resource, such as a JSP, an HTML file, or a servlet to be included.
The resource will be included using the
If this field is empty, no resource will be included.
| |
| ordinal | back to summary |
|---|---|
| public int ordinal()
The ordinal number for this annotated method.
The ordinal number determines the order of execution if multiple methods are annotated. Annotated methods with a lower ordinal number are executed before methods with a higher ordinal number.
| |
| portletMode | back to summary |
|---|---|
| public String portletMode()
The portlet mode rendered by the annotated method.
If an portlet mode is specified, the bean enabler will dispatch Render requests with matching portlet mode values to this method. If this field is empty, the method will be executed for all Render requests not dispatched by portlet mode to other RenderMethods.
| |
| portletNames | back to summary |
|---|---|
| public String[] portletNames()
The portlet names for which the render method applies.
The annotated method can apply to multiple portlets within the portlet application. The names of the portlets to which the resources apply must be specified in this field. A wildcard character '*' can be specified in the first portletName array element to indicate that the resource declarations are to apply to all portlets in the portlet application. If specified, the wildcard character must appear alone in the first array element.
| |