on 03-09-2005 11:14 PM
Hi,
I've retrieved records from a BAPI into a table and want to be able to add a checkbox column to the result set. I want to be able to loop through the table to get the selected rows for deletion.
How do I do this? I tried just to insert a column into the table but it was not bound to anything and I got an error.
When I try to add a Model Attribute to the Controller's context variable, it says it's not supported if the node has a dictionary structure binding.
Thanks,
Andrew
Hi,
You should use value node for the structure type and map this to your table. to get each row you should use loop
the following code may help you
or(int i=0 ; i< No_Of_Rows ; i++)
{
POAsASNType.LineItemsType.ItemType item = (POAsASNType.LineItemsType.ItemType)l.get(i);
IPrivateAdvanceShipView.ILine_ItemsElement table = wdContext.createLine_ItemsElement();
table.setItemCode(item.getItemCode().intValue());
table.setItemDescription(item.getItemDescription());
table.setMaterialNo(item.getMaterialNo());
table.setQuantityRequired(item.getQuantityRequired());
table.setSerialNo(item.getSerialNo().intValue());
wdContext.nodeLine_Items().addElement(table);
}
above code is keyed in wdInit method above mentioned code is directly will not applicable to you but u have to do modification according to ur requirement
hope it helped you
Regards
RK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew,
You can replicate the model node with a value node and add a boolean attribute in it.
This new node can be bound to the table. The new node can be populated by taking the size of the model node.
Hope this would help.
Regards
Noufal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Andrew,
1. You may use 0..n cardinality for selection and track node.isMultiSelected(idx)
2. You may add right under your model node sub-node with the following properties: non-singleton, 1..1 cardinality, initializeLeadSelection=true, selection 0..1/1..1; add your boolean attribute <i>selected</i> to this sub-node and bind CheckBox table cell editor to it.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.