This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
forked from mareknovotny/jboss-seam
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Controls.xml
executable file
·1562 lines (1353 loc) · 60.5 KB
/
Controls.xml
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
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<chapter id="controls">
<title>Seam JSF controls</title>
<para>
Seam includes a number of JSF controls that are useful for working with
Seam. These are intended to complement the built-in JSF controls, and
controls from other third-party libraries. We recommend
JBoss RichFaces, ICEsoft ICEfaces and Apache MyFaces Trinidad tag libraries for use with Seam.
We do not recommend the use of the Tomahawk tag library.
</para>
<section id="controls.tags">
<title>Tags</title>
<para>
To use these tags, define the "<literal>s</literal>" namespace in your page
as follows (facelets only):
</para>
<programlisting role="XHTML"><![CDATA[<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.org/schema/seam/taglib">]]></programlisting>
<para>
The ui example demonstrates the use of a number of these tags.
</para>
<section>
<title>Navigation Controls</title>
<section>
<title><literal><s:button></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
A button that supports invocation of an action with control over
conversation propagation. <emphasis>Does not submit the
form.</emphasis>
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>value</literal> — the label.
</para>
</listitem>
<listitem>
<para>
<literal>action</literal> — a method binding that
specified the action
listener.
</para>
</listitem>
<listitem>
<para>
<literal>view</literal> — the JSF view id to link to.
</para>
</listitem>
<listitem>
<para>
<literal>fragment</literal> — the fragment
identifier to link to.
</para>
</listitem>
<listitem>
<para>
<literal>disabled</literal> — is the link disabled?
</para>
</listitem>
<listitem>
<para>
<literal>propagation</literal> — determines the
conversation propagation style: <literal>begin</literal>,
<literal>join</literal>, <literal>nested</literal>,
<literal>none</literal>, <literal>end</literal>
or <literal>endRoot</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>pageflow</literal> — a pageflow definition
to begin. (This is only useful when
<literal>propagation="begin"</literal> or
<literal>propagation="join"</literal> is used).
</para>
</listitem>
<listitem>
<para>
<literal>includePageParams</literal> — when set to false,
page parameters defined in <literal>pages.xml</literal> will be
excluded from rendering.
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:button id="cancel"
value="Cancel"
action="#{hotelBooking.cancel}"/>]]></programlisting>
<para>
You can specify both <literal>view</literal> and
<literal>action</literal> on <literal><s:link /></literal>.
In this case, the action will be called once the redirect to the
specified view has occurred.
</para>
<para>
The use of action listeners (including the default JSF action
listener) is not supported with <literal><s:button /></literal>.
</para>
</section>
<section>
<title><literal><s:conversationId></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Add the conversation id to JSF link or button (e.g.
<literal><h:commandLink /></literal> ,
<literal><s:button /></literal>).
</para>
<para><emphasis>Attributes</emphasis></para>
<para>None</para>
</section>
<section>
<title><literal><s:taskId></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Add the task id to an output link (or similar JSF control),
when the task is available via <literal>#{task}</literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
</section>
<section>
<title><literal><s:link></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
A link that supports invocation of an action with control over
conversation propagation. <emphasis>Does not submit the
form.</emphasis>
</para>
<para>
The use of action listeners (including the default JSF action
listener) is not supported with <literal><s:link /></literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>value</literal> — the label.
</para>
</listitem>
<listitem>
<para>
<literal>action</literal> — a method binding that
specified the action listener.
</para>
</listitem>
<listitem>
<para>
<literal>view</literal> — the JSF view id to link to.
</para>
</listitem>
<listitem>
<para>
<literal>fragment</literal> — the fragment identifier
to link to.
</para>
</listitem>
<listitem>
<para>
<literal>disabled</literal> — is the link disabled?
</para>
</listitem>
<listitem>
<para>
<literal>propagation</literal> — determines the
conversation propagation style: <literal>begin</literal>,
<literal>join</literal>, <literal>nested</literal>,
<literal>none</literal>, <literal>end</literal>
or <literal>endRoot</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>pageflow</literal> — a pageflow definition
to begin. (This is only useful when using
<literal>propagation="begin"</literal> or
<literal>propagation="join"</literal>.)
</para>
</listitem>
<listitem>
<para>
<literal>includePageParams</literal> — when set to false,
page parameters defined in <literal>pages.xml</literal> will be
excluded from rendering.
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:link id="register" view="/register.xhtml"
value="Register New User"/>]]></programlisting>
<para>
You can specify both <literal>view</literal> and
<literal>action</literal> on <literal><s:link /></literal>.
In this case, the action will be called once the redirect to the
specified view has occured.
</para>
</section>
<section>
<title><literal><s:conversationPropagation></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Customize the conversation propagation for a command link or button
(or similar JSF control). <emphasis>Facelets only.</emphasis>
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>type</literal> — determines the conversation
propagation style: <literal>begin</literal>,
<literal>join</literal>, <literal>nested</literal>,
<literal>none</literal>, <literal>end</literal>
or <literal>endRoot</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>pageflow</literal> — a pageflow definition to
begin. (This is only useful when using
<literal>propagation="begin"</literal> or
<literal>propagation="join"</literal>.)
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:commandButton value="Apply" action="#{personHome.update}">
<s:conversationPropagation type="join" />
</h:commandButton>]]></programlisting>
</section>
<section>
<title>
<literal><s:defaultAction></literal>
</title>
<para>
<emphasis>Description</emphasis>
</para>
<para>
Specify the default action to run when the form is submitted using
the enter key.
</para>
<para>
Currently you can only nest it inside buttons (e.g.
<literal><h:commandButton /></literal>,
<literal><a:commandButton /></literal> or
<literal><tr:commandButton /></literal>).
</para>
<para>
You must specify an id on the action source. You can only have one
default action per form.
</para>
<para>
<emphasis>Attributes</emphasis>
</para>
<para>None.</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:commandButton id="foo" value="Foo" action="#{manager.foo}">
<s:defaultAction />
</h:commandButton>]]></programlisting>
</section>
</section>
<section>
<title>Converters and Validators</title>
<section>
<title><literal><s:convertDateTime></literal></title>
<para><emphasis>Description</emphasis></para>
<para>Perform date or time conversions in the Seam timezone.</para>
<para><emphasis>Attributes</emphasis></para>
<para>None.</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:outputText value="#{item.orderDate}">
<s:convertDateTime type="both" dateStyle="full"/>
</h:outputText>]]></programlisting>
</section>
<section>
<title><literal><s:convertEntity></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Assigns an entity converter to the current component. This is
useful for radio button and dropdown controls.
</para>
<para>
The converter works with any managed entity - either simple or
composite. The converter should be able to find the items
declared in the JSF controls on form submission, otherwise you
will receive a validation error.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>None.</para>
<para><emphasis>Configuration</emphasis></para>
<para>
You must use <emphasis>Seam managed transactions</emphasis> (see
<xref linkend="persistence.seam-managed-transactions" />) with
<literal><s:convertEntity /></literal>.
</para>
<para>
If your <emphasis>Managed Persistence Context</emphasis> isn't
called <literal>entityManager</literal>, then you need to set it
in components.xml:
</para>
<programlisting><![CDATA[<components xmlns="http://jboss.org/schema/seam/components"
xmlns:ui="http://jboss.org/schema/seam/ui">
<ui:jpa-entity-loader entity-manager="#{em}" />]]></programlisting>
<para>
If you are using a <emphasis>Managed Hibernate Session</emphasis>
then you need to set it in components.xml:
</para>
<programlisting><![CDATA[<components xmlns="http://jboss.org/schema/seam/components"
xmlns:ui="http://jboss.org/schema/seam/ui">
<ui:hibernate-entity-loader />]]></programlisting>
<para>
If your <emphasis>Managed Hibernate Session</emphasis> isn't
called <literal>session</literal>, then you need to set it
in components.xml:
</para>
<programlisting><![CDATA[<components xmlns="http://jboss.org/schema/seam/components"
xmlns:ui="http://jboss.org/schema/seam/ui">
<ui:hibernate-entity-loader session="#{hibernateSession}" />]]></programlisting>
<para>
If you want to use more than one entity manager with the entity
converter, you can create a copy of the entity converter for each
entity manager in <literal>components.xml</literal> - note how
the entity converter delegates to the entity loader to perform
persistence operations:
</para>
<programlisting><![CDATA[<components xmlns="http://jboss.org/schema/seam/components"
xmlns:ui="http://jboss.org/schema/seam/ui">
<ui:entity-converter name="standardEntityConverter" entity-loader="#{standardEntityLoader}" />
<ui:jpa-entity-loader name="standardEntityLoader" entity-manager="#{standardEntityManager}" />
<ui:entity-converter name="restrictedEntityConverter" entity-loader="#{restrictedEntityLoader}" />
<ui:jpa-entity-loader name="restrictedEntityLoader" entity-manager="#{restrictedEntityManager}" />]]></programlisting>
<programlisting><![CDATA[<h:selectOneMenu value="#{person.continent}">
<s:selectItems value="#{continents.resultList}" var="continent"
label="#{continent.name}" />
<f:converter converterId="standardEntityConverter" />
</h:selectOneMenu>]]></programlisting>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:selectOneMenu value="#{person.continent}" required="true">
<s:selectItems value="#{continents.resultList}" var="continent"
label="#{continent.name}"
noSelectionLabel="Please Select..."/>
<s:convertEntity />
</h:selectOneMenu>]]></programlisting>
</section>
<section>
<title><literal><s:convertEnum></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Assigns an enum converter to the current component. This is
primarily useful for radio button and dropdown controls.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>None.</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:selectOneMenu value="#{person.honorific}">
<s:selectItems value="#{honorifics}" var="honorific"
label="#{honorific.label}"
noSelectionLabel="Please select" />
<s:convertEnum />
</h:selectOneMenu>]]></programlisting>
</section>
<section>
<title><literal><s:convertAtomicBoolean></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
<literal>javax.faces.convert.Converter</literal> for
<literal>java.util.concurrent.atomic.AtomicBoolean</literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting><![CDATA[<h:outputText value="#{item.valid}">
<s:convertAtomicBoolean />
</h:outputText>]]></programlisting>
</section>
<section>
<title><literal><s:convertAtomicInteger></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
<literal>javax.faces.convert.Converter</literal> for
<literal>java.util.concurrent.atomic.AtomicInteger</literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting><![CDATA[<h:outputText value="#{item.id}">
<s:convertAtomicInteger />
</h:outputText>]]></programlisting>
</section>
<section>
<title><literal><s:convertAtomicLong></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
<literal>javax.faces.convert.Converter</literal> for
<literal>java.util.concurrent.atomic.AtomicLong</literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting><![CDATA[<h:outputText value="#{item.id}">
<s:convertAtomicLong />
</h:outputText>]]></programlisting>
</section>
<section>
<title><literal><s:validateEquality></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Tag to nest inside an input control to validate that its parent's
value is equal (or not equal!) to the referenced control's value.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>for</literal> — The id of a control to validate against.
</para>
</listitem>
<listitem>
<para>
<literal>message</literal> — Message to show on failure.
</para>
</listitem>
<listitem>
<para>
<literal>required</literal> — False will disable a check that a value at all is inputted in fields.
</para>
</listitem>
<listitem>
<para>
<literal>messageId</literal> — Message id to show on failure.
</para>
</listitem>
<listitem>
<para>
<literal>operator</literal> — What operator to use when comparing the values
Valid operators are:
<itemizedlist>
<listitem>
<para>
<literal>equal</literal> — Validates that value.equals(forValue)
</para>
</listitem>
<listitem>
<para>
<literal>not_equal</literal> — Validates that !value.equals(forValue)
</para>
</listitem>
<listitem>
<para>
<literal>greater</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue) > 0]]>
</para>
</listitem>
<listitem>
<para>
<literal>greater_or_equal</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue) >= 0]]>
</para>
</listitem>
<listitem>
<para>
<literal>less</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue) < 0]]>
</para>
</listitem>
<listitem>
<para>
<literal>less_or_equal</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue) <= 0]]>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting><![CDATA[<h:inputText id="name" value="#{bean.name}"/>
<h:inputText id="nameVerification" >
<s:validateEquality for="name" />
</h:inputText>]]></programlisting>
</section>
<section>
<title><literal><s:validate></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
A non-visual control, validates a JSF input field against the
bound property using Hibernate Validator.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:inputText id="userName" required="true"
value="#{customer.userName}">
<s:validate />
</h:inputText>
<h:message for="userName" styleClass="error" />]]></programlisting>
</section>
<section>
<title><literal><s:validateAll></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
A non-visual control, validates all child JSF input fields
against their bound properties using Hibernate Validator.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:validateAll>
<div class="entry">
<h:outputLabel for="username">Username:</h:outputLabel>
<h:inputText id="username" value="#{user.username}"
required="true"/>
<h:message for="username" styleClass="error" />
</div>
<div class="entry">
<h:outputLabel for="password">Password:</h:outputLabel>
<h:inputSecret id="password" value="#{user.password}"
required="true"/>
<h:message for="password" styleClass="error" />
</div>
<div class="entry">
<h:outputLabel for="verify">Verify Password:</h:outputLabel>
<h:inputSecret id="verify" value="#{register.verify}"
required="true"/>
<h:message for="verify" styleClass="error" />
</div>
</s:validateAll>]]></programlisting>
</section>
</section>
<section>
<title>Formatting</title>
<section>
<title><literal><s:decorate></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
"Decorate" a JSF input field when validation fails or when
<literal>required="true"</literal> is set.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>template</literal> — the facelets template
to use to decorate the component
</para>
</listitem>
<listitem>
<para>
<literal>enclose</literal> — if true, the template
used to decorate the input field is enclosed by the
element specified with the "element" attribute. By
default this is a div element.
</para>
</listitem>
<listitem>
<para>
<literal>element</literal> — the element to enclose
the template used to decorate the input field. By default,
the template is enclosed with a div element.
</para>
</listitem>
</itemizedlist>
<para>
<literal>#{invalid}</literal> and <literal>#{required}</literal>
are available inside <literal>s:decorate</literal>;
<literal>#{required}</literal> evaluates to
<literal>true</literal> if you have set the input component being
decorated as required, and <literal>#{invalid}</literal>
evaluates to <literal>true</literal> if a validation error occurs.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:decorate template="edit.xhtml">
<ui:define name="label">Country:</ui:define>
<h:inputText value="#{location.country}" required="true"/>
</s:decorate>]]></programlisting>
<programlisting role="XHTML"><![CDATA[<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.org/schema/seam/taglib">
<div>
<s:label styleClass="#{invalid?'error':''}">
<ui:insert name="label"/>
<s:span styleClass="required" rendered="#{required}">*</s:span>
</s:label>
<span class="#{invalid?'error':''}">
<s:validateAll>
<ui:insert/>
</s:validateAll>
</span>
<s:message styleClass="error"/>
</div>
</ui:composition>]]></programlisting>
</section>
<section>
<title><literal><s:div></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Render a HTML <literal><div></literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:div rendered="#{selectedMember == null}">
Sorry, but this member does not exist.
</s:div>]]></programlisting>
</section>
<section>
<title><literal><s:span></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Render a HTML <literal><span></literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
<itemizedlist>
<listitem>
<para>
<literal>title</literal> — Title for a span.
</para>
</listitem>
</itemizedlist>
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:span styleClass="required" rendered="#{required}" title="Small tooltip">*</s:span>]]></programlisting>
</section>
<section>
<title><literal><s:fragment></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
A non-rendering component useful for enabling/disabling rendering
of it's children.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:fragment rendered="#{auction.highBidder ne null}">
Current bid:
</s:fragment>]]></programlisting>
</section>
<section>
<title><literal><s:label></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
"Decorate" a JSF input field with the label. The label is placed
inside the HTML <literal><label></literal> tag, and is
associated with the nearest JSF input component. It is often
used with <literal><s:decorate></literal>.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>style</literal> — The control's style
</para>
</listitem>
<listitem>
<para>
<literal>styleClass</literal> — The control's style class
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:label styleClass="label">
Country:
</s:label>
<h:inputText value="#{location.country}" required="true"/>]]></programlisting>
</section>
<section>
<title><literal><s:message></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
"Decorate" a JSF input field with the validation error message.
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<f:facet name="afterInvalidField">
<s:span>
 Error: 
