如何在gwt的formPanel上添加隐藏数据 [英] how can i add hidden data on my formPanel in gwt
本文介绍了如何在gwt的formPanel上添加隐藏数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在表单面板上传递一个字符串参数.可以在GWT表单面板上添加字符串参数数据吗?
I want to pass a string parameter on my form Panel. Is it possible to add string parameter data on GWT form panel?
我有servlet代码,将使用post接收传递的字符串参数,我无法在链接中包含参数,因为它包含大量数据
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
这是我的servlet代码:
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.
这篇关于如何在gwt的formPanel上添加隐藏数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文