Official Content

Executes a refresh on the web component itself and the web components it contains. This causes the web component to execute the Start, Refresh and Load events.

Syntax

<web component>.Refresh

Description

This command is very useful when the Web User Experience property is set to "Smooth" as it allows refreshing only the web components needed, leaving out the others in the web page so as to avoid making a full refresh of the page.

Samples

Suppose you need to refresh a web component that is contained in the same web page and in the same level of the web component where an event is triggered.

For example, you have a web page which loads web component A and web component B. Web Component A has the following code:

Event "GetBalance"
    &UserBalance = GetUserBalance(&UserId)
    &websession.set("UserBalance",&UserBalance)
EndEvent

Web Component B uses &UserBalance to display information in the form. It won't get the information from &UserBalance unless the previous code includes an explicit refresh which causes web component B to reload.

Event "GetBalance"
    &UserBalance = GetUserBalance(&UserId)
    &websession.set("UserBalance",&UserBalance)
    WebComponentB.refresh()
EndEvent

This causes web component B to execute the Start, Refresh and Load events, so &UserBalance can be read from the web session in the Refresh event.

See Also

Event Execution Scheme
Event execution on the client side since X Evolution 3

 

 






Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant