on 01-30-2008 2:00 PM
Hi All,
I have used an ItemListBox for multiple selection.
1. For that I created a ValueNode (say, Countries) with following properties changed:
selection 0..n
initializeLeadSelection false
remaining properties are default.
Now created a Value Attribute countryName under Countries of type string.
2. Created an ItemListBox with properties I have changed:
dataSource: Countries
multipleSelection: true
text: countryName
3. Created a button to check selected items.
My problem is when I have select none(First Time) or one or more item and click on Check button result is right.
But when deselect all item after selecting one or more and click on Check button then last deselected item is showing as it was selected.
Is I am missing somthing or its a bug?
It's a bug in your version. Please open an OSS message (BC-WD-CLT-HTML).
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Link is
https://websmp108.sap-ag.de/message
You need a SAP MarketPlace ID (SUserID ) to raise a OSS.
Regards
Ayyapparaj
Hi,
You can try with the following code
wdContext.node<YourNode>().setLeadSelection(-1);
wdContext.node<YourNode>().clearSelection();
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj and Ayyapparaj,
The code segment you have written is the serverside code.
As I need to capture the selected elements in the serverside to process the request and use those code segment before/after capture, everytime I will found no items selected in the view even if somthing selected. And also the previos problem will persists. Its not acceptable.
For your information, sharing my knowledge that I discover is,
SAP uses JavaScript for value insert/change in any UI elements through HTML events. When we click/change information some HTML events (onclick, onchange,onkeypress etc) triggered into the window and SAP tracks those event and set the value to their defined JavaScript Object/Array to process later on.
Ultimately when we submit the form-data it fetches those data from there not from the UI display data and send it to the Server. Server captures those data from the request object and parses those data and process.
The reverse process is for response view creation.
If you change or clear the selection then when the view will be created it will be reflected on the view.
But the problem will be same.
My resolution on the situation is that its a bug. I think when the user deselect all then the last deselected item is not cleared from the object/array that they uses for storing the user entered data and that data is submitted to the Server.
Feel free to share if I am wrong.
Thanks
Subhendu
Hi,
Capture the selected item and then send it for further processing or whatever you want to do and then at the end clear the selection.
How the previous problem still persist. After clearing the selection there will not be any selected items. In your case click your check button again and see.
thanks & regards,
Manoj
Hi Manoj,
Please don't waste time yaar. Don't give such vauge answer that it depends on your requirement. My requirement is specified in detail. If you have suggestions on this mostly welcome.
Please read my problem carefully once again to give answer
I am repeating that
My problem is:
"When I have select none(First Time) or one or more item and click on Check button result is right.
But when deselect all item after selecting one or more and click on Check button then last deselected item is showing as it was selected."
Thanks,
Subhendu
Hi Ayyapparaj,
As I know for ItemListBox there is only one Event onLeadSelection and it only triggered for Single Selection (multipleSelection is false) not for Multiple Selection(multipleSelection is true).
And it only triggers for selection not deselection (though for Single selection there is no deselection happens by user. User only select any other item to deselect the previous one.)
Can you describe How to do that? How to trigger a round trip to clear the client side cache here?
Thanks,
Subhendu
Hi,
Well first of all i am not here to waste mine or anybody's time. Secondly the suggestion was based on your statement only.
As you said, "But when deselect all item after selecting one or more and click on Check button then last deselected item is showing as it was selected".
What i am trying to say here is you are deselecting the items by clicking one of the items. In this way you are selecting one of the items which is getting displayed on click of Check button. This will be solved if you clear the selection. Offcourse after the event selected items will not be highlighted.
My intention was just to provide you with a solution.
Anyways its upto you how you do it.
thanks & regards,
Manoj
Hi Manoj,
The Statement you quoted its a partial statement right?
Is it the right way to give solution based on the partial statement.
I think you have not understand my problem anyway its your way to give answer and obviously I have to decide how to do it
Thanks for your valuable comments and suggestions to decide my solution.
Hi,
Well you can clear the selection of the node using:
wdContext.nodeCountries().clearSelection();
This is the way to deselect.
Hope it will solve your problem.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.