Skip to Content
0
Jul 16, 2009 at 10:41 AM

error Input table in web dynpro java

12 Views

Hi expert

I'm trying to create a service order via web dynpro java, but i can't use the input parameter of type table;

With this implementation of the method init of the custom controller ,on the table i can insert only an element, because the table have only a row. wdContext.nodeIt_Input_Items().size() = 1

  public void wdDoInit()
  {
    //@@begin wdDoInit()
	Crm_Wap_Order_Create_Input input = new Crm_Wap_Order_Create_Input();
		wdContext.nodeNode_custom_controller().bind(input);
	Crm_Wap_Input_Items table = new Crm_Wap_Input_Items();
			wdContext.nodeIt_Input_Items().bind(table);  
		
	
		input.setIv_Bp(input.getIv_Bp());
			input.setIv_Currency(input.getIv_Currency());
			input.setIv_Description(input.getIv_Description());
			input.setIv_Offline_Luid_Order(input.getIv_Offline_Luid_Order());
			input.setIv_Ord_Delivery_Date(input.getIv_Ord_Delivery_Date());
			input.setIv_Order_Guid(input.getIv_Order_Guid());
			input.setIv_Pers_Resp(input.getIv_Pers_Resp());
			input.setIv_Po_Number_Sold(input.getIv_Po_Number_Sold());
			input.setIv_Proc(input.getIv_Proc());
			input.setIv_Save(input.getIv_Save());
			input.setIv_Selected_Prod(input.getIv_Selected_Prod());
			input.setIv_Ship_To(input.getIv_Ship_To()); 

		for(int i=0;i<wdContext.nodeIt_Input_Items().size(); i++) {
			table.setOrder_Qty(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getOrder_Qty());
			table.setProd(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getProd());
			table.setDelivery_Date(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getDelivery_Date());
			table.setSequence(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getSequence());
			table.setUom(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getUom());
			table.setLine_Guid(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getLine_Guid());
			if(wdContext.nodeIt_Input_Items().getIt_Input_ItemsElementAt(i).getProd()!= null)
			 input.addIt_Input_Items(table);
			 } 
    //@@end
  }

I've tried, with a button, to insert more row, and i do that, but the additionals rows are not passed to the function, but only the row created with the method wdDoInit();

How can i bind the additional row at the context??

Somebody know a tutorial for create an order via web dynpro java??

Please Help me

Best regards

Marco