Diferencias
Muestra las diferencias entre dos versiones de la página.
Próxima revisión | Revisión previa Última revisión Ambos lados, revisión siguiente | ||
wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:4.5.-after-edit:start [2017/08/10 16:19] 127.0.0.1 editor externo |
wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:4.5.-after-edit:start [2019/05/20 17:56] ary [Nodo AFTER-EDIT] |
||
---|---|---|---|
Línea 1: | Línea 1: | ||
{{indexmenu_n> | {{indexmenu_n> | ||
- | ===== Nodo BEFORE-EDIT ===== | + | ===== Nodo AFTER-EDIT ===== |
- | Aquí se podrán poner todas y cada una de las acciones | + | Nodo similar al before-edit, |
\\ | \\ | ||
- | Su ámbito es a nivel de **coll**, como el resto de eventos.\\ | + | La razón de ser de este nodo es principalmente por si los scripts del before-edit son un poco pesados, evitar que el usuario se quede con la pantalla "en blanco" |
+ | \\ | ||
+ | Su ámbito es a nivel de **coll**.\\ | ||
\\ | \\ | ||
- | Este evento se ejecuta cuando alguien | + | Este evento se ejecuta cuando alguien |
\\ | \\ | ||
- | Asignamos | + | En el ejemplo, comprobamos |
| | ||
<code xml> | <code xml> | ||
- | <before-edit> | + | <after-edit show-wait-dialog=" |
- | <action name=" | + | <action name=" |
- | <include file=" | + | <script language=" |
- | <script language=" | + | if ( user.APPVERSION != appData.getGlobalMacro("##VERSION##" |
- | This("MAP_BANDERA")=0 | + | user.APPVERSION = appData.getGlobalMacro("##VERSION##"); |
- | CheckRecibosPendientes | + | user.save(); |
- | If This("MAP_NOPAGA")=1 Then | + | replica.start(); |
- | AppData.FailWithMessage -8100," | + | } |
- | End If | + | </ |
- | </ | + | </ |
- | </ | + | </after-edit> |
- | </before-edit> | + | |
</ | </ | ||
\\ | \\ | ||
- | \\ | ||
- | **Ejecución de script**. En este ejemplo busca si hay llamadas para un cliente en una fecha determinada.\\ | ||
- | < | + | < |
- | <action name=" | + | <!-- se lanza despues del pintado --> |
- | <script language=" | + | < |
- | dim c | + | |
- | set c=appdata.GetCollection("Llamadas") | + | <script language=" |
- | c.filter="IDCLIENTE=" | + | |
- | 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 | ||
- | </ | ||
- | </ |