JSF 2.0 view handler

JDeveloper documentation has an error in configuring the view handler.
http://download.oracle.com/docs/cd/E16162_01/user.1112/e17455/dev_wpt.htm#OJDUG3574
Example 11-4 Facelet Code Added to Your faces-config.xml
<application>
<view-handler>com.sun.Facelets.FaceletViewHandler</view-handler>
</application>
com.sun.Facelets.FaceletViewHandler is the JSF 1.2 view handler. For JSF 2.0 a view handler is not to be configured.
Edited by: dvohra16 on Jul 7, 2012 2:07 PM

Thank-you for pointing out this in our documentation. I have removed this section since the faces-config.xml does not get modified to add the view handler detail in JSF 2.0. when one adds a facelet page.
Edited by: user742463 on Jul 10, 2012 1:30 PM

Similar Messages

  • JSF 2.0: View Scope Problem

    Hey,
    I 'm having trouble using the JSF 2.0 view scope. My application is a search page displaying some search parameters and a list of results. The search parameters are backed by a session scope bean, the results a backed by a request scoped bean and there is some kind of controller bean in request scope, too. Searching and displaying the results works fine.
    The second step was some kind of details page to display when clicking on one result element. I have another controller bean for this goal, but when pressing the link the requested action is not performed. I remembered similar problems I had in the past where I put the bean containing the result list into view scope.
    But after putting the results bean into view scope searching is not working anymore. You click the search button, the search action is performed. But after successfully storing the results a new results bean is instantiated. An empty one of course.
    Now I 'm not sure anymore if I understand the view scope: I have a single page, I search something and the results are displayed on the same page. I cannot believe that request scoped results work fine and view scoped results do not.
    Can anyone help me?
    Thanks,
    Stephan

    I found the problem and a solution :-) The missing piece of the puzzle was the id attribute for the form tag. After some debugging of the JSF JavaScript I found the solution.
    The JavaScript function response(request, context) is invoked to handle the server response. Inside this function the doUpdate(element, context) is invoked.
    The doUpdate() function is doing the modification of the DOM. The function doUpdate() is two times invoked for a response. The first time the html elements are updated.
    The second time the view state hidden field is updated or created but only under the following condition:
    Comment in the JavaScript source code of the jsf.js
    //Now set the view state from the server into the DOM
    //but only for the form that submitted the request.If the forms of the both side haven't the same id the form can't be found on the second page.
    In the following way it is working:
    page1.xhtml
    <h:form id="myform">
            <h:commandLink value="Go to page 2" action="page2">
                <f:ajax render="@all" execute="@all"/>
            </h:commandLink>
    </h:form>
    .....page2.xhtml
    <h:form id="myform">
                <h:commandLink value="Go to page 1" action="page1">
                    <f:ajax render="@all" execute="@all"/>
                </h:commandLink>
    </h:form>So always set an explicit id for each JSF tag.

  • Custom View Handler

    I am creating a custom view handler , but I want that this view is used only for specific files(views) and for all other files I want that default handler to be used , can we do this in JSF ??If yes then how ??

    In your createView method of custom view handler, One of your parameter represents viewName. I guess you can inspect the viewName and delegate the method calls the appropriate implementation. You may also use a resource bundle in conjuction with this.
    This strategy depends on the enhancements that you wish to do in your custom implementation.
    I have never tried this before but dont you think its possible in your case?

  • How to define a second view-handler (decorator)

    Hello,
    I'd like to implement the ViewHandler decorator proposed by Adam Winder to accomplish authorization.
    http://forum.java.sun.com/thread.jspa?threadID=502322
    Besides, I use myfaces and Tiles, thus already having a Viewhandler defined
    How do I decorate the Tiles View-Handler?
    I don't know if this would be correct...
    <application>
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>
    <view-handler>my.package.myViewHandler</view-handler>
    Regards,
    Jan

    Hi Surya,
    As a starting point you should review the SAP Help on the subject, this will explain the steps required to get a catalog up and running.
    http://help.sap.com/saphelp_ccm20/helpdata/en/index.htm
    Regards,
    Jason

  • Integration of Spring, JSF as a view through portlets...

    I am trying to integrate Spring and JSF as a View. Furthermore I am trying to run this combination within a Portlet environment. I have got as far as been able to display the components by the url on the form post is not the portlet action URL as it should be. Can someone look at this thread and perhaps propose a next step.
    http://forum.springframework.org/viewtopic.php?t=4950

    Hi
    If you are new to EBS then read up on EBS. Take a look at:
    http://www.packtpub.com/service-oriented-java-business-integration
    http://en.wikipedia.org/wiki/Enterprise_service_bus
    In Siebel take a look at Bookshelf:
    Transports and Interfaces:
    Siebel eBusiness Application Integration Volume III
    and
    Integration Platform Technologies:
    Siebel eBusiness Application Integration Volume ll
    For Siebel 8.0 you find it here:
    http://download.oracle.com/docs/cd/B40099_02/books/EAI3/EAI3TOC.html
    Axel

  • How to get a View handler?

    Hi all,
      I'm trying to make a mandatory field check but in the message triggered I want to use the attribute "Text" of the label of my inputfield:
    //This is my inputfield's label
    IWDLabel Dt_Decrichiesta = (IWDLabel) view.getElement("Dt_Decrichiesta_Label");
    //This is my check method with 2 parameters: 1 is the field to check, 2 is the name of field to use in the error message
    wdThis.CheckMandatory(IPrivateCompRequestView.IX_Zur_RichiesteElement.DT__DECRICHIESTA,Dt_Decrichiesta.getText());
    everything is done in the action handler.
    As u can see I need a IWDView object to call the getElement method...
    Where/how can I get that???

    :-P
    sorry i am criptical
    by the way into method "onActionSave" {
         if (checkMandatory_is_OK()) {
                  // DO WHAT TO HAVE TO DO
         // ELSE DO NOTHING/IGNORE THE click THAT USER HAVE DONE
    and into
    "wddomodifyview" {
         if (!checkMandatory_is_OK() && !firstTime) {
                  // SHOW MESSAGE ERROR
    forgot "firstTime"
    Message was edited by:
            Roberto Tagliento

  • JSF Design Time View Not working correctly for ADF/JSF components

    My project is not using any external tag libraries. It is based purely on ADF core/html and JSF core/html components. The design time view does not show the appropriate presentation, everything is shown as nexted frame containers (I suppose how you would show a component that does not have a visual representation).
    If I create a new project and copy my jsp (jsf) pages over they show perfectly. I did this activity and all was going well in the new project and then I lost the design time view again. I cannot tell you what I did to cause the issue, maybe it was a modification to the web.xml as has been suggested in some other threads. Can anyone tell me what I should be looking for that causes this problem, what corrective actions I might take to eliminate the issues

    Ok I have isolated this issue. In my phase listener I had this line of code:
    private static final Logger _logger =  Logger.getLogger(EigRequest.class.getPackage().getName());
    and I changed it to
    private static final Logger _logger =
    Logger.getLogger(EigRequest.class.getName());
    and design mode started to work. I guess either of the above works for me although I do not understand why the line works when you run the application but not in design mode.
    Moral to the story is if something fails in any one of these types of decorators you will drop into a raw view mode. The question I have is if errors are occuring how do I figure out where they may be. There is no indication that anything is wrong with the exception that you lose most of the design mode functionality.
    This was not a compile issue, this was not a runtime issue. It took me quite a few hours of writing a test program to validate that it was not just writing a phase-listener issue; then launching, editing, relaunching the application to find the problem. I will say that a good portion of the code came from a Eclipse project. If you add the offending lines of code while using JDeveloper you do not loose design mode immediately. You only see the problem the next time you start JDeveloper which complicates finding the problem.

  • JSF Portlet default view (FacesPortlet)

    If we are creating a JSF based portlet using Sun's JSF RI and jsf-portlet bridge, then in portlet.xml we define this:
    {color:#0000ff}
    <portlet>
    <portlet-name>myPortlet</portlet-name>
    <portlet-class>
    com.sun.faces.portlet.FacesPortlet
    </portlet-class>
    <init-param>
    <name>com.sun.faces.portlet.INIT_VIEW</name>
    <value>/default.jsp</value>
    </init-param>
    </portlet>{color}
    But in faces-config.xml, we define our navigation using navigation-cases, like this:
    {color:#008000}
    <!-- Global Error -->{color}
    {color:#0000ff}
    <navigation-rule>
    <navigation-case>
    <from-outcome>exceptionNavigation</from-outcome>
    <to-view-id>/error.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>{color}
    What I'm trying to do is this:
    I want to programmatically access the navigation rule which references the default view.
    I can fish out the INIT_VIEW value using:
    {color:#0000ff}
    String initView = application.getInitParameter(com.sun.faces.portlet.LifecycleImpl.INIT_VIEW_PARAMETER);{color}
    But this returns me the actual jsp name, ie: {color:#0000ff}/default.jsp{color}
    This means I cannot use faces to navigate to it, like this:
    {color:#0000ff}
    application.getNavigationHandler()
    .handleNavigation( context, null, initView );{color}
    As the navigation model is core to JSF, would it not be better for FacesPortlet to require, in portlet.xml,
    a global navigation-case rather than just a jsp page?
    This would apply to EDIT_VIEW, HELP_VIEW, etc.
    In order to implement the functionality I want, I have to specify my default or INIT_VIEW page twice, once in portlet.xml and a second time in faces-config.xml. What is more, I cannot use this as independent code, because I have to know or prescribe the navigation-case containing the default/initView to the user of the code:
    {color:#0000ff}
    <navigation-case>
    <from-outcome>com.sun.faces.portlet.INIT_VIEW</from-outcome>
    <to-view-id>/default.jsp</to-view-id>
    </navigation-case>{color}
    Regards,
    Stewart
    PS: How do I display code correctly using this editor?

    I have answered my own question. This is how to programmatically access the INIT_VIEW jsp in this situation:
    ExternalContext econtext = context.getExternalContext();
    String initViewId = (String) econtext.getRequestMap().get(
    (String) econtext.getRequestMap().get(
    com.sun.faces.portlet.LifecycleImpl.INIT_PARAMETER ));
    UIViewRoot viewRoot = context.getApplication().getViewHandler().createView(context, initViewId);
    context.setViewRoot(viewRoot);
    context.renderResponse();
    It the viewId IS the jsp name, and navigation can be achieved directly on the jsp name using the ViewHandler class. This is what the NavigationHandler does, under the bonnet (sorry, hood).
    Give myself a Duke Star!
    :-)

  • Problem doing JSF tutorial - design view not working

    Hi everyone.
    I am fairly new to Java and followed the tutorial bellow to styart learning about it.
    http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adf_richclient/adfrichclient.htm#o
    I managed to finish the tutorial using the structure explorer because the design view wasn't working for me. Whenever I make a JSF Template and use it to make another JSF page, the design view does not shows the facet I've added, thus I cannot put any components using the design view. I basically fail to get the screen shown at #4 of the "Create a Page Using the Page Template" section in the tutorial.
    Am I missing a configuration or something ?
    Thanks.

    I tried looking at the logs (with the option on) and didn't see anything. I'll continue to investiguate on this.
    Here is the template code followed by the "child" page code. On the page code, I can't put anything inside the facet using the designer, but using the structure, I can.
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <af:pageTemplateDef var="attrs">
    <af:decorativeBox id="pt_db1">
    <f:facet name="center">
    <af:panelSplitter id="pt_ps1" orientation="vertical"
    splitterPosition="25" positionedFromEnd="true">
    <f:facet name="first">
    <af:panelSplitter id="pt_ps2">
    <f:facet name="first">
    <af:panelAccordion id="pt_pa1">
    <af:showDetailItem text="showDetailItem 1" id="pt_sdi1"/>
    </af:panelAccordion>
    </f:facet>
    <f:facet name="second">
    <af:facetRef facetName="content"/>
    </f:facet>
    </af:panelSplitter>
    </f:facet>
    <f:facet name="second"/>
    </af:panelSplitter>
    </f:facet>
    <f:facet name="top"/>
    </af:decorativeBox>
    <af:xmlContent>
    <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>master</display-name>
    <facet>
    <facet-name>content</facet-name>
    </facet>
    <attribute>
    <attribute-name>Title</attribute-name>
    <attribute-class>java.lang.String</attribute-class>
    <default-value>*Default Title</default-value>
    </attribute>
    </component>
    </af:xmlContent>
    </af:pageTemplateDef>
    </jsp:root>
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:pageTemplate viewId="/templates/master.jspx"
    value="#{bindings.pageTemplateBinding}" id="pt1">
    <f:facet name="content"/>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Edited by: 833334 on Feb 2, 2011 2:28 PM --> Replaced with smaller code that has the same issue.

  • JSF 1.2 tag handler classes in JSF 1.1 environment

    Hi,
    I’m developing a JSF 1.2 application with RSA 7.5.1. When I run it in the WAS 6.1 I get the following exception:
    javax.servlet.ServletException:
    Unable to convert string '#{onebean.onestring}' to class
    javax.el.ValueExpression for attribute title:
    java.lang.IllegalArgumentException:
    Property Editor not registered with the PropertyEditorManager
    at org.apache.jasper.runtime.PageContextImpl.handlePageException
    (PageContextImpl.java:660)etc...
    I think my WAS 6.1 running environment doesn’t admit Tag Handler classes in JSF 1.2 style (you know: Extending UIComponentELTag, with all attributes in the tag class of type valueExpression along with setter methods...).
    In case this suspect is true, is there any tricky way to run this JSF 1.2 components in a JSF 1.1 environment?
    Do you have any ideas to solve this problem without downgrading my JSF tag handler classes from 1.2 to 1.1?
    Thanks a lot!

    Hi BalusC,
    This is the full history:
    I started coding the tag handler classes of my JSF components in the JSF 1.2 way.
    But know, I’am being forced to run the web app that uses those JSF 1.2 components in a WAS 6.1 (servlet 2.4 & jsp 2.0, I suppose).
    Not very elegant solution, I put a ‘servlet2.5-jsp2.1-api.jar’ file in my ‘WebContent\WEB-INF\lib’ directory, and configured a ‘PARENT-LAST’ class loader policy in the server configuration.
    This is my web.xml:
    <?xml version="1.0"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
       <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>When I launch the JSF example page, I get no logs, no messages, ONLY a blank page (¿?)
    Thank you very much for your skilled help!

  • JSF/JSP design view not displaying correctly

    Hi there
    I am using jdeveloper version Studio Edition Version 11.1.1.3.0 on windows 7. When I create a 3 column layout JSF page , the design view does not show 3 columns (This used work properly). Instead
    it shows .
    - <>/oracle/templates/threecolumnTemplate.jspx
    I am used to seeing 3 columns start,middle and end (in blue). I have not changed any configuration settings.
    regards

    What does the source tab shows? what's the actual code of your page?

  • Capture comp controller event n enhancement view - handler not triggered

    Hi,
    Enhanced a std WDA component through the enhancement framework.  Added a view in the enhancement.  This view will be a popup requesting user supplies more details.
    Ive enhanced a std component controller method to fire off a component controller event.  Ive also created an event handler method in the new view and associated with the component controller event.
    Unfortunately the new view method doesnt trigger.  If I add an event handler method to one of the std views through the enhancement framework it does trigger.
    Grateful for any solution/info, cheers!

    Hey,
    Std view A is the active view when the firing of the event occurs within the component controller.  Enhancement view Z is where the event handler method is defined.Defining an event handler method in active view A will be triggered upon component controller event firing, but not event handler method in view Z.  Handling within event view Z (not active/displayed) beyond the realms of WDA eventing?

  • JSF UI component view restore.

    Good day,
    Please help me with my problem.
    The problem is:
    I use this http://myfaces.apache.org/tomahawk/panelNavigation2 to make a menu on my site. Component renered perfect: I can open submenu items, click on them, todo some actions and so on. But if I will be redirected to another page the view of my menu cleared. I mean, that all items collapsed and there is no active menu item what had been clicked.
    How can I realise a component view saving for example in session? I mean, If I click on some item I want to see this item opened after refresh.
    This problem not in http://myfaces.apache.org/tomahawk/panelNavigation2 realisation, because if I use another components of the same type (rich components from JBOSS for example) I have the same....
    Please help me!

    I don't use tomahawk but in other similar components you have a flag or something that controls state, like expanded/collapsed, selectedItem, etc.
    The problem is that the component will remember the state because it saves it internally as a local value. Thus as long as you are using the same view (viewId) the component state is stored in the component tree. The minute you go to another view, that view state is lost.
    The answer is typically to create a managed bean, put it is session scope, and have it hold the view state. That way when you return to the view all of the expanded/collapsed, selectedItem, etc information is restore correctly.

  • JSF lifecycle : render view

    Was just having look at logs of a JSF application, below are the output's from PhaseListener
    RESTORE_VIEW(1)
    APPLY_REQUEST_VALUES(2)
    RESTORE_VIEW(1)
    RENDER_RESPONSE(6)
    How come RESTORE_VIEW is called after APPLY_REQUEST_VALUES, from JSF lifecycle it seems
    that they are executed in certain order(although some can be skipped)
    Regards,
    Joshua

    Multiple requests?
    Without an SSCCE it's only guessing to an answer.

  • A telnet problem

    i create a telnet application.it have two jspx pages:index.jspx and about.jspx
    i test each page in cmd console ,all go right.
    A problem is i cann't navigate from index.jspx to about.jspx,or from about.jspx to index.jspx. i have no idea.
    my face-config.xml :
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <application>
    <view-handler>oracle.adf.view.faces.application.industrial.TelnetViewHandlerImpl</view-handler>
    <default-render-kit-id>oracle.adf.core</default-render-kit-id>
    </application>
    <navigation-rule>
    <from-view-id>/index.jspx</from-view-id>
    <navigation-case>
    <from-outcome>about</from-outcome>
    <to-view-id>/about.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/about.jspx</from-view-id>
    <navigation-case>
    <from-outcome>home</from-outcome>
    <to-view-id>/index.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    any idea can help me

    yes,it's right.
    my web.xml:
    <?xml version = '1.0' encoding = 'GBK'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    </web-app>

Maybe you are looking for

  • Event structures used to monitor indicator change

    I am new to the event structure. Is it possible to monitor an indicator for a value change?  I know this works with controls, but I'm not sure you can monitor and indicator in this way. Thanks, -Nathan

  • Is there any way to delete a run from my iTunes Nike+iPod history?

    I'm using a shoe "hack" for my chip, which unfortunately didn't work -- resulting in a 58minute run that only clocked in .6miles on my nano. I've deleted the run from the iPod itself, but not before I synched with my iTunes. So now I have an erroneou

  • Oracle Text Search Problem

    hi, we have implemented oracle text search. When trying to search a keyword contains in Adobe Reader 7.0 pdf version no search result is showing while the same keyword search is showing the pdf file which is in Adobe Reader 6.0. Can any one please he

  • Multiple clients in DEV and QA for CHARM setup

    Blog /people/dolores.correa/blog/2008/07/26/first-steps-to-work-with-change-request-management-scenario is an excellence introduction to CHARM setup. However in real world, we have multiple clients on DEV and QAS systems. Could you help explain how t

  • 11g SOA Composite Rules Error - Rule session pool object does not exist

    Hi all, I'm hoping someone has experienced this and found a way through it. We're looking at exposing Oracle Rules DecisionFunctions via the automagically created web services in JDeveloper. We've tried several Rules examples, including the OrderAppr