Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

List always displays first row after update

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    List always displays first row after update

    Hi,

    I have a three level hierarchy of lists. You select a row in the first list, which then changes to a new panel with a different list, which you then need to select a row to switch to another panel which displays the third list.

    If I make any updates to the third list, and save the updates, it will cause the first row in each of the two 'upper' level lists to be selected, regardless of the rows previously selected. This causes the wrong data to be displayed in the third list (which is being displayed in the currently active panel).

    How do I stop this happening ? I have tried both of the following:

    1. Use the 'savelistedits' method to save the changes (and not use the automatic client to server sync feature of the list)
    2. Use the auto sync feature of the list without using an explicit method to save the changes.

    In both cases, the result is the same - the lists row selection in the upper level lists get set to the first row.

    I have also tried saving the selected rows in each list to variables, and then setting the selected row using the 'setValue' method after making the updates. But I have found that I need to set such a long timeout ( > 3 secs) for it to work reliably. This is not acceptable as you can see the 'wrong' row in the list appearing for several seconds before the 'correct' row is displayed.

    I have tried this with the latest production version of AA as well as several pre-release versions including the latest 5390 build. No difference.

    Reading through some past threads, this seems to have been a problem before but indications were that it was fixed ??? Any comments or suggestions welcome....

    Cheers,

    #2
    Re: List always displays first row after update

    When you say, the wrong data appears in the third list - what data is displayed? Is it the correctly selected row from the parent? Is it the row you just submitted while the parent is on the first of the ordered data? I think you would need to add in a refresh all lists to the submit code.
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

    Comment


      #3
      Re: List always displays first row after update

      Sorry, I didn't mean to infer it is the wrong data. Its the correct data for the selected rows in the parent lists. For example, if I select the second row in the top most list, and then the second row in the second level list, the data displayed in the third level list will be displayed depending on the rows selected in the higher level lists.

      That's fine. But if I update the data in any of the rows in the third level list, and then save it, the data in the third level list will be refreshed automatically. However, instead of the second rows remaining selected in the higher level lists, it will for some reason change the selected rows in those lists to the first row, and display the data in the third list which is associated with row 1 in the top level lists.

      The problem is the selected rows in the top level lists is not remaining on what was selected, but defaulting back to the first row. Not sure why???

      Hope this explains it better.

      Comment


        #4
        Re: List always displays first row after update

        You've not specifically stated that your 3 Lists are in a Parent/Child relationships as set up in the List Properties of your 2nd and 3rd Lists. Is this the case?

        In my tests with 3 Lists, utilizing the Parent List properties, changing data in List3, saving and syncing, has no effect on the currently selected rows of List1 and List2.

        Comment


          #5
          Re: List always displays first row after update

          Yes, list 3 has list 2 as its parent and list 2 has list 1 as its parent.

          I have "pre-load data" selected in list 2 and 3. Not sure if this makes a difference ?

          Comment


            #6
            Re: List always displays first row after update

            I've tested out that exact configuration a lot. In fact, I'm preparing a little test app to send to Alpha to show them that panels + a hierarchy of lists + pre-loaded data option equals multiple list redraws of all 3 lists triggered by many events that you may not expect.

            Just put a little console.log in the onListDraw event of each list to see the surprising amounts of redraws. It is more obvious if you take a recording in the Chrome DevTools Performance tool. Even for the smallest one panelcard app with the 3 lists placed in it, the Performance tool shows a rendering bottleneck and the frames per second drops to 0. I've played around with it a little by putting the lists in their own Injectible containers outside of any panel elements or even "lied" to the app by temporarily setting the parent list that it doesn't know it has a child (just as a test; I'm sure it would break other functionality) and that has helped to reduce the redraws.

            Anyway, that doesn't really address your problem at all... but I do assure you that I've played around a lot with that configuration and I don't see the behavior of the app forgetting my selected row in any of the 3 lists. They usually do a good job of storing the route information before redrawing.

            Have you perhaps forgotten to persist and restore list data and variables?
            Last edited by jgrannis; 10-12-2018, 06:00 PM.

            Comment


              #7
              Re: List always displays first row after update

              I'm not seeing this behaviour.

              In your Lists... in Properties... what is "Allow NULL selection" set to?

              And... In each List, what List Event are you using to Navigate to either the next List... or the List Detail? onSelect? onClick?

              If onSelect, try using onClick instead. onSelect gets fired by Alpha... a lot.

              Comment


                #8
                Re: List always displays first row after update

                Jeff thats some pretty interesting testing your doing...what have you found to be the most efficient in terms of rendering/time to complete the render of the data?
                NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                Comment


                  #9
                  Re: List always displays first row after update

                  Allow null selection is ticked in list 3 and list 1 and not ticked in list 2.
                  For list 1, I am using the 'onClick' event to make the next panel active which contains list 2. Then with list 2, I am using the 'DblClick' event to set the next panel active and open a formview. Below the Formview is a button which makes the next panel active with list 3. The button uses the 'Click' event which uses a set Panel active action to display the panel which displays the 3rd list.

                  Comment


                    #10
                    Re: List always displays first row after update

                    WTF???? I unticked "Allow Null selection" in all lists, and now it is remembering the selected rows in the lists after updates.

                    I don't understand why I am seeing this behaviour??? The comment for that particular property states,

                    "Specify if the list must always have a selected row, or if it is allowed to have no row selected".

                    Allowing no row to be selected should not cause the list to select the first row by default after an update, overriding the previously selected row.

                    David, thanks for pointing me in the right direction.......

                    Comment


                      #11
                      Re: List always displays first row after update

                      Allow Null Selection, in my tests, whether on or off, has no ill effect on the Lists keeping a current selection.

                      I'd suggest something else is going on. Maybe whatever you're doing between List2 and List3. You had not mentioned a Formview being involved.

                      Comment


                        #12
                        Re: List always displays first row after update

                        I tried to simplify the explanation of what I'm doing as its a bit complicated. List 1 is actually 3 lists on the same panel. They are parent/child lists. So it works like this:

                        List 1a click row->list 1b click row->list 1c click row-> change panel:list 2 displays, double click row -> change panel:formview displays, click button -> change panel:list 3 displays.

                        I found if I untick "Allow Null selection" in all lists, then it will remember the selected rows after updates to list 3. I also found I can tick "Allow Null selection" in some of the lists, and it will still remember the selected rows.

                        I'm still trying to work out if there is a pattern to this, but at the moment its not making a lot of sense to me.

                        Greg

                        Comment


                          #13
                          Re: List always displays first row after update

                          Sounds like there's a lot more to this... and somewhere in there something is causing a problem. Your simple 3 List problem grew to 5 lists and a formview... plus whatever else you may have.

                          Unfortunately it can't be replicated outside your UX. The downside to simplifying a problem is that the cause of the issue is usually removed as well.

                          Seems like it's working for you now... so that's good.

                          Comment


                            #14
                            Re: List always displays first row after update

                            You can capture the top level item on click, and store it (create an Argument), then upon sync or refresh you can tell it to set it as the selected item. There are many use cases for this and it's relatively easy to program.

                            Comment


                              #15
                              Re: List always displays first row after update

                              Charles, I believe the fastest and smoothest I've been able to come up with so far for this configuration is to have a pre-rendered host and child UX type configuration with the 3 lists in the child UX in each their own Injectible content container. Then have a Control Bar that uses disclosures to show the list I want in the panelcard body. The downside for me at this point is that this method "eats up" the 1 disclosure showing at a time rule with a list where I would rather use the disclosures for slide-in menus, messages and form editors. I need to play with it more to see if I can inject the list content in alternative Control Bar layouts and if that still allows the app to render without lagging. And of course, I also need to test more to see if this configuration breaks other list behavior.

                              Comment

                              Working...
                              X