Tuesday 4 July 2017

Restricting shuttle choices even faster

Some months ago I published an Oracle Apex plugin to restrict the left side shuttle choices. You can read the original post here.
On the demo page the On Change event was used to refresh the left side list. My friend Alex Nuijten made the remark this was not very intuitive. The user needs to navigate out of the selection item to see the change.
So I changed the demo page to provide instant feedback. The selection is now refreshed after each keystroke. As this process is completely executed on the client the response is very fast. Only for very long list the user might notice a slight delay.
No changes to the plugin were needed. It can still be downloaded at apex.world


Here is how is was done:

Selection item
Name : P400_SELECTION
Type: Text Field

Dynamic Action
Name: Select on keystroke
Event: Key Release
Selection Type : Item
Item(s): P400_SELECTION

True Action
Name: Perform Selection
Action: Restrict Shuttle Values [plug-in]
Search Item: P400_SELECTION
Selection Type: Item(s)
Item(s): P400_SHUTTLE
Fire on initialization: No

Update 22-07-2017: A new version 1.2 has been released with a bug fix.This bug prevented the plug-in form functioning. 

Happy Apexing


7 comments:

GB said...

I created a test page with the text field, shuttle and dynamic action. But I cannot get the filter to work. It seems pretty straight forward, any suggestions?

GB said...

Debug messages from the console: the word fieldst is really fieldset, the system will not allow me to post fieldset

Catch Return
Restrict Shuttle Values: search_item= P90_FILTER
Restrict Shuttle Values: shuttle_item=
perform Restrict shuttle values
search_words= Array [ "car" ]
Error: Syntax error, unrecognized expression: #[object HTMLFieldSetElement]_LEFT option

Dick Dral said...

Hi GB,

from the log it seems to me that the shuttle item is not defined.
Choose the shuttle item as Affected Item.

Thanks,
Dick

GB said...

The blog actually stripped the content that I was pasting because it is the form of an html tag. Below is the line from the console after I removed the '<' before the word fieldset and '>' from the very end.

Restrict Shuttle Values: shuttle_item= fieldset id="P91_SHUTTLE" class="shuttle" aria-labelledby="P91_SHUTTLE_LABEL" tabindex="-1"

Dick Dral said...

Hi GB,

I found an error in the JavaScript code of the plugin. This was the cause of the behavior you observed.
You can find the new version on apex.world.

Thanks,
Dick

GB said...

Okay, thanks. I will give it another try.

Gulabi News said...
This comment has been removed by a blog administrator.