Fixing UIShell : Components in welcome facet are not shown
Hi
Jdeveloper version is 12.2.1 running on windows 10 machine
I have created ADF fusion application with model and viewcontroller projects.
the unbounded task flow contains three pages : login ,homeUIShell ,and hrUIShell
homeUIShell and hrUIShell are baed on UIShell template.
"login" page is not based on any template. it is a blank page contains only one button to navigate to homeUIShell page.
in the homeUIShell page , I add a calendar component in the welcome facet. this is the jsf code of the homeUIShell
if I run only the homeUIShell , the calendar component renders correctly .But when I run the login page first and press the login button that simply navigates to the homeUIShell , the homeUIShell is displayed but the calendar is now rendered
The refresh button on the top of the page does not execute any method or actions.It is used only for testing submitting the page.
When I press the "refresh" button on the top of the page , this error is raised
Cause of this bugJdeveloper version is 12.2.1 running on windows 10 machine
I have created ADF fusion application with model and viewcontroller projects.
homeUIShell and hrUIShell are baed on UIShell template.
"login" page is not based on any template. it is a blank page contains only one button to navigate to homeUIShell page.
if I run only the homeUIShell , the calendar component renders correctly .But when I run the login page first and press the login button that simply navigates to the homeUIShell , the homeUIShell is displayed but the calendar is now rendered
The refresh button on the top of the page does not execute any method or actions.It is used only for testing submitting the page.
When I press the "refresh" button on the top of the page , this error is raised
- value="#{viewScope.tabContext.tabs[0].binding.regionModel}": java.lang.NullPointerException
- <oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl> <DiagnosticsDataExtractorImpl> <createADRIncident> <incident 444 created with problem key "ADFC-00032 [ADFc]">
- <oracle.adf.view> <RichExceptionHandler> <_logUnhandledException> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RESTORE_VIEW 1>
- javax.el.ELException: /file:C:/Users/tarek/AppData/Roaming/JDeveloper/system12.2.1.1.42.160607.2047/DefaultDomain/servers/DefaultServer/tmp/_WL_user/TestApp/95dkyr/war/WEB-INF/lib/oracle-page-templates-ext.jar!/oracle/ui/pattern/dynamicShell/dynamicTabShell.jspx @278,126 value="#{viewScope.tabContext.tabs[0].binding.regionModel}": java.lang.NullPointerException
- at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
- at org.apache.myfaces.trinidad.component.UIXFacesBeanImpl.getBoundProperty(UIXFacesBeanImpl.java:203)
- at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:69)
- at org.apache.myfaces.trinidad.component.UIXComponentBase.getProperty(UIXComponentBase.java:1928)
- at oracle.adf.view.rich.component.fragment.PartialUIXRegion.getValue(PartialUIXRegion.java:201)
- at oracle.adf.view.rich.component.fragment.UIXRegion.getRegionModel(UIXRegion.java:308)
- at oracle.adf.view.rich.component.fragment.UIXRegion.processEvent(UIXRegion.java:1155)
- at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$EventDeliverer.visit(LifecycleImpl.java:1122)
- at oracle.adfinternal.view.faces.component.visit.VisitCallbackChain.visit(VisitCallbackChain.java:31)
- at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:604)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:504)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:482)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:774)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:631)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:405)
- at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
- at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:560)
- at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeRestoreViewAfterPhaseListenerLogic(LifecycleImpl.java:532)
- at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeAfterPhaseLogic(LifecycleImpl.java:466)
- at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:381)
- at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:227)
- at javax.faces.webapp.FacesServlet.service(FacesServlet.java:650)
- at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)
- at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
- at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
- at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)
- at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:207)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
- at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)
- at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
- at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:529)
- at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:354)
- at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:232)
- at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:169)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at weblogic.servlet.utils.FastSwapFilter.doFilter(FastSwapFilter.java:64)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:141)
- at java.security.AccessController.doPrivileged(Native Method)
- at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
- at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)
- at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:124)
- at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:232)
- at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)
- at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
- at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3683)
- at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3649)
- at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
- at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
- at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
- at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
- at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433)
- at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)
- at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259)
- at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1686)
- at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1646)
- at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)
- at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
- at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
- at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
- at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
- at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
- at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
- at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
- Caused by: javax.el.ELException: java.lang.NullPointerException
- at javax.el.BeanELResolver.getValue(BeanELResolver.java:367)
- at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
- at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
- at com.sun.el.parser.AstValue.getValue(AstValue.java:139)
- at com.sun.el.parser.AstValue.getValue(AstValue.java:203)
- at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
- at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
- ... 130 more
- Caused by: java.lang.NullPointerException
Problem Solution
As Timo mentioned , the problem is because there is any tabs defined.To solve this problem, you have to open a new tab or to set the content by default when loading the page for the first time.
1 - in the UIShellHome page , add this java script code that call a java method when the page is loaded. Insert this code inside the af:document
<af:clientListener method="initialize" type="load"/>
<af:serverListener type="launchDefaultActivity" method="#{backingBeanScope.homeBacking.launchDefaultActivity}"/>
<f:facet name="metaContainer">
<af:resource type="javascript">
function initialize(event) {
var source = event.getSource();
AdfCustomEvent.queue(source, "launchDefaultActivity",
{
},
false);
}
</af:resource>
</f:facet>
2- create a backing bean for the page
import oracle.adf.view.rich.render.ClientEvent;
import oracle.ui.pattern.dynamicShell.TabContext ;
import oracle.ui.pattern.dynamicShell.TabContext.TabContentAreaDirtyException;
public HomeBacking() {
}
TabContext tabContext = TabContext.getCurrentInstance();
try {
tabContext.setMainContent("WEB-INF/main-flow.xml#main-flow");
} catch (TabContentAreaDirtyException e) {
e.printStackTrace();
}
}
}
3- if you run the page , you will find an error in the log file like this
<page id="pt1" path="oracle.ui.pattern.dynamicShell.model.dynamicTabShellDefinition" Refresh="ifNeeded"/>
then in your page source "jsf page source code" set tge value of the pageTemplate to
<af:pageTemplate viewId="/oracle/ui/pattern/dynamicShell/dynamicTabShell.jspx" id="pt1" value="#{bindings.pt1}">
Comments