0
我想在我的表单面板上传递一个字符串参数。是否可以在GWT表单面板上添加字符串参数数据?我如何添加隐藏的数据在我的formPanel gwt
我将接收使用后,我不能包括在链接中的参数,因为它有大量的数据
的,这是我的servlet代码中传递的字符串参数的servlet代码:
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..
}
}
我设法解决使用表单输入框,把字符串放在他们和禁用它们。然后,doPost方法会迭代这些项目,并在从中获取正确的值之前检查它们的“id”。 – WLGfx
使用[隐藏](http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/Hidden.html)小部件。它创建''元素。 – Adam
@亚当,你应该把它作为答案;这是正确的答案。 –