5 Replies Latest reply: Apr 22, 2013 7:08 AM by Daniel Merchán RSS

    Open a pop up on click of a hyperlink

    991045
      i have a image on my webcenter spaces application page which is hyperlinked to a document. i want this document to open as a pop up window instead of a new window/tab. Any help would be appreciated..!
        • 1. Re: Open a pop up on click of a hyperlink
          Daniel Merchán
          Hi.

          You can try follow next approach.
          Change your link for a commandLink. Open an af:popup passing your URI value of the document.
          Inside of the af:popup use an af:inlineFrame to show your document.

          Another thing that you can do is pass Content ID to af:popup. Your af:popup include Document Viewer Task Flow configured to show your Content ID wired to the popup.

          I hope this help you.

          Regards.
          • 2. Re: Open a pop up on click of a hyperlink
            991045
            Iam not using webcenter framework instead using webcenter spaces. need to know whether it is possible to acheive this functionality in webcenter spaces..!
            • 3. Re: Open a pop up on click of a hyperlink
              Daniel Merchán
              Hi.

              Give more details about your scenario:
              - How you built your hyperlink. OOTB components?.
              - Did you try customization?.

              Regards.
              • 4. Re: Open a pop up on click of a hyperlink
                991045
                Hi,

                I added a image component from the resource catalog to my application page where in i've given the hyperlink URL to a document with in the same space. currently, when i click on the image, document is opening in a new tab - i need this to be opened as a popup window.
                • 5. Re: Open a pop up on click of a hyperlink
                  Daniel Merchán
                  Hi.

                  Hyperlink component is generated by following code:
                  <cust:showDetailFrame xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"
                                                          id="#" text="#{componentExtensionBundle.IMAGE}"
                                                          background="#{changeModeBean.inEditMode ? 'medium' : 'light'}"
                                                          contentStyle="background-color:transparent;"
                                                          displayHeader="#{changeModeBean.inEditMode}"
                                                          showMinimizeAction="none"
                                                          showResizer="never" stretchContent="false">
                                      <f:attribute xmlns:f="http://java.sun.com/jsf/core"
                                                   name="sdf_selection_rule" value="sdf_for_edit_mode_only"/>
                                      <af:goImageLink xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="#" icon="/adf/pe/images/default_image.png" shortDesc="#{null}" />
                                    </cust:showDetailFrame>
                  Using this component you can't achieve your requirement to open it in a popup. You can find this component in the catalog-registry.xml that is used by your Resource Catalog.

                  One option is create your own component registering it in the catalog following next approach:
                  <cust:showDetailFrame xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable"
                                                          id="#" background="light"
                                                          contentStyle="background-color:transparent;"
                                                          displayHeader="false" showMinimizeAction="none"
                                                          showResizer="never" stretchContent="false">
                                      <f:attribute xmlns:f="http://java.sun.com/jsf/core"
                                                   name="sdf_selection_rule" value="sdf_for_edit_mode_only"/>
                                      <af:commandLink id="#" text="#{componentExtensionBundle.LINK_TEXT}"
                                                 xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
                                           <af:showPopupBehaviour ...>
                                      </af:commandLink>
                  </cust:showDetailFrame>
                  And the popup should be in the pageTemplate or pageStyle.

                  Regards.