XPages inputTextArea is not editable -


when use multiline editbox (shown in first one) cannot editable if document in editmode. second 1 editable. point if use formula @ value of inputtextarea can not editable. not find missed?

first one:

<xp:inputtextarea id="muvname" rows="2" cols="70"><xp:this.value><![cdata[#{javascript:@implode(document1.getitemvalue("muvname"))+ @newline() + "c/o";}]]></xp:this.value></xp:inputtextarea> 

second one:

<xp:inputtextarea id="muvname" rows="2" cols="70" value="#{document1.muvname}"> </xp:inputtextarea> 

use property defaultvalue define default value:

   <xp:inputtextarea         id="muvname"         rows="2"         cols="70"         value="#{document1.muvname}">         <xp:this.defaultvalue><![cdata[#{javascript:             @implode(document1.muvname)+ @newline() + "c/o"         }]]></xp:this.defaultvalue>     </xp:inputtextarea> 

and use property value binding document's item (or scope variable) editable field. value has object xpage can write submitted content to.

in first example calculate string , it's impossible write calculated string. that's why field read only.

update:

if want correct document field's value before editing use custom converter instead:

<xp:inputtextarea     id="muvname"     rows="10"     cols="70"     value="#{document1.muvname}">     <xp:this.converter>         <xp:customconverter             getasobject="#{javascript:value}">             <xp:this.getasstring><![cdata[#{javascript:                 if (!value.endswith("c/o")) {                     value += @newline() + "c/o";                 }                 value             }]]></xp:this.getasstring>         </xp:customconverter>     </xp:this.converter> </xp:inputtextarea> 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -