Author: tchemit Date: 2012-05-18 16:50:18 +0200 (Fri, 18 May 2012) New Revision: 3376 Url: http://chorem.org/repositories/revision/pollen/3376 Log: uncomment used code (but not at the good place) Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java Modified: trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java =================================================================== --- trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-05-18 14:15:42 UTC (rev 3375) +++ trunk/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-05-18 14:50:18 UTC (rev 3376) @@ -45,7 +45,6 @@ import javax.servlet.http.HttpServletRequest; import java.net.URL; import java.util.Collection; -import java.util.Collections; import java.util.Date; import java.util.List; @@ -202,30 +201,30 @@ return new Date(); } -// public String getVoteCountingTypeHelp(VoteCountingType voteCountingType) { -// String result; -// switch (voteCountingType) { -// -// default: -// case NORMAL: -// result = -// _("pollen.common.voteCountingTypeHelp.normal"); -// break; -// case PERCENTAGE: -// result = -// _("pollen.common.voteCountingTypeHelp.percentage"); -// break; -// case CONDORCET: -// result = -// _("pollen.common.voteCountingTypeHelp.condorcet"); -// break; -// case NUMBER: -// result = -// _("pollen.common.voteCountingTypeHelp.number"); -// } -// return result; -// } - + public String getVoteCountingTypeHelp(VoteCountingType voteCountingType) { + String result; + switch (voteCountingType) { + + default: + case NORMAL: + result = + _("pollen.common.voteCountingTypeHelp.normal"); + break; + case PERCENTAGE: + result = + _("pollen.common.voteCountingTypeHelp.percentage"); + break; + case CONDORCET: + result = + _("pollen.common.voteCountingTypeHelp.condorcet"); + break; + case NUMBER: + result = + _("pollen.common.voteCountingTypeHelp.number"); + } + return result; + } + public String getCurrentUrl() { HttpServletRequest request = ServletActionContext.getRequest(); String result = request.getRequestURL().toString(); @@ -274,6 +273,7 @@ // } return result; } + public boolean hasFlashMessages() { List<String> result = getPollenSession().getDynamicData(PollenSession.SESSION_TOKEN_MESSAGES); return CollectionUtils.isNotEmpty(result);