File: vc_button.xml

package info (click to toggle)
virtuoso-opensource 6.1.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 213,384 kB
  • ctags: 120,485
  • sloc: ansic: 631,183; sql: 420,245; xml: 272,257; java: 62,959; sh: 39,240; cpp: 37,890; cs: 24,942; php: 12,251; yacc: 8,812; lex: 7,135; makefile: 6,331; jsp: 3,739; asm: 3,281; ada: 1,681; awk: 1,639; pascal: 1,089; perl: 1,017; ruby: 1,000; python: 329
file content (599 lines) | stat: -rw-r--r-- 23,378 bytes parent folder | download | duplicates (2)
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
<refentry id="vc_button">
  <refmeta>
  <refentrytitle>button</refentrytitle>
  <refmiscinfo>vspx_control</refmiscinfo>
  </refmeta>
  <refnamediv>
  <refname>button</refname>
  <refpurpose>Scriptable button.</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
   <funcsynopsis id="vc_syn_button">
    <funcprototype id="vc_proto_button">
      <funcdef>
            &lt;<function>button</function> <attribute>
          <parameter>name</parameter> (required) </attribute>
        <attribute>
          <parameter>annotation</parameter> (optional) </attribute>
        <attribute>
          <parameter>initial-enable</parameter> (optional) </attribute>
        <attribute>
          <parameter>enabled</parameter> (optional) </attribute>
        <attribute>
          <parameter>instantiate</parameter> (optional) </attribute>
        <attribute>
          <parameter>control-udt</parameter> (optional) </attribute>
        <attribute>
          <parameter>xsd-stub-xhtml</parameter> (optional) </attribute>
        <attribute>
          <parameter>width</parameter> (optional) </attribute>
        <attribute>
          <parameter>height</parameter> (optional) </attribute>
        <attribute>
          <parameter>column</parameter> (optional) </attribute>
        <attribute>
          <parameter>null-value</parameter> (optional) </attribute>
        <attribute>
          <parameter>action</parameter> (required) </attribute>
        <attribute>
          <parameter>value</parameter> (required) </attribute>
        <attribute>
          <parameter>style</parameter> (optional) </attribute>
        <attribute>
          <parameter>active</parameter> (optional) </attribute>
        <attribute>
          <parameter>initial-active</parameter> (optional) </attribute>
        <attribute>
          <parameter>child-window-options</parameter> (optional) </attribute>
        <attribute>
          <parameter>browser-current</parameter> (optional) </attribute>
        <attribute>
          <parameter>browser-filter</parameter> (optional) </attribute>
        <attribute>
          <parameter>browser-list</parameter> (optional) </attribute>
        <attribute>
          <parameter>browser-mode</parameter> (optional) </attribute>
        <attribute>
          <parameter>browser-type</parameter> (optional) </attribute>
        <attribute>
          <parameter>browser-xfer</parameter> (optional) </attribute>
        <attribute>
          <parameter>selector</parameter> (optional) </attribute>
        <attribute>
          <parameter>format</parameter> (optional) </attribute>
        <attribute>
          <parameter>debug-srcfile</parameter> (optional) </attribute>
        <attribute>
          <parameter>debug-srcline</parameter> (optional) </attribute>
        <attribute>
          <parameter>debug-log</parameter> (optional) </attribute>
 /&gt;</funcdef>
    </funcprototype>
   </funcsynopsis>
  </refsynopsisdiv>
  <refsect1 id="vc_desc_button">
  <title>Description</title>
  <para>Scriptable version of Submit Button of the HTML form. Depending of
