Skip to content

Instantly share code, notes, and snippets.

@ethanbustad
Last active August 29, 2015 14:05
Show Gist options
  • Save ethanbustad/1d4bef10bcabaccec49c to your computer and use it in GitHub Desktop.
Save ethanbustad/1d4bef10bcabaccec49c to your computer and use it in GitHub Desktop.
Creating a delete actionURL with js
var actionURL = Liferay.PortletURL.createActionURL();
actionURL.setParameter('p_auth', Liferay.authToken);
actionURL.setParameter('controller', 'skills');
actionURL.setParameter('action', 'delete');
actionURL.setParameter('id', connectSkill.connectSkillId); // <-- not sure how you're accessing this ID
actionURL.setParameter('format', 'html');
actionURL.setParameter('redirect', document.URL);
actionURL.setPortletId(${themeDisplay.portletDisplay.rootPortletId});
actionURL.setWindowState('normal');
actionURL.toString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment