|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PortletDialogModelProvider
DialogModelProvider for portlet scope, i. e. with portlet request / response.
PortletServiceHome psh; javax.naming.Context ctx = new javax.naming.InitialContext(); boolean serviceAvailable = false; try { psh = (PortletServiceHome) ctx.lookup(PortletDialogModelProvider.JNDI_NAME); serviceAvailable = true; } catch(javax.naming.NameNotFoundException ex) { ... error handling ... } ... if (serviceAvailable) { PortletDialogModelProvider provider = (PortletDialogModelProvider) psh.getPortletService(PortletDialogModelProvider.class); DialogModel model = provider.getDialogModel(aRequest, aResponse); ... }
Note: The lookup for this provider should be executed within the init
method of a portlet and
only the lookup for the DialogModel
itself should be performed on a per-request basis.
Field Summary | |
---|---|
static java.lang.String |
JNDI_NAME
The JNDI name of the dialog model provider portlet service. |
Method Summary | ||
---|---|---|
|
getDialogModel(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
Returns the dialog model of the current context. |
Field Detail |
---|
static final java.lang.String JNDI_NAME
Method Detail |
---|
<T extends DialogDefinition> DialogModel<T> getDialogModel(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response) throws ModelException
request
- The PortletRequest
of the current context. Must not be null
.response
- The PortletResponse
of the current context. Must not be null
.
DialogModel
for the current context, never null
.
ModelException
- In any case the dialog model can not be obtained, e.g. due to exceptions during the lookup
of the current user.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |