Details

      Description

      This task involves creating a new portal:popUp component to encapsulate the Liferay Portal JavaScript Pop Up component. Currently, Liferay Faces developers are required to use JavaScript:

      AUI().use('liferay-util-window', function(A) {
          Liferay.component('popUp', Liferay.Util.Window.getWindow({
              dialog: {
                  centered: true,
                  constrain2view: true,
                  resizable: false,
                  visible: false,
                  render: true
              }
          }).plug(A.Plugin.DialogIframe, {
              autoLoad: true,
              iframeCssClass: 'dialog-iframe',
              uri:'#{url}'
          }));
      });
      

      This component should be encapsulated with a ClientComponentRenderer that allows the developer to change the appropriate attributes of the dialog and the appropriate attributes of the DialogIframe plugin in order to render a pop up in a JSF portlet.

      Additionally, the portal:popUp component should provide a url attribute. If the url attribute is not set, the portletId attribute should be consulted (and potentially other portlet:renderURL parameters as well like portletMode and copyCurrentRenderParameters). If both the url and portletId are not set, then the pop up should automatically target the current portlet.

      Judging based on the popularity of this feature on StackOverflow and its usefulness in our own showcase, I believe this component would be popular. Since this component encapsulates all the JavaScript, JSF developers would no longer need to read the JavaScript API docs and source for deprecated components like Dialog and DialogIframe in order to create a pop up in a JSF portlet.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: