问题
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..
}
}
回答1:
Use Hidden widget. It creates <input type='hidden'>
element.
来源:https://stackoverflow.com/questions/44181149/how-can-i-add-hidden-data-on-my-formpanel-in-gwt