Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
File word文件的在线编辑器和使用GWT预览文件的方法_File_Gwt_Gxt_Preview - Fatal编程技术网

File word文件的在线编辑器和使用GWT预览文件的方法

File word文件的在线编辑器和使用GWT预览文件的方法,file,gwt,gxt,preview,File,Gwt,Gxt,Preview,我的GWT 2.4.0+GXT 2.2.4+Amazon项目中有两个要求 我们只在应用程序中存储word文档(每个登录名只能访问其文档)。现在我希望用户可以像ZOHO writer一样在线编辑自己的word文档。如何在我的应用程序中实现此功能 我们还存储图像、文本文件、word文件、PDF文件和其他文件。我想在用户单击文件时显示这些文件的预览。比如,docs.com。如何做到这一点呢 我需要的只是如何实现这两个要求的指导。如有任何建议,我们将不胜感激 谢谢。GWT提出了XML代码镜像库的包装类

我的GWT 2.4.0+GXT 2.2.4+Amazon项目中有两个要求

  • 我们只在应用程序中存储word文档(每个登录名只能访问其文档)。现在我希望用户可以像ZOHO writer一样在线编辑自己的word文档。如何在我的应用程序中实现此功能

  • 我们还存储图像、文本文件、word文件、PDF文件和其他文件。我想在用户单击文件时显示这些文件的预览。比如,docs.com。如何做到这一点呢

  • 我需要的只是如何实现这两个要求的指导。如有任何建议,我们将不胜感激


    谢谢。

    GWT提出了XML代码镜像库的包装类 编辑器检查这是客户端的

    public XMLEditorPanel(int height, int width, final String xmlToDisplay) {
            this.xmlToDisplay = xmlToDisplay;
            setHeaderVisible(false);
            setHeight(height);
            setWidth(width);
    
            config = new CodeMirrorConfiguration();
            config.setLineNumbers(true);
            config.setTextWrapping(false);
            config.setAutoMatchParens(false);
    
            editor = new CodeMirror(config);
    
            editor.addInitializeHandler(new InitializeHandler() {
                public void onInitialize(InitializeEvent event) {
                    editor.setParser(CodeMirror.PARSER_XML);
                    editor.setIndentUnit(2);
                    editor.setFocus();
                    if (xmlToDisplay != null && xmlToDisplay != "" && xmlToDisplay.length() > 0) {
                        editor.setValue(xmlToDisplay, false);
                    } else {
                        editor.setValue(" ", false);
                    }
                    editor.reindent();
                }
            });
    
            editor.addValueChangeHandler(new ValueChangeHandler<String>() {
    
                @Override
                public void onValueChange(ValueChangeEvent<String> event) {
                    XMLEditorPanel.this.xmlToDisplay = editor.getValue();
                }
            });
    
            add(editor);
        }
    
    publicXmlEditorPanel(整数高度、整数宽度、最终字符串xmlToDisplay){
    this.xmlToDisplay=xmlToDisplay;
    setheadervible(false);
    设置高度(高度);
    设置宽度(宽度);
    config=新的CodeMirrorConfiguration();
    config.setLineNumbers(true);
    config.setTextWrapping(false);
    config.setAutoMatchParens(false);
    编辑器=新代码镜像(配置);
    editor.addInitializeHandler(新的初始化Handler(){
    公共无效初始化(InitializeEvent事件){
    setParser(CodeMirror.PARSER_XML);
    编辑:设置缩进单元(2);
    setFocus();
    如果(xmlToDisplay!=null&&xmlToDisplay!=“”&&xmlToDisplay.length()>0){
    setValue(xmlToDisplay,false);
    }否则{
    editor.setValue(“,false);
    }
    reindent()编辑;
    }
    });
    addValueChangeHandler(新的ValueChangeHandler(){
    @凌驾
    ValueChange上的公共作废(ValueChangeEvent事件){
    XMLEditorPanel.this.xmlToDisplay=editor.getValue();
    }
    });
    添加(编辑);
    }
    
    您想在客户机上实际阅读文档,还是将文件传输到服务器并在那里处理?文件已经在服务器上,我只需要从服务器获取它并在客户机上显示,然后让用户在线编辑它。在此之后,对文件的更改需要存储回服务器。您是否计划开发基于浏览器的字处理器?在服务器上,您可以使用它从Word文档中提取信息,并将编辑内容放回文档中。我认为如果您在服务器上读写文档,这将更容易,但看起来仍然需要大量的工作!祝你好运事实上,安迪,没那么简单。但我很确定@vbjain是有备而来的:-)。这个问题在一定程度上可以帮助你