General Actions:
Log-in
Register
Wiki:
games
▼
:
Document Index
»
Space:
NameManager
▼
:
Document Index
»
Page:
NameClassSheet
Search
en
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Name Manager
»
NameClassSheet
Wiki source code of
NameClassSheet
Last modified by AdamHattrell on 2008/05/12 20:42
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: 1 $doc.name 2: 3: 1.1 Names stored on this page 4: 5: #foreach ($nameObj in $doc.getObjects("NameManager.NameClass")) $nameObj.get("name") #end 6: 7: 1.1 Add new names 8: 9: Insert a list of names into the form below to add them to the page. 10: 11: <FORM method="post"> 12: <TEXTAREA NAME="nameList" COLS=40 ROWS=10></TEXTAREA> 13: <INPUT type="submit" name="Go" value="Go" /> 14: </FORM> 15: 16: #if ($request.getParameter("Go")) 17: #set ($nameList = $request.getParameter("nameList")) 18: #foreach ($newName in $nameList.split(" ")) 19: #set ($newObj = $doc.newObject("NameManager.NameClass")) 20: $newObj.set("name", $newName) 21: #end 22: $doc.save() 23: $response.sendRedirect($doc.getURL()) 24: #end