开发者

Liferay request current page name

What is the smartest way to get current page name where re开发者_如何转开发quest came from? By page I mean the real page name that contains current portlet.


By using something like that you should be ok

ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
String title = themeDisplay.getLayout().getName(themeDisplay.getLocale());


just be aware,themeDisplay.getLocale() could result different char encoding format, use with caution, may cause certain string functions to fail

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