Bound "Set Focus" not working

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
RichDotsonMTD
Profound User
Posts: 30
Joined: Mon Jun 22, 2020 1:48 pm
First Name: Rich
Last Name: Dotson
Company Name: MTD Products
State / Province: Ohio
Country: United States
Contact:

Bound "Set Focus" not working

Post by RichDotsonMTD »

I have a UI where all the entry fields have a bound indicator field on the "Set Focus" property. If the data is invalid I move *On to the bound field and redisplay the UI but the field in error does not receive focus. All the fields are defined the same way and none of them receive focus as expected.

Any ideas?
.
.
Attachments
pui.png
pui.png (32.99 KiB) Viewed 1601 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Bound "Set Focus" not working

Post by Scott Klement »

Run the screen so that it attempts to set focus like you want it to. When it fails and you're seeing the screen with focus in the wrong place, hit Ctrl-F9 to create a dump of the screen.

Post that dump here. This will give us complete information on what's happening.
RichDotsonMTD
Profound User
Posts: 30
Joined: Mon Jun 22, 2020 1:48 pm
First Name: Rich
Last Name: Dotson
Company Name: MTD Products
State / Province: Ohio
Country: United States
Contact:

Re: Bound "Set Focus" not working

Post by RichDotsonMTD »

Attached is the downloaded JSON. I was expecting the uiOnlineOrder field to have focus.
The RPGLE code setting the bound field value is: focusOnline = *On;
.
Attachments
json.txt
(62.29 KiB) Downloaded 387 times
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Bound "Set Focus" not working

Post by Scott Klement »

I tried your screen, and focus seems to be going into the "Online Order" field just as you would expect.
dotson_focus.png
dotson_focus.png (35.42 KiB) Viewed 1598 times
You are loading a number of external javascript and css files that I don't have. Perhaps one of them is changing the focus... but without them, focus goes exactly where you say it should.
RichDotsonMTD
Profound User
Posts: 30
Joined: Mon Jun 22, 2020 1:48 pm
First Name: Rich
Last Name: Dotson
Company Name: MTD Products
State / Province: Ohio
Country: United States
Contact:

Re: Bound "Set Focus" not working

Post by RichDotsonMTD »

It's good to know that I have the fields setup correctly. I am using a custom function to enhance the display of my "alert" error messages. I'll research the css/js for that function to see if it's affecting the focus in some way.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests