on 07-20-2006 2:37 AM
i have two itemListBox (asumed named A and B):
put A'selected elements into B by some action event.
when A got MultiSelected(no more one element get select).
i don't know how to get the selected element of A.
(Addition:how to fixed the hight of the ItemListBox)
thanks!
Hi,
Try to use this:
for (int j = 0, n = wdContext.nodeRows().size(); j < n; ++j)
{
if (wdContext.nodeRows().getLeadSelection() == j
|| wdContext.nodeRows().isMultiSelected(j)
{
/* row at index j is selected */
}
}
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,Maksim Rashchynski
as u said:
1>it means i must iterator the total node element every times. i cann't get the Multi-LeadSelection elements of some node directly(e.g.:<b>int leadElement = wdContext.nodeA().getLeadSelection()</b>;)?
2>sir,if have put all the elements of A Node to the B Node. do u have any short-way?
<b>for(int i=1;i<=wdContext.nodeA().size();i++){
String selField =wdContext.nodeA().getAElementAt(i).getA();
PrivatePopView.IBElement newEle=wdContext.createBElement();
newEle.setB(selField);
wdContext.nodeB().addElement(newEle);;
}</b>
Hi,
You can get the multiselected elements using the code in the previous post and there is no default method like getMultiSelection() (that you are looking for).
You may use <a href="https://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/webdynpro/com/sap/tc/webdynpro/progmodel/api/WDCopyService.html">WDCopyService</a> for copying elements between nodes.
Bala
hi,Maksim Rashchynski
but i have met another matter!
i have two nodes named A and B.bind it to ListItemBox.
now i need to put the Selected element of node A to the node B by some event.the problem is:
<b>
for(int aLength=wdContext.nodeA.size(),int i=aLength;i>=0;i--)
{
if (wdContext.nodeA().getLeadSelection() == i|| wdContext.nodeA().isMultiSelected(i){
......//some operate.
<u>//you 'll find i=0 is always exist!although you don't select the the first item in ItemListBox.how to cancel it for default selected item?</u>
}
}</b>
User | Count |
---|---|
73 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.