1
votes

The next inputText is from a repeat control ( having the indexVar = index )

<xp:inputText id="inputText1" value="#{viewScope.fields[index]}">
                <xp:this.converter>
                    <xp:convertNumber type="number" locale="ro"
                        maxFractionDigits="2">

                    </xp:convertNumber>
                </xp:this.converter>
</xp:inputText>

Let's say inputText1=55.556,78.

I have a save button which pass the value from viewScope to a dataSource field:

document1.replaceItemValue("RepeatFields", viewScope.fields.join('#')+'#');

Don't bother about the .join functions. I use it to concatenate / delimitate values.

And after I reopend the document: inputText1=55556.78. So the <xp:this.converter> property is not respected anymore ... , isn't anymore the decimal separator as I would like.

How can I correct this issue?

1

1 Answers

0
votes

I assume that you feed your reapeat control with the splitted value of your prior concatenated number list. What you'll get then isn't numbers but strings in each loop so you should cast your

viewScope.fields[index]

to a number again.