Select (SP-Tag): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K (hat „Sp:select“ nach „Select (SP-Tag)“ verschoben) |
K (Hob den Schutz von „Select (SP-Tag)“ auf) |
||
(6 dazwischenliegende Versionen von 4 Benutzern werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
==Name== | ==Name== | ||
− | <sp:select> - | + | <sp:select> - Erzeugt eine Selectbox |
==Syntax== | ==Syntax== | ||
<source lang="xml"> | <source lang="xml"> | ||
− | <sp: | + | <sp:select name="variable"> |
+ | ... | ||
+ | </sp:select> | ||
</source> | </source> | ||
==Beschreibung== | ==Beschreibung== | ||
− | + | Der Select-Tag erzeugt eine HTML-Select-Box. <code>sp:select</code> wird zusammen mit <code>[[sp:option]]</code> verwendet. | |
==Attribute== | ==Attribute== | ||
− | {| class="prettytable" | + | {| class="prettytable sortable" |
|- class="hintergrundfarbe1" | |- class="hintergrundfarbe1" | ||
! Name || Type || Required || Default || ab IES Version | ! Name || Type || Required || Default || ab IES Version | ||
|- | |- | ||
− | | | + | {{sp_input_attributes|attribute=name|mode=row}} |
− | | | + | |- |
− | | | + | {{sp_input_attributes|attribute=locale|mode=row}} |
− | | | + | |- |
− | | | + | {{sp_input_attributes|attribute=type|mode=row}} |
|- | |- | ||
− | | | + | {{sp_input_attributes|attribute=disabled|mode=row}} |
− | | | ||
− | |||
− | |||
− | |||
|- | |- | ||
− | | <code> | + | | <code>multiple</code> |
− | | [[ | + | | [[Condition]] |
| Nein | | Nein | ||
| None | | None | ||
| 1 | | 1 | ||
|- | |- | ||
− | | | + | {{sp_input_attributes|attribute=dynamics|mode=row}} |
− | | | ||
− | |||
− | |||
− | |||
|} | |} | ||
− | + | {{sp_input_attributes|attribute=name|mode=desc}} | |
− | + | {{sp_input_attributes|attribute=locale|mode=desc}} | |
− | + | {{sp_input_attributes|attribute=type|mode=desc}} | |
− | + | {{sp_input_attributes|attribute=disabled|mode=desc}} | |
− | ;<code> | + | ;<code>multiple</code> |
− | : | + | :HTML-Attribut (true, false). |
+ | {{sp_input_attributes|attribute=dynamics|mode=desc}} | ||
==Beispiele== | ==Beispiele== | ||
− | === | + | ===Select-Box mit eigenen Optionen und einer Collection=== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Template Quelltext | Template Quelltext | ||
<source lang="xml"> | <source lang="xml"> | ||
− | + | <sp:select name="choice"> | |
+ | <sp:option value="sitepark">sitepark</sp:option> | ||
+ | <sp:option value="develop">develop</sp:option> | ||
+ | <sp:loop collection="col" item="i"> | ||
+ | <sp:option value="${i.name}"><sp:print name="i.name"/></sp:option> | ||
+ | </sp:loop> | ||
+ | </sp:select> | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<noinclude> | <noinclude> | ||
[[Category:SP-Tags]] | [[Category:SP-Tags]] | ||
− | |||
− | |||
− | |||
[[Category:Qualität_des_Codes_prüfen]] | [[Category:Qualität_des_Codes_prüfen]] | ||
+ | [[Category:Beispiel_überarbeiten_testen]] | ||
</noinclude> | </noinclude> | ||
− |
Aktuelle Version vom 24. Februar 2010, 12:40 Uhr
Name
<sp:select> - Erzeugt eine Selectbox
Syntax
<sp:select name="variable">
...
</sp:select>
Beschreibung
Der Select-Tag erzeugt eine HTML-Select-Box. sp:select
wird zusammen mit sp:option
verwendet.
Attribute
Name | Type | Required | Default | ab IES Version |
---|---|---|---|---|
name
|
Variable | Ja | None | 1 |
locale
|
Locale | Nein | None | 1 |
type
|
Content-Type | Nein | text | 1 |
disabled
|
Condition | Nein | None | 1 |
multiple
|
Condition | Nein | None | 1 |
Dynamische Attribute | Text | Nein | None | 1 |
name
- Bestimmt den Namen des Feldes.
locale
- Dieses Attribut bestimmt die Mehrsprachigkeit der Variablen.
type
- Der Typ des Eingabefeldes.
disabled
- HTML-Attribut (true, false).
multiple
- HTML-Attribut (true, false).
- Dynamische Attribute
- Dynamische Attribute sind beliebige HTML-Attribute, die evaluiert und bis zum HTML-Tag durchgereicht werden.
Beispiele
Select-Box mit eigenen Optionen und einer Collection
Template Quelltext
<sp:select name="choice">
<sp:option value="sitepark">sitepark</sp:option>
<sp:option value="develop">develop</sp:option>
<sp:loop collection="col" item="i">
<sp:option value="${i.name}"><sp:print name="i.name"/></sp:option>
</sp:loop>
</sp:select>