Forum Stats

  • 3,752,288 Users
  • 2,250,483 Discussions
  • 7,867,783 Comments

Discussions

Display a Windows FONT dialog box

Scott Morrow
Scott Morrow Member Posts: 1 Green Ribbon

In Forms 6i, we had a D2KWUtil library to display and use a Windows font dialog. You could call the standard Windows font chooser and return the selected results to the Oracle form.

In Forms 12C, moving to the WebUtil library, there is no replacement for the ability to display a font dialog box. (We need this because we have a screen that our users may customize column widths, font sizes, font colors, etc. A hook to the existing Windows font picker made sense. I can't see any simple way to do it in Forms 12C.

I'm not a Java guy - Is there possibly a java library or something else I cn make use of to re-enable our font picker dialog? (I'd rather avoid having to build/code my own if possible.) Any suggestions appreciated.

Answers

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,815 Employee

    It won't do you much good to display the OS dialog as the form will not be able to display those fonts. The form is limited to the Java "logical" fonts, of which there are only a few. More information can be found here:

    https://docs.oracle.com/javase/tutorial/2d/text/fonts.html

    https://docs.oracle.com/en/middleware/developer-tools/forms/12.2.1.4/working-forms/configuring-and-managing-forms-services.html#GUID-893C94B9-AAA6-411F-BD2E-B3DBF8323482

    Since there are only a few fonts styles to choose from, it would make more sense to create your own dialog or add your own drop-down list to control the font face and size.

    In a future release we plan to include support of native fonts, however for now, showing native fonts is a bit painful and requires configuration changes on the user machine.

    In the future:

    https://twitter.com/OracleFormsPM/status/1271558029406687232

  • MAHMOUD_HASSAN
    MAHMOUD_HASSAN Member Posts: 8 Green Ribbon
    edited Sep 21, 2021 1:58PM

    For the same topic, I have created an executable jar file to integrate with oracle Forms server 12c :

    1- The jar file is signed with a certificate and after that, before using it when run not display the dialogue as before signed.

    2- Did the required configuration, like change update formweb.cfg, Defualt.env and copy the signed jar file in the java folder under forms.

    3-We are using Forms standalone launcher (FSAL) to run our application without a browser as an internal application.

    4-Update the Form in the builder to use the dialogue font jar signed file.

    5-After run the application and when to open the specified form, it gives me this error in the image :


    Questions :

    • I need to know, is this the best solution to use java dialogue fonts? if not need to suggest another one?
    • what is the cause of this error displayed?
    • Shall we use the same version of java when signing the jar file?
  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,815 Employee

    As I mentioned, there is limited value in displaying a Font dialog to the user because Forms cannot use the fonts on the user-tier. However, if you use a PJC to extend the desired Forms objects (e.g. text item, display item, etc) then you likely can use local fonts.

    Regarding your question/comment, as the error message text suggests the server side runtime (frmweb) crashed. Obviously this is an extremely generic error. This often occurs when an un-handled exception occurs or when the runtime was not able to start at all.

    As mentioned, this is not likely a client-side problem, so signed jar or not it is not likely related. It is more likely an issue with your Forms code or something sent from the client to the server. You will need to debug both your Forms and Java code to understand where the failure exists.

  • MAHMOUD_HASSAN
    MAHMOUD_HASSAN Member Posts: 8 Green Ribbon

    Need to confirm that, we are using Forms standalone launcher (FSAL) to run our application without a browser as an internal application! Does this allow the oracle application to run java dialogue fonts or not?

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 6,815 Employee

    FSAL supports most of the same functionality as any other configuration. In short, it is a Java client just like Web Start or Embedded Java.