on 06-28-2007 12:02 PM
Hi all,
I am using check box in my table. and writing the code in "ontoggle" method of the check box.
1) when I am selecting a checkbox in the 3 rd row of the table, in the next screen (where it should display in the first row ) its leaving first 2 rows empty and showing in the 3 rd row. same if i select 5 th row, its showing all 4 rows empty and showing in the 5th row. How to show rows from 1st row.... ( I am selecting multiple rows)
2) when I am selecting one row, after navigating to next screen if I go back and select another row, first displayed row is not refreshing. old values exist in the displayed table. how to refresh it.
3)If I select a check box and unselect it immediatly, still that row is displaying in the next screen. what to do if I want NOT to display if a check box selected and unselected without proceeding to next screen...
Please help me out by giving solutions to above 3 problems
regards
pradeep
I am using the code...
for(int i=0;i<wdContext.nodeVnTable().size();i++)
{
if(wdContext.nodeVnTable().getVnTableElementAt(i).getChecked())
{
IPrivateSearchResult.IVnTable_1Element ele= wdContext.nodeVnTable_1().createVnTable_1Element();
wdContext.nodeVnTable_1().addElement(ele);
ele.setVaOrderNo_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaOrderNo());
ele.setVaNoOfInserts_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaNoOfInserts());
ele.setVaDate_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaDate());
ele.setVaGrossAmount_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaGrossAmount());
}
}
do I need to invalidate the node for earch loop iterates????
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
invalidate your node before creating elements.
<b>wdContext.nodeVnTable_1().invalidate();</b>
for(int i=0;i<wdContext.nodeVnTable().size();i++)
{
if(wdContext.nodeVnTable().getVnTableElementAt(i).getChecked())
{
IPrivateSearchResult.IVnTable_1Element ele= wdContext.nodeVnTable_1().createVnTable_1Element();
wdContext.nodeVnTable_1().addElement(ele);
ele.setVaOrderNo_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaOrderNo());
ele.setVaNoOfInserts_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaNoOfInserts());
ele.setVaDate_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaDate());
ele.setVaGrossAmount_1(wdContext.nodeVnTable().getVnTableElementAt(i).getVaGrossAmount());
}
}
Hallo Pradeep,
what do you really want to achieve? Do you want to simulate multiselection in a Web Dynpro table UI element? Do you have one table column with checkboxes as cell editors to "emulate" multiselection? Which interaction behavior do you apply? You know, that you can get a reference to the clicked node element (with a boolean attribute, to which the checkbox is bound) in your action event handler without changing the lead selection (applying parameter mapping, see my SDN tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/web%20dynpro%20sample%20applications%20and%20tutorials.htm#46">Enhancing Table Performance</a>).
Multiselection simply works with CTRL+Click on the table selection column. In an actionevent handler you can then iterate the the node element list to extract the multi-selected node elements.
Regards, Bertram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi pradeep..
1.Sample Code:
u have to create checkbox attribute and have to bind.
Write the following code in ontoggle();
Check_Flag = wdContext.nodeFlight_List().getLeadSelection();
--> the above code is to get the id of the selected row in the table.
2.Afte u select the appropriate check boxes, then u can refresh the check boxes
by using invalidate function..
Write this funtion in Init();
3. In your third question, i cant get u clearly...need some more details...
Urs GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The 3rd doubt was...... Generally When user selects one check box and before going to next screen and check the result page,if he unselect the selected check box, that row should not be displayed in the resultant page. but I could see the unselected row in the resultant table.
And could not get your solution to my first doubt.... it was
when I am selecting some "x" row in the main view and navigates to the result page where result table is leaving all "x-1" rows empty and showing the selected row in "x"th row. actually it should display in 1st row of the resultant row.
thanks and regards
Pradeep
Everything is fine now.... but just one small small problem......
In the main table, I am getting one check box extra after last row..... and in the result table (result view) I am getting one empty row (with checkbox) in the first row.... results are starting from second row. what would be the problem. I need to change any table property???
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.