Search2 Web Pattern and AJAX Submit

Search2 Web Pattern and AJAX Submit

  

Hi All,

I have Search2 Web Pattern tied to ComboBox.But i notice that the Search2 functionality disappear from ComboxBox after AJAX submit of a button.I notice that by removing the AJAX Refresh from the code, the SearchButton is there,else it will not.


Does anyone has idea how to encounter this? In my understanding, if i use AJAX Submit at very end of the code, the entire form need to be refresh with all the variable clear.Can anyone help?

 

Johnson Lim wrote:

Hi All,

I have Search2 Web Pattern tied to ComboBox.But i notice that the Search2 functionality disappear from ComboxBox after AJAX submit of a button.I notice that by removing the AJAX Refresh from the code, the SearchButton is there,else it will not.


Does anyone has idea how to encounter this? In my understanding, if i use AJAX Submit at very end of the code, the entire form need to be refresh with all the variable clear.Can anyone help?

 


Hi Johnson,
When you mention about Search2, are you reffering to Select2 Web Pattern?

Can you kindly attach your OML file so I may help to check?

Solution

Hello Johnson,

Never heard of a "Search2" web pattern.

Did you mean the widget Search pattern where you drag an input to its placeholder, or the Select2 widget, that enable auto complete in a combo box?

As you are talking about Combo box, I'll assume you are talking about Select2 (but the idea is the same in the case of the Search pattern).

In this case, you need to do the Ajax Refresh to BOTH the combo box and the Select2, because the Select2 uses the ID of the combo box. When you do an ajax refresh, the IDs changes, and in this case, the JavaScript that is attached to the widget and that will run over the ombo box must be renewed.

If you don't refresh it either, it will still use the old ID and will not work anymore.

Cheers,
Eduardo Jauch

Solution

Thanks Lady, Eduardo. My typo error.It should be Select2