WEBUTIL_C_API Demo Form

A number of people have asked me about WEBUTIL_C_API, and I have offered to contribute a simple form that demonstrates how one can use this built-in to access the Windows API.
I have prepared a reasonably simple and straight-forward example, but I am still writing up instructions. I expect to have the demo completed this weekend -- I will post a URL for downloading it, at that time. Please follow this thread for further information.
Thanks,
Eric Adamson
Lansing, Michigan

Francois,
I've placed an updated version of apiwrap.dll & apiwrap.pll at the following URL:
http://www.ericadamson.com/code_samples/oracle_forms/apiwrap.zip
The PLL was created using 10.1.2.0.2 -- users with previous versions will probably need to build apiwrap.pll for themselves. For portability, I've also included the APIWRAP package spec & body as simple text files. Note that apiwrap.pll requires webutil.pll -- don't forget to attach it before compiling!
To save time, this version comes undocumented, but I'm sure you will have no problem figuring everything out! :) For others interested in experimenting with this code, please:
1. Be certain that WebUtil is installed on your app server or OC4J, and functioning correctly
2. Know how to build a WebUtil-enabled form.
3. Know how to compile apiwrap.pll (web forms require PLX's!)
4. Understand how WebUtil copies native DLL's to the client (read <forms_home>\forms\server\webutil.cfg for details)
5. Study the APIWRAP package spec for usage information and helpful constants
6. Refer to the Windows SDK documentation for information on the underlying API calls, FindWindow, ShowWindow, SetWindowText & SetWindowPos. For those who lack Windows SDK documentation, visit http://msdn.microsoft.com and search for the desired function by name, either from the main page, or from the MSDN Library.
Thanks,
Eric Adamson
Lansing, Michigan

Similar Messages

  • FRM-92101 in wu_test (the webutil demo form)

    Error:
    FRM-92101 in wu_test (the webutil demo form)
    Problem:
    I am attempting to run the wu_test form, downloaded with demos for webutil 1.02.
    Running wu_test or another form containing webutil functions results in
    FRM-92101 in the form's window and the following error in the OC4J console.
    "Forms session <1> aborted: unable to communicate with runtime process."
    Environment:
    Java Client: Tried with both Sun Java Plug-In 1.4.2.04/5 and Jinitiator 1.3.1.17
    Application Server: Oracle 9.0.4 iDS (Orion Development OC4J)
    Database: Enterprise Edition 10.1.0.2.0
    Forms Listener Servlet
    Attempted Solutions:
    I have scoured OTN & MetaLink & tried everything I could find with no luck. I
    apologize for the length of this post, but I want to provide as much information
    as possible re: what I've tried and my environment.
    For instance, the remedy in Note 252600.1, which can cause these symptoms, did
    not help.
    This note states:
    In webutil.cfg modify
    install.syslib.location to an absolute URL, replacing the line:
    install.syslib.location=/webutil
    To an absolute URL like:
    install.syslib.location=http://[host]:[port]/forms90/webutil
    (replacing [host] and [port] with your own values) or
    install.syslib.location=//../webutil
    Other Information:
    Other forms (ones that don't contain webutil functions/beans) run fine with the same
    env and config used for webutil.
    The wu_test form is already set up so first navigation item is not on the
    webutil canvas, but on the "demo" canvas.
    OC4J Console:
    C:\Program Files\Common Files\System\MAPI\1033\nt>C:\Ora10giDS\jdk\bin\java -Xbo
    otclasspath/p:C:\Ora10giDS\vbroker4\lib\vbjboot.jar -Doracle.security.jazn.confi
    g=C:\Ora10giDS\j2ee\DevSuite\config\jazn.xml -Doracle.home=C:\Ora10giDS -DORACLE
    _HOME=C:\Ora10giDS -jar C:\Ora10giDS\j2ee\home\oc4j.jar -userThreads -config C:\
    Ora10giDS\j2ee\DevSuite\config\server.xml
    04/07/29 15:46:09 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
    initialized
    04/07/29 15:46:19 FormsServlet init():
    configFileName: C:\Ora10giDS/forms90/server/formsweb.cfg
    testMode: false
    04/07/29 15:46:35 ListenerServlet init()
    04/07/29 15:46:51 Forms session <1> aborted: unable to communicate with runtime
    process.
    Orion webserver application.log:
    04/07/29 15:46:07 Started
    04/07/29 15:46:19 forms90web: jsp: init
    04/07/29 15:46:19 forms90web: f90servlet: init
    04/07/29 15:46:19 forms90web: FormsServlet init():
    configFileName: C:\Ora10giDS/forms90/server/formsweb.cfg
    testMode: false
    04/07/29 15:46:19 forms90web: 9.0.4.0.0 Started
    04/07/29 15:46:35 forms90web: l90servlet: init
    04/07/29 15:46:35 forms90web: ListenerServlet init()
    04/07/29 15:46:51 forms90web: Forms session <1> aborted: unable to communicate with runtime process.
    04/07/29 15:46:51 forms90web: Forms session <1> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    Java Console:
    Java(TM) Plug-in: Version 1.4.2_05
    Using JRE version 1.4.2_05 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\isellers
    Proxy Configuration: No proxy
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 9.0.4.0
    oracle.forms.net.ConnectionException: Forms session <1> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    Or JInitiator Console:
    Oracle JInitiator: Version 1.3.1.17
    Using JRE version 1.3.1.17-internal Java HotSpot(TM) Client VM
    User home directory = N:
    Proxy Configuration: no proxy
    JAR cache enabled
    Location: N:\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://localhost:8890/forms90/webutil/webutil.jar from JAR cache
    Loading http://localhost:8890/forms90/java/f90all_jinit.jar from JAR cache
    Loading http://localhost:8890/forms90/webutil/jacob.jar from JAR cache
    RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 9.0.4.0
    oracle.forms.net.ConnectionException: Forms session <2> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    Named Config sections from formsweb.cfg
    #A named (sample) named configuration section for use with WebUtil & Sun JPI
    [webutil]
    pageTitle=Oracle Forms Services - WebUtil
    webUtilArchive=/forms90/webutil/webutil.jar,/forms90/webutil/jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    baseHTMLjinitiator=html/bocowebutiljpi.htm
    baseHTMLjpi=html/bocowebutiljpi.htm
    userid=<replacedforsecurity>/<replacedforsecurity>@<replacedforsecurity>
    legacy_lifecycle=false
    heartBeat=5
    envFile=env/webutil.env
    #A named (sample) named configuration section for use with WebUtil & JInitiator
    [webutiljinit]
    pageTitle=Oracle Forms Services - WebUtil JInit
    webUtilArchive=/forms90/webutil/webutil.jar,/forms90/webutil/jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    baseHTMLjinitiator=html/bocowebutiljini.htm
    baseHTMLjpi=html/bocowebutiljini.htm
    userid=<replacedforsecurity>/<replacedforsecurity>@<replacedforsecurity>
    envFile=env/webutil.env
    Webutil.env (with comments removed)
    ORACLE_HOME=C:\Ora10giDS
    FORMS90_PATH=C:\Ora10giDS\forms90\webutil\forms;C:\Ora10giDS\forms90\webutil\demo;C:\Ora10giDS\apps;
    WEBUTIL_CONFIG=C:\Ora10giDS\forms90\webutil\webutil.cfg
    CLASSPATH=C:\Ora10giDS\j2ee\OC4J_BI_Forms\applications\forms90app\forms90web\WEB-INF\lib\f90srv.jar;C:\Ora10giDS\jlib\repository.jar;C:\Ora10giDS\jlib\ldapjclnt9.jar;C:\Ora10giDS\jlib\debugger.jar;C:\Ora10giDS\jlib\ewt3.jar;C:\Ora10giDS\jlib\share.jar;C:\Ora10giDS\jlib\utj90.jar;C:\Ora10giDS\jlib\zrclient.jar;C:\Ora10giDS\reports\jlib\rwrun.jar;C:\Ora10giDS\jdk\jre\lib\rt.jar;C:\Ora10giDS\forms90\webutil\lib\webutil.jar;C:\Ora10giDS\forms90\webutil\lib\jacob.jar;
    PATH=C:\Ora10giDS\bin;C:\Ora10giDS\jdk\jre\bin\client
    FORMS90=C:\Ora10giDS\forms90
    Section from Webutil.cfg
    #install.syslib.location=/webutil
    # Try absolute URL per note 252600.1 - no help
    #install.syslib.location=http://it110981.boco.co.boulder.co.us:8890/forms90/webutil
    # Or try relative URL like this per note 252600.1 - also no help
    install.syslib.location=//../webutil
    Line from orion-web.xml
    <virtual-directory virtual-path="/webutil" real-path="C:\Ora10giDS/forms90/webutil/lib" />
    Any suggestions on how I can get this to work will be appreciated. Thanks. -Ian

    most of the time this means that your webutil.pll isn't good attached but it is very dependant on the versions you working on.
    Post your versions of forms ias and webutil.
    In older version it is sometimes necessary to first subclass the webutil group and then attach the webutil.pll. Other way around didn't work (was in beta version 1.02 I believe)

  • Configuration problem running webutil demo form WU_TEST_106

    Hi,
    I am running the web util demo form from OTN, it works ok till I access the OLE tab and try to write some text to a *.doc file.
    The java console spits out this text:
    Loading http://dci003wa2197244.prod.irscounsel.treas.gov:8890/forms/java/frmall_jinit.jar from JAR cache
    Loading http://dci003wa2197244.prod.irscounsel.treas.gov:8890/forms/java/frmwebutil.jar from JAR cache
    RegisterWebUtil - Loading WebUtil Version 10.1.2.0
    Loading http://dci003wa2197244.prod.irscounsel.treas.gov:8890/forms/java/jacob.jar from JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Exception occurred during event dispatching:
    java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jacob)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkLink(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at com.jacob.com.Dispatch.<clinit>(Dispatch.java:537)
         at oracle.forms.webutil.ole.OleFunctions.create_obj(Unknown Source)
         at oracle.forms.webutil.ole.OleFunctions.getProperty(Unknown Source)
         at oracle.forms.handler.UICommon.onGet(Unknown Source)
         at oracle.forms.engine.Runform.onGetHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I followed the steps layed out for configuring webutil in the users guide, I suspect the problem is related to signing the jacob.jar file.
    I signed jacob.jar using $ORACLE_HOME/forms/webutil/sign_webutil.bat, I made sure ORACLE_HOME/jdk/bin was in PATH.
    I received these warning/errors at this point
    Generating a self signing certificate for key=webutil2...
    keytool error: java.lang.Exception: Key pair not generated, alias <webutil2> already exists
    There were warnings or errors while generating a self signing certificate. Please review them.
    Backing up d:\oracle\Product\dev10gR2suite\forms\java\jacob.jar as d:\oracle\Product\dev10gR2suite\forms\java\jacob.jar.old...
    1 file(s) copied.
    Signing d:\oracle\Product\dev10gR2suite\forms\java\jacob.jar using key=webutil2...
    jarsigner: attempt to rename d:\oracle\Product\dev10gR2suite\forms\java\jacob.jar to d:\oracle\Product\dev10gR2suite\forms\java\jacob.jar.orig failed
    I am running forms 10.1.2. How do I resolve this problem.
    Your help is greatly appreciated.
    Jim
    .

    Well, I think the problem is a permission issue or there is a problem finding the correct files. Let me explain:
    1. The first error is expected. Read it carefully and consider what you did to this point.
    Generating a self signing certificate for key=webutil2...
    keytool error: java.lang.Exception: Key pair not generated, alias <webutil2> already exists
    This is expected because the alias was already created when signing frmwebutil.jar. Since the alias only needs to be created one time, this is expected and can be ignored.
    2. The second error is your real issue:
    jarsigner: attempt to rename d:\oracle\Product\dev10gR2suite\forms\java\jacob.jar to d:\oracle\Product\dev10gR2suite\forms\java\jacob.jar.orig failed
    My suggestion:
    1. Delete all jacob files including any which may have been renamed.
    2. Re-download the correct Jacob version as noted in the WebUtil and Forms documentation. Do NOT attempt to use a newer version as it will cause a failure.
    3. Copy the jacob.jar file in the same directory which contains the cortousy signing script (batch) Oracle provides.
    4. Ensure that you have (Windows) Administrative permissions on the machine.
    5. Open a DOS shell and change directories (cd) to the directory which contains the signer script.
    6. Set the PATH to include the JDK\bin. For example:
    SET PATH=d:\oracle\Product\dev10gR2suite\jdk\bin;%PATH%
    7. Execute the jarsigner script.
    sign_webutil jacob.jar
    As already mentioned you can ignore messages which suggest that the alias already exists. However, pay attention to any others.
    8. Assuming it works correctly, copy jacob.jar to ..\forms\java
    9. Clear the JAR cache from whichever JRE (Jinitiator) you are using.
    10. Retest

  • WEBUTIL DEMO FORM ifError:7/500

    Hello
    I'm trying to run the webutil demo form (WU_TEST_105.fmb) from Form Builder (version 9.0.4.0.19). The browser window opens but just displays the message ifError:7/500. I can't find any reference to what this means! Does anyone know?
    Thanks
    Evan

    Here is my two cents worth.
    First, I build big corporate apps not Web stuff.
    So this might look a little sketchy but here goes.
    I'm on 10g using 10g tools.
    What is happening is Forms Designer is not assembling a correct address string.
    You should see something like the address below and it generates the error.
    http://mylocalmachine:8889/forms/lservlet
    ifError:7/500
    Plug-in the address to something like the following and you should get your form.
    http://mylocalmachine:8889/forms/frmservlet?form=mynewform.fmx&userid=&otherparams=useSDI=yes&lookAndFeel=oracle&colorScheme=blue
    Parameters in the address string are <mylocalmachine> and <mynewform>.
    Your "forms_path" registry entry might need some attention.
    The configuration files that are created by default need some modifications.
    Check these files:
    %OracleHome\cauprefs.ora
    %OracleHome\forms\server\default.env
    %OracleHome\forms\server\formsweb.cfg
    %OracleHome\j2ee\DevSuite\config\default-web-site.xml
    See other discussion pages about configuration parameters.
    Good luck from Bottom_End ...

  • WUC-18 when trying to run webutil demo form

    We set up Oracle Webutil, but are getting this java console output when trying to run the demo form:
    Oracle JInitiator: Version 1.3.1.13
    Using JRE version 1.3.1.13-internal Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\me
    Proxy Configuration: Manual Configuration
    Proxy: 1.1.1.1
    Proxy Overrides:
    JAR cache enabled
    Location: C:\Documents and Settings\me\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://mymachine:8888/forms90/webutil/webutil.jar from JAR cache
    Loading http://mymachine:8888/forms90/java/f90all_jinit.jar from JAR cache
    RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
    Loading http://mymachine:8888/forms90/webutil/jacob.jar from JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 902122
    2004-Feb-20 17:42:42.734 WUI[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:42.750 WUF[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:42.765 WUH[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:42.781 WUS[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:42.796 WUT[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:42.875 WUO[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:42.875 WUL[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:42.890 WUB[VBeanCommon.findLocalHost()] obtaining LocalHost info from InetAddress
    2004-Feb-20 17:42:44.109 WUI[setProperty()] Setting property WUC_GET_LOCAL_PROPERTY to syslib.ffisamp.dll
    2004-Feb-20 17:42:44.500 WUI[getProperty()] Getting property WUC_GET_LOCAL_PROPERTY
    2004-Feb-20 17:42:44.500 WUI[loadSettings()] Local properties file loaded
    oracle.forms.net.ConnectionException: Forms session <2> aborted: unable to communicate with runtime process.
         at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
         at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
         at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
         at oracle.forms.net.HTTPNStream.flush(Unknown Source)
         at java.io.DataOutputStream.flush(Unknown Source)
         at oracle.forms.net.StreamMessageWriter.run(Unknown Source)
    read metalink note 252600.1 and implemented the changes mentioned there. Also walked through the configuration files, see no error there.
    Regards
    Andreas

    I take it a simple webutil form with something like CLIENT_GET_FILE_NAME works ok?
    If so, then maybe its worth doing a Ctr Shift K and recompile the demo ad try again.
    Regards
    Grant Ronald
    Forms Product Management

  • Webutil Demo form is not working !!!!

    Hi,
    I Download WebUtil Demo form, compiled it and tried to run the demo form using Forms 11g but at run time the following error alert appears:
    oracle.forms.webutil.clientinfo.GetClientInfo bean not found.
    WEBUTIL_CLIENTINFO.GET_SYSTEM_PROPERTY will not work
    My environment is Oracle Forms 11g on which Webutil is already installed as it is mentioned in Forms 11g FAQ. So I did not change or add anything for webutil.
    Any Help !!!!
    Regards,
    Yousuf.

    hi
    i am not sure for 11g but u can try this.........
    How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
    Solution
    Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
    here are steps to get a small test form running, using WebUtil 1.06.
    Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
    Feel free to copy this note to a text editor, and do a global find/replace on
    [OraHome] with your actual value (no trailing slash). Then it is easy to
    copy/paste actual commands to be executed from the note copy.
    1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
      and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
    2) Copy or move jacob.jar and jacob.dll
      [JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
         cd [JacobStage]
         copy jacob.jar [OraHome]\forms\java\.
         copy jacob.dll [OraHome]\forms\webutil\.
      The Jacob staging area is no longer needed, and may be deleted.
    3) Sign frmwebutil.jar and jacob.jar
      Open a DOS command prompt.
      Add [OraHome]\jdk\bin to the PATH:
         set PATH=[OraHome]\jdk\bin;%PATH%
      Sign the files, and check the output for success:
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
         [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
    4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
      you may skip this step. Otherwise,
      Create a schema to hold the WebUtil stored code, and privileges needed to
      connect and create a stored package. Schema name "WEBUTIL" is recommended
      for no reason other than consistency over the user base.
      Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
      out the EXIT statement, to be able to see whether the objects were created witout
      errors.
      Start SQL*Plus as SYSTEM, and issue:
         CREATE USER webutil IDENTIFIED BY [password]
         DEFAULT TABLESPACE users
         TEMPORARY TABLESPACE temp;
         GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
         CONNECT webutil/[password]@[connectstring]
         @[OraHome]\forms\create_webutil_db.sql
         -- Inspect SQL*Plus output for errors, and then
         CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
      Reconnect as SYSTEM, and issue:
         grant execute on webutil_db to public;
    5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
      to the CLASSPATH entry.
    6) Start the OC4J instance
    7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
      Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
      It is important to generate the PLX, to avoid the FRM-40039 discussed in
      Note 303682.1
      If the PLX is not generated, the Webutil.pll library would have to be attached with
      full path information to all forms wishing to use WebUtil. This is NOT recommended.
    8) Create a new FMB.
      Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
      There is no need to Subclass the WebutilConfig object.
      Attach the Webutil.pll Library, and remove the path.
      Add an ON-LOGON trigger with the code
             NULL;
      to avoid having to connect to an RDBMS (optional).
      Create a new button on a new canvas, with the code
             show_webutil_information (TRUE);
      in a WHEN-BUTTON-PRESSED trigger.
      Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
    9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
      the "Application Server URL" is empty.
      Then append "?config=webutil" at the end, so you end up with a URL of the form
          http://server:port/forms/frmservlet?config=webutil
    10) Run your form.sarah

  • WU_TEST.fmb  (webutil demo form) - where is it?

    Would somebody point me to the location of the WU_TEST.fmb form
    (downloaded latest webutil - don't have this demo)
    Thanks in advance

    Hi,
    did you try
    http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
    There is a demo zip
    http://www.oracle.com/technology/products/forms/htdocs/webutil/Webutil_demo.zip
    Frank

  • Install Demo Forms 6i

    Hi all,
    Today I got the uip-file for the 6i demo and after unzip I found a setup.exe in my folder.
    When I try to execute it in a new folder I get an error (SQL*Plus or/and SQL*Net has to be installed - at least SQL*Plus is!) and setup ends.
    Is the demo to be installed?
    Is there a short description which subjects are shown, what is the main form or something like this?
    Thanks,
    Silke

    repost

  • How to Install Oracle Forms 10g (9.0.4) Demos

    Hi.
    My forms version is :
    Forms [32 bits] Versión 10.1.2.0.2 (Producción)
    Oracle Toolkit Versión 10.1.2.0.2 (Producción)
    PL/SQL Versión 10.1.0.4.2 (Producción)
    I'm trying to install Oracle Forms 10g (9.0.4) Demos. Everything works fine until step 5. I can even access the forms demos home page(changing forms90 to forms). However when i try to access any link, i get the following error:
    404 Not Found Resource /forms90/f90servlet not found on this server
    What's wrong?. I believe forms is pointing to the wrong direction:
    http://mluis:8888/forms90/f90servlet?config=reusable_picklist
    For example to show the tick image on step five on install guide, I have to replace
    http://mluis:8888//forms90/formsdemo/images/tick.gif
    for http://mluis:8888//forms/formsdemo/images/tick.gif
    This is because I don't have a forms90 directory in my Oracle_Home. I changed forms90 for forms in formsdemo.env. But still doesn't work. So my question is
    - Are these forms demos built for my forms version?.
    - If not, what do i have to change in order to make things work. I'm really interested in some special features like PJC, Webutil etc.
    - The configuration is still pointing at a forms90 directory. I need to change it to just forms but don't know which files.
    Thanks in advance ...!

    Hi,
    Have you resolved this issue? I have gotten a bit further.
    You also need to change any f90xxxxxx to frmxxxxxx
    But the servlet cannot seem to find any of the demo forms.
    I assume a path issue, but cannot seem to find it.
    Any clues?
    Thanks.

  • Looking for Interactive Forms Demo

    Hi all,
    I need to work on Interactive Smart Forms..
    Kindly do let me know if anybody have any kind of demo forms etc.
    Thanks!
    Dev

    you are talking about so-called web forms ? Look at [sap library - smart forms - Forms in Internet Applications|http://help.sap.com/saphelp_nw70/helpdata/EN/91/7af266066b11d5b66d006094192fe3/frameset.htm] for more information, there are also demos mentionned.

  • Forms 61 demo

    Hi,
    can't find the downloads, e.g. download demo forms 6i only. The demos are not included in the 6i Installation.
    I have downloaded the file 6irel2nt.exe (> 250 Mb!) and unzipped it. There is no Demo included!
    Where can I find it?
    Thanks and regards
    M. Carl

    There are some demos on OTN - otn.oracle.com/products/forms the left hand side click on SAMPLE CODE.
    Regards
    Grant Ronald
    FOrms Product Management

  • Webutil form compilation error

    Hi all
    I configured webutil on Application server 10g on linux. but when i compile the demo form on application server using
    /u01/app/oracle/OraHome_2/bin/frmcmp.sh module=$ORACLE_HOME/forms/WU_TEST_106.fmb userid=webutil/webutil@orant module_type=form compile_all=yes OUTPUT_FILE=$ORACLE_HOME/forms/WU_TEST_106.fmx
    it give me the errors
    FRM-18108: Failed to load the following objects.
    Source Module:webutil.olb
    Source Object: WEBUTIL
    Compiling procedure GET_CLIENTINFO...
    Compilation error on procedure GET_CLIENTINFO:
    PL/SQL ERROR 201 at line 3, column 35
    identifier 'WEBUTIL_CLIENTINFO.GET_USER_NAME' must be declared
    PL/SQL ERROR 0 at line 3, column 3
    Statement ignored
    PL/SQL ERROR 201 at line 4, column 35
    identifier 'WEBUTIL_CLIENTINFO.GET_IP_ADDRESS' must be declared
    PL/SQL ERROR 0 at line 4, column 3
    Statement ignored
    Compilation errors have occurred.
    Form not created
    ==========================================
    i search a lot but failed ..
    any solution regarding this plz thanks in advance.

    [oracle@appserver ~]$ /u01/app/oracle/OraHome_2/bin/frmcmp_batch.sh module=$ORACLE_HOME/forms/webutil.pll userid=webutil/webutil@orant module_type=library compile_all=yes OUTPUT_FILE=$ORACLE_HOME/forms/webutil.plx
    Forms 10.1 (Form Compiler) Version 10.1.2.0.2 (Production)
    Forms 10.1 (Form Compiler): Release - Production
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
    Oracle Multimedia Version 10.1.2.0.2 (Production)
    Oracle Tools Integration Version 10.1.2.0.2 (Production)
    Oracle Tools Common Area Version 10.1.2.0.2
    Oracle CORE 10.1.0.4.0 Production
    Compiling library WEBUTIL...
    Invalidating Package Spec CLIENT_IMAGE......
    Invalidating Package Spec CLIENT_OLE2......
    Invalidating Package Spec CLIENT_TEXT_IO......
    Invalidating Package Spec CLIENT_TOOL_ENV......
    Invalidating Package Spec CLIENT_WIN_API_DEBUG......
    Invalidating Package Spec CLIENT_WIN_API......
    Invalidating Package Spec CLIENT_WIN_API_ENVIRONMENT......
    Invalidating Package Spec CLIENT_WIN_API_PRELOAD......
    Invalidating Package Spec JAVA_EXCEPTION......
    Invalidating Package Spec WEBUTIL_BROWSER......
    Invalidating Package Spec WEBUTIL_CLIENTINFO......
    Invalidating Package Spec WEBUTIL_C_API......
    Invalidating Package Spec JAVA_SYSTEM......
    Invalidating Package Spec JAVA_APPSERV_READER......
    Invalidating Package Spec DELIMSTR......
    Invalidating Package Spec WEBUTIL_FILE......
    Invalidating Package Spec JAVA_APPSERV_WRITER......
    Invalidating Package Spec WEBUTIL_DB_LOCAL......
    Invalidating Package Spec JAVA_FILE......
    Invalidating Package Spec WEBUTIL_FILE_TRANSFER......
    Invalidating Package Spec WEBUTIL_HOST......
    Invalidating Package Spec WEBUTIL_SEPARATEFRAME......
    Invalidating Package Spec WEBUTIL_CORE......
    Invalidating Package Spec WEBUTIL_SESSION......
    Invalidating Package Spec WEBUTIL_UTIL......
    Invalidating Package Body WEBUTIL_UTIL......
    Invalidating Package Body WEBUTIL_SESSION......
    Invalidating Package Body WEBUTIL_SEPARATEFRAME......
    Invalidating Package Body WEBUTIL_HOST......
    Invalidating Package Body WEBUTIL_FILE_TRANSFER......
    Invalidating Package Body WEBUTIL_FILE......
    Invalidating Package Body WEBUTIL_DB_LOCAL......
    Invalidating Package Body WEBUTIL_C_API......
    Invalidating Package Body WEBUTIL_CORE......
    Invalidating Package Body WEBUTIL_CLIENTINFO......
    Invalidating Package Body WEBUTIL_BROWSER......
    Invalidating Procedure Body SHOW_WEBUTIL_INFORMATION......
    Invalidating Package Body JAVA_SYSTEM......
    Invalidating Package Body JAVA_FILE......
    Invalidating Package Body JAVA_EXCEPTION......
    Invalidating Package Body JAVA_APPSERV_WRITER......
    Invalidating Package Body JAVA_APPSERV_READER......
    Invalidating Package Body DELIMSTR......
    Invalidating Package Body CLIENT_WIN_API_PRELOAD......
    Invalidating Package Body CLIENT_WIN_API_ENVIRONMENT......
    Invalidating Package Body CLIENT_WIN_API_DEBUG......
    Invalidating Package Body CLIENT_WIN_API......
    Invalidating Package Body CLIENT_TOOL_ENV......
    Invalidating Package Body CLIENT_TEXT_IO......
    Invalidating Package Body CLIENT_OLE2......
    Invalidating Package Body CLIENT_IMAGE......
    Invalidating Procedure Body CLIENT_HOST......
    Invalidating Function Body CLIENT_GET_FILE_NAME......
    Compiling Package Spec CLIENT_IMAGE......
    Compiling Package Spec CLIENT_OLE2......
    Compiling Package Spec CLIENT_TEXT_IO......
    Compiling Package Spec CLIENT_TOOL_ENV......
    Compiling Package Spec CLIENT_WIN_API_DEBUG......
    Compiling Package Spec CLIENT_WIN_API......
    Compiling Package Spec CLIENT_WIN_API_ENVIRONMENT......
    Compiling Package Spec CLIENT_WIN_API_PRELOAD......
    Compiling Package Spec JAVA_EXCEPTION......
    Compiling Package Spec WEBUTIL_BROWSER......
    Compiling Package Spec WEBUTIL_CLIENTINFO......
    Compiling Package Spec JAVA_SYSTEM......
    Compiling Package Spec JAVA_APPSERV_READER......
    Compiling Package Spec DELIMSTR......
    Compiling Package Spec WEBUTIL_FILE......
    Compiling Package Spec JAVA_APPSERV_WRITER......
    Compiling Package Spec WEBUTIL_DB_LOCAL......
    Compiling Package Spec JAVA_FILE......
    Compiling Package Spec WEBUTIL_FILE_TRANSFER......
    Compiling Package Spec WEBUTIL_HOST......
    Compiling Package Spec WEBUTIL_SEPARATEFRAME......
    Compiling Package Spec WEBUTIL_CORE......
    Compiling Package Spec WEBUTIL_SESSION......
    Compiling Package Spec WEBUTIL_UTIL......
    Compiling Package Body WEBUTIL_UTIL......
    Compiling Package Body WEBUTIL_SESSION......
    Compiling Package Body WEBUTIL_SEPARATEFRAME......
    Compiling Package Body WEBUTIL_HOST......
    Compiling Package Body WEBUTIL_FILE_TRANSFER......
    Compiling Package Body WEBUTIL_FILE......
    Compiling Package Body WEBUTIL_DB_LOCAL......
    Compiling Package Body WEBUTIL_C_API......
    Compiling Package Body WEBUTIL_CORE......
    Compiling Package Body WEBUTIL_CLIENTINFO......
    Compiling Package Body WEBUTIL_BROWSER......
    Compiling Procedure Body SHOW_WEBUTIL_INFORMATION......
    Compiling Package Body JAVA_SYSTEM......
    Compiling Package Body JAVA_FILE......
    Compiling Package Body JAVA_EXCEPTION......
    Compiling Package Body JAVA_APPSERV_WRITER......
    Compiling Package Body JAVA_APPSERV_READER......
    Compiling Package Body DELIMSTR......
    Compiling Package Body CLIENT_WIN_API_PRELOAD......
    Compiling Package Body CLIENT_WIN_API_ENVIRONMENT......
    Compiling Package Body CLIENT_WIN_API_DEBUG......
    Compiling Package Body CLIENT_WIN_API......
    Compiling Package Body CLIENT_TOOL_ENV......
    Compiling Package Body CLIENT_TEXT_IO......
    Compiling Package Body CLIENT_OLE2......
    Compiling Package Body CLIENT_IMAGE......
    Compiling Procedure Body CLIENT_HOST......
    Compiling Function Body CLIENT_GET_FILE_NAME......
    Done.
    [oracle@appserver ~]$
    here is the code how i compile webutil.. its done sucessfully.

  • File Upload demo problem

    Hi!, i have a problem with the File Upload Demo when it calls this line:
    hDirectoryObject := JFile.new(directory);
    and the error is: error 6508 "PL/SQL: could not find program unit being called"
    That's ok, but anybody knows why should the program couldnt find the routine ?
    And just one more thing...where can i look for JFile method description ??
    Thanks a lot :) !!
    Cristian.

    Is this 9i or 6i?
    JFile is an imported wrapper for a Java Class - it should be in the Demo form already - you could try a compile all on the file just in case.

  • When a single-page form expands to more than one page, can you reference the new individual "pages" that have been created by the expanding table?

    Don't think this is possible but would love to be wrong.
    Bullet Points:
    1) In my demo form (simple hierarchy: form1.page1.table1.row1), 8 occurrences  (instance "0" through instance "7") of the repeating row1 can be visible
         before it causes a page break and adds another "page".  No issues there.
    2) I'm thinking about trying to control the end-users navigation abilities to only on-screen "previous page" and "next page" buttons.
         (So no scrolling from page to page; keep them where we want them.) Only way I can see making this work is if the form is designed
         and coded to only allow one page to be visible at a time --- nesting things correctly in a parent object then hide all necessary subforms
         and only make the appropriate subform visible.
    3) But when working with tables,  when occurrence 9 gets added (aka instance 8), it triggers an on screen "Page 2" to be added.
         End user can now scroll between Page 1 and Page 2. 
    4) Once Page 2 has been added, is there a way to reference Page 1 (as we see it on screen) and set it to be hidden?
    5) Is what we are seeing on screen as "Page 1" and "Page 2"  actually this.resolveNode("page1[0]") and this.resolveNode("page1[1]") ?
         Tried messing around with referencing it this way but didn't seem to work.  Maybe I had a typo but if we never set the subform named "page1"
         to allow multiple instances, I'm guessing it's not referenced this way.
    Any thoughts would be great.  Thanks so much to this community.
    Brian

    If you're looking at learning a bit more about database design (looking at your description of what you've done in creating a separate table for each category of item sold sounds like you're approaching it as though it was a flat-file rather than a relational database), there's a few books that I could direct you to:
    Beginning Database Design (ISBN 978-1590597699)
    Database Design for Mere Mortals (ISBN 978-0201694710)
    Databases Demystified (ISBN 978-0072253641)
    Absolute Beginner's Guide to Databases (ISBN 978-0789725691)
    I've also got an older book that's always sitting by my desk called Dreamweaver MX Databases (ISBN 978-0782141481), which I still reference regularly - chapter 3 on coding practices and chapter 5 on database design provide very good overviews of the subject.
    There's also a Database Development for Dummies, but I'm not a huge fan of the series where they're tackling technical subjects.
    Without knowing the data you're modeling, it's quite difficult to make generalisations, but I'd probably be looking at a single table called 'Product' (which contains all the product records), and which had in it a boolean for 'new item' and for 'on sale' (you could then use SQL to filter out new and/or sale items when you create your recordset). I'd then have a look up table called 'Categories' which held the values 'necklace', 'handbag', 'belt', and 'purse' which the Product table could then reference to identify.
    Breaking your data down into a logical structure like this is called 'normalisation' (see http://en.wikipedia.org/wiki/Database_normalization) - although it's a bit technical. There's a simpler practical explanation of a similar query to yours at TechRepublic (http://articles.techrepublic.com.com/5100-10878_11-5288500.html), which uses MS Access, but don't worry about that as it's teaching a concept which is applicable no matter what the database server.

  • Forms and validations - here's some of my ideas, what are yours?

    One of the big things still missing from the JFX space (especially where JEE is concerned) is forms and form validations. Maybe you guys have been luckier but at least 80% of the screens I've had to build in my career have been boring old forms - enter data in the fields, validate them and hit submit.
    So, I've been hacking around on this to try and get a pattern and hopefully some reusable classes for doing this in JavaFX. I have something that works but the code is verbose and less than elegant. I'm hoping some of you guys might want to kick around some ideas on this with me here. If we can come up with something that works, I'd like to either include it in [url http://www.zenjava.com/jfx-flow/]JFX Flow, or put it out as a separate open source project (whichever makes more sense).
    What I think needs to be supported:
    * Map between a normal Java bean and the fields on a form
    * Validate the data, i.e. specifying the constraints on a field and then checking those constraints
    * Show a validation summary at the top of the form
    * Highlight individual fields if they have validation errors
    * Support auto-validation, i.e. the validation highlights and messages will instantly update as the user types
    Some extra restrictions:
    * The data input will ideally be a normal bean and so it won't have observable values on it. In most projects I use, the beans are coming from the server and sometimes may be shared between desktop client and a jsp/web client, or even be a third party API so they can't be changed. End result: we don't want any JFX complexities or dependencies in our server code (design leak). This rule could be bent but only as a last resort.
    * The validations must be defined relative to the normal data bean not a JFX model or controller, etc. This is so the bean can be validated on the server as well as the client. The server must do validation to prevent dodgy data getting in (never trust a client). Ideally we don't want to be specifying the validations in two places (i.e. once for the client and once for the server) as this creates maintenance problems and weakens the integrity of the system over time.
    * Ideally the validation mechanism will be based on [url http://java.dzone.com/articles/bean-validation-and-jsr-303]JSR 303 - Bean Validations as this is quite nice. This is flexible however if there is a suitable alternative that integrates better.
    To give us something to reference in conversation, I've created a small working sample. This is only meant to be a rough starting point (at best) and I'd really like to get feedback on both the code (i.e. should we have a 'presentation model', how could bindings be better used, etc) and the general way I'm representing errors (i.e. should we use tooltips to show errors, or actually show the errors next to the field, should we use border colours or put a little exclamation mark over the field, should the fields be auto-validated or only validated on submit, etc).
    The example is a single form for editing a person. It has three fields, first name, last name and gender. When the form is blank, auto-editing is off. When the user submits the form it is validated and from that point on auto-validating is on. Error fields are highlighted with a style change, and a tooltip is added with details (I think we can do better - what's your ideas?).
    I have used all plain Java to keep thngs simple, but I'd be looking for the end result to translate to FXML as well. I've also coded everything into the one class but the eventual goal would be to have the common stuff moved out to reusable base classes, etc.
    Here's a workspace with some example code in it: http://code.google.com/p/jfxee/source/browse/trunk/jfxforms/
    Here's a running deploy of that code: http://zenjava.com/demo/form/forms.html
    (edit: I've moved the code to its own project and changed the url for the launch - the values above are the new, correct ones)
    Looking forward to hearing some thoughts on this topic.
    Edited by: zonski on 01-Dec-2011 13:41

    At Devoxx I did some straw man prototype that you might find useful (or hopeless, I'm not sure which, I did it in a hurry :-)). I followed some principles that I was influenced by years back by JGoodies, but I haven't looked at the JGoodies stuff in forever and know it isn't all the same. But anyway, like I said, I'm not sure it is actually useful but maybe there is something genius hidden in there.
    I have a Validator, which is just a simple SAM:
    import javafx.scene.control.Control;
    * @author Richard
    public interface Validator<C extends Control> {
        public ValidationResult validate(C control);
    }The idea is that it is given a Control, it will validate that control, and then return a ValidationResult. ValidationResult is actually only needed in cases of errors, since returning null indicates success, so the following is somewhat of a crock but you could rename it ValidationError or something and remove the "SUCCESS" type and there you are.
    public class ValidationResult {
        public enum Type { ERROR, WARNING, SUCCESS }
        private final String message;
        private final Type type;
        public ValidationResult(String message, Type type) {
            this.message = message;
            this.type = type;
        public final String getMessage() {
            return message;
        public final Type getType() {
            return type;
        }For good measure I threw in a ValidationEvent.
    import javafx.event.Event;
    import javafx.event.EventType;
    * @author Richard
    public class ValidationEvent extends Event {
        public static final EventType<ValidationEvent> ANY =
                new EventType<ValidationEvent>(Event.ANY, "VALIDATION");
        private final ValidationResult result;
        public ValidationEvent(ValidationResult result) {
            super(ANY);
            this.result = result;
        public final ValidationResult getResult() { return result; }
    }Because Control's don't presently have the notion of validation built in, I created a ValidationPane which is like a specialized StackPane, where there is a bottom layer, the control, and a glass pane layer. And from CSS you can style it however you like. The ValidationPane has a CSS style class set in case of errors / warnings. So without augmenting controls, the idea is that a ValidationPane subclass would exist to wrap each type of control you needed to validate. It did this because somebody has to wire up the listeners to the control to react on text input etc, and so I thought I'd like that encapsulated in something reusable, and there it was.
    import javafx.beans.DefaultProperty;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.ReadOnlyObjectProperty;
    import javafx.beans.property.ReadOnlyObjectWrapper;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.event.EventHandler;
    import javafx.scene.control.Control;
    import javafx.scene.layout.Region;
    * @author Richard
    @DefaultProperty("content")
    public abstract class ValidatorPane<C extends Control> extends Region {
         * The content for the validator pane is the control it should work with.
        private ObjectProperty<C> content = new SimpleObjectProperty<C>(this, "content", null);
        public final C getContent() { return content.get(); }
        public final void setContent(C value) { content.set(value); }
        public final ObjectProperty<C> contentProperty() { return content; }
         * The validator
        private ObjectProperty<Validator<C>> validator = new SimpleObjectProperty<Validator<C>>(this, "validator");
        public final Validator<C> getValidator() { return validator.get(); }
        public final void setValidator(Validator<C> value) { validator.set(value); }
        public final ObjectProperty<Validator<C>> validatorProperty() { return validator; }
         * The validation result
        private ReadOnlyObjectWrapper<ValidationResult> validationResult = new ReadOnlyObjectWrapper<ValidationResult>(this, "validationResult");
        public final ValidationResult getValidationResult() { return validationResult.get(); }
        public final ReadOnlyObjectProperty<ValidationResult> validationResultProperty() { return validationResult.getReadOnlyProperty(); }
         *  The event handler
        private ObjectProperty<EventHandler<ValidationEvent>> onValidation =
                new SimpleObjectProperty<EventHandler<ValidationEvent>>(this, "onValidation");
        public final EventHandler<ValidationEvent> getOnValidation() { return onValidation.get(); }
        public final void setOnValidation(EventHandler<ValidationEvent> value) { onValidation.set(value); }
        public final ObjectProperty<EventHandler<ValidationEvent>> onValidationProperty() { return onValidation; }
        public ValidatorPane() {
            content.addListener(new ChangeListener<Control>() {
                public void changed(ObservableValue<? extends Control> ov, Control oldValue, Control newValue) {
                    if (oldValue != null) getChildren().remove(oldValue);
                    if (newValue != null) getChildren().add(0, newValue);
        protected void handleValidationResult(ValidationResult result) {
            getStyleClass().removeAll("validation-error", "validation-warning");
            if (result != null) {
                if (result.getType() == ValidationResult.Type.ERROR) {
                    getStyleClass().add("validation-error");
                } else if (result.getType() == ValidationResult.Type.WARNING) {
                    getStyleClass().add("validation-warning");
            validationResult.set(result);
            fireEvent(new ValidationEvent(result));
        @Override
        protected void layoutChildren() {
            Control c = content.get();
            if (c != null) {
                c.resizeRelocate(0, 0, getWidth(), getHeight());
        @Override
        protected double computeMaxHeight(double d) {
            Control c = content.get();
            return c == null ? super.computeMaxHeight(d) : c.maxHeight(d);
        @Override
        protected double computeMinHeight(double d) {
            Control c = content.get();
            return c == null ? super.computeMinHeight(d) : c.minHeight(d);
        @Override
        protected double computePrefHeight(double d) {
            Control c = content.get();
            return c == null ? super.computePrefHeight(d) : c.prefHeight(d);
        @Override
        protected double computePrefWidth(double d) {
            Control c = content.get();
            return c == null ? super.computePrefWidth(d) : c.prefWidth(d);
        @Override
        protected double computeMaxWidth(double d) {
            Control c = content.get();
            return c == null ? super.computeMaxWidth(d) : c.maxWidth(d);
        @Override
        protected double computeMinWidth(double d) {
            Control c = content.get();
            return c == null ? super.computeMinWidth(d) : c.minWidth(d);
    }And finally the TextInputValidatorPane instance good for any TextInputControl. I think.
    import javafx.beans.InvalidationListener;
    import javafx.beans.Observable;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.control.TextInputControl;
    * @author Richard
    public class TextInputValidatorPane<C extends TextInputControl> extends ValidatorPane<C> {
        private InvalidationListener textListener = new InvalidationListener() {
            public void invalidated(Observable o) {
                final Validator v = getValidator();
                final ValidationResult result = v != null ?
                    v.validate(getContent()) :
                    new ValidationResult("", ValidationResult.Type.SUCCESS);
                handleValidationResult(result);
        public TextInputValidatorPane() {
            contentProperty().addListener(new ChangeListener<C>() {
                public void changed(ObservableValue<? extends C> ov, C oldValue, C newValue) {
                    if (oldValue != null) oldValue.textProperty().removeListener(textListener);
                    if (newValue != null) newValue.textProperty().addListener(textListener);
        public TextInputValidatorPane(C field) {
            this();
            setContent(field);
    }This should also be usable as is from FXML since you can easily wrap a TextInputValidatorPane around a TextField, and CSS does all the styling, so I think it all just works. You probably need to have some library of sophisticated Validators which know how to read text from a TextField and compare against the validation annotations, but otherwise it should work well enough. Anyway, in the actual implementation I think I would omit the ValidationPane stuff completely and just build that part into the controls / skins. Like I said, this was a quick hack but seemed to get the "how do I visualize validation errors" part of the problem solved.
    Richard

Maybe you are looking for

  • IWeb'08 and iWeb Enhancer

    After installing iWeb'08, HTML code that I had inserted to my site and made functional with iWeb Enhancer now doesn't work. Has anyone discovered a work around? I contacted and posted onto iWeb Enhancer, but I haven't heard anything yet. I'm consider

  • Dell 20.1 Inch UltraSharp LCD 2007FP Widescreen

    I've found several postings that this will work with the MBP. I've got one on order. Does anyone have any recommendations for setting this up? I plan to use the DVI connection, laptop lid closed, BT mouse and keyboard. I did try this out at work usin

  • File Size Reduction

    Can I take my large photos (1.5 MB) and save them at a smaller size with Elements?

  • Can GPS be set to use on ipad 3 when not online?

    New to ipad, can GPS be set to use when on the road , ie not online?

  • ALV GRID out put issue

    hi, how to increase the font size of the output of alv grid... Actually my list is printing nearly 50 lins in one page how to control it to 20 and how to increase the font size in the alv grid output can anyone guide me its bit urgent  plzzzzzz SIRI