Skip to Content
0
Former Member
Feb 28, 2008 at 12:43 PM

Dynamic Input Boxes not enabled

6 Views

I have a requirement to create Input boxes on the fly (note in the code posted I have the amount of boxes hardcoded - this will change).

I am getting the input boxes desired, however, the are not enabled - you cannot enter data into them. What step did I miss? Did I forget to add something to context?

Thoughts?

//@@begin wdDoModifyView
if (firstTime)
{
  IWDNodeInfo employees = wdContext.getNodeInfo().addChild("Employees",null,true,false,true,	false,true,false,null,null,null);
  employees.addAttribute("employeeUserId","ddic:com.sap.dictionary.string");
		
  IWDTransparentContainer employeeContainer = (IWDTransparentContainer)view.getElement("EmployeeContainer");
  for(int i=0; i<5; i++)
  {
    IWDInputField emplUserId = (IWDInputField) view.createElement(IWDInputField.class,"emplUserId" + i);
		emplUserId.setLength(8);
		emplUserId.setReadOnly(false);
		emplUserId.setEnabled(true);
    IWDNodeInfo nodeinfo = wdContext.getChildNode("Employees", 0).getNodeInfo();
    emplUserId.bindValue(nodeinfo.getAttribute("employeeUserId"));
    employeeContainer.addChild(emplUserId);
  }

Edited by: Diane Fuller on Feb 28, 2008 1:44 PM