I have a project where users can enter a list of US States for an order. The states themselves are transient entities, but a string I create from them is stored in the order. I have created a sample application (attached) to illustrate what is going on.
Please use Applications->Orders to create an order. Enter a customer name (doesn’t matter what), leave the states field blank, then press the “States” button.
Enter any two letter abbreviations (NY, NJ, CT, AZ for example), pressing ENTER between each one. Starting point:
As soon as I enter CT, the third state, I get this strange view on the screen. Now I enter AZ:
I will now click OK:
It picked up all the states. If I go back into the dialog box by clicking States button again:
They are all there as they should be.
What am I doing wrong here? Why does my dialog box behave strangely while entering state entities?
Thank you. I tried removing the requestFocus but now I have to click in the “state” text field on each new row. The requestFocus selected the field, making data entry faster. So, unfortunately, your solution fixes the display issue but causes another one.
I also have a related question (feel free to ask me to open as a new post ). I have an association set up. The user chooses the parent entity. The child entity has many possible rows (matching a filter), but only one of them is actually associated to the parent. I would like the table to show 15 rows at a time. When I load the entities, I would like the table to move to the page that contains the associated entity, which should be selected. This mimics the way our old Oracle Forms application behaves.
I have not found any way to accomplish this. If I set the maxResults on the loader, then I don’t get all the matching (filtered) rows and it is very possible that the associated entity has not been loaded yet. Hence selecting it fails. I have also not found any way to position a table to a certain page programmatically.