当前位置: 代码迷 >> Web前端 >> smartgwt下传跳转的有关问题-iframe 嵌在当前页面 form 标签里面有指定跳到那个frame里面
  详细解决方案

smartgwt下传跳转的有关问题-iframe 嵌在当前页面 form 标签里面有指定跳到那个frame里面

热度:69   发布时间:2012-10-24 14:15:58.0
smartgwt上传跳转的问题----iframe 嵌在当前页面 form 标签里面有指定跳到那个frame里面
formDoc.setEncoding(Encoding.MULTIPART);
formDoc.setTarget("fff");
form 里面记得写

formDoc.setTarget("fff");
这个是跳转iframe 的

HTMLPane htmlPane = new HTMLPane();
htmlPane.setContentsType(ContentsType.PAGE);
htmlPane
.setContents("<iframe name='fff' style='position:absolute;width:0;height:0;border:0'></iframe>");
htmlPane.setWidth("1");
htmlPane.setHeight("1");



final DynamicForm uploadForm = new DynamicForm();
        uploadForm.setAction("uploadServlet");
        uploadForm.setEncoding(Encoding.MULTIPART);
        uploadForm.setMethod(FormMethod.POST);
        uploadForm.setTarget("foo");
       
        final UploadItem imageItem = new UploadItem("image","图片");
       
        ButtonItem saveItem = new ButtonItem("save","上传");
        saveItem.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {

@Override
public void onClick(
com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
uploadForm.submitForm();
}
});
  相关解决方案