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

Refresh is not a function List Event

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

    Refresh is not a function List Event

    Hello everyone !
    im having difficulty on refreshing an embedded ux, there is several particular condition that needs to be fulfilled in order for my apps to run as i want it to be.
    im placing this refresh code i got by clicking "insert method" and "copy example to clipboard" from <listObject>listIsDirty(); method on "onListDraw" event, here goes the code
    Code:
    var listObj = {dialog.object}.getControl('listFormKWH');
    var flag = listObj.listIsDirty();
    if(listObj) { 
    		alert('You must first sync your edits before you can refresh the List');
    } else { 
    		{dialog.object}.refreshListData('listFormKWH');
    }
    as i run the preview, my list wasn't refreshed as it was intended to be, and i got this error alert saying as in the pic i attached

    any solution or suggestion to the problem i'm having is really welcomed, much appreciated, thanks !
    Attached Files

    #2
    Re: Refresh is not a function List Event

    Try this:

    Code:
    var listObj = {dialog.object}.getControl('listFormKWH');
    var flag = listObj.listIsDirty();
    if([COLOR="#FF0000"]flag[/COLOR]) { 
    		alert('You must first sync your edits before you can refresh the List');
    } else { 
    		{dialog.object}.refreshListData('listFormKWH');
    }
    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

    Comment


      #3
      Re: Refresh is not a function List Event

      Originally posted by iRadiate View Post
      Try this:

      Code:
      var listObj = {dialog.object}.getControl('listFormKWH');
      var flag = listObj.listIsDirty();
      if([COLOR="#FF0000"]flag[/COLOR]) { 
      		alert('You must first sync your edits before you can refresh the List');
      } else { 
      		{dialog.object}.refreshListData('listFormKWH');
      }
      sorry, my bad, i've already done that earlier, paste-ing the code exactly from the example
      seems that i posted the wrong code up there

      still, i didn't get the result i wanted

      Comment


        #4
        Re: Refresh is not a function List Event

        You have a "Parent" (main) component and an embedded "Child" component. The List you want to refresh is on the "Child" component.

        Do you want to refresh the Child component from the Parent component? If so, then you must first get a pointer to the Child.

        Your Embedded component has a property... "Component alias". You must assign a unique value here. You cannot use <DefaultAlias>. Let's say the embedded component alias is MYCHILDUX. In the Parent UX you'll have this code...

        Code:
        var childUX = {dialog.Object}.getChildObject('MYCHILDUX');
        Now that you can access the embedded component... you can do this... again from the Parent...

        Code:
        var listObj = childUX.getControl('listFormKWH');
        var flag = listObj.listIsDirty();
        if(flag) { 
        		alert('You must first sync your edits before you can refresh the List');
        } else { 
        		childUX.refreshListData('listFormKWH');
        }

        Comment


          #5
          Re: Refresh is not a function List Event

          Originally posted by Davidk View Post
          You have a "Parent" (main) component and an embedded "Child" component. The List you want to refresh is on the "Child" component.

          Do you want to refresh the Child component from the Parent component? If so, then you must first get a pointer to the Child.
          Hey David ! thanks for replying.
          the thing is i tried to refresh the list on the very same UX, yes it is an embedded UX from the main one, but at this point of refreshing the page is already in the embedded UX, so i guess my code should've worked, would be happy to be corrected if im wrong !

          Comment


            #6
            Re: Refresh is not a function List Event

            Ok... thanks... I wasn't sure where the refresh was taking place. The code, as Stephen posted, does work... given that you don't have any other errors on your rendered page.

            Can you run this in a browser and report what's in the console?

            Comment


              #7
              Re: Refresh is not a function List Event

              Try ticking delay render till visible in the properties of the embedded UX which will do an ajax callback when it comes into view and you won't have to do a refresh - I beleive...is this a PG app by chance?
              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


                #8
                Re: Refresh is not a function List Event

                Originally posted by Davidk View Post
                Ok... thanks... I wasn't sure where the refresh was taking place. The code, as Stephen posted, does work... given that you don't have any other errors on your rendered page.

                Can you run this in a browser and report what's in the console?
                Originally posted by CharlesParker View Post
                Try ticking delay render till visible in the properties of the embedded UX which will do an ajax callback when it comes into view and you won't have to do a refresh - I beleive...is this a PG app by chance?
                Sorry for the late reply,

                Hi Charles ! thanks for your suggestion, i tried ticking just as you suggest, and it only delay the process i guess, just like the function name (duh) but i'm still having the error,
                i put the screenshot of the console after i ticked the delay render till visible.

                there is two error in my screenshot, the first one (listIsDirty is not function) occured when the page first accessed, and the second one (refresh is not a function) happened after i click the second tab (KWH-1), default tab is the "nama" tab

                btw what is a PG app, Charles ?

                Comment


                  #9
                  Re: Refresh is not a function List Event

                  When and where are you running this code? Sounds like the List isn't rendered yet. PGB app... PhoneGap Build.

                  Comment


                    #10
                    Re: Refresh is not a function List Event

                    Originally posted by Davidk View Post
                    When and where are you running this code? Sounds like the List isn't rendered yet. PGB app... PhoneGap Build.
                    silly me, i've forgotten to attach the screenshot at my previous reply. i've put it just now.
                    sorry i dont quite get your question David, i ran it using Browser (Chrome) Live Preview, i put it on ListDraw event on a list on an embedded UX
                    Attached Files

                    Comment


                      #11
                      Re: Refresh is not a function List Event

                      I have a feeling you're wrapping yourself around the axle. I don't think you want to put a .refreshListData into the onListDraw event. I'd put it into the UX onRenderComplete event.

                      If you have it onListDraw... then when the List finishes drawing... you refresh the List... which the draws... which then refreshes... which then... you get the idea.

                      Comment


                        #12
                        Re: Refresh is not a function List Event

                        Originally posted by Davidk View Post
                        I have a feeling you're wrapping yourself around the axle. I don't think you want to put a .refreshListData into the onListDraw event. I'd put it into the UX onRenderComplete event.

                        If you have it onListDraw... then when the List finishes drawing... you refresh the List... which the draws... which then refreshes... which then... you get the idea.
                        i see, i'll try to put it on another event for now, thanks for the feedback !

                        Comment

                        Working...
                        X