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
Hide line numbers
1: #set($AppManager = $services.applicationmanager) 2: #if(!$AppManager) 3: #error($msg.get("xapp.pluginnotenabled")) 4: #end 5: ## 6: #set($Exception = $AppManager.DefaultException) 7: ## 8: #set($appdocument = $AppManager.createApplicationDocument()) 9: #set($appdocumentobject = $appdocument.updateObjectFromRequest("XAppClasses.XWikiApplicationClass")) 10: ## 11: #set($action = $request.getParameter("action")) 12: ## 13: ############################################################################# 14: ## 15: 1 $msg.get("xapp.createapplication") 16: ## 17: #if($action) 18: #if($action == "create") 19: #set($result = $AppManager.createApplication($appdocument, true)) 20: #if ($result == $Exception.ERROR_NOERROR) 21: <font color=green> 22: $msg.get("xapp.successcreateapp", [$appdocument.appname, $appdocument.getFullName()]) 23: </font> 24: #else 25: <font color=red> 26: #if ($result == $Exception.ERROR_AM_APPDOCALREADYEXISTS) 27: $msg.get("xapp.errorcreateapp.ERROR_AM_APPDOCALREADYEXISTS", [$appdocument.appname]) 28: #else 29: $msg.get("xapp.errorcreateapp", [$appdocument.appname, $result]) 30: #end 31: </font> 32: #end 33: #end 34: #end 35: ## 36: <form method="get" action=""> 37: <div> 38: <input type="hidden" name="form_token" value="$!{services.csrf.getToken()}" /> 39: <input type="hidden" name="action" value="create" /> 40: <dl> 41: <dt><label for="XAppClasses.XWikiApplicationClass_0_appname">$msg.get("xapp.appname")</label></dt> 42: <dd>$appdocument.display("appname", "edit")</dd> 43: <dt><label for="XAppClasses.XWikiApplicationClass_0_description">$msg.get("xapp.description")</label></dt> 44: <dd>$appdocument.display("description", "edit")</dd> 45: <dt><label for="XAppClasses.XWikiApplicationClass_0_appversion">$msg.get("version")</label></dt> 46: <dd>$appdocument.display("appversion", "edit")</dd> 47: </dl> 48: </div> 49: <p> 50: <input class="button" type="submit" value="$msg.get("create")" /> 51: </p> 52: </form>