Value

Synchronize value between client and server with getter/setter methods and support for onchange event. Renders an input type=hidden and provides getName() and setName() methods.

Age is 15.

Try to set a new age via the console, for example setAge(42). Since the value has an ajax behavior attached, it will reload the form and render the new value.

Example
Documentation

<h:form>
    <t:value id="age" value="#{controller.age}">
        <f:ajax render="@form"/>
    </t:value>
</h:form>

Synchronize value between client and server with getter/setter methods and support for onchange event. Renders an input type=hidden and provides getName() and setName() methods.

Info
Tag name value
Component type io.tornadofaces.component.Value
Renderer type io.tornadofaces.component.ValueRenderer
Attributes
NameDescriptionRequired
idThe id of the componenttrue
valueThe valuetrue
nameThe base name of the getters and setters. For example, if name is "age", getter will be getAge() and setter will be setAge(). If not supplied, id is used instead.false
widgetVarThe widgetVar. Defaults to the name attribute. You can call TW('widgetVar').get and .set instead of using getters and setters if you like. false