I have a XPage with a repeat control getting its values from a viewScope vector.
<xp:repeat id="repeat1" rows="100" indexVar="i" value="#{javascript:viewScope.v1}"
</xp:repeat>
The fields are binded to the vector like this
<xp:inputText value="#{viewScope.v3[i]}" id="qty" style="width:80px"</xp:inputText>
I have managed to get the update correctly by using the onChange event on the input boxes. something like this.
<xp:eventHandler event="onchange" submit="true" refreshMode="partial" refreshId="qty">
<xp:this.action><![CDATA[#{javascript:var v3:java.util.Vector = viewScope.v3
v3.setElementAt(getComponent("qty").getValue(),i)
viewScope.v3 = v3;
}]]></xp:this.action>
</xp:eventHandler>
The problem is that the onChange event is updating the inputfield so if user is too fast typing the entered values are lost and they need to type it again.
so I am looking for a way to loop the viewScope and set all the row values in the save button instead.
So in my save button I want to loop the values in the viewScope and put them all in a new Vector that I can write to the document fields. basically I need to get hold of the values the user enterd using getComponent("").getValue() for each row in an SSJS loop.
how can I do that.