简体   繁体   中英

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..
            }
}

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM