Dropdown Select does't work after ajax refresh call

Hi all,

I'm using Outsystems 11 and I'm having a problem with the DropDown select after ajax call, what happens is that when I click in the Radio Button the Container where is the ComboBox show up but the DropDown select  stop working(it lost the searching capability, the combobox appears only with the data and no css styling), I tried to use ajax refresh in the DropDown select but no success. Please find the images bellow:

Screen Action

Form

The data for the ComboBox is comming from a Rest API.

Best Regards

Hi Vanilson,


Can you try to surround the combobox + the dropdown widget together in a container, give it a name, and do the ajax refresh on the new container, not on the combobox itself.


Regards,

Hasan

Hi Vanilson,

Did you debug the code and checked that is the API response is assigned to drop down or not ? Or API is returning data or not ?

Please debug the code and check that whether API is returning data or not.

Kind Regards,


Hi All,

Thank you for the response.

@Hasan Derawan 

I tried your suggestion and the dropdown select is working but I lost all the data.

@Komal Kumbhar 

The API is returning the data, I use this API in other ComboBox.


Best Regards

Hi,

what is the type of your application? Traditional Web or Reactive Web App?

Hi Vanilson,


Base on my understanding, when the page is initially rendered, the dropdown has a search capability which means you are using a Select2 richwidget or any extension/component that adds search capability on dropdown? Is this correct ? 

If you are using a richwidget or any component, did you include the web block in the container that you are trying to ajax refresh ?


Thank you

Kind Regards,

Marco Mateo

If you are using a Dropdown Select from OutSystemsUI, include the DropdownSelect web block in the container you are refreshing. Please see below screenshot for reference:

Hi Marco,

Base on my understanding, when the page is initially rendered, the dropdown has a search capability which means you are using a Select2 richwidget or any extension/component that adds search capability on dropdown? Is this correct ?

Yes, you a´re correct

If you are using a Dropdown Select from OutSystemsUI, include the DropdownSelect web block in the container you are refreshing. Please see below screenshot for reference:

I already did that and is retuning a empty ComboBox. Please see the image below:

Best Regards

Hi Vanilson,

where you have  called your api?

Few suggestion to check:

1) Can you try call api once you  click on radio button. Only if it light call response.

2) if you calling the preparation, Bind it to variable and try to debug the variable on ajax call.

3) You can also bind combo box with serveraction which will have api call, and pass that response to combo box.


Hope it may helps you!!!

Cheers,

Ali Amin


Hi Ali,

Thank you for the response.

In the preparation I called the API and than I bind it to ListEmployee varaible and this variable I use it as Source Record List in the combobox, the action that I called in the radio button remains the same, but the problem remains. I debug  the ListEmployee variable and it says -unavailable in current context:

IntermediateAprover is name of the variable for the combobox.

ListIntermediateApprover is the combobox that have the problem

I even tried to call the API again before and after the ajax refresh and set the result in the ListEmployee but no success.

The values for the combobox disappear only when I call the ajax refresh.

Best Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.