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
@亞當,你應該把它作爲答案;這是正確的答案。 –