How to get the all ListBox Value on the Server Side in GWT

好久不见. 提交于 2019-12-13 18:18:35

问题


I am using GWT

3 Listbox are Add in container (verticalPanel) . container is added to formPanel.

These List box has more then one value.

On the server side i Have this code.

ServletFileUpload upload = new ServletFileUpload();

        FileItemIterator iterator = upload.getItemIterator(request);
        while (iterator.hasNext()) {
            FileItemStream item = iterator.next();
             stream = item.openStream();

            if (item.isFormField()) {
                log.warning("Got a form field: " + item.getFieldName() + item.getName() + item.);
                System.out.println(" chk  " +item.getFieldName() +"  =  "+ Streams.asString(item.openStream()));



            }else{

                log.warning("Got an uploaded file: " + item.getFieldName()
                        + ", name = " + item.getName());
                fileName = item.getName();
                mimetype = item.getContentType();



            }
        }

    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

but i can get get only the first value of the List box

Plz tell me how to get all the values of the list box

Note : I cant send Listbox through RPC cause these list box is related to file which is to send to server and server to external repository.

Some one plz Help.


回答1:


if you are adding values to list box at run time manage a list behiend it and add values in the list box to that list and pass that list to the sever.



来源:https://stackoverflow.com/questions/10980022/how-to-get-the-all-listbox-value-on-the-server-side-in-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!