This translation is older than the original page and might be outdated. See what has changed.



Events / Business Rules


Element Descrition
1.-action Node where the actions to be performed in the events defined in our application will be displayed.
2.-create Node in which the rules of creation of the collections are going to be described.
3.-insert Node in which the rules and actions of recording in a collection are going to be established.
4.-before-editEvent executed when editing an object, before painting the screen.
4.5.-after-editEvent executed when editing an object just after painting the screen.
5.-onchange Node in which the fields whose changes you want to monitor and the actions you want to execute when the changes occur are described.
6.-delete Node in which the rules and actions for the elimination of collections will be described.
7.-maintenance Node to define maintenances in an application.
8.-selecteditem Node that takes place when a contents file is selected.
9.-onlogon Business rule that takes place when we enter at the application.
10.-onlogoffBusiness rule that takes place when we are going to exit from the application.
11.-onback Event that supports the backward button that executes this node.
12.-replica-ok Node used to capture the replication event of any table in the database.
13.-auto-selecteditem It takes place when the “slides” or presentations in a contents are automatically passing.
14.-reglas-de-negocio Explanation of the different “events” available in XOne to define the business rules.
15.-binding Binding
16-sys-message Special node of the “Companies” collection, to receive events of XOneLive.
17-notificaciones-push Special node of the companies collection launched when you click on a PUSH notification.
18-onlong-press On logon press.
19-oneditoraction On editor action.
20.-onmessage onMessage.
21.-onrecovery onRecovery.
22.-after-recovery-login after-recovery-login.
23.-permissions Android only, node to control permissions over device from the app.
24.-ondate-selected onDateSelected
25.-onpage-selected onPageSelected
26.-oncelldraw onCellDraw
27.-onfocus onFocus
28.-onlostfocus onLostFocus
29.-load 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 available for execution within the different Events.

Element Description
Events Actions Actions to be made in the different events defined below.

Events available in the XOne Platform to make the different Business Rules.

Element Description
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
insert Event that performs its actions when the user saves an object, either a new insert or an object update
before-edit Event executed when editing an object, before painting the screen.
after-edit Event executed when editing an object just after painting the screen.
onchange Execution of the event when modifying the value of a field
delete Event that is executed when an object is going to be deleted


Element Description
onback Android only, node to control the behaviour of the button behind the system
permisos Android only, node to control permissions over device from the app.

Events in Companies collection


Element Description
maintenance Maintenances executed every so often (Programmed Tasks),always in the background.
onlogon When entering at the application.
onlogoff Business rule that takes places when we are going to exit from the application.
replica-ok Node to capture the replica event from some concrete table.
sys-message Special node of the “Companies” collection, to receive XOneLive events.
onpushnotificationclick Special node of the companies collection launched when clicking on a PUSH notification.
onmessage Intents processing.
onrecovery It checks if before the user was validated once logged in.
after-recovery-login

Contents Collections Events


Element Description
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.
auto-selecteditem Exclusive node for the contents with viewmode=“slideview”, so that as “presentations” or slides are automatically passed, the <auto-selecteditem> node is executed, without the need for the user to go through with his finger.
29.-load Node that takes place for each record loaded in a contents

Events in contents of CalendarView type (Calendar view)


Element Description
ondateselected When selecting a day in the calendar.
onpageselected When we move from one month to another.
oncelldraw When each of the cells in the calendar is going to be painted.

Events in Tabs (Group Node)


Element Description
OnFocus Exclusive element for group node. It is produced when a tab gets the focus.
OnLostFocus Exclusive envent for group node. It is produced when a tab loses the focus.


Exclusive for the tabs when these take the focus.

	<group name="pestana1" id="1" onfocus="ExecuteNode(onfocus(1))" />
	<group name="pestana2" id="2" onfocus="ExecuteNode(onfocus(2))" />
	<group name="pestana3" id="3" onfocus="ExecuteNode(onfocus(3))" />



Exclusive for the tabs when these lose the focus.


When selecting a day in the calendar. By the moment, the only parameter that takes value is DATEVALUE with the selected date.

<ondateselected refresh="true" show-wait-dialog="false" refresh-owner="DatosPoblaciones,MAP_FECHA,MAP_TITLE_NAMES_MES,MAP_TITLE_ANO,MAP_RUTA">
	<action name="runscript">
	<param name="DATEVALUE" />
	<param name="TIMEVALUE" />
	<param name="EVENTVALUE" />
		<script language="vbscript">   
			'Esto es para coger el valor de la fecha del día seleccionado
			thisDataColl.OwnerObject("MAP_FECHA")= DATEVALUE
			thisDataColl.OwnerObject("MAP_TITLE_NAMES_MES")=ucase(cstr(monthname(DATEVALUE)))
			thisDataColl.OwnerObject("MAP_TITLE_ANO")= cstr(year(DATEVALUE))
		</script>
	</action>
</ondateselected>


It is executed when doing “Swipe”, when we move when you go from one month to another one in the calendar.

<onpageselected refresh="true" show-wait-dialog="false" refresh-owner="DatosPoblaciones,MAP_FECHA,MAP_TITLE_NAMES_MES,MAP_TITLE_ANO,MAP_RUTA">
	<action name="runscript">
	<param name="DATEVALUE" />
	<param name="TIMEVALUE" />
	<param name="EVENTVALUE" />
		<script language="vbscript">          
			thisDataColl.OwnerObject("MAP_FECHA")= DATEVALUE
			thisDataColl.OwnerObject("MAP_TITLE_NAMES_MES")=ucase(cstr(monthname(DATEVALUE)))
			thisDataColl.OwnerObject("MAP_TITLE_ANO")= cstr(year(DATEVALUE))
		</script>
	</action>
</onpageselected>


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.

<oncelldraw>
	<action name="runscript">
	<param name="CELLDATE" />
		<script language="VBScript">
			'Poner el script que sea.                              
		</script>
	</action>
</oncelldraw>