Tobago Demo

Menu

Root Dummy Intro Search Getting Started Docker What's New Migration Compatibility FAQ API Download Server Info Logging Info In Suggest Textarea Date Range Group 5 Star Rating File Upload Out Label Badge Image Figure Progress Object Checkbox Toggle Dropdown Radio Listbox SelectOneList Multi Checkbox Multi Listbox Shuttle SelectManyList Button and Link Default Command Button Group Customizer Link Group Box Panel Separator Section Header and Footer Bar Popup Popover Toast Basic example Tab Client Tab Ajax Tab Server Basic example Sheet Sorting Paginator Sheet Column Selector Sheet Selectionchange Sheet Event Sheet Action Sheet Markup Sheet Style Empty Sheet Column Bar Sheet Filter Sheet Static Header Sheet Multi Header Sheet Tree Column Panel Sheet Editable Sheet Lazy Sheet Nested Basic example Tree Command Types Tree Select Tree Editor Tree Menu Tree Listbox Intro TinyMCE CKEditor Flow Layout Flex Layout Segment Layout Label Layout Grid Layout Split Layout Message-layout Overview Collapsible Box Collapsible Popup Collapsible Panel Collapsible Section Content Validation JSR 303 Severity Messages Content Security Policy Sanitize Roles Form AccessKey Focus Exception Handler Style Tag Bootstrap Theme Icons Partial Ajax Behavior WebSocket Transition Non Faces Request Conversion Error Handling For Each ConversationScoped Download Configuration Format Locale DataAttribute Meta
Root Dummy Intro Search Getting Started Docker What's New Migration Compatibility FAQ API Download Server Info Logging Info In Suggest Textarea Date Range Group 5 Star Rating File Upload Out Label Badge Image Figure Progress Object Checkbox Toggle Dropdown Radio Listbox SelectOneList Multi Checkbox Multi Listbox Shuttle SelectManyList Button and Link Default Command Button Group Customizer Link Group Box Panel Separator Section Header and Footer Bar Popup Popover Toast Basic example Tab Client Tab Ajax Tab Server Basic example Sheet Sorting Paginator Sheet Column Selector Sheet Selectionchange Sheet Event Sheet Action Sheet Markup Sheet Style Empty Sheet Column Bar Sheet Filter Sheet Static Header Sheet Multi Header Sheet Tree Column Panel Sheet Editable Sheet Lazy Sheet Nested Basic example Tree Command Types Tree Select Tree Editor Tree Menu Tree Listbox Intro TinyMCE CKEditor Flow Layout Flex Layout Segment Layout Label Layout Grid Layout Split Layout Message-layout Overview Collapsible Box Collapsible Popup Collapsible Panel Collapsible Section Content Validation JSR 303 Severity Messages Content Security Policy Sanitize Roles Form AccessKey Focus Exception Handler Style Tag Bootstrap Theme Icons Partial Ajax Behavior WebSocket Transition Non Faces Request Conversion Error Handling For Each ConversationScoped Download Configuration Format Locale DataAttribute Meta

Group

The <tc:in/> tag may be extended with the facet tags <f:facet name="before"> and <f:facet name="after">. With these, you can add text and dropdown menus to an input field.

Tag Library Documentation

Text

The following example show how to add a text-label inside an input field.

Before

<tc:in> <f:facet name="before">https://example.com/</f:facet> </tc:in>
https://example.com/

After

<tc:in label="Price"> <f:facet name="after">.00 €</f:facet> </tc:in>
.00 €

Output

The following example show, how to add twice tc:out on one side in an input group

<tc:in id="values"> <f:facet name="before"> <tc:out id="firstName" value="Bob"/> <tc:out id="lastName" value="Marley"/> </f:facet> </tc:in>
Bob Marley

Commands

Press the 'Send'-Button to add your message to the chat.

<tc:in value="#{groupController.newMessage}"> ... <f:facet name="after"> <tc:button label="Send" action="#{groupController.sendChat}"> <f:ajax execute="inewmessage" render="tachatlog"/> </tc:button> </f:facet> </tc:in>
User Two

Dropdown Menu

The following two examples show an input field with a dropdown element in front of. Pressing the "SendTo"-Button will display a selectable list. This list is different in the examples. Notice that the omit attribute is set for <tc:link/>.

Info It's recommended to use buttons instead of links for dropdown menus inside an input group.
When using a button, a dropdown menu is positioned under the input group. Otherwise the dropdown menu is set directly under the link.

Commands

<tc:in placeholder="type a message"> <f:facet name="before"> <tc:button id="lsendtoc" label="#{groupController.sendTo}" omit="true"> <tc:command label="SendTo: Peter"> <f:ajax render="isendtoc" execute="isendtoc" listener="#{groupController.sendToListener}"/> </tc:command> ... </tc:button> </f:facet> </tc:in>

Radio Buttons

<tc:in id="isendtorb" placeholder="type a message"> <f:facet name="after"> <tc:button id="lsendtorb" label="#{groupController.sendTo}" omit="true"> <tc:selectOneRadio value="#{groupController.sendTo}"> <tc:selectItem itemValue="SendTo: Peter"/> ... <f:ajax render="isendtorb"/> </tc:selectOneRadio> </tc:button> </f:facet> </tc:in>
Send To:

Choice

1,000.00

Date

Since Tobago 5.3.0 these facets can be used in <tc:date>

Before and After

Before After
© 2005-2025 Apache Software Foundation, Licensed under the Apache License, Version 2.0.