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

PanelCard OnActivate

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

    PanelCard OnActivate

    My PanelCard UX component is embedded object in a separate Login PanelCard UX component.

    Unfortunately the OnActivate event is not called when the first PanelCard of this embedded UX is first activated.
    It is colled when I activate any other PanelCard, but not for the first PanelCard.

    Have you found any way to launch some javascript code when an embedded UX is opened?

    #2
    Re: PanelCard OnActivate

    In the Component definition for the embedded component there is an option to run any javascript you want within the context of the embedded object, it's called onLoadComplete - use that area to run the js you have in the Onactivate event - it should work, if not you may have to put a settimeout on it to give the embedded object a moment to settle down first!
    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


      #3
      Re: PanelCard OnActivate

      Originally posted by rnoguera View Post
      My PanelCard UX component is embedded object in a separate Login PanelCard UX component.

      Unfortunately the OnActivate event is not called when the first PanelCard of this embedded UX is first activated.
      It is colled when I activate any other PanelCard, but not for the first PanelCard.

      Have you found any way to launch some javascript code when an embedded UX is opened?
      This depends a bit on the Embedded Object property "Delay render till visible".
      Also, do you want the Child PanelCard 1 to run Javascript every time it's viewed, or just the first time it's viewed?
      If you swipe to Child PanelCard 2, and then back to Child PanelCard 1, do you want to run Javascript for Child PanelCard 1?

      Comment


        #4
        Re: PanelCard OnActivate

        As with the other replies, you can also use OnPanelActivateComplete on the panel card's inner-most panel navigator (if you have a panel navigator in your UX & inner-most meaning if you have embedded panel navigators). All you would have to do is check the active panel using:
        Code:
        this.state.activePanel
        This is how I got around the issue of the 1st panel card not activating. But as david was implying.. We just need a little bit more info.

        Comment


          #5
          Re: PanelCard OnActivate

          For clarity: I am trying to run a code the first time, the first panel card is activated.
          I don't have any trouble for 2nd, 3rd and other panel cards, as I can use onActivate event for the PanelCard.
          But this event apparently is not called for the 1st PanelCard.

          onLoadComplete Event in the embedded component >> Did not work for me. Even with a Timeout.

          onRenderComplete Event inside the embedded UX >> Did the trick. Although not very elegant and would not work with pre-rendering.

          onPanelActivate Event inside the embedded UX >> Does not seem to be called for the 1st panel card

          OnPanelActivateComplete on the panel card's inner-most panel navigator >> Does not seem to be called for the 1st panel card...

          Comment


            #6
            Re: PanelCard OnActivate

            The 4th doesn't work on the 1st panel card? Odd. That is what I use for the 1st panel card (and all panel cards for that matter).

            Comment


              #7
              Re: PanelCard OnActivate

              You haven't really answered some questions. Do you have "Delay render till visible" checked?
              Do you want your code to run EVERY time the Child Panelcard 1 is viewed... or just the first time it's viewed?
              Is your Parent UX and/or or Child UX Pre-Rendered?
              You also don't tell us which Alpha Build you're using... this is important.

              All these settings affect the events. It's tough to help not knowing the details of your setup.

              Build a simple UX Parent and Child component and post it here. Describe, in detail, what you would like to have happen. So far it's not clear.
              There are settings for the Navigator, PanelCard, Embedded, Rendering, and Delay. These must all be known.

              Comment


                #8
                Re: PanelCard OnActivate

                Originally posted by mshoemate View Post
                The 4th doesn't work on the 1st panel card? Odd. That is what I use for the 1st panel card (and all panel cards for that matter).
                onPanelAcivateComplete only fires when all Panelcards for that Navigator are viewed... kind of. It's a bit dicey.

                Comment


                  #9
                  Re: PanelCard OnActivate

                  Okay, that makes sense. It seems to work fine for what I need, just sounded similar to what Roger needed.

                  Comment


                    #10
                    Re: PanelCard OnActivate

                    Hi Davidk,

                    Regarding your questions:

                    Do you have "Delay render till visible" checked? >> YES

                    Do you want your code to run EVERY time the Child Panelcard 1 is viewed... or just the first time it's viewed? >> ONLY FIRST TIME. If runs every time, I can live with it and control execution of sensible code using javascript.

                    Is your Parent UX and/or or Child UX Pre-Rendered? >> YES. BOTH

                    You also don't tell us which Alpha Build you're using... this is important. >>6470-5430

                    Comment


                      #11
                      Re: PanelCard OnActivate

                      Try the onView Event of the Child PanelCard 1. This will fire as follows:

                      1. It will fire only one time when moving from the Parent to the Child. If you go back to the Parent... and then back to the Child... the Child onView will not fire.
                      2. It will fire each time you move to PanelCard 1 from within the Child UX. E.g. Child PanelCard 2 to Child PanelCard 1. But, as you said, you can control code execution.

                      Comment


                        #12
                        Re: PanelCard OnActivate

                        Yes!!

                        onView event worked for me.

                        I had to wrap my javascript function inside a Timeout, otherwise the UX wouldn't render. But other than that, worked perfectly.

                        Comment


                          #13
                          Re: PanelCard OnActivate

                          That's because your Javascript is looking for something that isn't there yet... a common issue. You can also test for objects you're expecting. Glad it worked out.

                          Comment


                            #14
                            Re: PanelCard OnActivate

                            As always, thanks for your excellent input DK - love the thoroughness of the answers! The event information doesn't really provide context like that.
                            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

                            Working...
                            X