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

Method to close Tab in Tabbed UI

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

    Method to close Tab in Tabbed UI

    Hi all,

    I've found the methods here on the forum to close the CURRENT UI tab:
    {dialog.object}.closeCurrentTabbedUIPane()
    {grid.object}.closeCurrentTabbedUIPane()

    But in my case these will close the current tab you are on no matter which one initiated the command.

    I'm trying to set a timeout that closes a tab after so many minutes. If you set it with the above methods, a person can be on a different tab and it will close that one instead of the one I'm targeting.

    Right now I have a grid component with a button to open a drawing. I was able to get this to work if I have it open a window and add this code to the windows onShow event:
    Code:
     timer=setTimeout("closeLastOpenedA5Window()",3000)
    (set to three seconds for testing purposes.)

    Unfortunately, there is no OnShow event for opening in a new tab of a tabbed UI. Also, it's a new tab and not an a5 window.

    So, to put it simply, I want a user who has this grid component opened in the tabbed UI to be able to click on a "show drawing" button in the grid component which opens the PDF in a new UI tab. I want this particular tab to close itself after a set time.

    Thanks

    #2
    Re: Method to close Tab in Tabbed UI

    The TabbedUI button has an onInitial Tab Pane event that you could add your timer code to.

    Maybe then add code like this :

    setTimeout(function() {
    var myIdx = tbiObj._tbObj._curTabIndx;
    var myID = tbiObj._tbObj._panes[myIdx]._id;
    tbiObj._tbObj.remove(myID);
    }, 3000);


    I haven't tested this .... but it should get you started at least....

    Comment


      #3
      Re: Method to close Tab in Tabbed UI

      Hi Andy,
      First, thanks for your help so far!

      I see what you are talking about. Under the individual tabbed UI Button for my grid component there is a section called "Tab Pane Javascript" which has an OnInitial event. However if I put it in the onInitial, It will close down that tab right? That tab is the one that holds my grid component and I don't want it closed. I want to close the additional tabs that are created by the grid component. I have buttons in the grid component that create a new tab in any tabbed UI that holds the grid component. What I need to do is control "children" of the tab in question.

      Actually, maybe the code you have in your example takes care of that problem by figuring out the tab's individual id? Would you be able to explain it line by line for me and explain what information it is getting? In my case, the names of the new tabs are set by the grid component to a value in the database for the current record. So, if the record you click on in the grid component has a draing number of 2013-GU, that will be the name of the tab.

      Sorry, I'm not even to the level of a script kiddie when it comes to javascript. I may have been up to script kiddie level with php a few years back. I'm a Mfg. Eng. so what I'm really good at is CNC Gcode, Fanuc Macro b (parametric CNC programming), and robot programming.....not so much on the computer programming.

      Comment


        #4
        Re: Method to close Tab in Tabbed UI

        setTimeout(function() {

        var myIdx = tbiObj._tbObj._curTabIndx; //get the current tab index
        alert(myIdx); // show value

        var myID = tbiObj._tbObj._panes[myIdx]._id;
        alert(myID); // show value

        tbiObj._tbObj.remove(myID); //remove the entire tab

        }, 3000);

        setTimeout - this tells the browser not to run the function within for xx milliseconds (3000 = 3s)


        I think you will need to learn basic javascript if you want to build useful web systems. Otherwise, you can only settle for what the standard A5 components offer out of the box.

        Comment


          #5
          Re: Method to close Tab in Tabbed UI

          Originally posted by agillbb View Post
          setTimeout(function() {

          var myIdx = tbiObj._tbObj._curTabIndx; //get the current tab index
          alert(myIdx); // show value

          var myID = tbiObj._tbObj._panes[myIdx]._id;
          alert(myID); // show value

          tbiObj._tbObj.remove(myID); //remove the entire tab

          }, 3000);

          setTimeout - this tells the browser not to run the function within for xx milliseconds (3000 = 3s)


          I think you will need to learn basic javascript if you want to build useful web systems. Otherwise, you can only settle for what the standard A5 components offer out of the box.
          Thanks,
          Yeah, I realize I'll need to learn some java to do special stuff like this. That's why I'm not complaining. Unlike my other issue with dropdown boxes, this SHOULD call for custom code.

          Regarding your example code. Won't I have to pass a variable from the grid so it knows which tab I want to close? That being said, Here's what I am trying to do currently in som OnClick inline javascript in the grid button (which isn't working):

          Code:
          paneid = {grid.object}.getValue('G','A5FN_NUMBER',grid.rowNumber);
          timer=setTimeout("tbiObj.selectPane('paneid')",3000);
          Maybe I can pass "paneid" to the tabbed ui somehow and have it close that particular pane instead of trying to set the timer in the grid button.....?

          Comment


            #6
            Re: Method to close Tab in Tabbed UI

            In your code, you are setting a field value (A5FN_NUMBER - whatever this data is) to a variable.
            But surely this value does not represent a valid TabbedUI Pane ID? A pane id is usually assigned by A5.

            Comment


              #7
              Re: Method to close Tab in Tabbed UI

              Originally posted by agillbb View Post
              In your code, you are setting a field value (A5FN_NUMBER - whatever this data is) to a variable.
              But surely this value does not represent a valid TabbedUI Pane ID? A pane id is usually assigned by A5.
              (
              There's an option (target properties in the Action Javascript) to set the name of the pane to one of your field in the settings. When my grid component creates a new tab the name on the tab is the name of the drawing (A5FN_NUMBER). I guess I don't know for sure that the TabbedUI Pane ID is set to this as well, I guess I just assumed because it made sense.

              Comment

              Working...
              X