How to custom a conversion error in JSF page in JDeveloper

According to the book "Core JavaServer Faces" p213 (fifth edition), if I add the following line to messages.properties file, and specifiy it in the faces-config.xml and .jsp file, then the displayed conversion error message should be my tailored one instead of the default. However, I still get the default error message. Besides, I didn't find "CONVERSION" variable in UIInput class. Is the book wrong? And what's the correct way?
javax.faces.component.UIInput.CONVERSION=Please correct your input

I didn't choose any special in JDeveloper IDE. I just selected "new" to create a file called "message.properties" and put the line there. I didn't specify converters excepts declaring the type in the Jave Beans. I guess the converting is done by the JSF framework automatically. It must be a JSF converter since I created the page as a JSF page.

Similar Messages

  • How to design a complicated and attractive jsf pages in jdeveloper

    Hi All,
    I have tried to deisgn jsf pages to looking attractive. But i cannot able to achieve that and it took me more time to design little complicated.
    Can anyone refer me any link or tell me how to design more complicated page.
    what is the layout procedure for that.
    My jdev version - 11.1.2.0.0
    Thanks in advance,
    SAN

    san-717 wrote:
    Hi All,
    I have tried to deisgn jsf pages to looking attractive. But i cannot able to achieve that and it took me more time to design little complicated.
    Can anyone refer me any link or tell me how to design more complicated page.
    what is the layout procedure for that.Well… there's a lot to this. First, you'll have to have an idea of what should be on your page; how it is presented is ultimately a design decision, not one of layout. Once you have a design (paper sketches?), then you can proceed to start 'cutting up' your designs into larger components. Perhaps your applicaiton will have a larger page template that holds 'content' of other pages/page fragments.
    (If you're coming from OAF, for example, this is a pretty big difference - in ADF page design is very flexible, and how information is presented is largely up to developers/designers. There's no single method for laying out a page.)
    To add to the link above, there is also a list of 'design patterns' than can help with some common problems and ways of presenting information:
    http://www.oracle.com/technetwork/topics/ux/applications/gps-1601227.html

  • How to use Apache MyFaces components in JSF pages + Eclipse?

    I've managed to write my JSF web app. in Eclipse jee, and test it on JBoss 4.2 GA, within Eclipse, but how to import Apache MyFaces components into Eclipse JSF plug-in?
    If I can't import it nicely, how to use those components directly in JSF pages?

    The Tomahawk component library provides MyFaces components. Install it as you would any other component library.
    http://myfaces.apache.org/tomahawk/

  • How to fire an event dynamically in JSF Page

    Hi All
    How to fire an event dynamically in JSF Page?
    Thanks
    Sudhakar

    Hi,
    Thanks for the response. I mean to say, if I create the components dynamically then how can I fire events for those components.
    In otherwords,
    If I create the Button dynamically with particular ID being set to that component, then how can I call button action event when the button is clicked??
    Hope you understand
    What is the role of MethodBinding mechanism here??
    Thanks
    Sudhakar Chavali

  • How to display date and time on jsf page

    Hi,
    how to display date and time on jsf page
    we are using 11.2.0.0 jdeveloper on windows.
    thanks
    Edited by: user12187801 on 26-Jul-2012 01:42

    Your question is certainly lacking some information.
    If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
    If you meant something else, then it's back to you to explain.

  • 404 error access JSF pages

    Hello,
    When I was running my JSF application through the embeded Tomcat 6.0.18 server in Netbeans 6.5.1 all worked fine. After deploying the *.WAR file to the stand alone Tomcat 6.0.18 server I get a 404 error when I access the jsf pages. The default page at http://localhost:8080 work fine and so does the servlet in the same webapp as my jsfs. I tried downloading the JSF & JSTL frameworks and placing the contents of their lib directory into TOMCATHOME/lib and restarted the server - no effect
    Pls Help ! Thnx
    (URL im using to access one of the jsf pages is http://localhost:8080/LUIDManager/LUID_Config_List.jsf)
    Here is my web.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" 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">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
        <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>initServlet</servlet-name>
            <servlet-class>Servlets.initServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>initServlet</servlet-name>
            <url-pattern>/initServlet</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>forwardToJSF.jsp</welcome-file>
            </welcome-file-list>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/luidregistry</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
        </web-app>Edited by: paulchwd on Apr 15, 2009 5:01 PM

    Thnx for your reply. Not sure what Faclets are. I added the JSF 1.2 framework from Netbeans into my project. I am also an idiot :)
    The links the servlet generates to take me to the JSFs had a typo - wrong port #
    Thnx for the help

  • HTTP 500 internal server error with jsf pages in OC4J 10.1.2

    Hi all. I am trying to use the Sun RI o fJSF1.1 together with a standalone OC4J 10.1.2. My jsf pages are not being displayed. Any clues.

    Hi ,
      Please answer my following questiosn.
    1)  which PI version are you using?
    2) How many J2EE nodes you have.
    please be reminded that SOAP is not for the heavy messages. Then you need to increase your timeout parameters from BASIS.
    Rgds
    Veeru
    Edited by: viru srivastava on Dec 14, 2010 10:18 PM

  • Javascript error in jsf page.

    Hi,
    I am trying to Do post form a script function in a jsf page. I am using the trh:script tag for adding the script. But when run it i am getting a lot of errors saying that the attributes cannot be recognised. I am trying to send a xml updated with some data after the click of a button to the server. Though its not showing any any errors when not run.
    Below is the code i am using :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad/html" prefix="trh"%>
    <%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>
    <%@ taglib uri="http://xmlns.oracle.com/dss/trinidad/faces" prefix="dvtt"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>
    <f:view>
    <trh:script text="
    var endpointURL = "http://localhost:7101/services/MobileManagerService";
    var xmlstring = '<?xml version="1.0"encoding="UTF-8"?>\
    <notifications>\
         <notification>\
              <id>1<\/id>\
                   <status>CLOSE<\/status>\               
              <\/notification>\
         <\/notifications>';
    var xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml");
    var stautsXml = (new XMLSerializer()).serializeToString(xmlobject);
    alert(stautsXml);
    var http_request = false;
    function makePOSTRequest(method, url, parameters) {
    http_request = false;
    if(window.XMLHttpRequest) { // Mozilla, Safari,...
    http_request = new XMLHttpRequest();
    if (http_request.overrideMimeType) {
    // Set type accordingly to anticipated content type.
    http_request.overrideMimeType('text/xml');
    // http_request.overrideMimeType('text/html');
    } else if (window.ActiveXObject) { // IE
    try {
    http_request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
    try {
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {}
    if (!http_request) {
    alert('Cannot create XMLHttpRequest object');
    return false;
    http_request.onreadystatechange = alertContents;
    // http_request.open(method, url, true);
    if(method=='GET'){
    http_request.open(method, url + parameters, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(null);
    if(method=='POST') {
    http_request.open(method, url, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
    if(method=='PUT') {
    http_request.open(method, url, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(parameters);
    if(method=='DELETE') {
    http_request.open(method, url+parameters, true);
    http_request.setRequestHeader("Content-type", "text/xml");
    http_request.setRequestHeader("Content-length", parameters.length);
    http_request.setRequestHeader("Connection", "close");
    http_request.send(null);
    function alertContents() {
    if (http_request.readyState == 4) {
    if (http_request.status == 200) {
    alert('Response received from server:\n'+http_request.responseText);
    result = http_request.responseText;
    // Turn < and > into &lt; and &gt; for displaying on the page.
    result = result.replace(/\<([^!])/g, '&lt;$1');
    result = result.replace(/([^-])\>/g, '$1&gt;');
    document.getElementById('serverresponse').innerHTML = result;
    } else {
    alert('There was a problem with the request.'
    +http_request.responseText +' '+http_request.status);
    document.getElementById('serverresponse').innerHTML = http_request.responseText;
    function postApproveForm() {
    var poststr = stautsXml ;
    alert('Sending XML to server:\n'+poststr);
    makePOSTRequest('POST', endpointURL , poststr);
    "/>
    <trh:html id="h2">
    <trh:head title="ApproveAlerts" id="h1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <link type="text/css" rel="stylesheet" href="css/iPhone.css"/>
    </trh:head>
    <trh:body id="b1">
    <!-- <jsp:useBean id="IdBean" class="oracle.application.IdBean" scope="application"/> -->
    <af:messages id="m1"/>
    <trh:body styleClass="body" id="b2">
    <!-- <td><input type="button" name="Approve" value="Approve" onclick="javascript:approveAlert();"></td> -->
    <td>
    <input type="button" name="Approve" value="Approve" onclick="postApproveform();" </input>
    </td>
    <af:outputText id="ot1" value='"#{requestScope.myId}"'/>
    </trh:body>
    </trh:body>
    </trh:html>
    </f:view>
    Do i need to add some taglib or something to make it work ?
    Regards
    Sishant
    Edited by: user784337 on May 24, 2010 3:37 AM

    Because :
    Session.getAtrribute is java-code that can only run on the server
    and
    var y = session.getAttribute is javascript-code run on the client.

  • Error loading JSF page popup window - Cannot find FacesContext

    Hello,
    I am trying to load a popup window from my Visual Web JSF page. The popup window itself will be a Visual Web JSF page also.
    As an example, i have 2 buttons on my original page with jsp tags as follows::
    <webuijsf:button binding="#{Page1.button1}" id="button1" onClick="window.showModelessDialog('./PopupPage.jsp'); return false;"
    style="left: 19px; top: 16px; position: absolute" text="Button"/>
    <webuijsf:button actionExpression="#{Page1.button2_action}" binding="#{Page1.button2}" id="button2"
    onClick="window.showModelessDialog('./PopupPage.jsp');" style="position: absolute; left: 20px; top: 44px" text="Button"/>
    When i click Button1, the popup window appears but will not load the page within the window. I get the following report in the server log:
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
    at org.apache.jsp.PopupPage_jsp._jspx_meth_f_view_0(PopupPage_jsp.java from :102)
    at org.apache.jsp.PopupPage_jsp._jspService(PopupPage_jsp.java from :77)
    ETC ETC
    If i click Button2 (which does NOT return false in the onclick Script and thus submits the first page) the first attempt fails with the same error, but if i try a second time the popup window displays and loads the page correctly.
    Any solutions would be greatly appreciated as this is driving me crazy :-s
    Edited by: coxy69 on Jan 9, 2008 10:29 PM

    Cannot find FacesContextThis generally indicates that you invoked a request which points to a JSP page which contains JSF tags, but that the request itself isn't passed through the FacesServlet. Make sure that the request URL is covered by the url-pattern setting of the FacesServlet in the web.xml.

  • How to set content type for a JSF page

    Hi,
    I want to know is there any way we can specify the content type of a JSF page, like in JSPs we have the page attribute <%@ page contentType="application/vnd.ms-excel" %>
    In JSP we can create a html table with values and if we specify the contenType as application/vnd.ms-excel, we would get an excel file generated.
    But do we have something similar to this is JSF, as I am using Facelets I cannot use page directive in the xhtml file.
    I tried setting the content type in MangedBean's action as follows
    ((HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse()).setContentType("application/vnd.ms-excel"); but it did'nt work.
    Thanks in advance.

    //add related mutip-part to combine parts
    MimeMultipart multipart = new MimeMultipart("related");
    //attach a pdf
    messageBodyPart = new MimeBodyPart();
    fds = new FileDataSource("h:/something.pdf");
    messageBodyPart.setDataHandler(new DataHandler(fds));
    messageBodyPart.setFileName(fds.getName());
    multipart.addBodyPart(messageBodyPart);
    //add multipart to the message
    message.setContent(multipart);
    //send message
    Transport.send(message);

  • How to get the initial state of JSF PAGE IN ORACLE ADF

    Hi everybody
    my Jdeveloper version is 12.1.3
    I'm building my JSF pages based on a template that has a navigation pane which contains command navigation items , every one of them (command navigation items) appears as a link at runtime and calls a JSF page , I wish to get the initial state for any page when leaving it then entering such page again , and I would like to know what is the suitable place to write the code to do this task.
    many thanks !

    Clear the cache by adding the following to each jsf page.
    <%
    response.setHeader("Cache-Control","no-cache"); 
    response.setHeader("Pragma","no-cache");
    %>

  • How to align the components in a jsf page?

    Hi all,
    In my use case I need to use three UI components like push down menu
    a textbox and a button. when I dragged all the things on to my jsf page
    I am getting one by one.( I mean to say that I am getting button beneath pushdown
    and pushdown beneath the text box)
    I want all these components adjacent to each other.Kindly come up with the suggestions.
    Thanks,
    Phani.

    These three components surround with af:panelGroupLayout and set af:panelGroupLayout layout property to horizontal (you can find layout property in common section of Property Inspector).

  • How to place an applet in a jsf page

    Hello all.
    I try to place an applet on a specific place in my jsf page, as example in a table or
    something else. My resulting test-code looks like this:
    <f:view>   
         <h:form id="registrationForm">
         <h:panel_grid headerClass="panel-background" footerClass="panel-background">
                   <h:column>                    
                        <h:output_text value="My Applet:"/>
                   </h:column>     
                   <h:column>
                        <jsp:plugin type="applet" code="smartcard.SmartCardApplet"
                             archive="/sharedlib/SmartCardApplet_signed.jar"
                                  name="SmartCardApplet" width="360" height="120">
                        </jsp:plugin>
                   </h:column>     
         </h:panel_grid>
         <h:command_button styleClass="style-button" id="register" value="Register"
              action="#{MyBean.register}"/>
         </h:form>
    </f:view>
    ...But on the resulting page in my browser the applet has been placed on the top of the
    page instead in the table. What is going wrong? Does anyone have an idea?
    Thanks
    Phil

         <h:form id="registrationForm">
         <h:panel_grid headerClass="panel-background" footerClass="panel-background">
                   <h:column>                    
                        <h:output_text value="My Applet:"/>
                   </h:column>     
                   <h:column>
                        <f:verbatim escape="false">
                        <jsp:plugin type="applet" code="smartcard.SmartCardApplet"
                             archive="/sharedlib/SmartCardApplet_signed.jar"
                                  name="SmartCardApplet" width="360" height="120">
                        </jsp:plugin>
                        </f:verbatim>
                   </h:column>     
         </h:panel_grid>
         <h:command_button styleClass="style-button" id="register" value="Register"
              action="#{MyBean.register}"/>
         </h:form>
    <table>
    <tbody><tr>
    <td>My Applet:</td>
    </tr>
    <tr>
    <td><OBJECT classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93 name="SmartCardApplet" width="360" height="120" codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    <PARAM name="java_code" value="smartcard.SmartCardApplet">
    <PARAM name="java_archive" value="/sharedlib/SmartCardApplet_signed.jar">
    <PARAM name="type" value="application/x-java-applet;">
    <COMMENT>
    <EMBED type="application/x-java-applet;" name="SmartCardApplet" width="360" height="120" pluginspage="http://java.sun.com/products/plugin/" java_code="smartcard.SmartCardApplet" java_archive="/sharedlib/SmartCardApplet_signed.jar"/>
    <NOEMBED>
    </NOEMBED>
    </COMMENT>
    </OBJECT></td>
    </tr>
    </tbody></table>

  • How to use ocx with javascript in jsf page

    Hello,
    Please i create a jsf page which purpose is to scan.
    I used in a source of my jsf page an OCX with object tag like
    <OBJECT ID="Ranger"
    CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
    </OBJECT>
    i wrote my functions which use this ocx in javascript. Function that i call with clientlistener rear adf button
    but it doesn't work
    Could you please help me please VERY IMPORTANT

    This my html code:
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportNewState(newState,previousState)>  
    // Transport new state, fired every time the State changes on the control
    // input params , are the new state and the previous state
    //alert(newState);
    var RangerTransportStates = {TransportUnknownState: -1, TransportShutDown: 0, TransportStartingUp: 1,
                                  TransportChangeOptions: 2, TransportEnablingOptions: 3, TransportReadyToFeed: 4,
                                  TransportFeeding: 5, TransportExceptionInProgress:6, TransportShuttingDown: 7};
    if(newState == RangerTransportStates.TransportShutDown)
          document.getElementById('StartRanger').disabled = false;
          document.getElementById('EnableRanger').disabled = true;
          document.getElementById('StopFeeding').disabled = true;
          document.getElementById('StartFeeding').disabled = true;
          document.getElementById('ChangeOptions').disabled = true;
          document.getElementById('Shutdown').disabled = true;     
          document.getElementById('UserInstructions').innerHTML = "Press 'Startup Ranger' to initialize the Ranger control"
    if(newState == RangerTransportStates.TransportChangeOptions)
          document.getElementById('StartRanger').disabled = true;
          document.getElementById('StartFeeding').disabled = true;
          document.getElementById('EnableRanger').disabled = false;
          document.getElementById('Shutdown').disabled = false;
          document.getElementById('UserInstructions').innerHTML = "<b>Ranger Started</b> <br> Press 'Enable Ranger' to enable the current Ranger Options and prepare to start feeding"
    if(newState == RangerTransportStates.TransportReadyToFeed)
          document.getElementById('EnableRanger').disabled = true;
          document.getElementById('StopFeeding').disabled = true;
          document.getElementById('StartFeeding').disabled = false;
          document.getElementById('ChangeOptions').disabled = false;
          document.getElementById('Shutdown').disabled = false;
          document.getElementById('UserInstructions').innerHTML = "<b>Ready to feed </b><br> Press 'Start Feeding' to start Ranger Feeding checks from main hopper"
    if(newState == RangerTransportStates.TransportFeeding)
          document.getElementById('StartFeeding').disabled = true;
          document.getElementById('ChangeOptions').disabled = true;
          document.getElementById('Shutdown').disabled = true;
          document.getElementById('StopFeeding').disabled = false;     
          document.getElementById('UserInstructions').innerHTML = "<b>Feeding... </b><br> Press 'Stop Feeding' to stop Ranger from Feeding checks"
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportChangeOptionsState(previousState)>  
    //Fired when Ranger reaches the change option state, input params are previous state
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportReadyToFeedState(previousState)>  
    //Fired when ranger is ready to feed the next item
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportFeedingStopped(reason,itemsFed,itemsrequested)>  
    //Fired when feeding has stopped
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportItemInPocket(itemID)>  
    //Fired when the item has been fed into the pocket
    var RangerSides = {TransportFront: 0, TransportRear: 1};
    var RangerImageColorTypes = {ImageColorTypeBitonal:0, ImageColorTypeGrayscale: 1, ImageColorTypeColor: 2};
    // Note: SaveImageToFile() below is used to save gray scale images.  Please verify that 'NeedFrontImage2' and
    //       'NeedRearImage2' are set to 'true' in the GenericOptions.ini file.  If bitonal images are to be saved,
    //       please set 'NeedFrontImage1'/'NeedRearImage1' to 'true' before calling SaveImageToFile() for bitonal images.
    document.getElementById('MICR').innerHTML = 'MICR: ' + Ranger.GetMicrText(1);
    temp = Ranger.SaveImageToFile(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale, "C:\\test\\Testfront.jpg");
    temp = Ranger.SaveImageToFile(RangerSides.TransportRear, RangerImageColorTypes.ImageColorTypeGrayscale,"C:\\test\\Testback.jpg");
    //Here you could check to see if the images were saved, putting alternate
    //text in place of the image if they werent saved.
    document.getElementById('PIC').innerHTML = '<img height=200 width=400 src=' + '"Testfront.jpg">' + '<br>' + '<img height=200 width=400 src=' + '"Testback.jpg">';
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportNewItem()>  
    // Fired when a new item has entered the track
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportShutDownState(currentState,previousState)>  
    //Fired when the Ranger control has been shutdown
    getstatus();
    </SCRIPT> 
    <SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportSetItemOutput(itemID)>  
    //fired when the item is ready to have params set(pocketing decisions)
    getstatus();
    </SCRIPT> 
    <!-- End of Events ------------- -->
    <SCRIPT LANGUAGE="javascript">
    function getstatus()
         document.getElementById('Status').innerHTML = 'Status: ' + Ranger.GetTransportStateString();
    </SCRIPT>
    </head>
    <body>
    <OBJECT ID="Ranger"
    CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
    </OBJECT>
    <div id="container">
         <div id="banner" >
         </div>
         <div id="left">
              <h2>Ranger Control Buttons</h2>
              <br><div id="Status">Status:</div><br>
              <input class="controlbutton" id="StartRanger" type=button value="Startup Ranger" onclick="Ranger.Startup();">
              <input class="controlbutton" id="EnableRanger" disabled type=button value="Enable Ranger" onclick="Ranger.EnableOptions();">
              <input class="controlbutton" id="StartFeeding" disabled type=button value="Start Feeding" onclick="Ranger.StartFeeding(0,0);">
              <input class="controlbutton" id="StopFeeding" disabled type=button value="Stop Feeding" onclick="Ranger.StopFeeding();">
              <input class="controlbutton" id="ChangeOptions" disabled type=button value="Change Options" onclick="Ranger.PrepareToChangeOptions();">
              <input class="controlbutton" id="Shutdown" disabled type=button value="Shutdown Ranger" onclick="Ranger.Shutdown();">
         </div>
         <div id="content">
              <div id="UserInstructions">Press 'Startup Ranger' to initialize the Ranger control</div>
              <br>
              <div id="MICR"></div>
              <br>
              <div id="PIC"></div>
         </div>
         <div id="footer"><h1>Ranger Control</h1></div>
    </div>
    them jsf code:
    <f:view>
    <OBJECT ID="Ranger"
        CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
    </OBJECT>   
      <af:document id="d1" title="Fiche Bordereau">
        <af:messages id="m1"/>
        <af:form id="f1">
          <af:pageTemplate viewId="/tempCompens.jspx" id="pt1">
           <af:resource type="javascript">
            // Transport new state, fired every time the State changes on the control
            // input params , are the new state and the previous state
            //alert(newState);
            var RangerTransportStates = {TransportUnknownState: -1, TransportShutDown: 0, TransportStartingUp: 1,
                                  TransportChangeOptions: 2, TransportEnablingOptions: 3, TransportReadyToFeed: 4,
                                  TransportFeeding: 5, TransportExceptionInProgress:6, TransportShuttingDown: 7};
            ok =false;
            var i = 0;
            if(newState == RangerTransportStates.TransportShutDown)
                document.getElementById('btn_demarre').disabled = false;
                document.getElementById('btn_active').disabled = true;
                document.getElementById('btn_arretscan').disabled = true;
                document.getElementById('btn_scan').disabled = true;
                document.getElementById('btn_changetat').disabled = true;
                document.getElementById('btn_arret').disabled = true;
                document.getElementById('UserInstructions').value = "Appuyer sur Demarrer pour initiliser le scanner"
            if(newState == RangerTransportStates.TransportChangeOptions)
                document.getElementById('btn_demarre').disabled = true;
                document.getElementById('btn_scan').disabled = true;
                document.getElementById('btn_active').disabled = false;
                document.getElementById('btn_arret').disabled = false;
                document.getElementById('UserInstructions').value = "Demarrage... Appuyer sur Activer pour preparer le scanning "
                ok = false;
            if(newState == RangerTransportStates.TransportReadyToFeed)
                document.getElementById('btn_active').disabled = true;
                document.getElementById('btn_arretscan').disabled = true;
                document.getElementById('btn_scan').disabled = false;
                document.getElementById('btn_changetat').disabled = false;
                document.getElementById('btn_arret').disabled = false;
                document.getElementById('UserInstructions').value = "Pret a scanner.   Appuyer sur Scanner pour lancer le scanning"
                ok = true;
            if(newState == RangerTransportStates.TransportFeeding)
                document.getElementById('btn_scan').disabled = true;
                document.getElementById('btn_changetat').disabled = true;
                document.getElementById('btn_arret').disabled = true;
                document.getElementById('btn_arretscan').disabled = false;
                document.getElementById('UserInstructions').value = "Scanning...  Appuyer sur Arret scanning pour stopper le scanning"
            getstatus();
           </af:resource>
           <af:resource type="javascript">
            //Fired when the item has been fed into the pocket
                var RangerSides = {TransportFront: 0, TransportRear: 1};
                var RangerImageColorTypes = {ImageColorTypeBitonal:0, ImageColorTypeGrayscale: 1, ImageColorTypeColor: 2};
            //alert(Ranger.GetGenericOptionFileName());
                Ranger.SetGenericOption("OptionalDevice","NeedFrontImage1",true);
                Ranger.SetGenericOption("OptionalDevice","NeedRearImage1",true);
                document.getElementById('cmc7').value = 'CMC7= '+Ranger.GetMicrText(1);
                var cmc7 = trim(Ranger.GetMicrText(1));
                cmc7 = cmc7.replace(" ","_");
                cmc7 = cmc7.replace(" ","_");
            //cmc7 = cmc7.substring(0,15);
                cmc7R = cmc7+"_R.jpg";
            //alert(Ranger.GetImageAddress(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale))
                function trim(myString)
                    return myString.replace(/^\s+/g,'').replace(/\s+$/g,'')
                temp = Ranger.SaveImageToFile(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale, "C:\\Documents and Settings\\Koffi Ernest\\Mes documents\\NetBeansProjects\\Scan-project\\web\\"+cmc7R);
                window.onload = function()
                  document.getElementById("verso").src = monfichierV();
                function monfichierR()
                //  nomfichier = nomfichier+"_R.jpg";
                    var nomfichier = trim(Ranger.GetMicrText(1))+"_R.jpg";
                    return  nomfichier
                cmc7V = cmc7+"_V.jpg";
                temp = Ranger.SaveImageToFile(RangerSides.TransportRear, RangerImageColorTypes.ImageColorTypeGrayscale,"C:\\Documents and Settings\\Koffi Ernest\\Mes documents\\NetBeansProjects\\Scan-project\\web\\"+cmc7V);
                window.onload = function()
                    document.getElementById("verso").src = monfichierV();
                function monfichierV()
                    var nomfichierV = trim(Ranger.GetMicrText(1))+"_V.jpg";
                    return nomfichierV
                function getRImageUrl(img)
                    var imageSrc = trim(Ranger.GetMicrText(1))+"_R.jpg";
                    if(img.src != imageSrc)
                    // don't get stuck in an endless loop
                    img.src = imageSrc;
                function getVImageUrl(img)
                 var imageSrc = trim(Ranger.GetMicrText(1))+"_V.jpg";
                 if(img.src != imageSrc)
                 { // don't get stuck in an endless loop
                  img.src = imageSrc;
            document.getElementById('recto').source = cmc7R;
            document.getElementById('verso').source = cmc7V;
            getstatus();
           </af:resource>
            <af:resource type="javascript">
                 document.getElementById('status').value = Ranger.GetTransportStateString();
            </af:resource>
            <f:facet name="temp">
              <af:panelSplitter id="ps1" splitterPosition="329"
                                inlineStyle="width:709px;">
                <f:facet name="first">
                  <af:panelGroupLayout layout="scroll"
                                       xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                       id="pgl5">
                    <af:panelGroupLayout id="pgl1">
                      <af:outputText value="Saisie des informations du bordereau"
                                     id="ot1"
                                     inlineStyle="font-size:small; font-family:inherit; color:Gray; font-weight:bold;"/>
                    </af:panelGroupLayout>
                    <af:panelFormLayout id="pfl1">
                      <f:facet name="footer">
                        <af:panelGroupLayout id="pgl4" layout="horizontal">
                          <af:commandButton text="Annuler" id="cb4"/>
                          <af:spacer width="5" height="10" id="s14"/>
                          <af:commandButton text="Scanner" id="cb5"
                                            action="success"/>
                        </af:panelGroupLayout>
                      </f:facet>
                      <af:spacer width="10" height="30" id="s2"/>
                      <af:panelGroupLayout id="panelGroupLayout1"
                                           layout="horizontal" valign="middle">
                        <af:inputText label="N° de compte                   " id="it1"/>
                        <af:spacer width="10" height="10" id="s16"/>
                        <af:commandButton text="..." id="cb3"/>
                      </af:panelGroupLayout>
                      <af:spacer width="5" height="3" id="s12"/>
                      <af:panelGroupLayout id="pgl2" layout="horizontal"
                                           valign="middle">
                        <af:inputText label="Nom du client         " id="it3"/>
                      </af:panelGroupLayout>
                      <af:spacer width="5" height="3" id="s17"/>
                      <af:panelGroupLayout id="pgl11" layout="horizontal"
                                           valign="middle">
                        <af:inputText label="N° bordereau    " id="it4"/>
                        <af:spacer width="5" height="10" id="s11"/>
                        <af:commandButton text="New" id="cb1"/>
                        <af:spacer width="2" height="10" id="s13"/>
                        <af:commandButton text="Find" id="cb2"/>
                      </af:panelGroupLayout>
                      <af:spacer width="5" height="3" id="s18"/>
                      <af:panelGroupLayout id="pgl3">
                        <af:inputText label="Nbre de chèque" id="it2"/>
                        <af:spacer width="5" height="3" id="s19"/>
                        <af:inputDate label="Date d'operation                  " id="id1"/>
                      </af:panelGroupLayout>
                      <af:spacer width="1000" height="10" id="s1"/>
                    </af:panelFormLayout>
                  </af:panelGroupLayout>
                </f:facet>
                <f:facet name="second">
                  <af:panelGroupLayout layout="scroll"
                                       xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                       id="pgl6">
                    <af:outputText value="Resultat scanning" id="ot2"
                                   inlineStyle="font-size:small; font-weight:bold; color:Gray;"/>
                    <af:panelTabbed id="pt2"
                                    inlineStyle="height:498px; width:680px;">
                      <af:showDetailItem text="Scanning" id="sdi1">
                        <af:panelSplitter id="ps2" splitterPosition="103"
                                          inlineStyle="width:433px; height:436px;">
                          <f:facet name="first">
                            <af:panelGroupLayout id="pgl7" layout="vertical">
                              <af:outputText value="Liste de contrôles" id="ot3"
                                             inlineStyle="font-weight:bold; color:Gray;"/>
                              <af:spacer width="10" height="10" id="s20"/>
                              <af:outputText id="status"/>
                              <af:spacer width="10" height="10" id="s8"/>
                              <af:commandButton text="Demarrer      "
                                                id="btn_demarre">
                                <af:clientListener type="click"
                                                   method="Ranger.Startup()"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s7"/>
                              <af:commandButton text="Activer              "
                                                id="btn_active"
                                                disabled="true">
                                <af:clientListener method="Ranger.EnableOptions()"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s6"/>
                              <af:commandButton text="Scanner       "
                                                id="btn_scanne"
                                                disabled="true">
                                <af:clientListener method="Ranger.StartFeeding(0,0)"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s3"/>
                              <af:commandButton text="Arrêt Scan   "
                                                id="btn_arretscan"
                                                disabled="true">
                                <af:clientListener method="Ranger.StopFeeding()"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s4"/>
                              <af:commandButton text="Changer Etat"
                                                id="btn_changetat"
                                                disabled="true">
                                <af:clientListener method="Ranger.PrepareToChangeOptions()"
                                                   type="click"/>
                              </af:commandButton>
                              <af:spacer width="10" height="10" id="s5"/>
                              <af:commandButton text="Arrêter         "
                                                id="btn_arret"
                                                disabled="true">
                                <af:clientListener method="Ranger.Shutdown()"
                                                   type="click"/>
                              </af:commandButton>
                            </af:panelGroupLayout>
                          </f:facet>
    ....Edited by: nesta on 21 juil. 2010 07:07

  • Getting Insufficient Privileges Error while running Pages in Jdeveloper

    Hi,
    When I am running my pages in JDeveloper, I am getting the Error:
    "You have insufficient privileges for the current operation." and the Application login page is being shown.
    Looking at the log window, I see that the system expects my page to be shown correctly. However the login screen gets displayed.
    I suspected that my login/password is incorrect in Jdeveloper Project settings. But I tried that. It is finw. Any suggestions as to what the problem might be would be great.
    Please find excerpts from the Jdev log window:
    [328] Connected to Oracle JBO Server - Version: 9.0.3.13.88
    [329] Loading from /lalith/oracle/apps/xxtmg/graph/server/server.xml file
    [330] Loading from indvidual XML files
    [331] Loading the Containees for the Package 'lalith.oracle.apps.xxtmg.graph.server.server'.
    [332] Loading from /lalith/oracle/apps/xxtmg/graph/server/GraphAM.xml file
    [333] Created root application module: 'lalith.oracle.apps.xxtmg.graph.server.GraphAM'
    [334] Locale is: 'en_US'
    [335] DefaultConnectionStrategy is establishing an application module connection
    [336] mUsePersColl is false
    [337] ViewObjectImpl.mDefaultMaxRowsPerNode is 70
    [338] ViewObjectImpl.mDefaultMaxActiveNodes is 30
    [339] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    [340] Successfully logged in
    [341] JDBCDriverVersion: 9.2.0.5.0
    [342] DatabaseProductName: Oracle
    [343] DatabaseProductVersion: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, OLAP and Data Mining options
    [344] Root application module, lalith.oracle.apps.xxtmg.graph.server.GraphAM, was created at 2007-01-02 14:08:08.391
    [345] setConnectionReleaseLevel - Set connection release level to 0
    [346] OAApplicationPoolImpl.setConnectionReleaseLevel was called with isReleased = false, isReserved = false
    [347] setConnectionReleaseLevel - Set connection release level to 0
    [348]
    <ICX_SessionValues_Diagnostics - ICX Cookie = m6BVBr6qeAiK1S9ptOKjFou1:S>: WebRequestUtil.validateContext is called.
    [349]
    <ICX_SessionValues_Diagnostics - ICX Cookie = m6BVBr6qeAiK1S9ptOKjFou1:S>: WebRequestUtil.validateContext returned status = VALID.
    ICX Session Values after WebRequestUtil.validateContext:
    ============================================================
    <ICX_SessionValues_Diagnostics - ICX Cookie = m6BVBr6qeAiK1S9ptOKjFou1:S>:
    Current ICX Session (Oracle Applications User Session) Values:
    1. User ID (DB, ICX_SESSIONS) = 6
    2. Responsibility ID (DB, ICX_SESSIONS) = -1
    3. Responsibility Application ID (DB, ICX_SESSIONS) = -1
    4. Org ID (DB, ICX_SESSIONS) = 132
    5. Org ID (DB, CLIENT_INFO) = 132
    6. Org ID (ProfileStore.getProfile) = 132
    7. Org ID (ProfileStore.getSpecificProfile with new ICX_SESSIONS values) = 132
    8. Employee ID (DB, FND_GLOBAL.EMPLOYEE_ID) = -1
    9. Employee ID (AppsContext.getFNDGlobal) = -1
    10. Function ID (DB, ICX_SESSIONS) = -1
    11. Security Group ID (DB, ICX_SESSIONS) = -1
    ===========================================================
    [350] New Language Code = null
    [351] Current Language Code = US
    [352] ViewDefImpl_1_2>#q computed SQLStmtBufLen: 64, actual=24, storing=54
    [353] select sysdate from dual
    [354] **********oracle.jdbc.driver.OraclePreparedStatement@11abd68
    [355] Column count: 1
    [356] Column count: 1
    [357] ViewObject : Created new QUERY statement
    [358] ViewDefImpl_1_2>#q old SQLStmtBufLen: 54, actual=24, storing=54
    [359] select sysdate from dual
    [360] ViewObject close prepared statements...
    [361] Loading from /oracle/apps/ak/region/server/server.xml file
    [362] Loading from indvidual XML files
    [363] Loading the Containees for the Package 'oracle.apps.ak.region.server.server'.
    [364] Loading from /oracle/apps/ak/region/server/AkAmParameterRegistryVO.xml file
    [365] ViewDef: oracle.apps.ak.region.server.AkAmParameterRegistryVO using glue class
    [366] Column count: 2
    [367] ViewObject : Created new QUERY statement
    [368] AkAmParameterRegistryVO>#q computed SQLStmtBufLen: 140, actual=100, storing=130
    [369] select PARAM_NAME, PARAM_SOURCE
    from AK_AM_PARAMETER_REGISTRY
    where APPLICATIONMODULE_DEFN_NAME = :1
    [370] Binding param 1: lalith.oracle.apps.xxtmg.graph.server.GraphAM
    [371] OAApplicationPoolImpl.setConnectionReleaseLevel was called with isReleased = true, isReserved = true
    JRAD_PERF : /lalith/oracle/apps/xxtmg/graphs/webui/GraphPG - processRequest : 1313ms
    We have recently migrated our 9i database to 10G database. Is it something related to that?
    Thanks

    Check whether the following thread helps.
    Re: Error: You have insufficient privileges for the current Operation.

Maybe you are looking for