Conditional rendering of JSF page depending on Navigation case

Hi
Can we conditionally render the JSF page depending the navigation case, which brought us in that page..
Lets say that a page A does both Edit and create operations , we have two navigation cases "edit" and "create" directing to this page from main page. can we modify the components in the page depending on the navigation case.
Thanks in advance
Pradeep

Hi Grant,
your reply was helpful. i got into another scenario :-) where i need to know the navigation case which brought us into the page.
I have a page flow in adf which can be called by client applications both as a popup or a regular window. the ADF's dialog framework more or less solves my requirement. But to return values from dialog, i have to use "returnFromDialog" method on click of button in the popup window. as i am reusing the page i would write a conditional statement to show diff behaviour when launched as a popup.
my problem is that i do not want client application to set any parameter in the managed bean (this would get client apps into the implementation issues, causing unnecessary complexity). This again brings me back to the same question ability to KNOW (get handle of) the "navigation case".
Pradeep

Similar Messages

  • How to access a session variable just before rendering a JSF page???

    Dear Sirs...
    i am using jdeveloper 10.1.3.2 with JSF and ADF faces. i want to access a session variable and perform some processing just before rendering a page. how can i achieve this????
    i am a little new to jsf, so i feel a little lost
    thanks for any help in advance, and best regards

    <p>
    Hi,
    </p>
    <p>
    See example 60 &quot;<strong>Triggering OnPageLoad-Style Code in a JSF Backing Bean Using ADF PagePhaseListener or PageController</strong>&quot; on Steve&#39;s Muench blog.
    </p>
    <p>
    Kuba 
    </p>

  • Rendering a JSF page with a choice from CoreSelectOneChoice!

    Hi,
    I have a jsp page with lots of ADF and JSF components. I have a CoreTable component that gets it values from a DB thru Toplink. On this page I have a CoreSelectOneChoice component with a ValueChangedListener. When the user makes a selection from the CoreSelectOneChoice component I want the CoreTable to update its value based on code in the ValueChangeListener.
    My problem is that when the user makes its selection on the CoreSelectOneChoice component my CoreTable dont renders out from the new values I set in the ValueChangedListener.
    So how can I render (re-post) my CoreTable component or my whole page after the code in my ValueChangedListener has run? Or what code should I put in the ValueChangedListener to get the wanted behavior.
    Hope that sombody can help a stuck developer :-)
    Eskild

    Hi,
    set autosubmit = true on the core selet one component and define an ID value. On the table component, set the PatrialTriggers property to the ID value
    Frank

  • Re-rendering JSP/JSF pages

    I wnat to be able to set up a checkbox that will cause some other components to be visible or invisible. I was thinking of using the rendering attribute on the target components. However, I am having trouble finding a good method of causing the rendered attribute to be re-evaluated when the checkbox is clicked. This is an enhancement to a current applicaiton that uses JSF1.1 with Tomahawk.
    Any help would be appreciated. I've put in several hours researching this and have not found anything helpful.
    Mike

    Just let the checkbox submit the form on click.
    <h:selectBooleanCheckbox value="#{myBean.checked}" onclick="this.form.submit();" />
    <h:someComponent rendered="#{myBean.checked}" />If you want to do this asynchronously, consider Ajax4jsf.

  • Getting style missing errors while rendering ADF trees in JSF page

    I am getting the following message while rendering a JSF page with af:tree. Based on other posts on this forum, I verified servlet-mapping in web.xml and it is already set to /faces/*.
    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    Here is my JSF code snippet.
    <f:view><af:document title="DeviceTree2.jsf" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:tree value="#{bindings.Device1.treeModel}" var="node" selectionListener="#{bindings.Device1.treeModel.makeCurrent}" rowSelection="single" id="t1">
    <f:facet name="nodeStamp"><af:outputText value="#{node}" id="ot1"/>
    </f:facet>
    </af:tree>
    </af:form>
    </af:document>
    </f:view>
    Surely I am missing something here but not sure on the real issue.
    Would appreciate if someone can help on this.

    I am getting the following error. Browser shows the JSF XML code listed in my original issue statement followed by this error.
    "This XML file does not appear to have any style information associated with it. The document tree is shown below."

  • Dynamic Form componants in my jsf page?

    how could i make dynamic form componant in my jsf page ,depend on user inputs or result from database or whatever , where i use sun studio creator ???

    you need to use the "rendered" attribute of the components...
    for example in your jsp put this...
    <h:outputText value="Hello" rendered="#{myBean.renderHello}"/>
    the render hello method looks like this in your backing bean "myBean"
    public boolean getRenderHello() {
    return true; // or false
    if getRenderHello() returns true, "Hello" will be displayed, if getRenderHello() returns false, it will not...
    you can also use expressions in the jsf... for example...
    <h:outputText value="Hello" rendered="#{myBean.someNumber == 5}"/>
    if the "getSomeNumber()" method in your backing bean returns 5 it will be true and "Hello" will show up... otherwise it won't... :)
    Hope this helps...
    -Garrett

  • How-to get attributes from one JSF page redirected to another?

    How do I send information from one JSF page when the navigation rule redirects it to another?
    When JSF navigation does a forward I can use request.setAttribute() in the from-page and then use request.getAttribute() in the to-page, but this doesn't work with <redirect/>.
    Regards,
    Al Malin

    The process scope in ADF Faces solves this. See:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.adffacesguide%7Cdevguide%7CcommunicatingBetweenPages%7Ehtml/

  • JSF in Jdeveloper - navigation case not working

    code in my faces-config.xml:
    <?xml version="1.0" encoding="windows-1252"?>
    <faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee">
    <application>
    <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
    </application>
    <navigation-rule>
    <from-view-id>/here.jsf</from-view-id>
    <navigation-case>
    <from-outcome>goThere</from-outcome>
    <to-view-id>/there.jsf</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/there.jsf</from-view-id>
    <navigation-case>
    <from-outcome>goHere</from-outcome>
    <to-view-id>/here.jsf</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    When I create a command button on the two pages and set the Application Action correctly, when I run the app the button does not take me to the other page. No error messages.

    MSorbera here, thanks - just tried that, still doesn't work, here's the code in adfc-config.xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <view id="here">
    <page>/here.jsf</page>
    </view>
    <view id="there">
    <page>/there.jsf</page>
    </view>
    <control-flow-rule id="__1">
    <from-activity-id>here</from-activity-id>
    <control-flow-case id="__2">
    <from-outcome>goThere</from-outcome>
    <to-activity-id>there</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <control-flow-rule id="__3">
    <from-activity-id>there</from-activity-id>
    <control-flow-case id="__4">
    <from-outcome>goHere</from-outcome>
    <to-activity-id>here</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    </adfc-config>
    And here's the command button code on one page:
    <h:commandButton value="Go There" id="cb1" action="goThere"/>
    And the other:
    <h:commandButton value="Go Here" id="cb1" action="goHere"/>

  • JSF Page is not  rendering correctly on NON JSF Action

    Hi All,
    When I go from JSF actions (clicking HtmlCommandButton HtmlActionLink), I am getting the correct page. But when I come from non jsf actions say if I come through by clicking normal anchor tag or javascript action or normal html submit button, I am getting same old rendered page. How can I overcome this problem??
    Thanks
    Sudhakar

    I am getting same old rendered pageIn otherwords, page is not getting refreshed and contains old data

  • JSF page not rendered in Design View (JDev 11.1.2.1.0)

    Hi!
    Recently strange behavior in JDeveloper 11.1.2.1.0) begins: JSF pages in some projects are not rendered anymore. We enabled "Show Design time Messages in log" in JDev Tools/Preferences/JSP and HTML Visual editor and message
    WARNING: A problem was encountered executing the page.  Using fallback rendering is shown in log. This is visible on this snapshot:
    [http://dl.dropbox.com/u/14304804/design_view_problem.jpg|http://dl.dropbox.com/u/14304804/design_view_problem.jpg]
    What is common to all of the projects with this issue is that we run "Remove ADF Security Configuration" which was enabled before and we implemented our custom security using phase-listener.
    Any idea what is wrong here?
    Regards,
    Sašo
    Edited by: Sašo C. on May 21, 2012 2:24 PM

    It's a limitation, if you will, of the way JDeveloper works. It essentially runs your JSF page in order to get the rendering. At design time, the phase listener is obviously messing things up since you're not in a proper secured environment - hence the workaround to bypass your phase listener at design time.

  • Jsf page not rendering in Jdeveloper

    Hello. I am using jdeveloper 11.1.2.2. I was working on an application this evening, and added a new jsff page. When I opened the page, I got the "waiting for designer to render" then it stopped, and all I see is white.
    I am able to add components to the page via the structure window, but I cannot see what the form looks like in the design view. The the problem started hitting the other jspx form I have in the application.
    I read somewhere about someone having the same problem and I tried renaming the windowinglayout.xml, and re-opened jdeveloper, but it did not solve the problem.
    This has happened before. I wiped out the system directory, and that works, but wiping out the system directory is painful. Are there any intelligent solutions?
    Thank you,
    Stuart

    I tried renaming the system directory, opening jdeveloper, opening the jsf page -- it rendered. So I then went to the system directory and found the windowinglayout.xml and backed it up.
    then I deleted out the new system directory, and the renamed back the old system directory. Found the windowinglayout.xml and replaced it with the good file.
    Opened Jdeveloper and the jsf page. Did some work and soon the render failed again.
    I am not sure if this is relevant...but the log shows this:
    Oct 16, 2012 9:47:44 PM oracle.security.jps.util.JpsUtil disableAudit
    INFO: JpsUtil: isAuditDisabled set to true
    Oct 16, 2012 9:47:56 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Mojarra 2.0.9 (SNAPSHOT 20120202) for context ''
    Oct 16, 2012 9:47:58 PM com.sun.faces.spi.InjectionProviderFactory createInstance
    INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
    Oct 16, 2012 9:47:59 PM org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl _checkTimestamp
    WARNING: Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    Oct 16, 2012 9:47:59 PM oracle.adfinternal.view.faces.lifecycle.LifecycleImpl _initializeTrinidadFrameBustingAppMapValue
    WARNING: The framebusting context param 'oracle.adf.view.rich.security.FRAME_BUSTING' has been deprecated. Please change your web.xml to use 'org.apache.myfaces.trinidad.security.FRAME_BUSTING' instead. The legal values are 'always', 'never', and 'differentOrigin'. If you were setting the value of 'oracle.adf.view.rich.security.FRAME_BUSTING' to 'differentDomain', then please note that you should set 'org.apache.myfaces.trinidad.security.FRAME_BUSTING' to 'differentOrigin'.
    Oct 16, 2012 9:48:01 PM org.apache.myfaces.trinidad.component.UIXEditableValue _isBeanValidationAvailable
    WARNING: A Bean Validation provider is not present, therefore bean validation is disabled
    Oct 16, 2012 9:48:20 PM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
    WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: unavailable.
    Oct 16, 2012 9:48:20 PM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
    WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: unavailable.
    Oct 16, 2012 9:50:11 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Mojarra 2.0.9 (SNAPSHOT 20120202) for context ''
    Oct 16, 2012 9:50:12 PM com.sun.faces.spi.InjectionProviderFactory createInstance
    INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
    Oct 16, 2012 9:50:14 PM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
    WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: unavailable.
    Oct 16, 2012 9:50:14 PM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
    WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: unavailable.
    Oct 16, 2012 9:50:15 PM org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl _checkTimestamp
    WARNING: Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    Oct 16, 2012 9:50:15 PM oracle.adfinternal.view.faces.lifecycle.LifecycleImpl _initializeTrinidadFrameBustingAppMapValue
    WARNING: The framebusting context param 'oracle.adf.view.rich.security.FRAME_BUSTING' has been deprecated. Since there is a non-null value for the context param 'org.apache.myfaces.trinidad.security.FRAME_BUSTING' the value of 'oracle.adf.view.rich.security.FRAME_BUSTING' will be ignored. Please remove 'oracle.adf.view.rich.security.FRAME_BUSTING' from the web.xml.
    Oct 16, 2012 9:50:18 PM org.apache.myfaces.trinidad.component.UIXEditableValue _isBeanValidationAvailable
    WARNING: A Bean Validation provider is not present, therefore bean validation is disabled

  • Forbiding rendering html and body elements within jsf page

    Hi, I have noticed rendered JSF page always starts and ends with elements
    <html> <body>
    my content
    </body> </html>
    but I need page that contains only "my content" for inserting into live html document
    It can be this automatic elements rendering disabled??

    f:subview instead of f:view did no changes. output is also closed with standards elements:
    <html><head><title></title></head><body>CONTENT</body></html>
    but I need in output only "CONTENT" without "body" and so

  • JSF Portlet keeps last navigated page

    I have a small JSF application where there is a simple navigation from first displayed JSP pageA to JSP pageB:
    (of course with a managed bean
    <navigation-rule>
    <from-view-id>/portlets/pageA.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/portlets/pageB.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    As a standalone Web app the first pageA is always redisplayed with the main app url.
    However configured as a JSF portlet, after navigating to pageB, the portlet will always redisplay pageB!
    What configuration am i missing to reset to first pageA when redisplay main portal page?
    thanks.

    on a second thought the behavior i see might be valid due to the fact that i specify in my navigation rule a <from-view-id>, which as soon as i'm on pageB no longer applies, meaning there is no rule from pageB for same outcome, so pageB is still displayed.
    I added an extra rule for pageB and a "Back" button on pageB and now i can go back to initial page.
    for me it is a bit unexpected, due to this view "statefulness", but does make sense, need to better master JSF ...

  • Navigation of JSF pages on Linux

    Hi ,
    I am in process of developing an application containing JSF pages . I have deployed the EAR on WAS on windows machine and JSF pages developed are working fine and I am able to navigate the pages without any issues.
    However , when I deploy the same EAR on WAS which is installed on LINUX , JSF page navigation has stopped.
    There is no error as such coming on the console , I need to check the system.out/err files for any error .
    Do I need to make any changes in faces-config.xml ?
    Advices/Suggestions will be greatly appreciated .
    thanks...

    When you say the "navigation has stopped," what do you mean? The page refreshes but returns the user to the same page? The page doesn't refresh? The user is taken to a blank page?
    You shouldn't need to make any changes at all. I develop on a Windows machine and deploy to a Linux server on a daily basis without any modifications before releasing. I'm using WAR files and Tomcat, but JSF applications should run just the same either way. The only thing that immediately comes to mind is the JDK installed on Linux might not be adequite. For example an older version or jre instead of jdk.

  • JSF page rendered propert

    Hi all,
    How to make reference either AmImpl method or VORowImpl method to the JSF page rendered property??
    thanks
    santosh

    You can NOT directly use the method reference in the page.
    Instead do the following
    - Add the exposed method to the PageDef
    - Have a boolean property in the managed bean that returns the value by invoking the method
    - For any UI component's rendered property, use EL expression based on boolean property in the managed bean.
    Thanks,
    Navaneeth

Maybe you are looking for

  • The bluetooth on my iPod touch has stopped working

    I try to turn it on, but it just "thinks" and doesn't actually turn on. Only happening for the past week. I've reset my iPod and updated the software, but nothing has changed. Help anyone??

  • Installing developer 6i on Windows Vista Ultimate

    Hello everybody, I tried to install Developer 6i on Windows Vista Ultimate, know if there are any patch or something like that? When you do not have the install path in the regedit. And I lose all the icons in my applications. Please I need help, Mig

  • Codec quality of motion clip

    I have a question about codec quality when creating slow motion effects in FCP 6 vs. motion 3. I slowed down a clip in fcp 6 by 50% with simple frame blending and then sent the same clip to motion 3 and sent it through optical flow. While the clip fr

  • I'm trying to reset my security questions but i do not have the link to reset them

    im trying to reset my security questions but i do not have the link to reset them

  • Error (-5000)

    I am trying to update my iphone 4 with the 5.0.1 update.  When itunes is backing up my phone, it stops and says the an error (-5000) has occurred and that if I continue I will lose all the info in my phone.  Help!  How can I fix the error and update