&#39;action&#39; attribute it may have variants. In some of these variants the button will not have a submit function, as in select and browse buttons.  In these cases the button will use client JavaScript to pop up new windows or for setting values in other windows.
</para>
  </refsect1>
  <refsect1 id="vc_attrs_button">
  <title>Attributes</title>
  <formalpara>
   <title>name = <link linkend="vc_type_SqlName">SqlName</link>
   </title>
    <para>A page level unique name identifying a control.</para>
  </formalpara>
  <formalpara>
    <title>annotation</title>
    <para>A human readable comment.</para>
  </formalpara>
  <formalpara>
   <title>initial-enable = <link linkend="vc_type_CalculateableValue">CalculateableValue</link>
   </title>
    <para>Determines  whether  a control is initially visible. True by default. Could be data-bound to an SQL expression.</para>
  </formalpara>
  <formalpara>
   <title>enabled = <link linkend="vc_type_CalculateableValue">CalculateableValue</link>
   </title>
    <para>Determines  whether  a control is visible. True by default. Could be data-bound to an SQL expression.</para>
  </formalpara>
  <formalpara>
   <title>instantiate = <link linkend="vc_type_CalculateableValue">CalculateableValue</link>
   </title>
    <para>Determines whether a control instantiate its children. It is true by default. It could be data-bound to an SQL expression. Unlike most of calcucateable attributes, the value of this attribute for a control is calcluated before calling &#39;on-init&#39; event handler of the control; other values are calculated before calling &#39;before-data-bind&#39; event handler.</para>
  </formalpara>
  <formalpara>
   <title>control-udt = <link linkend="vc_type_SqlName">SqlName</link>
   </title>
    <para>At run time every control is represented as an instance of some user-defined type (UDT). VSPX compiles selects the UDT to use depending on name of the XML element that represents the control and maybe some of its attributes. In some specific cases the application developer may instruct VSPX compiler to use some other UDT, e.g. an application-specific UDT that is derived from the preset one. If specified, the value of &#39;control-udt&#39; attribute should be equal to the name of the desired target UDT.</para>
  </formalpara>
  <formalpara>
    <title>xsd-stub-xhtml</title>
    <para>This attribute is for internal use only. It has no effect if added to the source VSPX file.</para>
  </formalpara>
  <formalpara>
    <title>width</title>
    <para>Visible width of the control when it is displayed in WYSIWYG tools when the source VSPX text is edited.
The value of this attribute will not be used when the resulting HTML is rendered.</para>
  </formalpara>
  <formalpara>
    <title>height</title>
    <para>Visible width of the control when it is displayed in WYSIWYG tools when the source VSPX text is edited.
The value of this attribute will not be used when the resulting HTML is rendered.</para>
  </formalpara>
  <formalpara>
   <title>column = <link linkend="vc_type_SqlName">SqlName</link>
   </title>
    <para>The name of the column bound.
If nothing else is specified, the column meta data from the containing update form sets the field&#39;s attributes.
</para>
  </formalpara>
  <formalpara>
    <title>null-value</title>
    <para>This value will be shown if value of the column is NULL, also
	      value of the control will be set to null if this value is passed upon POST request.
	  </para>
  </formalpara>
  <formalpara>
    <title>action</title>
    <para>This specifies the button subclass to use.</para>
   <table>
      <title>Allowed values of the &#39;action&#39; attribute</title>
    <tgroup cols="2">
     <tbody>
      <row>
            <entry>simple</entry>
       <entry>
              <para>is a simple submit button, no special functions
				</para>
       </entry>
      </row>
      <row>
            <entry>submit</entry>
       <entry>
              <para>an alias of &#39;simple&#39; button, obsolete
				</para>
       </entry>
      </row>
      <row>
            <entry>delete</entry>
       <entry>
              <para>a button for deleting a row in a data-set or data-grid control. This is represented as a submit button with a special on-post script. The delete function is performed based on table, key attributes. (check implementation!!)
				</para>
       </entry>
      </row>
      <row>
            <entry>browse</entry>
       <entry>
              <para>Button that opens pup-up window using client-side javascript (browse-button).
This control allows the designer to place some part of a form&#39;s input into a pop-up window. When the HTML page is rendered, this control puts a button and associated client-side javascript into the resulting page so clicking the button opens a child window.  </para>
       </entry>
      </row>
      <row>
            <entry>return</entry>
       <entry>
              <para>
