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

Reset UX controls

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

    Reset UX controls

    This shouldn't be this hard! I want to reset some UX controls tied to a list.

    I have a list with 3 UX controls configured for the detail view. I have several buttons across the bottom of the panel. One is for "New Record" and one is for "Cancel Changes". The idea is you click on "New Record" to enter a new record in the detail view which consists of a name, a checkbox and an image field.

    Another button is to "Save" the detail view controls back to the list. However, before you save, I want to be able to cancel any changes made to the detail view. So I have some code on the cancel button which clears the detail view controls (basically does a .setValue with value set as ' '). This doesn't clear the "dirty" status as I have an enable expression on the "save" button set to dialog.listDetailView.PHOTO_LIST.isDirty = true. After I press the "Cancel Changes" button, the UX controls clear, but the "Save" button is still disabled, I guess meaning the list is still dirty.

    I have tried adding the resetform method to the cancel changes button, however this seems to reset every control on all the panels (I have 4 panels with headers and footers with values set in them so it is quite tedious to set everything up again when I do a reset form, as well as re-selecting the selected rows in multiple lists on the panels).

    I have also tried {dialog.object}.isDirty = false for all the detail view controls and also the list. But nothing seems to clear the dirty status of the list. I have also tried the .setClean method, again with no success.

    There must (should?) be an easier way to do this. Any help appreciated.

    Cheers,

    #2
    Re: Reset UX controls

    You should post the version/build you're using.

    If I understand what you're looking for, it's built into the available Detail View Buttons. Get into your List, and into the Detail View tab. At the bottom click the Detail View - Quick Setup Genie.

    Turn on the "Add buttons to the List...", select Choose buttons to create, then click Select. You'll see one of the buttons is "Undo edits to Detail View (before edits are saved)".

    The code it produces is...

    Code:
    var lObj = {dialog.object}.getControl('LISTCUST');
    lObj.resetForm({prompt: true});
    This performs a .resetForm()... but only on the List Control.

    Comment


      #3
      Re: Reset UX controls

      I'm using the latest released version : 12.4.5.4.6 build 5445.

      So I used this action in my cancel changes button: List control action->reset detail form.
      When I convert it to text, it produces the code as per your reply.
      This has helped me narrow down the problem. In the detail view I have 3 controls: a text area used for entering the name and description, a checkbox to indicate if this is the overview photo, and an image field which contains the selected photo.

      I can edit the text area and/or checkbox, hit the cancel changes button and they will revert back to the original contents. However, if I change the image, and then hit the cancel changes button, it will revert back to the previous image. But if I try to click on another row in the list I get this message:
      "You must first save or undo the changes you made to the list's detail view".
      Obviously something in the list is not getting reset.

      I am using a action "Image capture for list detail view" to capture the image. (I have set it to phonegap preferred, so when running on the tablet it will use the camera, and on the laptop you can load an image from the file system). I've converted the action to text so I can enable/disable it based on a flag.

      So something in the image field is not being reset but not sure why?

      Greg

      Comment


        #4
        Re: Reset UX controls

        The latest official release is 5447. There are some serious issues with 5445. I somewhat doubt the problems you're having is because of 5445, but try 5447 to be sure.

        Comment


          #5
          Re: Reset UX controls

          With your additional information I was able to replicate your issue. Updating anything except the image and the List can be reset. Update the image and, although the image is reset, the List is not. Any controls... e.g. Save, Reset... with an Enable expression... stay enabled. Moving off the List row marks that row as changed.

          You should report this as a bug to Alpha. They are not taking care of Image controls. I tested with 5447.

          Comment


            #6
            Re: Reset UX controls

            OK, thanks for the confirmation.

            Comment


              #7
              Re: Reset UX controls

              If you don't want to wait for Alpha... or don't want to play yet another round of "Release/Pre-Release/Bugs" then you can clean up after an image edit yourself.

              When Alpha deals with Images, they create a 2nd Div named "HIDDENA5FN". This is where the bug is... what Alpha is not looking after.

              In your "Reset" code... add this...

              Code:
              $("{dialog.ComponentName}.V.R1.PHOTO_IMAGE_HIDDENA5FN").src="";
              $("{dialog.ComponentName}.V.R1.PHOTO_IMAGE_HIDDENA5FN").setAttribute("a5isdirty",false);
              This code resets the "src" of the hidden image to an empty string.
              And then sets the value of the "a5isdirty" attribute of the div back to false;

              Your full code will be...

              Code:
              $("{dialog.ComponentName}.V.R1.PHOTO_IMAGE_HIDDENA5FN").src="";
              $("{dialog.ComponentName}.V.R1.PHOTO_IMAGE_HIDDENA5FN").setAttribute("a5isdirty",false);
              var lObj = {dialog.object}.getControl('PHOTO_LIST');
              lObj.resetForm({prompt: false});

              Comment


                #8
                Re: Reset UX controls

                David, excellent. That did it!

                Greg

                Comment

                Working...
                X