Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    unable to get hidden item value on the server side program

    unable to get hidden item value on the server side program


    DynamicForm form = new DynamicForm();
    HiddenItem item = new HiddenItem("FileName");
    item.setValue(csvOutput);
    form.setFields(item);
    form.setCanSubmit(true);
    form.setMethod(FormMethod.POST);
    form.setAction(GWT.getHostPageBaseURL() + "DownloadServlet");
    form.submitForm();


    Server Code

    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    System.out.pritnln(request.getParameter("FileName"));

    }


    The value of the FileName whcih is a HiddenItem is never getting passed.Please let us know how to pass a value. We are not intrested in using a query String.

    GWT Version: 2.0
    SmartGWT: SmartGWTPower 2.1
    OS: Windows XP/7
    Eclipse 3.5
    Browser IE 8, Firfox 3.5

    #2
    Don't create a form if all you want to do is submit a POST to a URL. Use the RPCManager instead.

    Comment


      #3
      Hi

      I read through the documentation and wrote something similar to the original poster.

      Isomorphic, why doesn't posting data via a dynamicForm.submitForm work? There is nothing in the documentation that suggests posting using this method is a bad idea. Can you elaborate please?

      Thanks
      KC

      Comment

      Working...
      X