Adjax refresh on input connected to AutoCompleteWidget

Adjax refresh on input connected to AutoCompleteWidget

  

Hi there, 

I have an autocomplete which is connected to an input widget: 

Basically, I create a new customer in a popup and want to refresh the input such that it now autocompletes with the newly created a customer. I thought I would just launch a server action on the onnotify event for the popup to refresh the customer aggregate and the input widget (as I would do with a dropdown), but this does not work. I have also tried calling the server action that is called for the OnNotify event for the AutoComplete button: 


This does also not work. 

I think I am missing something straightforward here... any suggestions? 

Kind regards,
Cole 

Solution

Hi Cole,

As with other RichWidgets stuff where you link a Web Block to another widget by the Id, you must not only refresh the widget, but also the Web Block. The reason behind this is that on a refresh, a Widget gets a new Id, breaking the link with the RichWidgets Web Block, which has the Id as input. Easiest way is to put both the input and the Web Block in a Container, and refresh the Container instead.

Solution

Kilian Hekhuis wrote:

Hi Cole,

As with other RichWidgets stuff where you link a Web Block to another widget by the Id, you must not only refresh the widget, but also the Web Block. The reason behind this is that on a refresh, a Widget gets a new Id, breaking the link with the RichWidgets Web Block, which has the Id as input. Easiest way is to put both the input and the Web Block in a Container, and refresh the Container instead.


Thank you so much for Clarifying this Kilian!


You're most welcome :). It's a pretty common pitfall, may also happen with pop-ups for example.