summaryrefslogtreecommitdiff
path: root/helpcontent2/source/text/shared/02/01170202.xhp
blob: fc0441e815d647c2e73d85d6c38dd461aa20f0b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?xml version="1.0" encoding="UTF-8"?>


<!--
 ***********************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 * 
 * Copyright 2008 by Sun Microsystems, Inc.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * $RCSfile: 01170202.xhp,v $
 * $Revision: 1.10 $
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************
 -->
	
<helpdocument version="1.0">
<meta>
<topic id="textshared0201170202xml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Events</title>
<filename>/text/shared/02/01170202.xhp</filename>
</topic>
<history>
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
<lastedited date="2006-02-23T16:48:00">converted from old format - fpe</lastedited>
</history>
</meta>
<body>
<section id="ereignisse">
<bookmark xml-lang="en-US" branch="index" id="bm_id3150499"><bookmark_value>forms; events</bookmark_value>
<bookmark_value>events;in forms</bookmark_value>
</bookmark>
<paragraph role="heading" id="hd_id3150499" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/shared/02/01170202.xhp" name="Events">Events</link></paragraph>
<paragraph role="paragraph" id="par_id3147043" xml-lang="en-US" l10n="U" oldref="2">The<emph> Events </emph>tab page, allows you to assign a macro to certain events which occur in a form.</paragraph>
</section>
<section id="howtoget">
  <embed href="text/shared/00/00040501.xhp#formulareigenschaftenereignisse"/>
