^1640740822399
@
sname
CreatePage
slabel
CreatePage
sdescriptors
xworker.web.controls.SimpleControl
sth_createIndex
false
sth_registMyChilds
false
sth_mark
false
  @/@actions
  sname
  actions
  sdescriptors
  xworker.web.controls.SimpleControl/@actions
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_mark
  false
  sid
  actions
    @/@actions/@doAction
    sname
    doAction
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import org.xmeta.Thing;

import xworker.dataObject.DataObject;

import xworker.doc.treehtmldoc.HtmlInfo;

//文档事物
def docThing = world.getThing(requestBean.docPath);

if(docThing.getBoolean("isNeedLogin") && session.getAttribute(requestBean.docPath) == null){
    def str = """{
        "success":false,
        "msg":"未登录，请先登录!"
        }""";
    response.setContentType("text/plain; charset=utf-8");
    response.getOutputStream().write(str.getBytes("utf-8"));
    return;
}

def id = requestBean.id;
def theData = new DataObject("xworker.doc.treehtmldoc.dataobjects.HtmlNode");
theData.put("tid", id);
theData.load(actionContext);

def page = HtmlInfo.getPageThing(docThing, id);
def thingPath = page.getMetadata().getPath();
page.put("label", theData.get("label"));
page.put("label_en", theData.get("label_en"));
page.save();

theData.put("url", "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=" + thingPath);
theData.update(actionContext);

def str = """{
    "success":true,
    "path":"${thingPath}",
    "id":"${id}",
    "url": "do?sc=xworker.ide.worldexplorer.swt.http.ThingDoc/@desc&thing=${thingPath}"
}""";
response.setContentType("text/plain; charset=utf-8");
response.getOutputStream().write(str.getBytes("utf-8"));
#$@text#$@
    sinterpretationType
    Action
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@GroovyAction
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_mark
    false
    sid
    doAction
      @/@actions/@doAction/@contexts
      sname
      contexts
      sdescriptors
      xworker.lang.actions.Inout/@contexts
      sth_createIndex
      false
      sth_registMyChilds
      false
      sth_mark
      false
      sid
      contexts
        @/@actions/@doAction/@contexts/@DataSouceActionContext
        sname
        DataSouceActionContext
        sconnectionName
        con
        stransaction
        false
        sdataSourcePath
        ognl:world.getThing(requestBean.get("docPath")).dataSource
        sdisable
        false
        sonError
        ignore
        spreventError
        false
        sinherit
        true
        sdescriptors
        xworker.lang.context.Contexts/@DataSouceActionContext
        sth_createIndex
        false
        sth_registMyChilds
        false
        sth_mark
        false
        sid
        DataSouceActionContext
