{{indexmenu_n>1}} ===== Refresh ===== \\ To avoid having to repaint the whole screen and since some of them can be quite complicated, some tools have been implemented to allow us concrete which properties we want to refresh, so that conditions of visibility, colors, margins, etc., are re-evaluated only for the specified properties. \\ \\ In case of a **FLOATING FRAME**, if a frame is refreshed, its direct children are refreshed too, **NO** its children´s children.\\ \\ The **type="NC"** (**Check**) prop ALWAYS refresh the whole screen. \\ \\ The **** node DO NOT refresh the screen when changes the value of some field, if we want to refresh the screen we have to specify the onchange="refresh(Propiedades_A_Refrescar)" ATTRIBUTE __at the property that causes the change__. For what we said earlier, when we have a link field with another collection (MAGNIFYING GLASS), we have to specify the onchange="refresh(Propiedades_A_Refrescar)" attribute to the link field //IDWHATEVER// which is the one that changes value and causes the change of the MAP or else use the script ui.refresh "Propiedades_A_Refrescar" method. ==== Attributes in PROP ==== === onchange === \\ In the different prop we have at our disposal the **onchange** attribute to indicate what we want to refresh when the prop value changes: \\ NOTICE, **onchange="refresh"**, it refresh the FULL collection, included the tabs that are not visible. === postonchange === \\ The postonchange is an attribute executed when we return from an edition with **pushvalue** or after editing a log of a contents. At the (type="B") buttons and in the (type="Z") you can also put a ** postonchange ** attribute that can have the same values ​​that have been described for the ** onchange ** attribute. \\ \\ This **postonchange** attribute, defines what we want to do when returning from an editing window launched with a pushvalue or in the case of a contents, when we return from editing a log of this one. \\ ==== Attributes in NODE ==== \\ In some node we are going to execute, we can specify that after the execution the full screen will NOT be refreshed (By default, it is refreshed).\\ \\ === refresh === \\ In order NOT refresh the whole screen but only the properties that we want are refreshed, we must specify ** refresh = "false" ** as an attribute of the node to be executed, since by default its value is "true". === refresh-prop === \\ In combination with the refresh="false" attribute, we have to specify also the **refresh-prop** attribute to indicate the properties we want to refresh. ... === refresh-owner === \\ If the node executed is in some contents, we can indicate it to refresh **a property of the father object** with the **refresh-owner** attribute .\\ \\ The **refresh-owner** attribute can be specified in any node of a contents, such as **,, , ...** ... ==== Refresh with SCRIPT ==== \\ Instead doing it with attributes in the XML, we can indicate it the refresh through an script "**refresh**" method of AppData.Userinterface, by indicating the properties we want to refresh. ui.refresh "PROP1,PROP2" //If we do it with VBSCRIPT. ui.refresh("PROP1,PROP2"); //In case doing it in JAVASCRIPT. ==== RefreshAll ==== \\ To avoid having to indicate separately all the props that we want to refresh in a view, the RefreshAll method has been implemented, which refreshs all the children(only the first level), of the view or frame passed as parameter. \\ // With this we tell it to refresh all the children contained in the "floatingRespuesta" Frame. ui.getView(self).refreshAll("floatingRespuesta"); ==== refreshValue. Only the value. ==== \\ If what changes is **only the value** of some property and **the visual aspect doesn´t vary** (font, visibility, foreground and background colors, etc) we can use the "refreshValue" method of AppData.userInterface that is much faster and efficient. ui.refreshValue "PROP1,PROP2" //If we do it with VBSCRIPT ui.refreshValue("PROP1,PROP2"); //If we do it with JAVASCRIPT ==== Refresh of a CONTENTS ==== \\ We can refresh only a log of a contents instead refreshing the full contents. For this, we can use two appData.userInterface methods, which are ui.refreshContentRow and ui.refreshContentSelectedRow === ui.refreshContentRow === \\ In the node we are going to execute, we have to put the **refresh="false"** in order NOT to refresh everything, just only what we specify it. === ui.refreshContentSelectedRow === \\ In the node we are going to execute, we have to put the refresh=“false” in order NOT to refresh everything, just only what we specify it. \\ \\ In this case, the **selecteditem** of the contents is executed, so that the only parameter we have to pass it is the name of the prop of the contents we want to refresh, IT IS NOT necessary to pass it the ID of the array with the position of the log we want to refresh as the case of the previous method, since the selecteditem is executed over the log that the user did select. \\ Notice that in the refreshing examples of the contents, only the visual appearance on the screen has been updated, at no time the data have been saved.