This is to be used on a page invoked for selecting from a browse button.  Specifies that the value of the fields designated by the field children are to be asigned to the corresponding fields of the invoking page.
				</para>
       </entry>
      </row>
      <row>
            <entry>logout</entry>
       <entry>
              <para> This will terminate the current session when clicked.  Can only occur inside the login control.
				</para>
       </entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </formalpara>
  <formalpara>
   <title>value = <link linkend="vc_type_CalculateableValue">CalculateableValue</link>
   </title>
    <para>Text of the label of the button.</para>
  </formalpara>
  <formalpara>
    <title>style</title>
    <para>A style of button, affects appearance.</para>
   <table>
      <title>Allowed values of the &#39;style&#39; attribute</title>
    <tgroup cols="2">
     <tbody>
      <row>
            <entry>submit</entry>
       <entry>
              <para>This is a default style used, no special handling.
The button will be rendered as a usual submit button.
				</para>
       </entry>
      </row>
      <row>
            <entry>url</entry>
       <entry>
              <para>The button will be rendered as a link, furthermore client side JavaScript code will be produced to act as submit button.	</para>
       </entry>
      </row>
      <row>
            <entry>image</entry>
       <entry>
              <para>The button will be rendered as an image on the browser under link button. In that case value of button control must be link to the image file.
				</para>
       </entry>
      </row>
     </tbody>
    </tgroup>
   </table>
  </formalpara>
  <formalpara>
   <title>active = <link linkend="vc_type_CalculateableValue">CalculateableValue</link>
   </title>
    <para>A data bound value to enable or disable the button. The default is &#39;1&#39; meaning &#39;enable&#39;.</para>
  </formalpara>
  <formalpara>
   <title>initial-active = <link linkend="vc_type_CalculateableValue">CalculateableValue</link>
   </title>
    <para>A data bound value to enable or disable the button. The default is &#39;1&#39; meaning &#39;enable&#39;.
Unlike &#39;active&#39; attribute, this one is effective only when the page is displayed in the first time, not after user posts data back to the page.</para>
  </formalpara>
  <formalpara>
    <title>child-window-options</title>
    <para>Options for oppening a child pop-up window.This can be used only in conjuction with  action browse.</para>
  </formalpara>
  <formalpara>
    <title>browser-current</title>
    <para>Current directory of browsing. Can be used only with browse button for WebDAV or File system resources.</para>
  </formalpara>
  <formalpara>
    <title>browser-filter</title>
    <para>Filter expression(s) for browsing. (see above)</para>
  </formalpara>
  <formalpara>
    <title>browser-list</title>
    <para>Type of browser list, 0 - short, 1 - long</para>
  </formalpara>
  <formalpara>
    <title>browser-mode</title>
    <para>COL, RES or STANDALONE , for a file system or DAV browse button, this specifies whether to return an path name or internal ID.
</para>
  </formalpara>
  <formalpara>
    <title>browser-type</title>
    <para>This designates the type of browser: dav or OS (filesystem).</para>
  </formalpara>
  <formalpara>
    <title>browser-xfer</title>
    <para>For a browse button, this is the   means  of transferring the data between windows, DOM is default. No other options in current implementation.</para>
  </formalpara>
  <formalpara>
    <title>selector</title>
    <para>For a browse button this is the  URL that will be loaded into the pop up window.</para>
  </formalpara>
  <formalpara>
   <title>format = <link linkend="vc_type_CalculateableValue">CalculateableValue</link>
   </title>
    <para>A sprintf format string for printing the value</para>
  </formalpara>
  <formalpara>
    <title>debug-srcfile</title>
    <para>URI of the source document where the tag comes from.</para>
  </formalpara>
  <formalpara>
    <title>debug-srcline</title>
    <para>Line number in the source document where the tag comes from.</para>
  </formalpara>
  <formalpara>
    <title>debug-log</title>
    <para>This defines what sort of data are saved to the debugging log.
</para>
  </formalpara>
  </refsect1>
  <refsect1 id="vc_udt_button">
  <title>Declaration of type vspx_button</title>
  <para>
 Button class, encapsulate all controls originating a event
