Hi Regan,
the solution provided by Sergiu does work (I've used it a number of times
already).
You have to add the XWiki.SheetClass object to the page that is called by
the include (which in your case seems to be 'Projects.TestRequestClassSheet'
).
Are you sure you:
1. Added the object to the right page?
2. All your application's pages are in syntax 2?
3. You tried clicking on 'Edit' once on your test page (and not directly
on 'wiki' or 'wysiwyg')?
You can check out how this works in the latest version of the bulletin board
application:
Hope this helps,
Guillaume
On Mon, Nov 9, 2009 at 5:47 AM, Regan Gill <rgill(a)acceptsoftware.com> wrote:
Thank you for the reply. Unfortunately that
doesn't do anything for this
case for some reason. Is there an example some where I can look at that
does work and maybe I can determine what is different.
-----Original Message-----
From: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org] On Behalf
Of Sergiu Dumitriu
Sent: Sunday, November 08, 2009 3:30 PM
To: XWiki Users
Subject: Re: [xwiki-users] problem getting inline edit for pages with
objects
On 11/09/2009 12:22 AM, Regan Gill wrote:
Hi,
I apologize in advance for the lengthy email. I am using XWiki
Enterprise 2.0.24043 now, after upgrading from 1.9.2 recently. I have
some custom classes created a year ago and I have tried to convert all
their pages to 2.0 syntax. There have been quite a few problems I have
been able to solve, but there is one that I am quite confused about.
I need the pages that have these class objects to default to inline
edit
mode since that is the only useful way for the
users to enter the
data.
In the older (pre 2.0) version this happened
automatically -- although
I
don't know why, it was like magic -- and
things were fine. Now when
the
user clicks the edit menu it automatically goes
to WYSIWYG (or wiki
depending on the user). I thought I could get around this by
redirecting
the edit to inline, I think I was able to do this
in older versions of
xwiki. I have tried many versions of code like this:
{{velocity filter="none"}}
## check for admin is so that I can still edit pages in wiki as
normal,
## but non admin users should get the inline
version
#set($hasGlobalAdmin = $xwiki.hasAccessLevel("admin", $context.user,
"XWiki.XWikiPreferences"))
#if($context.action == 'edit'&& !$hasGlobalAdmin)
## for redirection, I tried a few different methods like
## $response.sendRedirect($doc.getURL('inline'))
## and this
$response.sendRedirect($xwiki.getURL($doc.name, 'inline'))
## tried with and without the stop
#stop
#else
{{include document="Projects.TestRequestClassSheet"/}}
You must add an object of type XWiki.SheetClass to the
Projects.TestRequestClassSheet document. No need to do anything else.
#end
{{/velocity}}
but instead is does this crazy thing of sending the entire page to a
WYSIWYG editor (meaning the entire xwiki page with the top menus,
panels, everything) with the page I am trying to edit showing as if it
was inline but not actually editable. The URL in the browser doesn't
change at all.
However if I just choose the inline edit mode to start or type in the
url "/xwiki/bin/inline/Projects/mynewtestrequest" for example that
works
like it should.
I tried upgrading to XWiki Enterprise 2.0.3.24848 and the behavior
persists. I fear I am going to have to get into the java code to find
a
solution, which means a lot more work -- so I am
appealing to the
group
to see if there is something easier that I am not
seeing. It appears
to
me that the $redirect support has changed
somehow.
TIA for your help!
Regan
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
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
--
Guillaume Lerouge
Product Manager - XWiki SAS
Skype: wikibc
Twitter: glerouge