Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
wiki:2.-desarrollo-app:2.3.-entender-codigo:c.-eventos:4.-before-edit:start [2017/08/09 17:42] – ↷ Page moved from wiki:2.-desarrollo-app:2.3.-entender-codigo.xml:c.-eventos:4.-before-edit:start to wiki:2.-desarrollo-app:2.3.-entender-codigo:c.-eventos:4.-before-edit:start ejetoro | wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:4.-before-edit:start [2023/04/28 13:23] (actual) – [Nodo BEFORE-EDIT] ary | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
+ | {{indexmenu_n> | ||
+ | ===== Nodo BEFORE-EDIT ===== | ||
+ | Aquí se podrán poner todas y cada una de las acciones que se han explicado en la parte de acciones. \\ | ||
+ | \\ | ||
+ | Su ámbito es a nivel de **coll**, como el resto de eventos.\\ | ||
+ | |||
+ | \\ | ||
+ | Este evento se ejecuta cuando alguien entra a editar un objeto de una colección, justo antes de que se pinten los controles en pantalla.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | Asignamos el valor **0** a la bandera " | ||
+ | | ||
+ | <code xml> | ||
+ | < | ||
+ | <action name=" | ||
+ | < | ||
+ | <script language=" | ||
+ | This(" | ||
+ | CheckRecibosPendientes | ||
+ | If This(" | ||
+ | AppData.FailWithMessage -8100," | ||
+ | End If | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | \\ | ||
+ | **Ejecución de script**. En este ejemplo busca si hay llamadas para un cliente en una fecha determinada.\\ | ||
+ | |||
+ | <code xml> | ||
+ | <action name=" | ||
+ | <script language=" | ||
+ | dim c | ||
+ | set c=appdata.GetCollection(" | ||
+ | c.filter=" | ||
+ | c.Startbrowse | ||
+ | |||
+ | //En caso de que haya, se rellenará la bandera " | ||
+ | if not c.currentItem is nothing then | ||
+ | this(" | ||
+ | end if | ||
+ | c.EndBrowse | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | Se **comprueba el usuario** para asignarle los permisos que le correspondan.\\ | ||
+ | \\ | ||
+ | <code xml> | ||
+ | <action name=" | ||
+ | <script language=" | ||
+ | if this(" | ||
+ | this(" | ||
+ | else | ||
+ | if this(" | ||
+ | this(" | ||
+ | else | ||
+ | if this(" | ||
+ | this(" | ||
+ | else | ||
+ | this(" | ||
+ | end if | ||
+ | end if | ||
+ | end if | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | \\ | ||
+ | **Se lanza pantalla de confirmación.**\\ | ||
+ | \\ | ||
+ | <code xml> | ||
+ | <script language=" | ||
+ | if This(" | ||
+ | ok=AppData.UserInterface.MsgBox (" | ||
+ | If ok=6 Then | ||
+ | ' ha dicho si | ||
+ | This(" | ||
+ | else | ||
+ | ' ha dicho no | ||
+ | This(" | ||
+ | end if | ||
+ | end if | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | <code javascript> | ||
+ | < | ||
+ | <action name=" | ||
+ | <script language=" | ||
+ | self.MAP_GROUP=1; | ||
+ | </ | ||
+ | </ | ||
+ | <action name=" | ||
+ | <script language=" | ||
+ | self.MAP_GROUP=1; | ||
+ | self.MAP_TOTAL_PAGES=2; | ||
+ | |||
+ | var v=ui.getView(self); | ||
+ | |||
+ | self.MAP_X=3; | ||
+ | self.MAP_Y=2; | ||
+ | self.MAP_X2=3.5; | ||
+ | self.MAP_Y2=2.3; | ||
+ | | ||
+ | self.MAP_XMASY=self.MAP_X+self.MAP_Y; | ||
+ | self.MAP_XMASY2=self.MAP_X+self.MAP_Y2; | ||
+ | self.MAP_X2MENOSY2=self.MAP_X2-self.MAP_Y2; | ||
+ | self.MAP_XENTREY=self.MAP_X/ | ||
+ | self.MAP_FECHADMY=new Date(); | ||
+ | self.MAP_FECHAYMD=self.MAP_FECHADMY; | ||
+ | self.MAP_FECHAHORA=self.MAP_FECHADMY; | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <code javascript> | ||
+ | < | ||
+ | <action name=" | ||
+ | <script language=" | ||
+ | self.executeNode (" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <code javascript> | ||
+ | < | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <action name=" | ||
+ | <script language=" | ||
+ | self.MAP_GROUP = 1; | ||
+ | self.MAP_TOTAL_PAGES = 7; | ||
+ | self.MAP_ESPECIAL = 0; | ||
+ | self.executeNode(" | ||
+ | self.MAP_RECORDSRX = replica.getRecordsRX().toString() + "/" | ||
+ | self.MAP_RECORDSTX = replica.getRecordsTX().toString() + "/" | ||
+ | self.MAP_RECORDSPEND = replica.getRecordsPend(); | ||
+ | self.MAP_LOG = replica.getLog(); | ||
+ | ui.executeActionAfterDelay(" | ||
+ | if( self.MAP_VERSIONXONELIVE == "## | ||
+ | self.MAP_VERSIONXONELIVE = "No Instalado"; | ||
+ | } | ||
+ | if( self.MAP_MID.indexOf("'", | ||
+ | self.MAP_MID = self.MAP_MID.replace(/'/ | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ |