14 Replies Latest reply: Dec 23, 2012 10:04 AM by Andreas Weiden RSS

    search suggestions

      db and dev 10g rel2 , xp sp3
      hi all ,
      i've a text_item for inserting patients names into "patient_name" column in "patients" table.
      i want the user when he tries to insert a patient name , if he writes "a" in the text_item , the text_item suggests the names of patients of the "pat_name" column which begin with the letter "a" ,
      and if he writes "as" , then it suggests the names begin with the letters "as" .

      not just this ,

      sure , any name consists of first name , middle and last name , and after each one there is a space button pressed on the keyboard .
      so , i want when he press "g" , then "grant" is suggested (just "grant" not "grant ronald" or "grant smith" , then he will press "space" to write the middle name ,
      when he do this and write "r" , then "ronald" is suggested (just ronald not"ronald fedrer" or "ronald aflek", then the same thing with the last name , i would be so happy if i can make the first name appears at the first , then the first and the middle name , then the first , second and the third appears in list

      lots of thanks to you
        • 1. Re: search suggestions
          you can use LOV for the same but there is no suggestion available in the oracle forms. you can use this on the HTML pages.
          • 2. Re: search suggestions
            i heard before that i can do it with a when-list-changed trigger of a combo box item ,

            but i do not remember how to do it ?

            if anyone can help ?

            • 3. Re: search suggestions
              Andreas Weiden
              Here is a start, but you'll have to implemnet some of your requirements on your own.

              • 4. Re: search suggestions
                could you send me your email in order to help me with the configuration , it is the first time
                i deal with java
                • 5. Re: search suggestions
                  Andreas Weiden
                  Please ask your questions on the forum.
                  • 6. Re: search suggestions
                    i asked for this , because i thought that it is not allowed to post question about non oracle products here in the forum .
                    but i would be glad if i can ,
                    first of all , i want to try it to know if it is what exactly i want or not , so i moved to the last lines of the page to " The sample dialog" , and

                    1- Download the CBAutoCompletion.zip file
                    2 . Unzip the file
                    3 . copy the ComboBoxCompletion.jar file in the <ORACLE_HOME>/forms/java directory
                    4. Edit your /forms/server/formsweb.cfg file to add the ComboBoxCompletion.jar .
                    5. Open the CBAUTOCOMPLETION.fmb module (Oracle Forms 9.0.2)
                    6 . Compile all and run the module

                    7-The JAR file has to be signed.

                    i did "1 , 2 and 3" .
                    - 4 i did not , because i do not know where and how to add the "ComboBoxCompletion.jar" in the .cfg file ,
                    i mean to which line?
                    and sure "5,6 and 7" are still waiting .


                    Edited by: semsem on Dec 22, 2012 11:38 AM
                    • 7. Re: search suggestions
                      Andreas Weiden
                      In your formsweb.cdg there is a line where all the jars needed on the client are listed. This line starts with ARCHIVE= ( if you use the sun-plugin) or ARCHIVE_JINI= (if you use the JInitiator). Add the new jar there (separated by a comma).
                      • 8. Re: search suggestions
                        in devsuitehome\forms\server\formsweb.cfg , the line looks like so :
                        and i did so ,
                        archive_jini=frmall_jinit.jar,ComboBoxCompletion.jar .

                        but before this i copied the ComboBoxCompletion.jar into devsuitehome\forms\java directory , not into oracle_home\forms\java like mentioned because there is no path like so . ?
                        . Open the CBAUTOCOMPLETION.fmb module (Oracle Forms 9.0.2)
                        my release is 10 1 2 0 2 , but i've tried to open it , and it is opened but when i press f2 to go to the layout editor ,this message appears "can not find javabean with name '.oracle.forms.fd.comboboxcompletion'

                        i clicked "ok" and logged in as hr\hr ,compiled the form then ran it , then a windows appears with the title
                        "hinitiator security warning" asking me
                        " do you want to install and run signed applet distributed by "degrelle"?
                        and options :
                        "grant this session" , "deny" ,"grant always" and "view certificate" are in front of my eyes .

                        i've stopped here , which one should i click on ?

                        • 9. Re: search suggestions
                          Andreas Weiden
                          Well, when you want to use the javabean, you have to grant access either for the session or for always (btw.. each user running that form later will get the same message).
                          • 10. Re: search suggestions
                            no comment for any problems i've mentioned about my release or the message when f2 or path to copy jar file .......???

                            - i've run it and it's run but nothing happened , just the bean ,and the text item and i can write nothing in the text item
                            or insert the cursor into the bean ?

                            what should i do now ?

                            and the message "can not find javabean with name '.oracle.forms.fd.comboboxcompletion'' still appears when i go to the layout editor .

                            Edited by: semsem on Dec 22, 2012 5:05 PM
                            • 11. Re: search suggestions
                              Andreas Weiden
                              You can ignore the message from the layout-editor. If you want to get rid of it, you have to add the jar-file to the FORMSBUILDER_CLASPATH-setting in the registry.

                              you can always open older forms in newer versions, that should not be a problem, simply recompile it. About nothing happening..., check the java-console if there are any errors.
                              • 12. Re: search suggestions
                                the java console

                                Oracle JInitiator: Version
                                Using JRE version Java HotSpot(TM) Client VM
                                User home directory = C:\Documents and Settings\Administrator

                                Proxy Configuration: no proxy

                                JAR cache enabled
                                Location: C:\Documents and Settings\Administrator\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://rocky:8889/forms/java/frmall_jinit.jar from JAR cache

                                Loading http://rocky:8889/forms/java/ComboBoxCompletion.jar from JAR cache



                                connectMode=HTTP, native.

                                إصدار بريمج Forms هو :














                                Exception occurred during event dispatching:

                                java.lang.VerifyError: (class: oracle/forms/fd/CBAutoCompletion$4, method: <init> signature: (Loracle/forms/fd/CBAutoCompletion;Ljavax/swing/JComboBox;)V) Expecting to find object/array on stack

                                     at oracle.forms.fd.CBAutoCompletion.<init>(CBAutoCompletion.java:36)

                                     at oracle.forms.fd.ComboBoxCompletion.setProperty(ComboBoxCompletion.java:128)

                                     at oracle.forms.handler.ComponentItem.setCustomProperty(Unknown Source)

                                     at oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)

                                     at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)

                                     at oracle.forms.handler.UICommon.onUpdate(Unknown Source)

                                     at oracle.forms.engine.Runform.onUpdateHandler(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.handler.LogonDialog.actionPerformed(Unknown Source)

                                     at oracle.ewt.button.PushButton.processActionEvent(Unknown Source)

                                     at oracle.ewt.button.PushButton.processEventImpl(Unknown Source)

                                     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)

                                     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)

                                     at oracle.ewt.button.PushButton.activate(Unknown Source)

                                     at oracle.ewt.lwAWT.AbstractButton._processKeyPress(Unknown Source)

                                     at oracle.ewt.lwAWT.AbstractButton.processKeyEvent(Unknown Source)

                                     at java.awt.Component.processEvent(Unknown Source)

                                     at java.awt.Container.processEvent(Unknown Source)

                                     at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)

                                     at oracle.ewt.button.PushButton.processEventImpl(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.processKeyEvent(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)
                                • 13. Re: search suggestions
                                  this the form after i've run it

                                  • 14. Re: search suggestions
                                    Andreas Weiden
                                    Sorry, but i can't help with that error. You might ask Francois directly.