1 11 package org.eclipse.help.internal.webapp.data; 12 import javax.servlet.*; 13 import javax.servlet.http.*; 14 15 import org.eclipse.help.internal.base.*; 16 20 public class ActivitiesData extends RequestData { 21 27 public ActivitiesData(ServletContext context, HttpServletRequest request, 28 HttpServletResponse response) { 29 super(context, request, response); 30 String changeShowAll = request.getParameter("showAll"); if (changeShowAll != null) { 32 if ("off".equalsIgnoreCase(changeShowAll)) { HelpBasePlugin.getActivitySupport().setFilteringEnabled(true); 34 } else if ("on".equalsIgnoreCase(changeShowAll)) { HelpBasePlugin.getActivitySupport().setFilteringEnabled(false); 36 } else { 37 } 39 } else { 40 } 42 String confirmShowAll = request.getParameter("showconfirm"); if ("false".equalsIgnoreCase(confirmShowAll)) { preferences.setDontConfirmShowAll(true); 45 } 46 } 47 50 public boolean isActivityFiltering() { 51 return HelpBasePlugin.getActivitySupport().isFilteringEnabled(); 52 } 53 58 public String getButtonState() { 59 if (!HelpBasePlugin.getActivitySupport().isUserCanToggleFiltering()) 60 return "hidden"; else if (HelpBasePlugin.getActivitySupport().isFilteringEnabled()) 62 return "off"; else 64 return "on"; } 66 } 67 | Popular Tags |