General Actions:
Log-in
Register
Wiki:
Main wiki
▼
:
Document Index
»
Space:
XAppManager
▼
:
Document Index
»
Page:
CreateApplication
Search
en
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Main wiki
»
Applications manager
»
Create new application
Wiki source code of
Create new application
Last modified by
Administrator
on 2012/03/21 17:41
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
#set($AppManager = $services.applicationmanager) #if(!$AppManager) #error($msg.get("xapp.pluginnotenabled")) #end ## #set($Exception = $AppManager.DefaultException) ## #set($appdocument = $AppManager.createApplicationDocument()) #set($appdocumentobject = $appdocument.updateObjectFromRequest("XAppClasses.XWikiApplicationClass")) ## #set($action = $request.getParameter("action")) ## ############################################################################# ## 1 $msg.get("xapp.createapplication") ## #if($action) #if($action == "create") #set($result = $AppManager.createApplication($appdocument, true)) #if ($result == $Exception.ERROR_NOERROR) <font color=green> $msg.get("xapp.successcreateapp", [$appdocument.appname, $appdocument.getFullName()]) </font> #else <font color=red> #if ($result == $Exception.ERROR_AM_APPDOCALREADYEXISTS) $msg.get("xapp.errorcreateapp.ERROR_AM_APPDOCALREADYEXISTS", [$appdocument.appname]) #else $msg.get("xapp.errorcreateapp", [$appdocument.appname, $result]) #end </font> #end #end #end ## <form method="get" action=""> <div> <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> <input type="hidden" name="action" value="create" /> <dl> <dt><label for="XAppClasses.XWikiApplicationClass_0_appname">$msg.get("xapp.appname")</label></dt> <dd>$appdocument.display("appname", "edit")</dd> <dt><label for="XAppClasses.XWikiApplicationClass_0_description">$msg.get("xapp.description")</label></dt> <dd>$appdocument.display("description", "edit")</dd> <dt><label for="XAppClasses.XWikiApplicationClass_0_appversion">$msg.get("version")</label></dt> <dd>$appdocument.display("appversion", "edit")</dd> </dl> </div> <p> <input class="button" type="submit" value="$msg.get("create")" /> </p> </form>