Class GenerateURLTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.gatein.pc.portlet.impl.jsr168.taglib.PortletTag
org.gatein.pc.portlet.impl.jsr168.taglib.GenerateURLTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,Serializable
- Direct Known Subclasses:
ActionURLTag,GenerateURL286Tag,RenderURLTag
Superclass of the actionURL and renderURL tags for the JSR 168 Portlet specification.
Creates a URL that must point to the current portlet and must trigger a render or action request with the supplied
parameters.
- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(String name, String value) Add a named parameter.protected voidintdoEndTag()Generate the URLintProcess the body, which may contain portlet:param tagsprotected javax.portlet.BaseURLprotected javax.portlet.BaseURLSet up the environment for generating the PortletURL and get the base PortletURL to decorate.Indicates the portlet mode that the portlet must have when this link is executed.Indicates whether the resulting URL should be a secure or insecure connection.protected abstract StringGet the type - action or render - from the implementing subclassprotected MapConvert working parameters to what is needed by PortletURL - a map with String[] values.getVar()Indicates the window state that the portlet should have when this link is executed.voidsetPortletMode(String portletMode) protected voidsetPortletMode(javax.portlet.PortletURL portletURL) Set the portlet mode for the URL to be what was given in the tag.voidprotected voidsetSecure(javax.portlet.BaseURL portletURL) Set the secure/unsecure state for the URL to be what was given in the tag.voidvoidsetWindowState(String windowState) protected voidsetWindowState(javax.portlet.PortletURL portletURL) Set the window state for the URL to be what was given in the tag.protected voidwriteURL(javax.portlet.BaseURL portletURL) Methods inherited from class org.gatein.pc.portlet.impl.jsr168.taglib.PortletTag
getActionRequest, getActionResponse, getConfig, getDispatchedRequest, getEventRequest, getEventResponse, getInvocation, getPortletPreferences, getPortletPreferenceValues, getPortletRequest, getPortletResponse, getPortletSessionScope, getRenderRequest, getRenderResponse, getResourceRequest, getResourceResponse, getSessionMethods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
GenerateURLTag
public GenerateURLTag()
-
-
Method Details
-
getPortletMode
Indicates the portlet mode that the portlet must have when this link is executed. Predefined states: edit, view, help Optional. Defaults to same as the portlet mode for the current request, by not being included as a parameter in the URL.- Returns:
- Returns the portletMode.
-
setPortletMode
- Parameters:
portletMode- The portletMode to set.
-
getSecure
Indicates whether the resulting URL should be a secure or insecure connection. "true" or "false" Optional. Defaults to security setting for the current request, by not being included as a parameter in the URL.- Returns:
- Returns the secure connection value.
-
setSecure
- Parameters:
secure- The secure connection value to set.
-
getVar
- Returns:
- Returns the var - name of the exported scope variable.
-
setVar
- Parameters:
var- The var to set.
-
getWindowState
Indicates the window state that the portlet should have when this link is executed. Predefined states: minimized, maximized, normal Optional. Defaults to same as the window state for the current request, by not being included as a parameter in the URL.- Returns:
- Returns the windowState.
-
setWindowState
- Parameters:
windowState- The windowState to set.
-
getURLParameters
Convert working parameters to what is needed by PortletURL - a map with String[] values.- Returns:
- Returns the parameters.
-
addParameter
Add a named parameter. Cater for multiple parameters with the same name by storing them in a list.- Parameters:
name-value-
-
getBasePortletEnvironmentAndURL
protected javax.portlet.BaseURL getBasePortletEnvironmentAndURL()Set up the environment for generating the PortletURL and get the base PortletURL to decorate. Includes setting the "type" parameter from the implementing subclass.- Returns:
- The PortelURL to decorate
-
setWindowState
protected void setWindowState(javax.portlet.PortletURL portletURL) throws javax.portlet.WindowStateException Set the window state for the URL to be what was given in the tag. If not given, default to what was there previously- Parameters:
portletURL-- Throws:
javax.portlet.WindowStateException
-
setPortletMode
protected void setPortletMode(javax.portlet.PortletURL portletURL) throws javax.portlet.PortletModeException Set the portlet mode for the URL to be what was given in the tag. If not given, default to what was there previously- Parameters:
portletURL-- Throws:
javax.portlet.PortletModeException
-
setSecure
protected void setSecure(javax.portlet.BaseURL portletURL) throws javax.portlet.PortletSecurityException Set the secure/unsecure state for the URL to be what was given in the tag. If not given, default to what was there previously- Parameters:
portletURL-- Throws:
javax.portlet.PortletSecurityException
-
clearPreviousTag
protected void clearPreviousTag() -
getTypeValue
Get the type - action or render - from the implementing subclass- Returns:
- the value for the "type" portal parameter
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionProcess the body, which may contain portlet:param tags- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException
-
generateURL
- Throws:
Exception
-
writeURL
- Throws:
Exception
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionGenerate the URL- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException
-