Florin M.
Florin M.

Reputation: 2169

xpages bind a field with default value

There is an inputText having the <xp:this.value> property added with javascript.

I want this field to be also binded to a form field.

How can I achieve this?

Upvotes: 2

Views: 177

Answers (1)

Thomas Adrian
Thomas Adrian

Reputation: 3636

You need to switch the "value" to a "default value" and bind the field to the "value".

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.data>
    <xp:dominoDocument var="d"></xp:dominoDocument>
</xp:this.data>
<xp:inputText id="inputText1" value="#{d.fld}">
    <xp:this.defaultValue><![CDATA[#{javascript:"default value"}]]></xp:this.defaultValue>
</xp:inputText>

Upvotes: 2

Related Questions