List of usage examples for com.liferay.portal.kernel.util PortletKeys MESSAGE_BOARDS
String MESSAGE_BOARDS
To view the source code for com.liferay.portal.kernel.util PortletKeys MESSAGE_BOARDS.
Click Source Link
From source file:com.liferay.message.boards.editor.configuration.internal.MBEditorOptionsContributor.java
License:Open Source License
@Override public void populateEditorOptions(EditorOptions editorOptions, Map<String, Object> inputEditorTaglibAttributes, ThemeDisplay themeDisplay, RequestBackedPortletURLFactory requestBackedPortletURLFactory) { PortletURL portletURL = requestBackedPortletURLFactory.createActionURL(PortletKeys.MESSAGE_BOARDS); portletURL.setParameter(ActionRequest.ACTION_NAME, "/message_boards/upload_temp_image"); Map<String, String> fileBrowserParamsMap = (Map<String, String>) inputEditorTaglibAttributes .get("liferay-ui:input-editor:fileBrowserParams"); long categoryId = 0; if (fileBrowserParamsMap != null) { categoryId = GetterUtil.getLong(fileBrowserParamsMap.get("categoryId")); }// w w w .ja v a 2 s . co m portletURL.setParameter("categoryId", String.valueOf(categoryId)); editorOptions.setUploadURL(portletURL.toString()); }