Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Binding problem of dynamic contents

Hello all

We use dynamic number of input fields which are accessing to a attribute node

<i>- cardinality: 0..n

- collectionType: list

- initializedLeadSection: true

- name: MyData

- selection: 0..1

- singleton: true

- structure:

- suplyFunction:

- technicalDocumentation:

- typedAccessRequired: true</i>

(By the way: The <i>MyData</i>-Structure represents the properties of the input field, like id, inputtype, value, readonly ...)

On method wdDoModifyView(..) I did:


IWDNode node = wdThis.wdGetContext().currentContextElement().node();
// Get the singleton node
IWDNode myNode = node.getChildNode("MyData", 0);

// Loop over all list elements (-> cardinality)
for (int index = 0; index < myNode .size(); index++) {
  IMyDataElement myElement = (IMyDataElement) myNode.getElementAt(index);
  String id= attributeElement.getId(); // It works properly
  String inputType = attributeElement.getType(); // It works properly
  String value = attributeElement.getValue(); // It works properly
  if (inputType.equals("InputField")) {
     IWDInputField inputField = (IWDInputField) 
         view.createElement(IWDInputField.class, id);
    inputField.bindValue("MyData.Value"); // *1: Fails !!!!!!!!!!

   } ..



The binding causes, that all fields have the same value (that of the first entry)!!!

But the all the settings - label, fieldsize, type,....- which are set "manually" are correct.


Is it possible to bind the value like this?:

inputField.bindValue("MyData[35].Value"); // Bind me the value of the 35th element 

<b><u>Maybe a hint:</u></b>

The <b>attributeNode.setLeadSelection(index);</b> changed all the inputfield values according the <b>index </b> element of the <i>MyData</i>-Structure.

Lot of thanks in advance,

Sascha Fuchs

Not what you were looking for? View more on this topic or Ask a question