List of usage examples for com.liferay.portal.kernel.servlet SessionMessages clear
public static void clear(PortletRequest portletRequest)
From source file:com.rivetlogic.speech.portlet.SpeechPortlet.java
License:Open Source License
@Override public void doView(RenderRequest request, RenderResponse response) throws IOException, PortletException { String key;/*from w ww . j a v a 2 s. co m*/ List<CommandBean> commandBeans = new ArrayList<CommandBean>(); PortletPreferences preference = request.getPreferences(); Map<String, String[]> preferenceMap = preference.getMap(); for (Map.Entry<String, String[]> entry : preferenceMap.entrySet()) { key = entry.getKey().trim(); if (!key.isEmpty() && !key.equalsIgnoreCase(SpeechConstants.KEY_PHRASE)) { commandBeans.add(new CommandBeanImpl(entry.getKey(), entry.getValue()[0])); } } request.setAttribute(SpeechConstants.VOICE_COMMAND_COUNT, commandBeans.size()); request.setAttribute(SpeechConstants.VOICE_COMMAND_LIST, commandBeans); SessionMessages.clear(request); super.doView(request, response); }