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

onDialogInitialize and the tmpl Component Definition

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

    onDialogInitialize and the tmpl Component Definition

    Does anyone know if it is possible to modify any of the dialog component definition settings from onDialogInitialize using the tmpl structure? I can do this with a grid component as long as I set the flag to recalculate the component settings. I would like my customers to be able to change my default control headings and help text and figured this event would be the perfect place to override all of my dialog settings. I've searched everywhere and have not been able to find anything about whether this can or cannot be done. I've read many threads about people asking how to populate drop downs or checking check boxes. In every case, the answer has been calling a javascript method. It just seems very simple and straightforward if it was possible to override all of the dialog properties using Xbasic in onDialogInitialize and be done with it.

    The dialog's onDialogInitialize event stub does mention the "e.tmpl - component definition" as if this is something you can modify using Xbasic. I've played around trying to change various control headings, bubble text, etc. but nothing changes as if the dialog component has already been constructed using the tmpl values and whatever values I set in the tmpl structure are ignored.

    Thanks

    #2
    Re: onDialogInitialize and the tmpl Component Definition

    I can't see anything that talks about change e.tmpl in the dialog... as it does in the grid. You can execute javascript, however. In the onDialogExecute event, you could do something like this to change the bubble help for a control.

    Code:
    e.javascript = "$('DLG1.V.R1.TXTLOCATION').title = 'Now setting Bubble Help from onDialogExecute
    You get get the values from e.tmpl, but it seems you can't set them. This contains the value from the bubble help for a control...

    Code:
    e.tmpl.page_fields[3].v.fieldBubbleHelp

    Comment


      #3
      Re: onDialogInitialize and the tmpl Component Definition

      Thanks fot the info. The name of one of the fields I am testing with is “DESCRIPTION”. When I tested the following line of code, nothing on the dialog seemed to change:

      e.javascript = "$('DLG1.V.R1.DESCRIPTION').title = “abc”

      Just to see what would happen, I then tried the following and noticed that “abc” now appeared in the editable area of my control:

      e.javascript = "$('DLG1.V.R1.DESCRIPTION').value = “abc”

      Are there other properties besides “.value” that I can override using this technique? I would like the ability to override many different dialog Textbox properties, but I have not seen examples of how to do it from the Message Board or the A5 documentation.

      Thanks again.

      Dave

      Comment


        #4
        Re: onDialogInitialize and the tmpl Component Definition

        When you say nothing seemed to change, do you mean that when you hover your cursor over the Description input box, you don't get 'abc' as help bubble text?
        Do you have Firebug installed for Firefox? If not, then go get it.
        Run your Grid in Live Preview, then click on the Firefox link at the bottom of your Preview window.
        Now, click into your Description field, and then right-click and choose Inspect Element with Firebug.

        This will show you all the HTML rendered, and you'll be able to pick out your default bubble help - whatever you typed for bubble help in the Grid Control Property. You'll see the bubble help text is assigned to "title" and that's what is being changed. You'll see all the other tags etc. for that control as well.

        Comment


          #5
          Re: onDialogInitialize and the tmpl Component Definition

          I don't know what I did wrong earlier, but after trying again it appears to work. BTW, I do have Fire Bug installed, but I have been doing all of my testing in Working Preview. I looked around and found that I could also change the bubble help for the label by doing the following: e.javascript = "$('DLG1.LBL.R1.DESCRIPTION').title = 'def';"

          I have not been able to find out what all of the property names are for the different types of control attributes. I don't understand why ".value" is the property name for bubble help? It would make more sense if it was called ".bubbleHelp". This is what I know so far:

          DLG1.LBL.R1.DESCRIPTION is associated with the control's heading.
          DLG1.V.R1.DESCRIPTION is associated with the control's data.
          ".value" is the property or attribute for the element's text.
          ".title" is the property or attribute for the element's bubble help text.

          Is any of this documented? If not, are there other text box attributes (e.g., background color, font attributes, etc.) I can change on a Dialog? Are there more control names I need to be familiar with like DLG1.LBL.R1.DESCRIPTION and DLG1.V.R1.DESCRIPTION.

          Thanks again. You have been very helpful.

          Comment


            #6
            Re: onDialogInitialize and the tmpl Component Definition

            All of this stuff is pure HTML, so you can find all of it many places. I check www.w3schools.com for a lot of this stuff. Just a point of clarification though... you say that ".value" is the property name for bubble help but that's the actual control value data... whereas .title is the bubble help. Just wanted to make sure...

            Yes... all attributes are available to change or add. I never try to keep them in mind, or every the rendered control names... I just fire up firebug and check the control I'm interested in to see what it's rendered name is.

            And... to make things more variable, you'll want to replace "DLG1" (the rendered name of your dialog) with a placeholder.

            Code:
            e.javascript = "$('{Dialog.ComponentName}.V.R1.TXTLOCATION').title = 'Now setting variable Bubble Help from onDialogExecute'"
            Note the {Dialog.ComponentName}... it gets resolved to DLG1

            Comment


              #7
              Re: onDialogInitialize and the tmpl Component Definition

              Got it! Makes sense now. I will start looking at the controls using Firebug.

              Thanks!

              Comment

              Working...
              X