Forum Stats

  • 3,722,809 Users
  • 2,244,417 Discussions
  • 7,850,109 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Oracle forms - Mac OS - trouble with '@'

Matthew D.
Matthew D. Member Posts: 1,010 Gold Trophy

We have oracle forms 12.2.1.4 on OCI and for some reason users (running forms application from Mac OS) can not type '@' in a form.

Strange thing is that i can enter '@' in every Mac OS application, java control panel, this small java program:

import java.awt.*;

class TextFieldExample{

public static void main(String args[]){

Frame f= new Frame("TextField Example");

TextField t1,t2;

t1=new TextField("Welcome to Javatpoint.");

t1.setBounds(50,100, 200,30);

t2=new TextField("AWT Tutorial");

t2.setBounds(50,150, 200,30);

f.add(t1); f.add(t2);

f.setSize(400,400);

f.setLayout(null);

f.setVisible(true);

}

}

and in java applet with firefox.

Running forms with webstart or fsal, it is not possible to type '@' in a form.

Maybe it is related with this Forms 12c - Access Keys Do Not Work on Apple Mac Computers Using Forms Standalone Launcher ( Doc ID 2564969.1 ).

Is there any way to debug this problem?

Regards

Answers

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,490 Employee

    Did you create an SR on this recently? I feel like someone else just mentioned the same issue not long ago. We tried investigating but couldn’t reproduce.

    What might be a good test that I just thought of would be to create a list item and add a when-list-changed trigger. In the trigger message out the value of the item. If @ is shown this suggests the character is being received but not rendered. If not then we can partially assume it was not received.

    Another good question is whether or not this reproduces in the logon dialog. What happens if in a text editor you type something like scott/[email protected] then copy this text to clipboard and paste in logon dialog Username field?

  • Matthew D.
    Matthew D. Member Posts: 1,010 Gold Trophy
    edited November 2020

    Yes, it was my SR.

    Meanwhile I was busy patching servers for CVE-2020-14750.

    First, thanks for tip on logon dialog. As you can see in below gif I can enter '@' in username field:


    But, in test form same thing. Tried with list item and message, copying from list item and message I can see '@', but typing '@' in field is not working. Somehow form is not receiving '@'.


    Regards

    M.


    PS: There is problem with animated gifs. First, gifs are not showing in browser (only static image), and second uploaded gif has 91.59KB, but same downloaded gif has 72KB.

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,490 Employee

    Your logon image shows no characters at all. So I assume when you said, "As you can see in below gif I can enter '@' in username field:", you meant CANNOT ENTER - right?

    As I mentioned, we have not been able to reproduce the issue. As a result this makes troubleshooting it nearly impossible. Can you reproduce this on any other MAC machine? What about on a Windows machine?

    If only reproducing on MAC, I suppose it might be possible that there is a font or character set issue on the MAC - possibly??? Maybe a change to NLS_LANG in the Forms environment settings??

    I just tested Forms 14 😉 on Mac with Java 11 (with FSAL) and it works. Since we haven't changed anything in this area of the code (yet) I can safely say that this behavior would be the same in v12:


  • Matthew D.
    Matthew D. Member Posts: 1,010 Gold Trophy

    Don't know why there is problem with uploaded gif files.

    I can enter '@' in logon screen:


    Already tried with different settings for NLS_LANG.

    Regards

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,490 Employee
    edited November 2020

    As you can see from my screenshots, I/we cannot reproduce the issue. Suggestions/questions:

    1. Can you reproduce this on any other MAC machine?
    2. Can you reproduce this on a Windows machine?
    3. Have you tested with other Java versions? For example I tested with Java 8u271 and 11.0.8
    4. Have you altered Registry.dat in any way? If so, try reverting back to the default settings.
    5. What font face/name was used for the failing objects? If a Microsoft font, change it to a standard True Type or other generic font (e.g. Arial, Helvetica, etc).
    6. Rather than typing in the field, can you insert @ when pasted from the clipboard?
  • Matthew D.
    Matthew D. Member Posts: 1,010 Gold Trophy
    edited November 2020

    My answers:

    1. Can you reproduce this on any other MAC machine?

    Yes.

    2. Can you reproduce this on a Windows machine?

    No.

    3. Have you tested with other Java versions? For example I tested with Java 8u271 and 11.0.8

    I have tested with 8u271 and 11.0.8.

    4. Have you altered Registry.dat in any way? If so, try reverting back to the default settings.

    No.

    5. What font face/name was used for the failing objects? If a Microsoft font, change it to a standard True Type or other generic font (e.g. Arial, Helvetica, etc).

    I have tried with Arial, still can enter '@'.

    6. Rather than typing in the field, can you insert @ when pasted from the clipboard?

    Yes.


    I have made some progress today. If I user US keyboard layout everything is ok (shift + @):


    But, with Croatian layout problems:


    I'm using screen keyboard to show you keys combination to enter '@'.

    As, you can see on picture, window menu is activated:


    It is interesting that on logon screen i'm still able to enter '@'.


    Regards

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,490 Employee

    Well this is all critical information that likely was/is needed in the Service Request.

  • Mani-Oracle
    Mani-Oracle Member Posts: 16 Employee

    Thanks a lot Mike & Mathew for these details.

  • eliasfm
    eliasfm Member Posts: 26 Bronze Badge

    Hello

    I have same problem with spanish layout.

    Best Regards

  • Mani-Oracle
    Mani-Oracle Member Posts: 16 Employee

    Hi Elias,

    You mean you are unable to enter "@" character?

    Regards,

    Manikandan

  • eliasfm
    eliasfm Member Posts: 26 Bronze Badge

    Hello,

    Indeed, I cannot write the character @, nor #, {, ...

    What you have to do is copy and paste from another application.

    As a workaround, in my application, for the text fields, in "Implementation Class" I have a java class so that when it is run on MAC enable a keyListener and inject them. But it is not a very elegant solution. It's very frustrating

    Example:

    public void init(IHandler handler) {

        companyProperties = GetCompanyProperties.getInstance();

        super.init(handler);

        _delegate = new LAF_XP_Delegate(this, handler, companyProperties, LAF_XP_Delegate.CAMPO_TEXTAREA);

        textArea = (LWCommonText) this.getComponent(0);

        addFocusListener(_delegate);

        addMouseListener(_delegate);

        bEsMac = System.getProperty("os.name").equals("Mac OS X");


        if (bEsMac) {

          addKeyListener(this);

        }

      }


      private void macInsertText(String s) {

        try {

          this.requestFocus();

          textArea.insert(s, textArea.getCaretPosition());

        } catch (Exception e) {

          _delegate.logError("MAC_INSERT_TEXT: " + e.toString());

        }

      }

      @Override

      public void keyTyped(KeyEvent e) {

        if (bEsMac) {

          if (e.getKeyChar() == '@') {

            macInsertText("@");

          } else if (e.getKeyChar() == '\\') {

            macInsertText("\\");

          } else if (e.getKeyChar() == '|') {

            macInsertText("|");

          } else if (e.getKeyChar() == '#') {

            macInsertText("#");

          } else if (e.getKeyChar() == '{') {

            macInsertText("{");

          } else if (e.getKeyChar() == '}') {

            macInsertText("}");

          } else if (e.getKeyChar() == '[') {

            macInsertText("[");

          } else if (e.getKeyChar() == ']') {

            macInsertText("]");

          }

        }

      }


    Regards,

  • Mani-Oracle
    Mani-Oracle Member Posts: 16 Employee

    Thanks Elias for sharing, Can you please create a new SR for this via MOS portal

    Regards,

    Manikandan

  • Matthew D.
    Matthew D. Member Posts: 1,010 Gold Trophy

    I have filled SR in October 2020 and so far we did not make any progress.

    It is very frustrating to explain to Oracle support why is this very important for us.

    We have our own ERP forms application in the Oracle cloud and a big number of small companies are using this application without a problem.

    But, for some "strange" reason, there is a big number of CEO and VIP in these companies which are using macOS.

    And, guess what, it looks very bad when they are using an application and can't type '@' just to send mail or type emails in the address book.

    It is not hard to get a conclusion.


    Regards

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,490 Employee

    Interesting news...

    Unfortunately, the original information made understanding how to reproduce the problem a bit unclear. This is/was especially true for anyone not familiar with working with other keyboard layouts.

    I can finally reproduce this problem. That said, although I don't yet fully understand the root cause, I have a high level suspicion. On an English non-Mac keyboard many of the symbols (non-alphabet ) are a second level set of the number keys (0-9). Accessing these symbols on an English layout requires pressing the Shift modifier key to access them. However, on a Mac and in the case of other languages like Croatian, Spanish, and others, the user is required to press the ⌥ (Option) key to access these symbols. Because this is actually the same as the Alt key, the keystroke is (and I'm only guessing at this point) being sent to the menu rather than the desired text field.

    It is my further belief that this works in the logon dialog because it is a modal window and access to the the menu is blocked. You can prove this by simply opening any modal window like an LOV and try entering @ in its text field. Notice it works, again likely because when an LOV is open the underlying menu is not accessible.

    So, although this isn't a solution yet, it is a better understanding of what might be happening.

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,490 Employee
    edited March 2

    While this is being investigated, here are at least two suggested alternatives:

    OPTION1 :

    Change the style of the email entry to use two fields rather than just one. This can be very useful if the email address often includes different domains. If the domain (e.g. @gmail.com) is always the same then you don't even need to expose the @domain.com It can be programmatically added when the user leaves the email field.

    OPTION2 :

    The user can use the builtin Editor (or you can add your own to the field. Without any code changes, all the user needs to do is press Ctrl+e. This will display the text editor where the user can enter the needed text. When they press on OK the value will be placed in the field.

    Here is an example where I use a combo box to include a variety of common domains. This prevents the user from having to type them. They can just choose from the list (or type their own) thereby reducing the chances of making typographical errors.


  • Matthew D.
    Matthew D. Member Posts: 1,010 Gold Trophy

    Since we are using Oracle email delivery service option 1 is not good because there are more than 1000 users with different email domains and we must change the code in forms.

    I have tried option 2 and looks good. I hope you will correct this problem in the near future.


    Regards

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Member Posts: 6,490 Employee

    Both options would require a change to Forms code. As for the first, it uses a combo box so the user can either choose from the list or type in their own value.

Sign In or Register to comment.