<s:message/>
</s:span>
</f:facet>]]></programlisting>
</section>
</section>
<section>
<title>Seam Text</title>
<section>
<title><literal><s:validateFormattedText></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Checks that the submitted value is valid Seam Text
</para>
<para><emphasis>Attributes</emphasis></para>
<para>
None.
</para>
</section>
<section>
<title><literal><s:formattedText></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Outputs <emphasis>Seam Text</emphasis>, a rich text markup useful
for blogs, wikis and other applications that might use rich text.
See the Seam Text chapter for full usage.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>value</literal> — an EL expression specifying
the rich text markup to render.
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<s:formattedText value="#{blog.text}"/>]]></programlisting>
<para><emphasis>Example</emphasis></para>
<mediaobject>
<imageobject role="fo">
<imagedata fileref="images/controls-seamtext.png" align="center" scalefit="1"/>
</imageobject>
<imageobject role="html">
<imagedata fileref="images/controls-seamtext.png" align="center"/>
</imageobject>
</mediaobject>
</section>
</section>
<section>
<title>Form support</title>
<section>
<title><literal><s:token></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Produces a random token that is inserted into a hidden form field
to help to secure JSF form posts against cross-site request
forgery (XSRF) attacks. Note that the browser must have cookies
enabled to submit forms that include this component.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>requireSession</literal> — indicates
whether the session id should be included in the form
signature, hence binding the token to the session. This
value can be set to false if the "build before restore"
mode of Facelets is activated (the default in JSF 2.0).
(default: false)
</para>
</listitem>
<listitem>
<para>
<literal>enableCookieNotice</literal> — indicates
that a JavaScript check should be inserted into the page
to verify that cookies are enabled in the browser. If
cookies are not enabled, present a notice to the user that
form posts will not work. (default: false)
</para>
</listitem>
<listitem>
<para>
<literal>allowMultiplePosts</literal> — indicates
whether to allow the same form to be submitted multiple
times with the same signature (as long as the view does
not change). This is a common need if the form is perform
Ajax calls but not rerendering itself or, at the very
least, the UIToken component. The preferred approach is to
have the UIToken component rerendered on any Ajax call
where the UIToken component would be processed.
(default: false)
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:form>
<s:token enableCookieNotice="true" requireSession="false"/>
...
</h:form>]]></programlisting>
</section>
<section>
<title><literal><s:enumItem></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Creates a <literal>SelectItem</literal> from an enum value.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>enumValue</literal> — the string
representation of the enum value.
</para>
</listitem>
<listitem>
<para>
<literal>label</literal> — the label to be used when
rendering the <literal>SelectItem</literal>.
</para>
</listitem>
</itemizedlist>
<para><emphasis>Usage</emphasis></para>
<programlisting role="XHTML"><![CDATA[<h:selectOneRadio id="radioList"
layout="lineDirection"
value="#{newPayment.paymentFrequency}">
<!-- JSF 2 way <f:converter converterId="org.jboss.seam.ui.EnumConverter" />-->
<s:convertEnum />
<s:enumItem enumValue="ONCE" label="Only Once" />
<s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" />
<s:enumItem enumValue="HOURLY" label="Every Hour" />
<s:enumItem enumValue="DAILY" label="Every Day" />
<s:enumItem enumValue="WEEKLY" label="Every Week" />
</h:selectOneRadio>]]></programlisting>
</section>
<section>
<title><literal><s:selectItems></literal></title>
<para><emphasis>Description</emphasis></para>
<para>
Creates a <literal>List<SelectItem></literal> from a List, Set, DataModel or Array.
</para>
<para><emphasis>Attributes</emphasis></para>
<itemizedlist>
<listitem>
<para>
<literal>value</literal> — an EL expression
specifying the data that backs the
<literal>List<SelectItem></literal>
</para>
</listitem>
<listitem>
<para>
<literal>var</literal>— defines the name of the local