public void buildScript(ResponseWriter writer, FacesContext context, UIComponent component, Map<?, ?> buttons, Map<?, ?> digitals) throws IOException { JSFunction function = new JSFunction("new RichFaces.ui.DataScroller"); function.addParameter(component.getClientId(context)); Map<String, Object> options = new HashMap<String, Object>(); options.put("buttons", buttons); options.put("digitals", digitals); options.put("currentPage", (Integer) component.getAttributes().get("page")); function.addParameter(getSubmitFunction(context, component)); function.addParameter(options); writer.write(function.toString()); }
public void buildScript(ResponseWriter writer, FacesContext context, UIComponent component, Map<?, ?> buttons, Map<?, ?> digitals) throws IOException { JSFunction function = new JSFunction("new RichFaces.ui.DataScroller"); function.addParameter(component.getClientId(context)); Map<String, Object> options = new HashMap<String, Object>(); options.put("buttons", buttons); options.put("digitals", digitals); options.put("currentPage", (Integer) component.getAttributes().get("page")); function.addParameter(getSubmitFunction(context, component)); function.addParameter(options); writer.write(function.toString()); }