[
https://issues.apache.org/jira/browse/PORTLETBRIDGE-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632408#action_12632408
]
Leonardo Uribe commented on PORTLETBRIDGE-47:
---------------------------------------------
Entering into details, the reason why a PortletConfig instance is passed to
PortletExternalContextImpl is that for calculate the viewId it does this (in
some part of private String getViewId(boolean updateHistory):
if (viewId == null)
{
Map<String, String> m = (Map<String,String>) mPortletContext.getAttribute(
Bridge.BRIDGE_PACKAGE_PREFIX +
mPortletConfig.getPortletName()
+ "." + Bridge.DEFAULT_VIEWID_MAP);
viewId = m.get(requestedMode);
if (viewId == null)
{
// If no defaultview then throw an exception
throw new BridgeDefaultViewNotSpecifiedException();
}
log("PortletExternalContextImpl.getViewId: jsf target viewId not found,
defaulting to: " + viewId);
}
it uses the portlet name to build the id. I don't know how to get a
PortletConfig instance based on a PortletContext or obtain the portlet name.
In the doc of getPortletName it says
"...The name may be provided via server administration, assigned in the portlet
application deployment descriptor with the portlet-name tag...."
I hope this help.
> BridgeImpl pass PortletConfig instance to FacesContextFactory instead
> PortletContext
> ------------------------------------------------------------------------------------
>
> Key: PORTLETBRIDGE-47
> URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-47
> Project: MyFaces Portlet Bridge
> Issue Type: Bug
> Affects Versions: 1.0.0-alpha-2
> Reporter: Leonardo Uribe
> Priority: Critical
>
> On myfaces portlet bridge (for jsf 1.2) do this
> (org.apache.myfaces.portlet.faces.bridge.BridgeImpl line 240):
> try
> {
> // Get the FacesContext instance for this request
> context =
> getFacesContextFactory().getFacesContext(mPortletConfig, request,
> response, getLifecycle());
> It should pass a javax.portlet.PortletContext instance instead, because this
> is the expected var here.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.