10 Replies Latest reply: Jun 14, 2013 10:48 AM by user302148 RSS

    alert message and timeout PJC

    user302148

      Hi,

      We are using timeout PJC  functionality for our web forms. It's working fine and the form application display the alert/message whenever inactivity time reaches(which is set for 30 minutes). The issue is when you minimized the form application by clicking the browser's minimized button and now let say you are working in Toad or some other application and in a mean time your form application which is minimized and its inactivity time reaches but the alert/message is hidden with the minimized form application. Is there anyway to show the alert/message in my current working window/application? Any advise/suggestion please?

       

      Thanks

      RM

        • 1. Re: alert message and timeout PJC
          GregorM

          Hi.

           

          I suppose you could achieve this by creating java bean alert. This way you could separate alert window from forms window and display it on OS desktop.

           

          Best regards.

          • 2. Re: alert message and timeout PJC
            ck

            or i think  call another form which is for message message with OK Button suggested.

            • 3. Re: alert message and timeout PJC
              user302148

              Thanks for the suggestions.

               

              I need to modify the timeoutPJC.java file because i was getting  java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet; error

              so when i tried to compile TimeoutPJC.java file i get the following errors, can someone please help me

              compiling C:\Oracle10g_ds\forms\demos\timeout\src\oracle\forms\demos\TimeoutPJC.java

              [10:50:39 AM] Compilation complete: 6 errors, 1 warnings.

               

              Error(46,28): cannot access class oracle.forms.engine.Main; file oracle\forms\engine\Main.class not found

              Error(47,29): cannot access class oracle.forms.handler.IHandler; file oracle\forms\handler\IHandler.class not found

              Error(48,32): cannot access class oracle.forms.properties.ID; file oracle\forms\properties\ID.class not found

              Error(49,24): cannot access class oracle.forms.ui.CustomEvent; file oracle\forms\ui\CustomEvent.class not found

              Error(50,24): cannot access class oracle.forms.ui.VBean; file oracle\forms\ui\VBean.class not found

              Error(52,33): class VBean not found in class oracle.forms.demos.TimeoutPJC

              Warning: The file is not part of the active project Project1.jpr, compiled class will be written to Project1.jpr output directory

               

              Thanks again

              RM

              • 4. Re: alert message and timeout PJC
                François Degrelle

                Hello,

                You have to add frmall.jar to the library list of your Java project.

                Francois

                • 5. Re: alert message and timeout PJC
                  user302148

                  Hi Francois, thanks for the reply.

                   

                  I'm still confused on this one. where this library list would be located?

                  C:\Oracle10g_ds\jdev\lib <- I've added to this but still i get the above messages. I'm stuck on this compiling part.

                   

                  Thanks again

                   

                  RM

                  • 6. Re: alert message and timeout PJC
                    François Degrelle

                    The frmall.jar is located in the /forms/java folder.

                    Francois

                    • 7. Re: alert message and timeout PJC
                      user302148

                      Hi Francois,

                       

                      The frmall.jar is already in C:\Oracle10g_ds\forms\java location. But still when i try to compile TimeoutPJC.java in jdeveloper i get the comilation errors.

                       

                      Compiling...
                      C:\Oracle10g_ds\jdev\bin\ojc.exe -noquiet -warn -nowarn:320 -nowarn:486 -nowarn:487 -deprecation:self -target 1.2 -encoding Cp1252 -g -d C:\Oracle10g_ds\jdev\mywork\Application1\Project\classes -make C:\Oracle10g_ds\jdev\mywork\Application1\Project\classes\Project.cdi -classpath C:\Oracle10g_ds\jdk\jre\lib\rt.jar;C:\Oracle10g_ds\jdk\jre\lib\i18n.jar;C:\Oracle10g_ds\jdk\jre\lib\sunrsasign.jar;C:\Oracle10g_ds\jdk\jre\lib\jsse.jar;C:\Oracle10g_ds\jdk\jre\lib\jce.jar;C:\Oracle10g_ds\jdk\jre\lib\charsets.jar;C:\Oracle10g_ds\jdk\jre\classes;C:\Oracle10g_ds\jdev\mywork\Application1\Project\classes -sourcepath C:\Oracle10g_ds\jdev\mywork\Application1\Project\src;C:\Oracle10g_ds\forms\demos\timeout\src;C:\Oracle10g_ds\jdk\src.zip C:\Oracle10g_ds\forms\demos\timeout\src\oracle\forms\demos\TimeoutPJC.java
                        compiling C:\Oracle10g_ds\forms\demos\timeout\src\oracle\forms\demos\TimeoutPJC.java
                      [1:07:42 PM] Compilation complete: 6 errors, 0 warnings.

                       

                      Project: C:\Oracle10g_ds\jdev\mywork\Application1\Project\Project.jpr
                      C:\Oracle10g_ds\forms\demos\timeout\src\oracle\forms\demos\TimeoutPJC.java

                      Error(46,28): cannot access class oracle.forms.engine.Main; file oracle\forms\engine\Main.class not found
                      Error(47,29): cannot access class oracle.forms.handler.IHandler; file oracle\forms\handler\IHandler.class not found
                      Error(48,32): cannot access class oracle.forms.properties.ID; file oracle\forms\properties\ID.class not found
                      Error(49,24): cannot access class oracle.forms.ui.CustomEvent; file oracle\forms\ui\CustomEvent.class not found
                      Error(50,24): cannot access class oracle.forms.ui.VBean; file oracle\forms\ui\VBean.class not found
                      Error(52,33): class VBean not found in class oracle.forms.demos.TimeoutPJC

                       

                      Thanks RM

                      • 8. Re: alert message and timeout PJC
                        CraigB

                        In JDeveloper or Eclipse (whichever Java IDE you are using), you have to add the frmall.jar as a resource.  This is what Francois is talking about when he said: "You have to add frmall.jar to the library list of your Java project."

                         

                        Craig...

                        • 9. Re: alert message and timeout PJC
                          user302148

                          Thanks Francois and CraigB

                           

                          after adding the library path, it compiled fine.

                           

                          Now to fix this error, i found the solution on the forum -> java.lang.NoSuchMethodError: oracle.forms.handler.IHandler.getApplet()Ljava/applet/Applet

                           

                          The reason is you try to use a Java Bean compiled with an older Forms JAR file, like f90all.jar.

                          So, to correct the issue, you have to change the Java code then re-create the JAR file:

                           

                          private Main         formsMain = null;

                          Replace:

                              formsMain  =  (Main) handler.getApplet();

                          by:

                               // getting the Forms Main class
                              try{
                                Method method = handler.getClass()
                                               .getMethod("getApplet", new Class[0]);
                                Object applet = method.invoke(handler, new Object[0]);
                                if (applet instanceof Main) {
                                   formsMain = (Main)applet;
                                }   
                              }catch(Exception ex) {;}

                           

                          after replacing the codes when i compile i get the following error

                          Project: C:\Oracle10g_ds\jdev\mywork\Application1\Project\Project.jpr

                          C:\Oracle10g_ds\forms\demos\timeout\src\oracle\forms\demos\TimeoutPJC.java

                          Error(173,7): class Method not found in class oracle.forms.demos.TimeoutPJC

                           

                          Thanks again

                          RM

                           


                          • 10. Re: alert message and timeout PJC
                            user302148

                            Hi,  Finally compiling problem has been resolved. thanks for your help

                             

                            Now back to the origional problem when you minimized the browser then inactivity exceed message/alert is hidden, however if browser is maximized then the message/alert shows even if you are working in a different application. So I tried as 'cb' has suggested to call another form which is for message with ok button but no luck, I don't know java so i was not able to try GregorM suggestion above (creating java bean alert) . My requirement is if user minimized the web forms application browser then inactivity alert/message should display to them even they are wworking in a different applications.

                             

                            I'm wondering if forms web application browser is minimized then is there anyway we can maximize the browser when inactivity alert/message happens? may be using javascript? because if browser becomes maximized then alert will show no matter if you're working in a different application.

                             

                            thnaks again

                             

                            regards

                            RM