</section>
<paragraph role="paragraph" id="par_id3159233" xml-lang="en-US" l10n="U" oldref="3">To link an event with a macro, first write a macro that contains all the commands to be executed when the event happens. Then assign this macro to the respective event by clicking the <emph>... </emph>button beside the corresponding event. The<emph> Assign Macro </emph>dialog opens, where you can select the macro.</paragraph>
<paragraph role="paragraph" id="par_id3149182" xml-lang="en-US" l10n="U" oldref="29">The following actions can be configured individually, meaning that you can use your own dialogs to depict an action:</paragraph>
<list type="unordered">
<listitem>
<paragraph role="listitem" id="par_id3166460" xml-lang="en-US" l10n="U" oldref="30">Displaying an error message,</paragraph>
</listitem>
</list>
<list type="unordered">
<listitem>
<paragraph role="listitem" id="par_id3152996" xml-lang="en-US" l10n="U" oldref="31">Confirming a delete process (for data records),</paragraph>
</listitem>
</list>
<list type="unordered">
<listitem>
<paragraph role="listitem" id="par_id3153541" xml-lang="en-US" l10n="U" oldref="32">Querying parameters,</paragraph>
</listitem>
</list>
<list type="unordered">
<listitem>
<paragraph role="listitem" id="par_id3155261" xml-lang="en-US" l10n="U" oldref="33">Checking input when saving a data record.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id3153127" xml-lang="en-US" l10n="U" oldref="34">For example, you can issue a "confirm deletion" request such as "Really delete customer xyz?" when deleting a data record.</paragraph>
<paragraph role="paragraph" id="par_id3150986" xml-lang="en-US" l10n="U" oldref="4">The following lists and describes all events in a form that can be linked to a macro:</paragraph>
<sort order="asc">
<section id="reset_update"><comment>UFI: removed help id</comment>
<paragraph role="heading" id="hd_id3147559" xml-lang="en-US" level="2" l10n="U" oldref="17">Before update</paragraph>
<paragraph role="paragraph" id="par_id3149669" xml-lang="en-US" l10n="U" oldref="56"><ahelp hid=".">The Before update event occurs before the control content changed by the user is written into the data source.</ahelp> The linked macro can, for example, prevent this action by returning "FALSE".</paragraph>
<bookmark xml-lang="en-US" branch="hid/HID_EVT_AFTERUPDATE" id="bm_id3154073" localize="false"/>
<paragraph role="heading" id="hd_id3153779" xml-lang="en-US" level="2" l10n="U" oldref="19">After update</paragraph>
<paragraph role="paragraph" id="par_id3153360" xml-lang="en-US" l10n="U" oldref="57"><ahelp hid="HID_EVT_AFTERUPDATE">The After update event occurs after the control content changed by the user has been written into the data source.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/HID_EVT_APPROVERESETTED" id="bm_id3154851" localize="false"/>
<paragraph role="heading" id="hd_id3157909" xml-lang="en-US" level="2" l10n="U" oldref="36">Prior to reset</paragraph>
<paragraph role="paragraph" id="par_id3155390" xml-lang="en-US" l10n="U" oldref="51"><ahelp hid="HID_EVT_APPROVERESETTED">The<emph> Prior to reset </emph>event occurs before a form is reset.</ahelp> The linked macro can, for example, prevent this action by returning "FALSE".</paragraph>
<paragraph role="paragraph" id="par_id3149236" xml-lang="en-US" l10n="U" oldref="52">A form is reset if one of the following conditions is met:</paragraph>
<list type="unordered">
<listitem>
<paragraph role="listitem" id="par_id3149164" xml-lang="en-US" l10n="U" oldref="53">The user presses an (HTML) button that is defined as a reset button.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3153666" xml-lang="en-US" l10n="U" oldref="54">A new and empty record is created in a form that is linked to a data source. For example, in the last record, the <emph>Next Record</emph> button may be pressed.</paragraph>
</listitem>
</list>
<bookmark xml-lang="en-US" branch="hid/HID_EVT_RESETTED" id="bm_id3152473" localize="false"/>
<paragraph role="heading" id="hd_id3156119" xml-lang="en-US" level="2" l10n="U" oldref="37">After resetting</paragraph>
<paragraph role="paragraph" id="par_id3148563" xml-lang="en-US" l10n="U" oldref="55"><ahelp hid="HID_EVT_RESETTED">The<emph> After resetting </emph>event occurs after a form has been reset.</ahelp></paragraph>
</section>
<section id="Section13">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_SUBMITTED" id="bm_id3147084" localize="false"/>
<paragraph role="heading" id="hd_id3150870" xml-lang="en-US" level="2" l10n="U" oldref="27">Before submitting</paragraph>
<paragraph role="paragraph" id="par_id3159152" xml-lang="en-US" l10n="U" oldref="28"><ahelp hid="HID_EVT_SUBMITTED">The<emph> Before submitting </emph>event occurs before the form data is sent.</ahelp></paragraph>
</section>
<section id="Section12">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_LOADED" id="bm_id3151383" localize="false"/>
<paragraph role="heading" id="hd_id3149167" xml-lang="en-US" level="2" l10n="U" oldref="5">When loading</paragraph>
<paragraph role="paragraph" id="par_id3156423" xml-lang="en-US" l10n="U" oldref="6"><ahelp hid="HID_EVT_LOADED">The<emph> When loading </emph>event occurs directly after the form has been loaded.</ahelp></paragraph>
</section>
<section id="Section11">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_RELOADING" id="bm_id3157320" localize="false"/>
<paragraph role="heading" id="hd_id3148451" xml-lang="en-US" level="2" l10n="U" oldref="38">Before reloading</paragraph>
<paragraph role="paragraph" id="par_id3154218" xml-lang="en-US" l10n="U" oldref="39"><ahelp hid="HID_EVT_RELOADING">The<emph> Before reloading </emph>event occurs before the form is reloaded.</ahelp> The data content has not yet been refreshed.</paragraph>
</section>
<section id="Section10">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_RELOADED" id="bm_id3154946" localize="false"/>
<paragraph role="heading" id="hd_id3155102" xml-lang="en-US" level="2" l10n="U" oldref="40">When reloading</paragraph>
<paragraph role="paragraph" id="par_id3157895" xml-lang="en-US" l10n="U" oldref="41"><ahelp hid="HID_EVT_RELOADED">The<emph> When reloading </emph>event occurs directly after the form has been reloaded.</ahelp> The data content has already been refreshed.</paragraph>
</section>
<section id="Section9">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_UNLOADING" id="bm_id3151116" localize="false"/>
<paragraph role="heading" id="hd_id3152792" xml-lang="en-US" level="2" l10n="U" oldref="42">Before unloading</paragraph>
<paragraph role="paragraph" id="par_id3152598" xml-lang="en-US" l10n="U" oldref="43"><ahelp hid="HID_EVT_UNLOADING">The<emph> Before unloading </emph>event occurs before the form is unloaded; that is, separated from its data source.</ahelp></paragraph>
</section>
<section id="Section8">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_UNLOADED" id="bm_id3152938" localize="false"/>
<paragraph role="heading" id="hd_id3154145" xml-lang="en-US" level="2" l10n="U" oldref="44">When unloading</paragraph>
<paragraph role="paragraph" id="par_id3154638" xml-lang="en-US" l10n="U" oldref="45"><ahelp hid="HID_EVT_UNLOADED">The<emph> When unloading </emph>event occurs directly after the form has been unloaded; that is, separated from its data source.</ahelp></paragraph>
</section>
<section id="Section7">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_CONFIRMDELETE" id="bm_id3154127" localize="false"/>
<paragraph role="heading" id="hd_id3147426" xml-lang="en-US" level="2" l10n="U" oldref="25">Confirm deletion</paragraph>
<paragraph role="paragraph" id="par_id3154988" xml-lang="en-US" l10n="U" oldref="26"><ahelp hid="HID_EVT_CONFIRMDELETE">The<emph> Confirm deletion </emph>event occurs as soon as data has been deleted from the form.</ahelp> For example, the linked macro can request confirmation in a dialog.</paragraph>
</section>
<section id="Section6">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_APPROVEROWCHANGE" id="bm_id3151351" localize="false"/>
<paragraph role="heading" id="hd_id3149481" xml-lang="en-US" level="2" l10n="U" oldref="46">Before record action</paragraph>
<paragraph role="paragraph" id="par_id3156007" xml-lang="en-US" l10n="U" oldref="58"><ahelp hid="HID_EVT_APPROVEROWCHANGE">The<emph> Before record action </emph>event occurs before the current record is changed.</ahelp> For example, the linked macro can request confirmation in a dialog.</paragraph>
</section>
<section id="Section5">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_ROWCHANGE" id="bm_id3150685" localize="false"/>
<paragraph role="heading" id="hd_id3145749" xml-lang="en-US" level="2" l10n="U" oldref="47">After record action</paragraph>
<paragraph role="paragraph" id="par_id3146975" xml-lang="en-US" l10n="U" oldref="59"><ahelp hid="HID_EVT_ROWCHANGE">The<emph> After record action </emph>event occurs directly after the current record has been changed.</ahelp></paragraph>
</section>
<section id="Section4">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_POSITIONING" id="bm_id3155413" localize="false"/>
<paragraph role="heading" id="hd_id3154012" xml-lang="en-US" level="2" l10n="U" oldref="48">Before record change</paragraph>
<paragraph role="paragraph" id="par_id3149664" xml-lang="en-US" l10n="U" oldref="60"><ahelp hid="HID_EVT_POSITIONING">The<emph> Before record change </emph>event occurs before the current record pointer is changed.</ahelp>. For example, the linked macro can prevent this action by returning "FALSE".</paragraph>
</section>
<section id="Section3">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_POSITIONED" id="bm_id3150420" localize="false"/>
<paragraph role="heading" id="hd_id3157975" xml-lang="en-US" level="2" l10n="U" oldref="49">After record change</paragraph>
<paragraph role="paragraph" id="par_id3154098" xml-lang="en-US" l10n="U" oldref="61"><ahelp hid="HID_EVT_POSITIONED">The<emph> After record change </emph>event occurs directly after the current record pointer has been changed.</ahelp>.</paragraph>
</section>
<section id="Section2">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_APPROVEPARAMETER" id="bm_id3149298" localize="false"/>
<paragraph role="heading" id="hd_id3151076" xml-lang="en-US" level="2" l10n="U" oldref="50">Fill parameters</paragraph>
<paragraph role="paragraph" id="par_id3147396" xml-lang="en-US" l10n="U" oldref="62"><ahelp hid="HID_EVT_APPROVEPARAMETER">The<emph> Fill parameters </emph>event occurs when the form to be loaded has parameters that must be filled out.</ahelp> For example, the data source of the form can be the following SQL command:</paragraph>
<paragraph role="paragraph" id="par_id3148773" xml-lang="en-US" l10n="U" oldref="63">SELECT * FROM address WHERE name=:name</paragraph>
<paragraph role="paragraph" id="par_id3149581" xml-lang="en-US" l10n="U" oldref="64">Here :name is a parameter that must be filled out when loading. The parameter is automatically filled out from the parent form if possible. If the parameter cannot be filled out, this event is called and a linked macro can fill out the parameter.</paragraph>
</section>
<section id="Section1">
<bookmark xml-lang="en-US" branch="hid/HID_EVT_ERROROCCURED" id="bm_id3148387" localize="false"/>
<paragraph role="heading" id="hd_id3146926" xml-lang="en-US" level="2" l10n="U" oldref="9">Error occurred</paragraph>
<paragraph role="paragraph" id="par_id3149485" xml-lang="en-US" l10n="U" oldref="10"><ahelp hid="HID_EVT_ERROROCCURED">The<emph> Error occurred </emph>event is activated if an error occurs when accessing the data source.</ahelp> This applies to forms, list boxes and combo boxes.</paragraph>
</section>
</sort>
</body>
</helpdocument>