Index: java/projects/xwiki/src/main/java/com/xpn/xwiki/web/EditAction.java =================================================================== --- java/projects/xwiki/src/main/java/com/xpn/xwiki/web/EditAction.java (revision 1008) +++ java/projects/xwiki/src/main/java/com/xpn/xwiki/web/EditAction.java (working copy) @@ -1,26 +1,26 @@ -/* - * Copyright 2006, XpertNet SARL, and individual contributors as indicated - * by the contributors.txt. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - * - * @author namphunghai - * @author torcq - * @author sdumitriu - */ +/* + * Copyright 2006, XpertNet SARL, and individual contributors as indicated + * by the contributors.txt. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * + * @author namphunghai + * @author torcq + * @author sdumitriu + */ package com.xpn.xwiki.web; import org.apache.velocity.VelocityContext; @@ -38,6 +38,8 @@ public String render(XWikiContext context) throws XWikiException { XWikiRequest request = context.getRequest(); + String isBack = request.getParameter("isBack"); + String content = request.getParameter("content"); XWikiDocument doc = context.getDoc(); XWikiForm form = context.getForm(); VelocityContext vcontext = (VelocityContext) context.get("vcontext"); @@ -94,6 +96,8 @@ } XWikiDocument tdoc2 = (XWikiDocument) tdoc.clone(); + if ( isBack!=null && isBack.equals("true")) + tdoc2.setContent(content); context.put("tdoc", tdoc2); vcontext.put("tdoc", new Document(tdoc2, context)); tdoc2.readFromTemplate(peform, context);