Skip to Content

when using load/reload datasource method in design studio 1.6

stepan1.jpgstepan2.jpg

Hi

I have multiple listboxes in my app when I make a selection in my listboxes the selection is highlighted in blue and a filter gets applied to the datasource. All works well until I click on a checkbox which provides a value for the Bex variable and I call a reload() method to refresh the query and this causes all the highlighted values in listboxes to lose focus - the selections get unchecked. How to keep the selected values highlighted?

Thanks

Abdul

stepan1.jpg (24.7 kB)
stepan2.jpg (25.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Posted on Nov 29, 2016 at 03:54 PM

    Why do you have the reload method? Why not use the setFilter method on the Listbox component?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 29, 2016 at 06:58 PM

    Hi Abdussamad Peera,

    Have you used data binding for items in list box?

    If so for datasource reload it will affect the components.

    Then you don't have to reload datasource to get changes for passing variable, it will work without reloading data source.

    If you want to reload for some reasons in your case, you can store the selected values of list boxes in a global variable and use them in code in checkbox to set the values selected again.

    The code is

    Listbox_1.setSelectedvalue("Listbox_selected_value");

    Thanks,

    Poovarasan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2016 at 02:45 PM

    Hi Poovarasan,

    I am now using the binding method as you suggested. However, when I go to another tab which loads data from another query all my listbox selections are lost even when I save them and reset them after the load. So no matter what I do, when I load a query I lose listbox selections.

    Abdul

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2016 at 04:10 PM

    Hi Abdussamad Peera,

    Can you show us the code you used in List box?

    And do you change value of global variable in each selection of list box?

    Thanks,

    Poovarasan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2016 at 06:11 PM

    I have typed answer to your question 2 times and submitted/posted it but it doesn't seem to be showing my response.

    It keeps losing my response. let's see if this answer shows up.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.