Package org.g4studio.common.web

Examples of org.g4studio.common.web.BaseActionForm


   * @param
   * @return
   */
  public ActionForward saveDirtyDatas(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    List list  = aForm.getGridDirtyData(request);
    Dto inDto = new BaseDto();
    inDto.setDefaultAList(list);
    Dto outDto = service.saveDirtyDatas(inDto);
    if (outDto.getSuccess()) {
      setOkTipMsg("数据保存成功", response);
View Full Code Here


   * @param
   * @return
   */
  public ActionForward deleteItem(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto inDto = aForm.getParamAsDto(request);
    service.deleteItem(inDto);
    setOkTipMsg("数据删除成功", response);
    return mapping.findForward(null);
  }
View Full Code Here

   * @return
   * @throws Exception
   */
  public ActionForward queryAreaDatas(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto dto = aForm.getParamAsDto(request);
    List areaList = g4Reader.queryForList("Demo.getChinaDataArea", dto);
    String jsonString = JsonHelper.encodeObject2Json(areaList);
    write(jsonString, response);
    return mapping.findForward(null);
  }
View Full Code Here

   * @return
   * @throws Exception
   */
  public ActionForward queryAreaDatas4Paging(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    Dto dto = aForm.getParamAsDto(request);
    //System.out.println(dto);
    List areaList = g4Reader.queryForPage("Demo.getChinaDataArea4Paging", dto);
    Integer totalInteger = (Integer) g4Reader.queryForObject("Demo.getChinaDataArea4PagingForPageCount", dto);
    String jsonString = encodeList2PageJson(areaList, totalInteger, null);
    write(jsonString, response);
View Full Code Here

   * @return
   * @throws Exception
   */
  public ActionForward formSynForwardInit(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto inDto = aForm.getParamAsDto(request);
    request.setAttribute("value", inDto.toJson());
    return mapping.findForward("formSynForwardPageView");
  }
View Full Code Here

   * @return
   * @throws Exception
   */
  public ActionForward saveTheSubmitInfo(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto dto = aForm.getParamAsDto(request);
    System.out.println("接收到的表单提交参数:\n" + dto);
    setOkTipMsg("数据提交成功:" + dto.toString(), response);
    return mapping.findForward(null);
  }
View Full Code Here

   * @return
   * @throws Exception
   */
  public ActionForward saveTheSubmitInfoBasedAjaxRequest(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm)form;
    Dto dto = aForm.getParamAsDto(request);
    System.out.println("接收到的表单提交参数:\n" + dto);
    setOkTipMsg("数据提交成功:" + dto.toString(), response);
    return mapping.findForward(null);
  }
View Full Code Here

   * @return
   */
  public ActionForward doUpload(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    Dto outDto = new BaseDto();
    BaseActionForm cForm = (BaseActionForm) form;
    // 单个文件,如果是多个就cForm.getFile2()....支持最多5个文件
    FormFile myFile = cForm.getFile1();
    // 获取web应用根路径,也可以直接指定服务器任意盘符路径
    String savePath = getServlet().getServletContext().getRealPath("/") + "/upload/demo/";
    //String savePath = "d:/upload/";
    // 检查路径是否存在,如果不存在则创建之
    File file = new File(savePath);
View Full Code Here

   * @param
   * @return
   */
  public ActionForward queryParts(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm cForm = (BaseActionForm)form;
    Dto dto = cForm.getParamAsDto(request);
    List list = g4Reader.queryForPage("Part.queryParts", dto);
    Integer countInteger = (Integer) g4Reader.queryForObject("Part.queryPartsForPageCount", dto);
    for (int i = 0; i < list.size(); i++) {
      Dto partDto = (BaseDto)list.get(i);
      dto.put("partid", partDto.getAsString("partid"));
View Full Code Here

   * @param
   * @return
   */
  public ActionForward savePartUserGrantDatas(ActionMapping mapping, ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    BaseActionForm aForm = (BaseActionForm) form;
    List list  = aForm.getGridDirtyData(request);
    Dto inDto = new BaseDto();
    inDto.setDefaultAList(list);
    if (!isDemoMode(response)) {
      partService.savePartRoleGrantDatas(inDto);
      setOkTipMsg("授权数据保存成功", response);
View Full Code Here

TOP

Related Classes of org.g4studio.common.web.BaseActionForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.