Skip to content

Instantly share code, notes, and snippets.

View gist:8649703
import java.text.Normalizer;
import java.util.regex.Pattern;
public class StringUtil {
public static String stripAccents(String originalString) {
String normalizedString = Normalizer.normalize(originalString, Normalizer.Form.NFD);
Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+");
return pattern.matcher(normalizedString).replaceAll("");
View gist:8596092
<aui:script>
Liferay.provide(
window,
'<portlet:namespace />openPopupWindow',
function(url, title, id) {
var instance = this;
Liferay.Util.openWindow(
{
cache: false,
View gist:8595945
<portlet:renderURL var="viewPopupURL" windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>">
<portlet:param name="jspPage" value="/html/your-portlet/your-jsp.jsp" />
</portlet:renderURL>
<a:aui onclick="<portlet:namespace />openPopupWindow('<%= viewPopupURL %>', 'Name of your popup', '<%= portletDisplay.getId() %>'); return false;"><liferay-ui:message key="link-message" /></aui:a>