Examples of PermissionsURLTag


Examples of com.liferay.taglib.security.PermissionsURLTag

      StringJspWriter stringJspWriter = new StringJspWriter();
      PageContextAdapter pageContextAdapter = new PageContextAdapter(httpServletRequest, httpServletResponse,
          elContext, stringJspWriter);

      // Invoke the Liferay Tag class directly (rather than using the tag from a JSP).
      PermissionsURLTag permissionsURLTag = new PermissionsURLTag();

      permissionsURLTag.setPageContext(pageContextAdapter);
      permissionsURLTag.setModelResource(MODEL);
      permissionsURLTag.setModelResourceDescription(getName());
      permissionsURLTag.setRedirect("false");
      permissionsURLTag.setResourceGroupId(scopeGroupId);
      permissionsURLTag.setResourcePrimKey(String.valueOf(getEntryId()));

      // Set var to null if you want the tag to write out the url
      permissionsURLTag.setVar(null);

      try {
        permissionsURLTag.doStartTag();
        permissionsURLTag.doEndTag();
        permissionsUrl = stringJspWriter.toString();
      }
      catch (Exception e) {
        logger.error(e);
      }
View Full Code Here

Examples of com.liferay.taglib.security.PermissionsURLTag

      StringJspWriter stringJspWriter = new StringJspWriter();
      PageContextAdapter pageContextAdapter = new PageContextAdapter(httpServletRequest, httpServletResponse,
          elContext, stringJspWriter);

      // Invoke the Liferay Tag class directly (rather than using the tag from a JSP).
      PermissionsURLTag permissionsURLTag = new PermissionsURLTag();

      permissionsURLTag.setPageContext(pageContextAdapter);
      permissionsURLTag.setModelResource(MODEL);
      permissionsURLTag.setModelResourceDescription(getName());
      permissionsURLTag.setRedirect("false");
      permissionsURLTag.setResourceGroupId(scopeGroupId);
      permissionsURLTag.setResourcePrimKey(String.valueOf(getGuestbookId()));

      // Set var to null if you want the tag to write out the url
      permissionsURLTag.setVar(null);

      try {
        permissionsURLTag.doStartTag();
        permissionsURLTag.doEndTag();
        permissionsUrl = stringJspWriter.toString();
      }
      catch (Exception e) {
        logger.error(e);
      }
View Full Code Here

Examples of com.liferay.taglib.security.PermissionsURLTag

  public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {

    try {

      // Get the URL from the tag output.
      PermissionsURLTag permissionsURLTag = newTag();
      copyAttributes(facesContext, cast(uiComponent), permissionsURLTag);

      PortalTagOutput portalTagOutput = getPortalTagOutput(facesContext, uiComponent, permissionsURLTag);
      String url = portalTagOutput.getMarkup();
View Full Code Here

Examples of com.liferay.taglib.security.PermissionsURLTag

    }
  }

  @Override
  public PermissionsURLTag newTag() {
    return new PermissionsURLTag();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.