</para>
  <screen>
create type vspx_button under vspx_field as
(
  bt_pressed int default 0,
  bt_style  varchar default &#39;submit&#39;,
  bt_close_img varchar,
  bt_open_img varchar,
  bt_url varchar default &#39;&#39;,
  bt_l_pars varchar default &#39;&#39;,
  bt_text varchar default &#39;&#39;,
  bt_anchor int default 0
)  temporary self as ref
overriding method vc_render () returns any,
overriding method vc_xrender () returns any,
overriding method vc_set_model () returns any,
constructor method vspx_button (name varchar, parent vspx_control)
</screen>
  </refsect1>
  <refsect1 id="vc_ex_button">
  <title>Examples</title>
   <example id="vc_ex_button__0">
    <title>
  Buton shown as an image
</title>
    <para>
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
 -  
 -  $Id: button__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2006 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program 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
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  


The button of the form will be shown as a picture plus.gif. Attributes whose names start with &#39;xhtml_&#39; are
placed into the resulting HTML with no changes.

</para>
    <screen>
&lt;v:page name=&quot;button__0&quot; xmlns:v=&quot;http://www.openlinksw.com/vspx/&quot;&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;VSPX samples | v:button&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;v:form name=&quot;form1&quot; type=&quot;simple&quot; action=&quot;&quot; method=&quot;POST&quot;&gt;
        &lt;v:text name=&quot;txt1&quot; default=&quot;&quot;/&gt;
        &lt;v:button name=&quot;submit1&quot; action=&quot;simple&quot; style=&quot;image&quot; xhtml_alt=&quot;A test button&quot; value=&quot;--&#39;plus.gif&#39;&quot; /&gt;
      &lt;/v:form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
&lt;/v:page&gt;
</screen>
   </example>
   <example id="vc_ex_button__1">
    <title>
  Simple &#39;Add-Number&#39; example
</title>
    <para>
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
 -  
 -  $Id: button__1.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2006 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program 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
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  


The form accepts two numbers and calculates their sum.

</para>
    <screen>
&lt;v:page name=&quot;button__1&quot; xmlns:v=&quot;http://www.openlinksw.com/vspx/&quot;&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;VSPX samples | v:button&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;v:form name=&quot;f1&quot; type=&quot;simple&quot; action=&quot;&quot; method=&quot;POST&quot;&gt;
	&lt;v:label name=&quot;l1&quot; value=&quot;--0&quot; format=&quot;%.2f&quot; /&gt;&lt;br/&gt;
        &lt;v:text name=&quot;t1&quot; default=&quot;0&quot;/&gt;
        &lt;v:text name=&quot;t2&quot; default=&quot;0&quot;/&gt;
        &lt;v:button name=&quot;b1&quot; action=&quot;simple&quot; value=&quot;Add&quot; &gt;
	&lt;v:on-post&gt;
	 self.l1.ufl_value := atof (self.t1.ufl_value) + atof (self.t2.ufl_value);
	&lt;/v:on-post&gt;
	&lt;/v:button&gt;
      &lt;/v:form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
&lt;/v:page&gt;
</screen>
   </example>
   <example id="vc_ex_button__2">
    <title>
  Simple &#39;Browse File&#39; dialog
</title>
    <para>
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
 -  
 -  $Id: button__2.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2006 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program 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
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  


The form allows to select a file from server&#39;s file system

&lt;html&gt;
&lt;body&gt;
</para>
    <screen>
&lt;v:page name=&quot;browse__2&quot; xmlns:v=&quot;http://www.openlinksw.com/vspx/&quot;&gt;
  &lt;v:form name=&quot;f1&quot; type=&quot;simple&quot; method=&quot;POST&quot;&gt;
      &lt;v:text name=&quot;floc&quot; value=&quot;&quot; xhtml_size=&quot;60%&quot; /&gt;
      &lt;v:button action=&#39;browse&#39; name=&quot;cmb&quot; selector=&quot;browser/dav_browser.vsp&quot;
		child-window-options=&quot;resizable=yes, status=no, menubar=no, scrollbars=no, width=640, height=400&quot;
		value=&quot;Browse&quot;
		browser-type=&quot;os&quot;
		browser-mode=&quot;RES&quot;
		browser-xfer=&quot;DOM&quot;
		browser-list=&quot;1&quot;
		browser-current=&quot;1&quot;
		browser-filter=&quot;*&quot;&gt;
        &lt;v:field name=&quot;floc&quot; /&gt;
      &lt;/v:button&gt;
  &lt;/v:form&gt;
&lt;/v:page&gt;
&lt;/body&gt;
&lt;/html&gt;
</screen>
   </example>
   <example id="vc_ex_button__3">
    <title>
  Simple browse button example
</title>
    <para>
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
 -  
 -  $Id: button__3.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2006 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program 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
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  


The form allows to select a two values from a different page

&lt;html&gt;
&lt;body&gt;
</para>
    <screen>
&lt;v:page name=&quot;button__3&quot; xmlns:v=&quot;http://www.openlinksw.com/vspx/&quot;&gt;
  &lt;v:form name=&quot;frm&quot; type=&quot;simple&quot; method=&quot;POST&quot;&gt;
      &lt;v:text name=&quot;fld1&quot; value=&quot;&quot; /&gt;
      &lt;v:text name=&quot;fld2&quot; value=&quot;&quot; /&gt;
      &lt;v:button action=&#39;browse&#39; name=&quot;br1&quot; selector=&quot;button__4.vspx&quot;
		child-window-options=&quot;scrollbars=yes, menubar=no, height=630, width=600&quot;
		value=&quot;Browse&quot;&gt;
        &lt;v:field name=&quot;fld1&quot; /&gt;
        &lt;v:field name=&quot;fld2&quot; /&gt;
      &lt;/v:button&gt;
  &lt;/v:form&gt;
&lt;/v:page&gt;
&lt;/body&gt;
&lt;/html&gt;
</screen>
   </example>
   <example id="vc_ex_button__4">
    <title>
  Simple select button example
</title>
    <para>
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
 -  
 -  $Id: button__4.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2006 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program 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
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  


The form returns back to caller form two walues from a text box and select list

&lt;html&gt;
&lt;body&gt;
</para>
    <screen>
&lt;v:page name=&quot;button__4&quot; xmlns:v=&quot;http://www.openlinksw.com/vspx/&quot;&gt;
  &lt;v:form name=&quot;f1&quot; type=&quot;simple&quot; method=&quot;POST&quot;&gt;
     &lt;v:text name=&quot;sl1&quot; value=&quot;Test&quot; /&gt;
     &lt;v:select-list name=&quot;sl2&quot;&gt;
       &lt;v:item name=&quot;*default*&quot; value=&quot;0&quot; /&gt;
       &lt;v:item name=&quot;FIRST&quot; 	value=&quot;1&quot; /&gt;
       &lt;v:item name=&quot;SECOND&quot; 	value=&quot;2&quot; /&gt;
     &lt;/v:select-list&gt;
	&lt;v:button name=&quot;select1&quot; action=&quot;return&quot; value=&quot;Select&quot;&gt;
	  &lt;v:field name=&quot;fld1&quot; ref=&quot;sl1&quot; /&gt;
	  &lt;v:field name=&quot;fld2&quot; ref=&quot;sl2&quot; /&gt;
	&lt;/v:button&gt;
 &lt;/v:form&gt;
&lt;/v:page&gt;
&lt;/body&gt;
&lt;/html&gt;
</screen>
   </example>
  </refsect1>
  <tip>
  <title>See Also: Reference Material in the Tutorial:</title>
   <para>
    <ulink url="/tutorial/web/vx_s_2/form.vspx">VX-S-2</ulink>
   </para>
   <para>
    <ulink url="/tutorial/web/vx_s_7/products.vspx">VX-S-7</ulink>
   </para>
  </tip>
</refentry>