on 02-28-2008 12:43 PM
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
Hi,
Simply replace the first line of code with below code.
IWDNodeInfo employees = wdContext.getNodeInfo().addChild("Employees",null,true,true,false,true,false,false,null,null,null);
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please ignore the previous answer.You have done the binding,but create you did not create the node element.
IEmployeesElement ele= wdContext.nodeEmployees().createEmployeesElement();
wdContext.nodeEmployees().addElement(ele);
Regards,
Sudhir
Edited by: Sudhir Gorantla on Feb 28, 2008 1:55 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You did not bind the inputboxes to context variables.If you have already binded then set the cardinality to 1:n.
Regards,
Sudhir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.