How to refresh the current page from web-block?

How to refresh the current page from web-block?

  

Dear all,

I'm still learning on the platform and I'm looking at how to refresh the current page from web-block?

I have at OutSystems web application which is listing of data at a page. I can also click the icon on the row and then update data on the list. As this web-block is used on different pages which are displaying same data I cannot hard link the page with "Destination". I was thinking to use "Common\ExternalURL" as target parameter and then I would need to find out the current page as a parameter for the web block with API? .. or is there some other way to achieve this?


Solution

Hi Sampsa,

Can you explain what your web block does? and what exactly do you need to refresh on your web screens?

Web Blocks can use the (now deprecated) Notify action or trigger (brand new in OutSystems 11!) an Event that the parent element (another Web Block or Web Screen) can react to by assigning a handler Screen action.

Solution

Hi Sampsa,

After clicking icon on the row are you using popup page to update the record and after the updating the record you want to refresh the parent page with updated data?


Regards

-SK-

Shashi kant Shukla wrote:

Hi Sampsa,

After clicking icon on the row are you using popup page to update the record and after the updating the record you want to refresh the parent page with updated data?


Regards

-SK-

Yes, this is what I'm looking for.

Hi Sampsa,

You need to follow below steps:

1. Create a popup page to update the record with Input parameter identifier of that record.

2. Open this popup page on clicking the link on listing page and pass the input parameter(identifier of record).

3. Now using Aggregate/Advance sql with that identifier you need to  populate that record in edit record in popup.

4. Update the record and click save button on popup and after updating records in save action you need to call Notify action in Save action of popup page.

5. In parent screen there should be OnNotify action which is associated with PopupEditor.

6. Refresh the Aggregate/Advance sql in OnNotify of PopupEditor in parent screen which is responsible to list the data and also refresh the Table records.

7. Now you can see the updated records in Table Record.


Please let me know if you still need anything else.

Regards

-SK-

Jorge Martins wrote:

Hi Sampsa,

Can you explain what your web block does? and what exactly do you need to refresh on your web screens?

Web Blocks can use the (now deprecated) Notify action or trigger (brand new in OutSystems 11!) an Event that the parent element (another Web Block or Web Screen) can react to by assigning a handler Screen action.

Thanks, this was what I was looking for and now it is nicely refreshing page for all 4 places. I just had to chain the notify event from web-lock until it did reach the page level and then trigger self-refresh.


Shashi kant Shukla wrote:

Hi Sampsa,

You need to follow below steps:

1. Create a popup page to update the record with Input parameter identifier of that record.

2. Open this popup page on clicking the link on listing page and pass the input parameter(identifier of record).

3. Now using Aggregate/Advance sql with that identifier you need to  populate that record in edit record in popup.

4. Update the record and click save button on popup and after updating records in save action you need to call Notify action in Save action of popup page.

5. In parent screen there should be OnNotify action which is associated with PopupEditor.

6. Refresh the Aggregate/Advance sql in OnNotify of PopupEditor in parent screen which is responsible to list the data and also refresh the Table records.

7. Now you can see the updated records in Table Record.


Please let me know if you still need anything else.

Regards

-SK-


Thank you Shashi, I made it work with Notify.