{{indexmenu_n>1}} ====== Events / Business Rules ====== /* {{indexmenu>wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:#eventos_reglas_de_negocio}} */ \\ ^Element ^Descrition ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:1.-action:start ]]| Node where the actions to be performed in the events defined in our application will be displayed. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:2.-create:start ]]| Node in which the rules of creation of the collections are going to be described. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:3.-insert:start ]]| Node in which the rules and actions of recording in a collection are going to be established.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:4.-before-edit:start ]]|Event executed when editing an object, before painting the screen. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:4.5.-after-edit:start ]]|Event executed when editing an object just after painting the screen. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:5.-onchange:start]]| Node in which the fields whose changes you want to monitor and the actions you want to execute when the changes occur are described.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:6.-delete:start ]]| Node in which the rules and actions for the elimination of collections will be described.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:7.-maintenance:start ]]| Node to define maintenances in an application.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:8.-selecteditem:start ]]| Node that takes place when a contents file is selected. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:9.-onlogon:start ]]| Business rule that takes place when we enter at the application. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:10.-onlogoff:start]]|Business rule that takes place when we are going to exit from the application. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:11.-onback:start]]| Event that supports the backward button that executes this node. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:12.-replica-ok:start]]| Node used to capture the replication event of any table in the database. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:13.-auto-selecteditem:start]]| It takes place when the "slides" or presentations in a contents are automatically passing.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:14.-reglas-de-negocio:start]]| Explanation of the different "events" available in XOne to define the business rules. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:15.-binding:start]]| Binding | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:16-sys-message:start]]| Special node of the "Companies" collection, to receive events of XOneLive. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:17-notificaciones-push:start]]| Special node of the companies collection launched when you click on a PUSH notification. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:18-onlong-press:start]] |On logon press.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:19-oneditoraction:start]] | On editor action.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:20.-onmessage:start]] |onMessage.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:21.-onrecovery:start]] |onRecovery.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:22.-after-recovery-login:start]] | after-recovery-login.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:23.-permissions:start]] | Android only, node to control permissions over device from the app.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:24.-ondate-selected:start]] | onDateSelected| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:25.-onpage-selected:start]] | onPageSelected| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:26.-oncelldraw:start]] | onCellDraw| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:27.-onfocus:start]] | onFocus| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:28.-onlostfocus:start]] | onLostFocus| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:29.-load:start]] | Node that takes place for each record loaded in a contents| \\ The events may occur by an action executed by the user in the visual interface or by an script created by the programmer. =====Actions===== \\ **Actions available for execution within the different Events**. ^Element ^Description ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:1.-action:start|Events Actions ]]| Actions to be made in the different events defined below. | =====Events===== **Events available in the XOne Platform to make the different Business Rules.** ^Element ^Description ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:2.-create:start|create ]]| Event that is executed when an object is created. This creation can be done through the actions of the framework, or by a script created by the programmer| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:3.-insert:start|insert ]]| Event that performs its actions when the user saves an object, either a new insert or an object update| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:4.-before-edit:start|before-edit ]]| Event executed when editing an object, before painting the screen. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:4.5.-after-edit:start|after-edit ]]| Event executed when editing an object just after painting the screen. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:5.-onchange:start|onchange ]]| Execution of the event when modifying the value of a field | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:6.-delete:start|delete ]]| Event that is executed when an object is going to be deleted | ====="Special" Events ===== \\ ^Element ^Description ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:11.-onback:start|onback ]]| Android only, node to control the behaviour of the button behind the system | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:23.-permissions:start|permisos]]| Android only, node to control permissions over device from the app.| === Events in Companies collection === \\ ^Element ^Description ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:7.-maintenance:start|maintenance ]]| Maintenances executed every so often (Programmed Tasks),always in the background. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:9.-onlogon:start|onlogon]]| When entering at the application. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:10.-onlogoff:start|onlogoff ]]| Business rule that takes places when we are going to exit from the application. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:12.-replica-ok:start|replica-ok ]]| Node to capture the replica event from some concrete table. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:16-sys-message:start|sys-message ]]| Special node of the "Companies" collection, to receive XOneLive events.| | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:17-notificaciones-push:start|onpushnotificationclick ]]| Special node of the companies collection launched when clicking on a PUSH notification. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:9.-onlogon:start|onmessage]]| Intents processing. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:9.-onlogon:start|onrecovery]]| It checks if before the user was validated once logged in. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:9.-onlogon:start|after-recovery-login]]| | === Contents Collections Events === \\ ^Element ^Description ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:8.-selecteditem:start|selecteditem ]]| When we select an element of a contents (subgrid/details), the behaviour by default is launching the object selected in edition, if we want to execute some customized actions when selecting an element from the contents, we can use this event. Only available in collections that are shown in contents shape. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:13.-auto-selecteditem:start|auto-selecteditem ]]| Exclusive node for the contents with **viewmode="slideview"**, so that as "presentations" or slides are automatically passed, the node is executed, without the need for the user to go through with his finger. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:29.-load:start]] | Node that takes place for each record loaded in a contents| ===Events in contents of CalendarView type (Calendar view)=== \\ ^Element ^Description ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:start#ondateselected|ondateselected]]| When selecting a day in the calendar. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:start#onpageselected|onpageselected]]| When we move from one month to another. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:start#oncelldraw|oncelldraw]]| When each of the cells in the calendar is going to be painted. | === Events in Tabs (Group Node) === \\ ^Element ^Description ^ | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:start#onfocus|OnFocus]] | Exclusive element for group node. It is produced when a tab gets the focus. | | [[wiki:2.-desarrollo-app:2.3.-codigo:c.-eventos:start#onlostfocus| OnLostFocus]] |Exclusive envent for group node. It is produced when a tab loses the focus. | ===== ONFOCUS ===== \\ Exclusive for the tabs when these take the focus. \\ \\ ===== ONLOSTFOCUS===== \\ Exclusive for the tabs when these lose the focus. ===== ONDATESELECTED ===== \\ When selecting a day in the calendar. By the moment, the only parameter that takes value is **DATEVALUE** with the selected date. \\ ===== ONPAGESELECTED ===== \\ It is executed when doing "Swipe", when we move when you go from one month to another one in the calendar. \\ ===== ONCELLDRAW ===== \\ This is executed when EACH of the cells in the calendar is going to be painted. If the script is heavy, it may take a long time. \\ It is recommended not to use when speed is required. \\