Tobago Demo

Menu

Form

Tobago supports nested forms and can treat each form separately. Values can be stored separately into the model, while already filled input elements keep their values (temporarily). Forms are added by the <tc:form/> tag.

Forms are also relevant for Default Command.

Tag Library Documentation

Example

This small example contain two separate forms, each surrounded by a content box. The submit button only update the model in the current form.

<tc:box label="Form 1"> <tc:form> <tc:in label="Value 1" value="#{formController.value1}"/> <tc:out label="Value 1 in Model" value="#{formController.value1}"/> <tc:button label="Submit"/> </tc:form> </tc:box> <tc:box label="Form 2"> ... </tc:box>

Form 1

Form 2

© 2005-2023 Apache Software Foundation, Licensed under the Apache License, Version 2.0.