use of javax.portlet.PortletURL in project liferay-blade-samples by liferay.
the class BladeActionDisplayContext method _getOnclick.
private String _getOnclick() {
PortletURL portletURL = PortletURLFactoryUtil.create(request, "blade_document_action_portlet_BladeDocumentActionPortlet", _themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);
String fileName = fileVersion.getFileName();
String mimeType = fileVersion.getMimeType();
String version = fileVersion.getVersion();
Date date = fileVersion.getCreateDate();
String createdDate = date.toString();
String createdUserName = fileVersion.getUserName();
String statusLabel = WorkflowConstants.getStatusLabel(fileVersion.getStatus());
portletURL.setParameter("fileName", fileName);
portletURL.setParameter("mimeType", mimeType);
portletURL.setParameter("version", version);
portletURL.setParameter("statusLabel", statusLabel);
portletURL.setParameter("createdDate", createdDate);
portletURL.setParameter("createdUserName", createdUserName);
try {
portletURL.setWindowState(LiferayWindowState.POP_UP);
} catch (WindowStateException wse) {
_log.log(LogService.LOG_ERROR, wse.getMessage(), wse);
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Liferay.Util.openWindow({");
stringBuilder.append("dialog: {cache: false,width:800,modal: true},");
stringBuilder.append("title: 'basic information',id: ");
stringBuilder.append("'testPopupIdUnique',uri: '");
stringBuilder.append(portletURL.toString() + "'});");
return stringBuilder.toString();
}
Aggregations