javagwtformpanel

how can i add hidden data on my formPanel in gwt


I want to pass a string parameter on my form Panel. Is it possible to add string parameter data on GWT form panel?

I have servlet code that will receive passed string parameter using post, I cannot include the parameters in the link because it has large amounts of data

this is my servlet code:

public void doPost(HttpServletRequest request, HttpServletResponse response) {
            String printMode = request.getParameter("printMode");
            String nodeNm = ConfigConstants.PRINTER.getValue();
            String outputLogPath=SrchSvcImpl.cnfg.readValCnfg(nodeNm, ConfigConstants.OUTPUT_ERROR_LOG.getValue());

            if(printMode.equalsIgnoreCase("single_print")) {
                String role = request.getParameter("role");
                String itemsToPrint = request.getParameter("itemsToPrint");
                //do something else..
            }
}

Solution

  • Use Hidden widget. It creates <input type='hidden'> element.