This discussion is archived
10 Replies Latest reply: Sep 3, 2012 10:11 PM by Ferez RSS

Problem in navigating from page A to page B

Ferez Newbie
Currently Being Moderated
Hi

I have faced a problem and I am stuck, please help me.
I have replaced the traditional menu which is based on af:navigationPane and af:commandNavigationItem with af:menuBar, af:menu and af:commandMenuItem inside JhsPageTemplate.jspx file. I mean I have replaced this part
-----
<af:navigationPane id="Menu2"
rendered="#{attrs.showMenu2}"
partialTriggers="Item2 ::pendingChangesDialog ::Menu1"
var="menuItem"
value="#{attrs.menuModel}"
level="#{attrs.menuStartLevel+1}"
hint="bar">
<f:facet name="nodeStamp">
<af:commandNavigationItem id="Item2"
partialSubmit="true"
text="#{menuItem.label}"
actionListener="#{pageFlowScope.pendingChangesBean.handle}"
action="#{menuItem.doAction}"
rendered="#{menuItem.rendered}">
</af:commandNavigationItem>
-----

with the following menu which I have built manually

-----
<af:menuBar id="mbMain" binding="#{MenuBean.menubar}">
<af:menu text="BASIC" id="mBasic" rendered="true">

<af:commandMenuItem id="Signers" text="SIGNERS" rendered="true"
action="uishell:Signers" partialSubmit="false"/>

<af:commandMenuItem id="BSI" text="BSI" rendered="true"
action="uishell:BSI" partialSubmit="false"/>

</af:menu>
</af:menuBar>
-----

For the action property of commandMenuItem I have used the action property automatically generated inside menu-xxx.xml files. Now I run the application and everything seems working but when I navigate from page A to page B and refresh the browser by F5 an error message like the following appears:

javax.el.PropertyNotFoundException: Target Unreachable, 'BSIDetailTable' returned null
     at com.sun.el.parser.AstValue.getTarget(Unknown Source)
     at com.sun.el.parser.AstValue.setValue(Unknown Source)
     at com.sun.el.ValueExpressionImpl.setValue(Unknown Source)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:656)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.access$000(LifecycleImpl.java:71)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$1.call(LifecycleImpl.java:697)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$1.call(LifecycleImpl.java:693)
     at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:503)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:692)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executeBindings(LifecycleImpl.java:727)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:632)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:300)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.jheadstart.controller.jsf.AuthenticationFilter.doFilter(AuthenticationFilter.java:282)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)


the 'BSIDetailTable' refers to a table in the page in which I have navigated from, in this case page A. I think that the navigation has not taken place properly and completely and the control is looking for something in the previous page. The action="uishell:BSI" attribute is the same for the af:commandNavigationItem component and af:commandMenuItem component so why is this happening?

I am using JDev 11.1.1.4 and JHs 11.1.1.3.35

