I have a Primefaces picklist, and when I try moving all items from the source to the target list (move right all) or from the target to source (move left all), I get a warning when I use Mozilla Firefox –
Warning - Unresponsive Script.
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: http://localhost:9090/...../faces/javax.faces.resource/jquery/jquery.js?ln=primefaces:23
It then prompts me to Continue, or
Stop Script
This happens only when the number of items in the list is really large.. In my case I have nearly 260 items. Also, this issue occurs only Mozilla Firefox, not when I use Google Chrome. This is my picklist code –
<p:pickList id="picklist1"
value="#{picklistFields}"
iconOnly="true" var="layout" itemLabel="#{layout}"
itemValue="#{layout}" showTargetControls="true"
effect="highlight">
<f:facet name="sourceCaption">Source</f:facet>
<f:facet name="targetCaption">Target</f:facet>
</p:pickList>
Please let me know if there is a way to avoid the warning.
Figured out the solution!
When I clicked on
Continuein the Warning Message, moving all items from source to target (or from target to source) was working perfectly. It meant that the script required more time to be processed, so here’s what I had to do –about:configin Mozilla Firefox address bardom.max_script_run_time, and reset the value to 20 (this is the integer value that worked for me, you can reset it to a higher value if required)When I tried moving all items after completing the above settings, I didn’t get the warning message again.