Hey i found this tutorial:
https://www.xwiki.org/xwiki/bin/view/FAQ/How+can+I+create+a+new+page+based+…
so this Situation is very similar to mine except that i want the name
auto generated name of the document which is created then.
Here is an Module for exactly this:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Unique+Identification+…
but i cant figure out how to change the code,
so that the new created page is not based on the value of docName rather
than it is based on $uin.getNextAvailableUIN()
----
#if("$!request.docName" != '')
## Request for creating a new instance
#set($targetDocReference =
$services.model.createDocumentReference('', $!{request.spaceName},
$!{request.docName}))
$response.sendRedirect($xwiki.getURL($targetDocReference, 'inline',
"template=${escapetool.url($request.template)}&parent=${escapetool.url($request.parent)}"))
## Stop processing, since we already sent a redirect.
#stop
#end
= Add a new question =
{{html}}
<form action="" id="newdoc" method="post">
<div>
<input type="hidden" name="parent"
value="${doc.fullName}"/>
<input type="hidden" name="template"
value="FAQ.FAQTemplate"/>
<input type="hidden" name="sheet" value="1"/>
<input type="hidden" name="spaceName"
value="FAQ"/>
Document: <input type="text" name="docName"
value="Enter your
question here" class="withTip" size="50"/>
<span class="buttonwrapper"><input type="submit"
value="Create
this FAQ" class="button"/></span>
</div>
</form>
{{/html}}
----
If someone gives me a little further information i would be very grateful.
Thanks
Felix
Am 17.03.2016 um 13:18 schrieb Eduard Moraru:
Hi,
Ludovic`s suggestion, as far as I understand it, was to create your own
button/link on the application`s homepage that takes the user to a
constructed URL what uses the entry name that you want.
/xwiki/bin/edit/<appName>/Data/<entryName>?template=test.Code.testTemplate&parent=test.WebHome&editor=inline
You can generate such an URL with velocity using:
$xwiki.getDocument("<appName>.Data.<entryName>", "edit",
"template=test.Code.testTemplate&parent=test.WebHome&editor=inline")
You would do this modification in the applcation's homepage, which is
located in "<appName>.Data.WebHome".
Hope this helps,
Eduard
On Tue, Mar 15, 2016 at 8:27 PM, Wiki Service-Team <wiki(a)deltaresearch.es>
wrote:
Hello all,
I have a question about these case:
http://lists.xwiki.org/pipermail/users/2014-July/028689.html
i would love to implement exactly the same our wiki ( we are using some
forms where employees put in simple data like wo they called over the day).
I created an app with app within minutes, everything is working fine, but
i would also like to skip the name dialog in App Within Minutes and replace
it with an auto generated random number, so the user should be directly in
the edit URL.
I think the best advise came from Ludovic, but my scripting knowledge is
not as good to understand the advise from him directly,
so can someone give me a little further explanation of how to script my
own Burton using the document api and than
redirection the user to the edit URL.
I would be very grateful for an advice what helps me to accomplish these
goal.
Thanks
Felix
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users