Regards,
Ferez
  • 1. Re: Problem in navigating from page A to page B
    Stephen J. Journeyer
    Currently Being Moderated
    Ferez,
    does the navigation work when you leave it as the original navigationPane->commandNavigationItem setup? Just wondering if it's an issue with the navigation menu or with something else on the page.
  • 2. Re: Problem in navigating from page A to page B
    Ferez Newbie
    Currently Being Moderated
    Hi Stephen

    I checked what you said. No, there is no problem with the default navigationPane and commandNavigationItem and it works just fine. You could check this by a simple application based on HR schema. I created a new app which contains two app modules and two services in JHs. I got Countries and Employees as groups in these services. With default menus there is no problem but when I use the following menu, mentioned problem happens again

    <af:menuBar id="mbMain" >
    <af:menu text="menu1"
    id="menu1"
    rendered="true">
    <af:commandMenuItem id="mi1"
    text="Countries"
    action="uishell:Countries"
    rendered="true"
    partialSubmit="false"/>
    <af:commandMenuItem id="mi2"
    text="Employees"
    action="uishell:Employees"
    rendered="true"
    partialSubmit="false"/>
    </af:menu>
    </af:menuBar>
  • 3. Re: Problem in navigating from page A to page B
    Steven Davelaar Employee ACE
    Currently Being Moderated
    Can you send a testcase based on the HR schema to idevcoe_nl@oracle.com?

    Steven Davelaar,
    Jheadstart team.
  • 4. Re: Problem in navigating from page A to page B
    Ferez Newbie
    Currently Being Moderated
    Hi Steven,

    Many thanks for the reply, I have sent the testcase about two weeks ago but how could I know the result? I haven't received any answer yet, should I wait for one? :)

    Regards,
    Ferez
  • 5. Re: Problem in navigating from page A to page B
    153666 Newbie
    Currently Being Moderated
    Hi Ferez,

    I'm sorry that we have not replied to your test case earlier. We have received it, but have not had time yet to look at it.

    We will get back to you, but it might take some more time.

    kind regards,
    Sandra
  • 6. Re: Problem in navigating from page A to page B
    957229 Newbie
    Currently Being Moderated
    Hi Ferez, I have similiar problem, but in my app it occurs occasionaly, can you send me your test case at darek86@gmail.com ?

    Regards,
    Darek.
  • 7. Re: Problem in navigating from page A to page B
    Steven Davelaar Employee ACE
    Currently Being Moderated
    Ferez,

    You need to set partialSubmit="true", and the menuBar should have partialTriggers that listen to the menu items:

    <af:menuBar id="mbMain" partialTriggers="EmployeesMI DepartmentsMI CountriesMI">
    <af:menu text="new menu" id="menu1" rendered="true">
    <af:commandMenuItem id="EmployeesMI"
    text="Employees"
    action="uishell:Employees"
    rendered="true"
    partialSubmit="true"/>
    <af:commandMenuItem id="DepartmentsMI"
    text="Departments"
    action="uishell:Departments"
    rendered="true"
    partialSubmit="true"/>
    <af:commandMenuItem id="CountriesMI"
    text="Countries"
    action="uishell:Countries"
    rendered="true"
    partialSubmit="true"/>
    </af:menu>
    </af:menuBar>

    Then, in UIShell.jspx, you should add your menubar id "mbMain" as partial target:

    <f:facet name="pageContent">
    <af:region id="mr" value="#{bindings.mainRegion.regionModel}"
    partialTriggers="::mbMain ::Menu1 ::Menu2 ::pendingChangesDialog"/>
    </f:facet>


    Steven Davelaar,
    JHeadstart Team.
  • 8. Re: Problem in navigating from page A to page B
    Ferez Newbie
    Currently Being Moderated
    Hi Steven

    Thanks a lot, now, thanks to your solution my menuBar works like a charm!

    Now there is a similar problem with menuGlobal area and I did the same thing you mentioned but it didn't work. I got a commandLink item inside menuGlobal.jsff file like the following:

    <af:toolbar id="menuGlobalToolbar">

    <af:commandLink id="mg_UserPreferences"
    text="user settings"
    action="uishell:UserPreferences"/>

    </af:toolbar>

    I do the same thing you mentioned, I mean I set the partialSubmit of commandLink to "true", add id of commandLink to the partialTriggers of the toolbar and add id of toolbar in UIShell.jspx as partial target like the following:
    -------------------------------------
    inside menuGlobal.jsff:

    <af:toolbar id="menuGlobalToolbar" partialTriggers="mg_UserPreferences">

    <af:commandLink id="mg_UserPreferences"
    text="user settings"
    action="uishell:UserPreferences"
         partialSubmit="true" />

    </af:toolbar>
    ---------------------------------------
    inside UIShell.jspx:

    <f:facet name="pageContent">
    <af:region id="mr" value="#{bindings.mainRegion.regionModel}"
    partialTriggers="::menuGlobalToolbar ::mbMain ::Menu1 ::Menu2 ::pendingChangesDialog"/>
    </f:facet>

    Now when I click on "user settings" link on the menuGlobal the content of the page doesn't get refreshed but if I press F5 the page gets refreshed and "user settings" page gets displayed. I think I have forgotten to set something somewhere. Do you have any idea?

    Regards,
    Ferez
  • 9. Re: Problem in navigating from page A to page B
    Ferez Newbie
    Currently Being Moderated
    Hi Darek

    I forwarded my test case to you but I should mention that Steven's solution worked for me.

    Regards,
    Ferez
  • 10. Re: Problem in navigating from page A to page B
    Ferez Newbie
    Currently Being Moderated
    Hi Sandra

    Thank you very much, thanks to Steven's solution the problem is solved now. I appreciate your concern.

    Regards,
    Ferez

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points