7 Replies Latest reply: Jun 21, 2011 2:18 AM by Mindmap RSS

    Dialog Region

      Hi guys,

      I have been trying to use Dialog Region Plugin for the last 4 hours, but I did not manage to do so. Perhaps you take a look and help:
      Basically, the problem is when I click the button to trigger the region nothing happens. However, I am aiming to trigger the region when an end user clicks a link on Interactive Report.

      Pwd: Cis12!
      Application: 49002 - SERIOUS
      user: dev
      pwd: dev
      Page 2

      Best Regards,

      Edited by: Fateh on Jun 20, 2011 6:47 AM
        • 1. Re: Dialog Region
          Tyson Jouglet

          workspace: "somefeto"
          username: "somefeto@gmail.com"
          Password: "Cis12!"

          are these all accurate?

          Tyson Jouglet
          • 2. Re: Dialog Region
            Thanks Tyson,

            I have just counter checked. These credentials are correct:

            workspace: somefeto
            username: somefeto@gmail.com
            Password: Cis12!

            Just to make it clear. Now, I am trying to apply it in the same way as it is applied in the Demo
            And my goal is to apply on IR where I have a column that contains Links of videos on Youtube. So, as an end user clicks on the link, the Dialog Region should be triggered.


            Edited by: Fateh on Jun 20, 2011 7:33 AM
            • 3. Re: Dialog Region
              Tyson Jouglet

              added a column to your report and called it youtube_link. added a dialog region to your page and made its triggering element "TD[HEADERS='YOUTUBE_LINK']". what you put into that region is up to you.

              Tyson Jouglet
              • 4. Re: Dialog Region
                Thanks a lot Tyson,

                Perhaps you can take a look again for the report is ready now.

                The goal is:
                When an end user clicks on a link on "VIDEO" Column, the value in that column should be passed into the Dialog Region to show the intended movie.

                And I would be grateful to you if you tell me what does this mean

                and why do you think when I click on "Show Dialog2" button - that is in page 2- the Dialog Region does not get triggered.

                Best Regards,
                • 5. Re: Dialog Region
                  Tyson Jouglet

                  Well one of the attributes of the dialog region plugin is triggering element. Basically what that mean is "Which elements will spawn this dialog when clicked?". Since it utilizes jQuery, we can provide a [url http://www.w3schools.com/jquery/jquery_ref_selectors.asp]jQuery Selector to cause multiple elements that meet a certain criteria to spawn the dialog when clicked. While cryptic at first, selectors actually become quite easy to read.
                  //this would be returned
                  <td headers="YOUTUBE_LINK">some data</td>
                  //this will not be returned
                  <td headers="SOME_OTHER_COLUMN">some data</td>
                  What this selector is saying is "get all TD (Table Data) elements where the headers attribute is equal to "YOUTUBE_LINK". This works out great for us because all TD elements in a report now get assigned a headers attribute which is the name for the column they belong to. So effectively we sliced our report so only the youtube link column was returned and we enabled an on click event that would open the dialog box.

                  Out of the box this dialog region is static. As in, you cannot pass any values into it and change its content based on the triggering element. To get what you are asking you would have to create your own function that spawns the region and changes whatever values. I cannot do anything with youtube or any sort of video right now as my network does not allow it.

                  Tyson Jouglet
                  • 6. Re: Dialog Region
                    Tyson Jouglet

                    1. I added a static ID to your plugin region. id="watch_video"
                    2. I added an ID to your video object. id="movie_obj"
                    <object id="movie_obj" style="height: 390px; width: 640px">
                        <param name="movie" value="http://www.youtube.com/v/hnaXHiNJgU8?version=3">
                        <param name="allowFullScreen" value="true">
                        <param name="allowScriptAccess" value="always">
                        <embed src="http://www.youtube.com/v/hnaXHiNJgU8?version=3"
                            type="application/x-shockwave-flash" allowfullscreen="true"
                            allowScriptAccess="always" width="640" height="390">
                    3. I removed the triggering element definition from the plugin region.

                    4. I added the following javascript to the "movie javascript" region which is rendered after the movie region.
                        var movie_src = $(this).attr('innerHTML');
                        apex.jQuery("#movie_obj param[name='movie']").attr("value",movie_src);
                        apex.jQuery("#movie_obj embed").attr("src",movie_src);
                        event.preventDefault(); ;
                        return false;
                    This may work but I cant test it because I disabled flash.

                    I have zero experience manipulating these flash movies.

                    Tyson Jouglet
                    • 7. Re: Dialog Region
                      Great Tyson,

                      Actually I was very happy when I saw it working, but I bumped into another obstacle. It does not look professional if the addresses show up; so, I displayed the address with an image in "Video" column where it is colored image when there is an address (the value in the column is not null) and black & white image when there is no address (null). Apparently, the address does not get passed to the Dialog Region.

                      I appreciate your effort,