|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A PortletURI
represents a URI to a specific portlet
function. A URI is created through the PortletResponse
for a specific portlet mode. Then additional parameter can be
added to the URI. The complete URI can be converted to a string
which is ready for embedding into markup.
On top of the parameters, it is possible to add actions to a
portlet URI. Actions are portlet-specific activities that need to
be performed as result of the incoming request, but before the
service()
method of the portlet is called. For example,
the PERSONALIZE mode of the portlet is likely to have a "Save"
button at the end of its dialog. The "Save" button has to bring
the user back to the DEFAULT mode of the portlet, but to save the
personalized portlet data, the portlet needs to be able to process
the posted data bfore the next markup is generated. This can be
achieved by adding a "Save" action to the URI that represents the
"Save" button. The respective listener is attached the respective
action listener to the portlet response. This listener will be
called when the next request comes and one of the portlet URIs
where the reason for the request. If more than one URI were part
of the response, the listener need to the check the action content.
This depends on the definition of the actual action which is the
responsibility of the portlet developer.
Method Summary | |
void |
addAction(PortletAction action)
Adds the given action to this URI. |
void |
addParameter(java.lang.String name,
java.lang.String value)
Adds the given parameter to this URI. |
java.lang.String |
toString()
Returns the complete URI as a string. |
Method Detail |
public void addParameter(java.lang.String name, java.lang.String value)
name
- the parameter namevalue
- the parameter valuepublic void addAction(PortletAction action)
Unless an action listener is registered in the portlet descriptor this action will not be delivered.
action
- the portlet actionpublic java.lang.String toString()
Once the string has been created, adding more parameters or other listeners will not modify the string. You have to call this method again, to create an updated string.
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |