Hi Zachary,
in XWiki, a page does not exist until it has been saved at least once. A
workaround you could try would be to create and save the page once, via
REST, then send your user to that same page in edit mode. The user will
actually be editing version 2.1 of the page.
Would this work for you?
Guillaume
On Thu, Mar 7, 2013 at 8:03 PM, zacharykane <kane.zach(a)gmail.com> wrote:
Hello everyone, I'm trying to automate Page
generation in my client but I'm
stuck on something.
The way it works is a simple form on my client let's my users construct a
Page Title to search for, so:
.../xwiki/bin/view/Main/Whatever-Name-They've-Typed
What I'm trying to do is if you get a 404 (and that page that says this
doesn't exist, edit this to create) I create the page via REST commands and
then direct them to the WYSIWYG editor for that new page -
/xwiki/bin/edit/Main/Whatever-Name-They've-Typed - this works pretty much.
The problem: The page doesn't seem to exist yet until they've clicked save
and view on their editor. If I try to open the page I've just made via REST
(at the aforementioned .../xwiki/bin/view/Main/Whatever-Name-They've-Typed)
it says it still doesn't exist and edit this page to create. What gives?
I'm doing all of this with XMLHTTPRequst and waiting for the 201 status
after the page is supposedly successfully created then redirect them to the
/edit/ page so they can start creating right away.
--
View this message in context:
http://xwiki.475771.n2.nabble.com/RESTful-Create-Page-doesn-t-exist-tp75841…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs