Async Command to refresh more than 1 component

hi All,

Facing an issue with async command button.

Issue description: On click of an async button, I have to refresh two components. Hence binded those 2 components for ‘Refresh’ property of async button with comma as the seperator.(As per the documentation given in the Help provided in Designer (Version 7.1.2) tool).

I am expecting these 2 components to be refreshed on click of the async button and display the latest values from server side.

But it is refreshing only first component.

Please find the attached sample project depicting the scenario.

You may ask me to put these 2 components in one parent component and refresh the parent component.

But in my application, Even if I put these components in 1 parent component, the parent component will sit just immediately below the Form component (This is because, the 1 component is at start of the form and other is at the bottom of the form). Hence it will be equivalent to refreshing the entire form and stopping the user to edit other details in my page till the response is received from this async command.

Could you please share your thoughts what modifications I need to do inorder to refresh both components asynchronously.

Kind regards,
Raja sekhar Kintali
SAGAsyncRefresh.zip (15.5 KB)

Thanks for the sample application.

The main problem you are seeing is because the form is being submitted twice (once for each control you need refreshed). Because the controls are input controls, when the second form is submitted (no action is invoked) the current contents of the second input control is blank, and that is set on the server side property.

As a result, when the response comes back, it has overridden the previously set value and now appears blank.

If you change those controls to be output controls, they will refresh as expected.

I hope this helps explain what is occurring.

Regards,
–mark

hi Mark,

Thanks for the hint.

All the TextInput components whichever I want to refresh via async call, put it’s equivalent number of Text components in a hideable panel and refreshed these text components via async call. At client side, put actionCompleteListener on this async call and copied the refreshed Text components details to TextInput components. In this way, gave the required functionality. :slight_smile:

If we give multiple components to refresh on an async call, control is going to server side multiple times, is this an expected behavior of async call?

Kind regards,
Raja sekhar Kintali

Good question. Yes, that is the current design and implementation.

Regards,
–mark