on 12-06-2007 9:27 AM
Hi,
In my Application the requirement is such that i need to select Multiple rows in a table without using Ctrl key of the keyboard .
But i am unable to directly select these rows through Click of a Mouse.
Is it possible to select these multiple rows on Click.
Please help me out in this regard.
Thanks and regards,
Chandrashekar.
Hi Chandra,
Create a <b>value node</b> in your parent node (i.e. node bound to table) with properties singleton false cardinality 1..1. Create a context attribute of type boolean in the <b>value node</b>. Bind this attribute to your tableCell CheckBox. You can check multiple Check boxes by setting the attribute to <b>true</b>.
wdContext.node<parent>.get<parent>ElementAt(i).current<valuenode>Element.set<attribute>(true);
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
Programatically i dont want to set the chkbox to true..I want to capture all the chkboxes which are selected by the user at runtime and delete those records from R/3 system
As u mentioned i created a value node in the node that is already binded with the table and mapped the value attribute to the newly created Colum of the table..
On click of Execute i have to get all the records means multi records selected by the user at runtime
Regards
Chandrashekar.
Hi Chandra,
If you want to delete the selected records, do this:
for(int i=0;i<Tablenode.size();i++)
{
//check for selected element
if(wdContext.node<parent>.get<parent>ElementAt(i).node<valuenode>.current<valuenode>Element.get<attribute>();)
{
// set the attributes to your input modelnode (Hope you know how to set, if not just post your //Node and its structure)
}
}
//RFC call
regards,
Siva
Hi Chandra,
Please assure in the context tab the properties of the <u>valuenode</u>.
<b>cardinality 1..1
selection 0..1
singleton false</b>
In the layout tab, table properties
<b>compatibilityMode nw04Plus
selectionMode none
</b>
Check th properties of Check box also.
No need of onToggle event
I have been working this type of deletion for one year so many times successfully.
regards,
Siva
>>selection refers to value(0..1) of that node requires
You mean the value of each element is from minimum of zero to maximum of one.
Could provide more information on selection.
I need your reply in brief becuase i am stopped at these places every time due to some error (java.lang.NullPointerException)....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi chandrashekar ,
yes it is possible.
Select the ValueNode [cardinality 0..n] that is bound to your table
and change the <b>selection</b> property value to <b>0..n</b>.
In view layout select the table and change
<b>selectionMode </b> property value to <b> auto </b>
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Take one value attribute of type boolean as child of <TableNode>,say selected
Insert another column in the table.. then right click on <column>> insertTableCellEditor> then insert checkbox.
bind the checked property of checkbox to the value attribute created above
In onToggle action of checkbox create an action, say ChkSelect
In ChkSelect write following code
Then use this code to check for each row selecetd or not..
int count=0;
for(int i=0;i<wdContext.node<TableNode>.size();i++)
{
if(wdConetxt.node<TableNode>().get<TableNode>ElementAt(i).getSelected==true)
{
count++;
//Perform required operation
}
}
wdComponentAPI.getMessageManager.reportSuccess(" "count"rows selected");
Regards
LakshmiNarayana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.