List of usage examples for javax.servlet.http HttpServletRequest getParameter
public String getParameter(String name);
String
, or null
if the parameter does not exist. From source file:org.openmrs.module.dataintegrityworkflow.web.controller.WorkflowStageFormController.java
protected Map referenceData(HttpServletRequest req) throws Exception { String workflowId = req.getParameter("workflowId"); DataIntegrityWorkflowService integrityWorkflowService = getDataIntegrityWorkflowService(); Map<String, Object> modelMap = new HashMap<String, Object>(); WorkflowStage workflowStage = integrityWorkflowService.getWorkflowStage(Integer.parseInt(workflowId)); modelMap.put("stage", workflowStage); return modelMap; }
From source file:org.openmrs.module.htmlformentry19ext.ProviderWidget.java
/** * @see org.openmrs.module.htmlformentry.widget.Widget#getValue(org.openmrs.module.htmlformentry.FormEntryContext, javax.servlet.http.HttpServletRequest) *//*ww w . j ava 2s . c o m*/ @Override public Object getValue(FormEntryContext context, HttpServletRequest request) { String val = request.getParameter(context.getFieldName(this)); if (StringUtils.hasText(val)) { return Context.getProviderService().getProvider(Integer.valueOf(val)); } return null; }
From source file:team.curise.controller.QueryInputController.java
@ResponseBody @RequestMapping(value = "/index/changeInfo", method = RequestMethod.POST) public List<ChangeInfo> changeInfo(HttpServletRequest req) { String u_name = req.getParameter("user_name"); List<ChangeInfo> result = changeInfoService.findCIByUName(u_name, curise_id); return result; }
From source file:team.curise.controller.QueryInputController.java
@ResponseBody @RequestMapping(value = "/index/customerInfo", method = RequestMethod.POST) public List<CustomerInfo> customerInfo(HttpServletRequest req) { String u_name = req.getParameter("user_name"); List<CustomerInfo> result = customerInfoService.findCustomerInfoByUName(u_name, curise_id); return result; }
From source file:team.curise.controller.QueryInputController.java
@ResponseBody @RequestMapping(value = "/index/saleRate", method = RequestMethod.POST) public SaleRate saleRate(HttpServletRequest req) { String r_type = req.getParameter("room_type"); SaleRate s = saleRateService.findSaleRateByRoomType(curise_id, curise_name, r_type); return s;//from ww w .j av a 2 s. co m }
From source file:WebControllers.ControladorFuncionesComunes.java
public double getParametroDouble(String parametro, HttpServletRequest request) { double param = 0; if (request.getParameter(parametro) != null && !request.getParameter(parametro).isEmpty()) { try {/* ww w. ja v a 2 s.com*/ param = Double.parseDouble(request.getParameter(parametro)); } catch (NumberFormatException e) { } } return param; }
From source file:za.ac.cput.project.hospitalmanagement.api.PatientApi.java
@RequestMapping(value = "/deletePatient", method = RequestMethod.GET) public String deletePatient(HttpServletRequest request) { String patientID = request.getParameter("patientID"); Long id = Long.parseLong(patientID); service.deletePatient(id);//from w w w. j a va 2 s .c o m return "Patient record deleted"; }
From source file:com.milos.neo4j.controller.ScoreboardController.java
@RequestMapping(value = "/scoreboard", method = RequestMethod.GET) public String getFullScoreboard(HttpServletRequest request, Model model) { String type = request.getParameter("type") != null ? request.getParameter("type") : ""; Long score = request.getParameter("score") != null ? Long.valueOf(request.getParameter("score")) : 1000l; Iterable<Scoreboard> scoreboards = new LinkedList<>(); switch (type) { case "montly": scoreboards = scoreboardService.getMontlyScoreboard(score); break;/* w w w .j a v a2s .c o m*/ case "weekly": scoreboards = scoreboardService.getWeeklyScoreboard(score); break; case "daily": scoreboards = scoreboardService.getDailyScoreboard(score); break; case "winnings": List<Scoreboard> winnings = scoreboardService.getWinningsScoreboard(score); scoreboards = new LinkedList<>(winnings); break; default: type = "montly"; scoreboards = scoreboardService.getMontlyScoreboard(score); break; } model.addAttribute("scoreboards", scoreboards); model.addAttribute("type", type); return "scoreboard"; }
From source file:com.jxt.web.util.MappingJackson2JsonpView.java
private String getCallBackParameter(HttpServletRequest request) { return request.getParameter(DEFAULT_CALLBACK_PARAMETER); }