I have several fields on my Notes Document
FieldA_1 FieldA_2 FieldA_3 FieldA_4
FieldB_1 FieldB_2 FieldB_3 FieldB_4
On a composite control I have 2 edit boxes FieldA FieldB
I have a compositeData.ATM_NUM defined a custom control that is a drop down list with the values 1,2,3,4.
How do I bind the edit boxes on my control to their corresponding document fields using the composite data available?
For example, I wanted to do something like: "FieldA_"+ compositeData.ATM_NUM.
I tried the javascript solution in this thread:
Binding an edit box within a custom control to a form field programatically
But it did not seem to work.
Try the following as value for e.g. field A:
<xp:inputText value="#{document['FieldA'+compositeData.ATM_NUM]}" />
You could also extend the property of the custom control to include the whole field name (and thereby transfer e.g. "FieldA_1" to the custom control). Then you should be able to do the following:
<xp:inputText value="#{document[compositeData.fieldName]}" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With