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

Caching issue driving me nuts!

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

    Caching issue driving me nuts!

    Okay it's late and it is probably something simple but I am darned if I can see it!

    I have a tabbed UI interface for a membership system. A common practice is to use a search page to select a member and open up a member record on a separate tab and repeat several times until several tabs are opened each for a separate member. The user then works through the tabs recording notes etc. One of the things they will do is create an activity note which involves an ajax callback to write a record to a separate table (which is displayed on a linked grid) The problem is that no matter which member (tab) is active the record is written to the record for the member on the LAST tab!? When each tab is opened the "Use cached grid" is NOT checked.

    To confirm the ajax callback uses e._currentRowDataOld. (I have also used e._currentRowDataNew.) The grid has an editable detail view but the button to create the record is not available if the record is dirty.

    Anyone else experience this or know what might be a cause?

    Kind regards

    Glen
    Last edited by glenschild; 06-25-2014, 06:11 PM. Reason: additional info
    Glen Schild



    My Blog


    #2
    Re: Caching issue driving me nuts!

    Update, so it appears the issue is that the button uses an advanced message box to confirm and then uses a javascript function to run the ajax callback
    Glen Schild



    My Blog

    Comment


      #3
      Re: Caching issue driving me nuts!

      Here's some things I do to make sure I am viewing the most recent published version and not a cached version:

      http://msgboard.alphasoftware.com/al...d.php?111005#7

      Comment


        #4
        Re: Caching issue driving me nuts!

        Hi Michael, thanks for the response but not the issue here. With multiple tabs open using the same component the ajax callback when fired directly from a button works but when fired via a javascript function it does not pick up the correct data from the current tab!
        Glen Schild



        My Blog

        Comment


          #5
          Re: Caching issue driving me nuts!

          So the problem seems to be that e._currentRowDataOld value is only storing the value of the very last member's page that is opened

          It sounds like you will need to find some other way (not using e._currentRowDataOld any more) to store and pass the ID variable (relating to the current member's newly opened page) to the AJAX callback...

          Comment


            #6
            Re: Caching issue driving me nuts!

            With multiple tabs open using the same component
            this is not usual, when a component is open in tabbedui, clicking that component button again usually does not open another tab, but goes back to the old tab. if you can post a screencast or an image then it may be possible to find a way to make that tab active to get the data from it.
            thanks for reading

            gandhi

            version 11 3381 - 4096
            mysql backend
            http://www.alphawebprogramming.blogspot.com
            [email protected]
            Skype:[email protected]
            1 914 924 5171

            Comment


              #7
              Re: Caching issue driving me nuts!

              Thanks for the responses but actually not sure I have made myself clear!

              There is a read only searchable grid on a tab that is used to identify members. Against each row in the grid there is a select option which opens up an editable component for that single member in another tab. This is done by filtering the component based upon the members Unique ID. One or many members can be open at the same time, very usual and common approach and works fine EXCEPT specifically calling an ajax callback via a message box.

              If I fire the ajax callback direct from a button then the e._currentRowDataOld used to populate various arguments and ultimately write a new child record in a table linked to the member fires perfectly. If I fire the ajax callback via a javascript function then the weird behaviour happens even though I am using the identical code to fire the callback.

              Kind regards

              Glen
              Glen Schild



              My Blog

              Comment


                #8
                Re: Caching issue driving me nuts!

                Try changing your read-only searchable grid to editable
                (and if this solves the problem, then lock all your fields so that it "appears" to be read-only)

                http://wiki.alphasoftware.com/~alpha...s+in+Grids+V10

                scroll down to:

                e._currentRowDataOld

                "If the Grid is not editable then this variable does not have any sub properties"

                Maybe this is why you aren't getting the value you expect, when running the callback from JavaScript function

                Comment


                  #9
                  Re: Caching issue driving me nuts!

                  Hi Michael

                  Also used e._currentRowDataNew and same behaviour but again the xbasic fires correctly if directly called but not if called via a javascript function.

                  Originally posted by mixter View Post
                  Try changing your read-only searchable grid to editable
                  (and if this solves the problem, then lock all your fields so that it "appears" to be read-only)

                  http://wiki.alphasoftware.com/~alpha...s+in+Grids+V10

                  scroll down to:

                  e._currentRowDataOld

                  "If the Grid is not editable then this variable does not have any sub properties"

                  Maybe this is why you aren't getting the value you expect, when running the callback from JavaScript function
                  Glen Schild



                  My Blog

                  Comment


                    #10
                    Re: Caching issue driving me nuts!

                    what happens when you make the grid editable?

                    Comment


                      #11
                      Re: Caching issue driving me nuts!

                      is active the record is written to the record for the member on the LAST tab!?
                      I think that is what happening because in your first read only tab the last called row is active.
                      you can verify that by clicking more buttons and going back to the read only grid.

                      so in order for the ajax callback to work and reference to any record other than the last record called, you should give the row id as selected row or the id of the record at least. I will try this idea later and see if it works.

                      edit:
                      if you can post your ajax callback that will give me a head start.
                      Last edited by GGandhi; 06-27-2014, 06:55 AM.
                      thanks for reading

                      gandhi

                      version 11 3381 - 4096
                      mysql backend
                      http://www.alphawebprogramming.blogspot.com
                      [email protected]
                      Skype:[email protected]
                      1 914 924 5171

                      Comment


                        #12
                        Re: Caching issue driving me nuts!

                        http://wiki.alphasoftware.com/~alpha...ed+UI+Pane+V11

                        take a look at this page this may give some ideas how to control the child tab from the parent grid via callback.
                        thanks for reading

                        gandhi

                        version 11 3381 - 4096
                        mysql backend
                        http://www.alphawebprogramming.blogspot.com
                        [email protected]
                        Skype:[email protected]
                        1 914 924 5171

                        Comment


                          #13
                          Re: Caching issue driving me nuts!

                          Glen,
                          If you are using a JavaScript function that is declared in the component's Code / JavaScript property, as opposed to an inline function attached to a specific control in the grid, then you may have to ensure the JavaScript function name becomes unique for each instance of that component opened in the tabbed-ui. I believe the suggested practice is to prefix you JavaScript function name with
                          {Grid.ComponentName}_

                          And, use that prefix in the places where you call the function.
                          Also, watch out for the use of any placeholder values that cannot be used in the context of a global function, like {Grid.RowNumber}.

                          Comment


                            #14
                            Re: Caching issue driving me nuts!

                            Glen, wondering if you ever solved this, or had any suggestions? I'm having basically the same problem and found this thread.

                            In a tabbed UI, account list grid is used to show account names, selection of each then opens up an account detail grid in a new tab. Multiple account detail tabs can be open. The account detail tabs, have several linked grids on them. Works fine, but now on one of the linked grids I do an ajax callback to add a specific type of child record. Problem I have is getting the account num (key) from the parent grid on the active tab. Alpha handles filtering the query for the linked grids on the account num, but I need to find it from the child grid. It doesn't seem to be exposed on the server in "e.", nor in the dom on the client side. I've tried using javascript from the child linked grid to find the parent grid and grab the account num from the parent, but that's where I run into your problem... the parent grid, isn't the parent of the "active" child grid, it's the parent grid on the last opened tab.

                            Ideally I think I'm looking for a way in the child grid to be able to reliably determine the link filter (base filter) that alpha is building into the child grid's query.

                            Any thoughts on this much appreciated. Thanks!

                            Comment

                            Working...
                            X