context.put("allMsgNumber", state.getAttribute(STATE_NUM_MESSAGES).toString()); context.put("allMsgNumberInt", state.getAttribute(STATE_NUM_MESSAGES)); context.put("topMsgPos", Integer.toString(topMsgPos)); context.put("topMsgPosInt", new Integer(topMsgPos)); int btmMsgPos = topMsgPos + ((Integer) state.getAttribute(STATE_PAGESIZE)).intValue() - 1; if (state.getAttribute(STATE_NUM_MESSAGES) != null) if (btmMsgPos > allMsgNumber) btmMsgPos = allMsgNumber; context.put("btmMsgPos", Integer.toString(btmMsgPos)); context.put("btmMsgPosInt", new Integer(btmMsgPos)); context.put("goPPButton", Boolean.toString(goPPButton)); boolean goNPButton = state.getAttribute(STATE_NEXT_PAGE_EXISTS) != null; context.put("goNPButton", Boolean.toString(goNPButton)); context.put("goFPButton", Boolean.toString(goFPButton)); boolean goLPButton = state.getAttribute(STATE_LAST_PAGE_EXISTS) != null; context.put("goLPButton", Boolean.toString(goLPButton)); context.put("pagesize", Integer.toString(pageSize)); context.put("pagesizeInt", pageSize); context.put("pagesizes", PAGESIZES);
/** * Respond to a request by dispatching to a portlet like "do" method based on the portlet mode and tool mode */ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException { // set in VmServlet ParameterParser params = (ParameterParser) req.getAttribute(ATTR_PARAMS); // we will need some covers... Note: parameters are parsed (i.e. files are read) here Context context = new Context(this, req); Placement placement = ToolManager.getCurrentPlacement(); PortletConfig config = new PortletConfig(getServletConfig(), placement.getPlacementConfig(), placement.getTool() .getRegisteredConfig(), placement); VelocityPortlet portlet = new VelocityPortlet(getPid(req), config); JetspeedRunData rundata = new JetspeedRunData(req, getState(req), getPid(req), params); req.setAttribute(ATTR_CONTEXT, context); req.setAttribute(ATTR_CONFIG, config); req.setAttribute(ATTR_PORTLET, portlet); req.setAttribute(ATTR_RUNDATA, rundata); super.doGet(req, res); }
/** * Respond to a request by dispatching to a portlet like "do" method based on the portlet mode and tool mode */ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException { // set in VmServlet ParameterParser params = (ParameterParser) req.getAttribute(ATTR_PARAMS); // we will need some covers... Note: parameters are parsed (i.e. files are read) here Context context = new Context(this, req); Placement placement = ToolManager.getCurrentPlacement(); PortletConfig config = new PortletConfig(getServletConfig(), placement.getPlacementConfig(), placement.getTool() .getRegisteredConfig(), placement); VelocityPortlet portlet = new VelocityPortlet(getPid(req), config); JetspeedRunData rundata = new JetspeedRunData(req, getState(req), getPid(req), params); req.setAttribute(ATTR_CONTEXT, context); req.setAttribute(ATTR_CONFIG, config); req.setAttribute(ATTR_PORTLET, portlet); req.setAttribute(ATTR_RUNDATA, rundata); super.doGet(req, res); }
context.put("allMsgNumber", state.getAttribute(STATE_NUM_MESSAGES).toString()); context.put("allMsgNumberInt", state.getAttribute(STATE_NUM_MESSAGES)); context.put("topMsgPos", Integer.toString(topMsgPos)); context.put("topMsgPosInt", new Integer(topMsgPos)); int btmMsgPos = topMsgPos + ((Integer) state.getAttribute(STATE_PAGESIZE)).intValue() - 1; if (state.getAttribute(STATE_NUM_MESSAGES) != null) if (btmMsgPos > allMsgNumber) btmMsgPos = allMsgNumber; context.put("btmMsgPos", Integer.toString(btmMsgPos)); context.put("btmMsgPosInt", new Integer(btmMsgPos)); context.put("goPPButton", Boolean.toString(goPPButton)); boolean goNPButton = state.getAttribute(STATE_NEXT_PAGE_EXISTS) != null; context.put("goNPButton", Boolean.toString(goNPButton)); context.put("goFPButton", Boolean.toString(goFPButton)); boolean goLPButton = state.getAttribute(STATE_LAST_PAGE_EXISTS) != null; context.put("goLPButton", Boolean.toString(goLPButton)); context.put("pagesize", state.getAttribute(STATE_PAGESIZE)); context.put("pagesizes", PAGESIZES);
context.put("param_panel", ActionURL.PARAM_PANEL); context.put("action", getState(req).getAttribute(STATE_ACTION)); context.put("param_pid", ActionURL.PARAM_PID); context.put("pid", getPid(req)); context.put(CONTEXT_SITE_COLLECTION_ID, collectionId); context.put("sakai_editor", editor); context.put("editorConfig", new EditorConfiguration()); languageCode += "-" + countryCode; context.put("language",languageCode); context.put("dir", rl.getOrientation(locale)); || UsageSession.MAC_NN.equals(browserId)) context.put("wysiwyg", "true"); context.put("panel", panel);
context.put("param_panel", ActionURL.PARAM_PANEL); context.put("action", getState(req).getAttribute(STATE_ACTION)); context.put("param_pid", ActionURL.PARAM_PID); context.put("pid", getPid(req)); context.put(CONTEXT_SITE_COLLECTION_ID, collectionId); context.put("sakai_editor", editor); context.put("editorConfig", new EditorConfiguration()); languageCode += "-" + countryCode; context.put("language",languageCode); context.put("dir", rl.getOrientation(locale)); || UsageSession.MAC_NN.equals(browserId)) context.put("wysiwyg", "true"); context.put("panel", panel);