[Bug] Select2 Widget Problems 

  

Hi all,


I'm using a Select2 widget with Id assigned to a Combo Box within a popup window on a web application. 

I have also included a JS Widgets for Layout. However, the combo mulitselect box is not working properly; when inspecting the element and looking at the console I get the following error:


"Uncaught TypeError: $(...).select2 is not a function"


Any help on resolving this would be greatly appreciated. Other elements of the application that I am developing work with this functionality, just not this popup, with no clear discernible difference. 


Kind regards,


Josh

Hi Josh,

Any chance you can share your application, so I can take a look?

Thanks,
R

Hi Rodrigo,


Thanks for getting back to me! We've resolved the issue, we were using some javascript to enable upload functionality of large files. This was breaking the javascript associated with the Select2 widget, alongside others.

The fix was hugely simple but took a while to work out - simply move the javascript to the top of the page, or above the widgets in use. 

Not sure why this is the case however.


Kind regards,

Josh

Hi Guys, I am having a strange problem with the select2 component.
(to Clarify, I am using the SilkUI WebPatterns.Controls.select2 component)

Service Studio 10.0.609
Development env 10.0.502

I have placed the component on the screen and bound it to a class which is used by all combo's on the screen.
I use combos to filter the results set, based on the user assigned (list of users in a specific group) and I use combos within the table results rows to display (or change) an assigned user - once again a list of users in a specific group. 

Upon Ajax refresh of the Table_Wrapper (i.e. the RefreshTable call), only the combos inside the table result lose their select2 component and formatting - reverting back to a default combobox. however, If I perform a full submit, all comboboxes are rendered correctly.

I am running a javascript setInterval to refresh the table wrapper every "n" minutes (integer value stored in database preference for client to configure). To Launch this script I have placed a RunJavascript server action in the preparation of the screen. After reading the above post I deleted the runjavascript action - however, removing the runjavascript action makes no difference to the behaviour at all.

can anyone think of something I am missing?


Thanks.