Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread Jeremie BOUSQUET
Ok thanks, but now I'm back to initial point ...
Now my main wiki is named xwiki with db xwiki and prefix test_, so I
have as expected dbs test_xwiki and test_workspacetemplate.
The WikiManager.WebHome list both entries, with domain names xwiki and
workspacetemplate.template.local.

I can successfully access the main wiki through
http://[IP]:[port]/xwikitest/bin/view/Main/,
or through http://[Server]:|port]/xwikitest/wiki/xwiki/view/Main/, but
default urls do not work ... http://[Server]:[port]/xwikitest/bin/view/Main/
redirects to the virtual wiki error page set in xwiki.cfg.
I even deleted and recreated page XWiki.XWikiServerXwiki but with no change
(in fact I used the WikiManager.WebHome to create a new wiki xwiki)
When targeting default urls redirected to error page, I can't see anything
in xwiki logs (either normal logs or exceptions).

2011/11/7 Thomas Mortagne thomas.morta...@xwiki.com

 On Mon, Nov 7, 2011 at 4:35 PM, jerem jeremie.bousq...@gmail.com wrote:
  Hello,
 
  I'm back on this subject ... Following recommendations, I've set
 db.prefix
  to test_ and renamed schema to test_xwiki instead of xwikitest, so
 my
  controller wiki is also my main wiki...
  In the process I made a mistake, instead of renaming workspacetemplate
  schema to test_workspacetemplate, I just ... crushed it.
 
  My problem now is that :
  - in non-virtual mode, WorkspaceManager.Install does not recognize that
 the
  workspace template is not correctly installed, and so does not install
 it. I
  tried to update the page so it would do it anyway, but of course an
  exception is thrown as I'm not in virtual mode
  - in virtual mode, WorkspaceManager.Install (well any page in fact)
 fails to
  display because of :
  Wrapped Exception: Error number 3301 in 3: Exception while switching to
  database [workspacetemplate]
  Wrapped Exception: Unknown database 'test_workspacetemplate'
 
  This is clearly because of workspace template being half created / half
  deleted somehow.
 
  How can I reset things to a clearer state ? (that is completely remove
 any
  trace of the workspace template in the wiki manager plugin)

 That's probably just because you deleted the database without deleting
 the wiki descriptor. You should find in listed on WikiManager.WebHome
 page or go directly to iit and delete the page
 XWiki.XWikiServerWorkspacetemplate.

 
  Thanks,
  Jeremie
 
  --
  View this message in context:
 http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6970795.html
  Sent from the XWiki- Users mailing list archive at Nabble.com.
  ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
 



 --
 Thomas Mortagne
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread Jeremie BOUSQUET
I wonder ... As I just renamed mysql catalog xwikitest to test_xwiki,
maybe there's something somewhere that still points to xwikitest instead
of xwiki ?

2011/11/8 Jeremie BOUSQUET jeremie.bousq...@gmail.com

 Ok thanks, but now I'm back to initial point ...
 Now my main wiki is named xwiki with db xwiki and prefix test_, so I
 have as expected dbs test_xwiki and test_workspacetemplate.
 The WikiManager.WebHome list both entries, with domain names xwiki and
 workspacetemplate.template.local.

 I can successfully access the main wiki through 
 http://[IP]:[port]/xwikitest/bin/view/Main/,
 or through http://[Server]:|port]/xwikitest/wiki/xwiki/view/Main/, but
 default urls do not work ... http://[Server]:[port]/xwikitest/bin/view/Main/
 redirects to the virtual wiki error page set in xwiki.cfg.
 I even deleted and recreated page XWiki.XWikiServerXwiki but with no
 change (in fact I used the WikiManager.WebHome to create a new wiki xwiki)
 When targeting default urls redirected to error page, I can't see anything
 in xwiki logs (either normal logs or exceptions).


 2011/11/7 Thomas Mortagne thomas.morta...@xwiki.com

 On Mon, Nov 7, 2011 at 4:35 PM, jerem jeremie.bousq...@gmail.com wrote:
  Hello,
 
  I'm back on this subject ... Following recommendations, I've set
 db.prefix
  to test_ and renamed schema to test_xwiki instead of xwikitest,
 so my
  controller wiki is also my main wiki...
  In the process I made a mistake, instead of renaming workspacetemplate
  schema to test_workspacetemplate, I just ... crushed it.
 
  My problem now is that :
  - in non-virtual mode, WorkspaceManager.Install does not recognize that
 the
  workspace template is not correctly installed, and so does not install
 it. I
  tried to update the page so it would do it anyway, but of course an
  exception is thrown as I'm not in virtual mode
  - in virtual mode, WorkspaceManager.Install (well any page in fact)
 fails to
  display because of :
  Wrapped Exception: Error number 3301 in 3: Exception while switching to
  database [workspacetemplate]
  Wrapped Exception: Unknown database 'test_workspacetemplate'
 
  This is clearly because of workspace template being half created / half
  deleted somehow.
 
  How can I reset things to a clearer state ? (that is completely remove
 any
  trace of the workspace template in the wiki manager plugin)

 That's probably just because you deleted the database without deleting
 the wiki descriptor. You should find in listed on WikiManager.WebHome
 page or go directly to iit and delete the page
 XWiki.XWikiServerWorkspacetemplate.

 
  Thanks,
  Jeremie
 
  --
  View this message in context:
 http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6970795.html
  Sent from the XWiki- Users mailing list archive at Nabble.com.
  ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
 



 --
 Thomas Mortagne
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] RESTful API to create a new object of custom class?

2011-11-08 Thread Ashtar Communications
Thank you both very much! Your suggestions worked perfectly...

aaron

On Mon, Nov 7, 2011 at 8:25 AM, Fabio Mancinelli
fabio.mancine...@xwiki.com wrote:
 Hi,

 you were almost there :)

 Your request has two things that were wrong:

 1) A text/plain content type instead of application/xml
 2) The URI for POSTing new object is
 /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects (and not
  /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className})

 ...And your XML is missing the className element which will tell the
 REST API what class has to be used.

 So to sum up, imagine that you want to create on the page Test.Test a
 new object of the class XWiki.TestClass, supposing that the class has
 a Text property (like in your example)
 So you have to do the following:

 $ curl -u Admin:admin -X POST -H Content-type: application/xml -H
 Accept: application/xml -d @test.xml
 http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects

 where test.xml is:

 object xmlns=http://www.xwiki.org;
  classNameXWiki.TestClass/className
  property name=Text
    valueWhatever you want to put here/value
 /property
 /object

 Alternatively you can use the less verbose
 application/x-www-form-urlencoded format:

 $ curl -u Admin:admin -X POST -H Content-type:
 application/x-www-form-urlencoded -H Accept: application/xml -d
 @test.txt 
 http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects

 where test.txt contains something like:
 className=XWiki.TestClassproperty#Test=Whatever+you+want.

 Or, better, you can use directly curl to specify these parameters
 using multiple -d switches:

 $ curl -u Admin:admin -X POST -H Content-type:
 application/x-www-form-urlencoded -H Accept: application/xml -d
 className=XWiki.TestClass -d property#Test=Whatever you want
 http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects

 The advantage of the second approach is that curl will take care of
 url-encode your content, while if you send a file you are responsible
 for this.

 Now some remarks:

 1) In the application/x-www-form-urlencoded format the property# is
 a standard immutable prefix that is used to distinguish attributes
 referring to properties from the attributes referring to the object.
 For example if we had className=XYZText=FOO we would have had an
 ambiguity on className because we couldn't understand if className is
 a property of the object to be set to XYZ or an attribute that
 describes the object itself (i.e., its metadata like the className).
 By having the property# prefix this ambiguity is resolved.

 2) The information you get back when you retrieve an object (i.e., all
 the attribute elements) are useful when clients need to understand
 the type of data contained in an object (e.g., when they want to
 display it). They are not necessary when creating an object because
 the system already has this information. That's why the XML to be sent
 is smaller. Actually the only information needed is the className
 and a set of property name=...value elements.

 3) How do you know what kind of information you can send with the XML?
 You can discover it by using the class description URI. If you go to
 http://localhost:8080/xwiki/rest/wikis/xwiki/classes you will get a
 list of all the classes defined in the Wiki. By looking at this you
 will understand what are the properties defined by each class, their
 types and attributes. In that way you will know what you're allowed to
 put in the propertyvalue elements of the XML you send.

 Hope this answers your questions.

 -Fabio

 On Sat, Nov 5, 2011 at 9:46 AM, Ashtar Communications
 ashtarcommunicati...@gmail.com wrote:
 Hi,

 Is it possible to create a new object of a custom class using the RESTful 
 API?

 The documentation page only lists the following POST method, which
 doesn't accept a class name:
 /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[?start=offsetnumber=n]

 I have tried things like the following:
 curl -u Admin:admin -X POST -H Content-type: text/plain -H Accept:
 application/xml -d @test.xml
 http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects/XWiki.TestClass

 Where test.xml contains some variation on:
 ?xml version=1.0 encoding=UTF-8 standalone=yes?
 properties xmlns=http://www.xwiki.org;
 property type=com.xpn.xwiki.objects.classes.TextAreaClass name=Text
 attribute value=Text name=name/
 attribute value=Test name=prettyName/
 attribute value=0 name=unmodifiable/
 attribute value=0 name=disabled/
 attribute value=100 name=size/
 attribute value=10 name=rows/
 attribute value= name=customDisplay/
 attribute value=Text name=editor/
 attribute value=6 name=number/
 attribute value=0 name=picker/
 attribute value= name=validationMessage/
 attribute value= name=validationRegExp/
 value
 This is some text.
 /value
 /properties

 Curl returns this:
 html
 head
   titleStatus page/title
 /head
 body
 h3The method specified in the request is not allowed for the 

Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread Thomas Mortagne
On Tue, Nov 8, 2011 at 10:27 AM, Jeremie BOUSQUET jeremie.bousqu
e...@gmail.com wrote:
 I wonder ... As I just renamed mysql catalog xwikitest to test_xwiki,
 maybe there's something somewhere that still points to xwikitest instead
 of xwiki ?

 2011/11/8 Jeremie BOUSQUET jeremie.bousq...@gmail.com

 Ok thanks, but now I'm back to initial point ...
 Now my main wiki is named xwiki with db xwiki and prefix test_, so I
 have as expected dbs test_xwiki and test_workspacetemplate.
 The WikiManager.WebHome list both entries, with domain names xwiki and
 workspacetemplate.template.local.

 I can successfully access the main wiki through 
 http://[IP]:[port]/xwikitest/bin/view/Main/,
 or through http://[Server]:|port]/xwikitest/wiki/xwiki/view/Main/, but
 default urls do not work ... http://[Server]:[port]/xwikitest/bin/view/Main/

You have to make sure [Server] is registered as alias in main wiki
descriptor otherwise XWiki cannot know that's the wiki you want to
access. See http://platform.xwiki.org/xwiki/bin/view/AdminGuide/AccessWiki.

 redirects to the virtual wiki error page set in xwiki.cfg.
 I even deleted and recreated page XWiki.XWikiServerXwiki but with no
 change (in fact I used the WikiManager.WebHome to create a new wiki xwiki)
 When targeting default urls redirected to error page, I can't see anything
 in xwiki logs (either normal logs or exceptions).


 2011/11/7 Thomas Mortagne thomas.morta...@xwiki.com

 On Mon, Nov 7, 2011 at 4:35 PM, jerem jeremie.bousq...@gmail.com wrote:
  Hello,
 
  I'm back on this subject ... Following recommendations, I've set
 db.prefix
  to test_ and renamed schema to test_xwiki instead of xwikitest,
 so my
  controller wiki is also my main wiki...
  In the process I made a mistake, instead of renaming workspacetemplate
  schema to test_workspacetemplate, I just ... crushed it.
 
  My problem now is that :
  - in non-virtual mode, WorkspaceManager.Install does not recognize that
 the
  workspace template is not correctly installed, and so does not install
 it. I
  tried to update the page so it would do it anyway, but of course an
  exception is thrown as I'm not in virtual mode
  - in virtual mode, WorkspaceManager.Install (well any page in fact)
 fails to
  display because of :
  Wrapped Exception: Error number 3301 in 3: Exception while switching to
  database [workspacetemplate]
  Wrapped Exception: Unknown database 'test_workspacetemplate'
 
  This is clearly because of workspace template being half created / half
  deleted somehow.
 
  How can I reset things to a clearer state ? (that is completely remove
 any
  trace of the workspace template in the wiki manager plugin)

 That's probably just because you deleted the database without deleting
 the wiki descriptor. You should find in listed on WikiManager.WebHome
 page or go directly to iit and delete the page
 XWiki.XWikiServerWorkspacetemplate.

 
  Thanks,
  Jeremie
 
  --
  View this message in context:
 http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6970795.html
  Sent from the XWiki- Users mailing list archive at Nabble.com.
  ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
 



 --
 Thomas Mortagne
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users



 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC Macro question

2011-11-08 Thread Ashtar Communications
Thomas,

Thank for very much for your suggestion. The group syntax was exactly
what I needed.

However, I am still having some trouble with getting the TOC macro to
correctly pick up wiki syntax rendered with $doc.display() that is
contained in an object's property.

I have also noticed that using wiki syntax instead of html,
$doc.display seems to behave differently and overrides the default
editor setting.

Here is my example - I am using wiki syntax similar to the following
(simplified for example's sake):

START CODE
(% class=grid sortable doOddEven id=Table %)
(% class=sortHeader %)|=Field 1|=Field 2
|Data 1|(((
(% class=mktree name=tree %)
* (((
=$doc.display(String, $object)=
)))
** (((
$doc.display(TextArea, $object)
)))
)))

{{toc /}}
END CODE

The TextArea property contains a large quantity of text formatted in
xwiki syntax. The display works just fine - the contents of the
property render correctly and display in the table.

Two problems:

1) The TOC macro only recognizes the String property that I manually
enclose in = Heading 1 syntax. It doesn't seem to be picking up the
wiki syntax contained in the object properties. So if I had 3 objects
on the page, I get:

*String 1
*String 2
*String 3

Instead of:

*String 1
  **Heading 2 from TextArea**
  **Heading 2 from TextArea**
*String 2
Etc

I'm afraid I don't know very much about the order of macro rendering
or whether it is even possible to accomplish what I am describing...

2) When I use the Inline editing mode, another TextArea property of
the object (not shown in the code above) does not show up with the
WYSIWYG editor, even though it is set as the default editor. When
using the {{html}} macro and code like this:

li$doc.display(TextAreaWYSIWYG, $object)/li

The property correctly displays in Inline mode with the WYSIWYG
editor. Now that I am using only wiki syntax to display the table, all
TextArea properties show up in the Plain Text editor, regardless of
their default setting. Am I doing something wrong?

Many thanks for all of the help, I have made very significant progress
on my project thanks to this list...

aaron

On Sun, Oct 23, 2011 at 1:50 AM, Thomas Mortagne
thomas.morta...@xwiki.com wrote:
 On Sun, Oct 23, 2011 at 12:27 AM, Ashtar Communications
 ashtarcommunicati...@gmail.com wrote:
 Thank you for the feedback - I have been playing with passing custom
 parameters, and have a few additional clarification questions.

 It seems that I need to use pure wiki syntax if I want the TOC macro
 to work right. I am currently relying on the {{html}} macro for two
 things which I can't figure out how to replace with custom parameters:

 1) Nested ul's - I can only get the custom parameter to apply to one
 line, and can't figure out how to nest another ul.

 Something like this:
 (% class=mktree name=tree %)
 * $doc.display(Title, $obj)
  velocity code, including an {{html}} block to create an input element
 **Additional parts of tree
 ***Additional parts of tree

 Just returns two different ul's, only the first one of which has the
 custom parameter. Is this because the additional lines of code before
 continuing the tree forces the rendering engine to close the first
 ul? Any way to override that?

 Here is an example of wiki syntax with custom parameters on each ul:

 (% param=value %)
 * toto
 (% param2=value2 %)
 ** titi

 but custom parameters on li is not supported yet.


 2) Table Sorter - Unfortunately, the whole set of object display code
 is wrapped in an {{html}} macro because I am using the old Table
 Sorter extension code. This is because I want to display multiple
 properties from each object in a single table cell. Looking at the
 Live Table macro, it seems that it only supports binding a table to a
 class and then setting a column to display a single property - where I
 need a single cell to include multiple properties displayed using
 custom code.

 Accomplishing this using the html syntax is simple - I can include an
 arbitrary amount of code in each td tag.

 To use wiki syntax for a sortable table, the XWiki Syntax document
 says I should use this:

 (% class=grid sortable filterable doOddEven id=tableid %)
 (% class=sortHeader %)|=Title 1|=Title 2
 |Cell 11|Cell 12
 |Cell 21|Cell 22

 This creates the table fine - but I can't figure out how to include
 additional multi-line code in a single cell. As soon as I put in a new
 line, etc...it closes the table. Is there any way to accomplish this
 using wiki syntax? Should I be trying to use LiveTable instead
 somehow?

 You can put as many lines you want without closing the table but it's
 closed by an empty line. If you need to have several paragraphs you
 can use group  syntax
 (http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HGroups) as
 in

 (% class=grid sortable filterable doOddEven id=tableid %)
 (% class=sortHeader %)|=Title 1|=Title 2
 |Cell 11|(((
 Cell 12

 with

 several

 paragraphs
 )))|Cell 

Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread jerem
You're right, I had forgotten this ... So now it works !
I could create a workspace, but ran through some more little issues :
- seems my user is duplicated between the main wiki and the workspace (for
example I'm listed twice in the workspace homepage Top active members
list)
- I exported a space from the main wiki, and imported it in my new
workspace. I tried to set a custom skin (custom skin page + custom color
theme) to this workspace but only the logo is shown, this custom skin used
to work correctly when it was a space in main wiki (I did not forget to copy
the skin page and colorTheme page in the new workspace...)
- I get many errors like this in the logs :
ERROR o.i.ObservationContextListener - Can't find any begin event
corresponding to [class org.xwiki.bridge.event.ActionExecutedEvent (ssx)],
with ssx replaced depending on cases by view, download, ...
- I created the workspace with another user as admin (but my user is admin
of the whole wiki). If I click on join workspace I get an error in the
page, saying that I must invited, and this is normal. But it seems I'm added
anyway as then I appear in the workspace members list. If I then click on
Leave workspace I get an error You are not allowed to view this document
or perform this action.. Maybe an ambiguity with the duplicated users
profiles ... ?

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6973858.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread Eduard Moraru
Hi Jerem,

The main wiki is still accessible with
/xwikitest/bin/view/XWiki/XWikiPreferences (because it's the main wiki and
it's handled a bit specially). It is also accessible with
/xwikitest/wiki/xwikitest/view/XWiki/XWikiPreferences (being treated as
just another wiki).

However, any link to a page in a subwiki (a wiki other than the main wiki)
will *always* have the format
/xwikitest/wiki/subwikiName/view/Space/Page.

Thanks,
Eduard

On Fri, Oct 21, 2011 at 11:19 AM, jerem jeremie.bousq...@gmail.com wrote:

 I have a last issue : default urls do not work.
 Problem is, that all urls now target xwikitest/wiki/xwikitest, except the
 one from first drop-down menu (MAIN), for example Administrate Main
 wiki
 is /xwikitest/bin/view/XWiki/XWikiPreferences and not
 /xwikitest/wiki/xwikitest/view/XWiki/XWikiPreferences

 I wonder if there is not a piece of configuration still missing, something
 to say ok, xwikitest IS the main wiki, but I don't know where to set that
 ...

 --
 View this message in context:
 http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6916181.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Auto Saving

2011-11-08 Thread Ziggy
anyone?

On Fri, Nov 4, 2011 at 1:08 PM, Ziggy zigg...@gmail.com wrote:

 Hi,

 Pre version 3.2 of Enterprise Manager, there was an option (a checkbox) to
 auto save the document while in Edit mode. This seems to have disappeared
 in version 3.2. Was this removed or does it now auto-save without having to
 specify that option?

 Thanks

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread jerem
Thanks but this was solved thanks to Thomas, because I had forgotten to set
the correct aliases, so default urls did not work ... But now it does ! :)

However my new issue is that it seems main users and workspace users are not
really considered and treated the same way depending on the use-cases ...
For example in my new workspace (let's call it newws), in table
activitystream_events I can find both values in ase_user field :
xwiki:XWiki.jbousque and XWiki.jbousque. 
The top active members then list a distinct entry for both (one with link
to profile in main wiki, the other with link to profile in newws
workspace), though the user directory only lists one user (the one in
newws).
By the way a new profile was created for me in newws, auto-magically (but
not from the start, I think it was created when I clicked on join
workspace), and this new profile has no link with my main profile (the
settings are the defaults).

I just wondered if it was expected behaviour (don't think so), or an issue
in the workspace app, or again a configuration problem on my side ?

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6973898.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] TOC Macro question

2011-11-08 Thread Ashtar Communications
Thomas,

Putting the line:
$context.getEditorWysiwyg()
in my sheet just results in that text being displayed on the page. Do
I need to do something else to have that picked up by velocity? I'm
sure I'm missing some obvious syntax ...it's late...:)

The WYSIWYGText property has the default editor set to WYSIWYG, the
PlainText property has it set to the plain text editor (obviously).
Using the HTML macro, the WYSIWYG editor appears for that property -
using wiki syntax, both show up as the Plain Text editor.

The code I am using is below:

{{velocity}}
##Includes for 
mktree$xwiki.jsfx.use('js/mktree/mktree.js')$xwiki.ssfx.use('js/mktree/mktree.css',
true)
##Includes for table
sort$xwiki.jsfx.use(js/xwiki/table/tablefilterNsort.js)$xwiki.ssfx.use(js/xwiki/table/table.css)
##Include for Entry Class CSS$xwiki.ssfx.use('css/entryclass.css', true)

#set($objs = $doc.getObjects('Admin.EntryClass'))
#set($action = $xcontext.getAction())

(% class=grid sortable doOddEven id=Entry Table %)
(% class=sortHeader %)|=#|=Entry|=Entry Date
#foreach($entry in $objs)
|$doc.display(SortOrder, $entry)|(((
(% class=mktree name=tree %)
* (((
(% class=title %)
=$doc.display(Title, $entry)=
)))
** (((
  #if($action != view)
WYSIWYG:
  #end

  $doc.display(WYSIWYGText, $entry)
)))
** (((
  #if($action != view)
Plain Text:
  #end

  $doc.display(PlainText, $entry)
)))
)))|$doc.display(EntryDate, $entry)
#end

{{toc /}}

{{/velocity}}

thanks,

aaron

On Tue, Nov 8, 2011 at 2:37 AM, Marius Dumitru Florea
mariusdumitru.flo...@xwiki.com wrote:
 Hi Aaron,

 On Tue, Nov 8, 2011 at 12:08 PM, Ashtar Communications
 ashtarcommunicati...@gmail.com wrote:
 Thomas,

 Thank for very much for your suggestion. The group syntax was exactly
 what I needed.

 However, I am still having some trouble with getting the TOC macro to
 correctly pick up wiki syntax rendered with $doc.display() that is
 contained in an object's property.

 I have also noticed that using wiki syntax instead of html,
 $doc.display seems to behave differently and overrides the default
 editor setting.

 Here is my example - I am using wiki syntax similar to the following
 (simplified for example's sake):

 START CODE
 (% class=grid sortable doOddEven id=Table %)
 (% class=sortHeader %)|=Field 1|=Field 2
 |Data 1|(((
 (% class=mktree name=tree %)
 * (((
 =$doc.display(String, $object)=
 )))
 ** (((
 $doc.display(TextArea, $object)
 )))
 )))

 {{toc /}}
 END CODE

 The TextArea property contains a large quantity of text formatted in
 xwiki syntax. The display works just fine - the contents of the
 property render correctly and display in the table.

 Two problems:

 1) The TOC macro only recognizes the String property that I manually
 enclose in = Heading 1 syntax. It doesn't seem to be picking up the
 wiki syntax contained in the object properties. So if I had 3 objects
 on the page, I get:

 *String 1
 *String 2
 *String 3

 Instead of:

 *String 1
  **Heading 2 from TextArea**
  **Heading 2 from TextArea**
 *String 2
 Etc

 I'm afraid I don't know very much about the order of macro rendering
 or whether it is even possible to accomplish what I am describing...

 2) When I use the Inline editing mode, another TextArea property of
 the object (not shown in the code above) does not show up with the
 WYSIWYG editor, even though it is set as the default editor. When
 using the {{html}} macro and code like this:

 li$doc.display(TextAreaWYSIWYG, $object)/li

 The property correctly displays in Inline mode with the WYSIWYG
 editor. Now that I am using only wiki syntax to display the table, all
 TextArea properties show up in the Plain Text editor, regardless of
 their default setting. Am I doing something wrong?

 Can you paste the code that doesn't work? (i.e. without using the HTML
 macro). Also, can you print this:

 $context.getEditorWysiwyg()

 at the end of your sheet. It will display a comma-separated list of
 field IDs that require WYSIWYG editing. Are your fields listed there
 when editing in Inline mode?

 Hope this helps,
 Marius


 Many thanks for all of the help, I have made very significant progress
 on my project thanks to this list...

 aaron

 On Sun, Oct 23, 2011 at 1:50 AM, Thomas Mortagne
 thomas.morta...@xwiki.com wrote:
 On Sun, Oct 23, 2011 at 12:27 AM, Ashtar Communications
 ashtarcommunicati...@gmail.com wrote:
 Thank you for the feedback - I have been playing with passing custom
 parameters, and have a few additional clarification questions.

 It seems that I need to use pure wiki syntax if I want the TOC macro
 to work right. I am currently relying on the {{html}} macro for two
 things which I can't figure out how to replace with custom parameters:

 1) Nested ul's - I can only get the custom parameter to apply to one
 line, and can't figure out how to nest another ul.

 Something like this:
 (% class=mktree name=tree %)
 * $doc.display(Title, $obj)
  velocity code, including an {{html}} 

Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread Eduard Moraru
Hi,

On Tue, Nov 8, 2011 at 12:46 PM, jerem jeremie.bousq...@gmail.com wrote:

 You're right, I had forgotten this ... So now it works !
 I could create a workspace, but ran through some more little issues :
 - seems my user is duplicated between the main wiki and the workspace (for
 example I'm listed twice in the workspace homepage Top active members
 list)


I once experienced this behavior and I think it's related to the actual
workspace creation process. This would only happen for the user that
created the workspace. Some of its actions were not registered as a global
user and were registered as a local workspace user instead. If you click on
the duplicate user listed in the Top active members, it should point to
an unexisting local workspace user (page not found) as this would result
from the local-global confusion. However, I did not experience this problem
since 3.2 on and I think it was fixed by one of Thomas's fixes on how the
user is handled in the context. If you can tell me a clear way to reproduce
this, I will investigate it further.


 - I exported a space from the main wiki, and imported it in my new
 workspace. I tried to set a custom skin (custom skin page + custom color
 theme) to this workspace but only the logo is shown, this custom skin used
 to work correctly when it was a space in main wiki (I did not forget to
 copy
 the skin page and colorTheme page in the new workspace...)


A workspace is a regular subwiki in all aspects, except that it
does(should) not allow local user registration and can be created by
non-admin users. If you are having issues with creating a skin/color theme,
it should not be related to workspaces, so it should work as it would on a
regular subwiki. Make sure you don`t have any rights issues on the pages of
the skin/color themese, etc.


 - I get many errors like this in the logs :
 ERROR o.i.ObservationContextListener - Can't find any begin event
 corresponding to [class org.xwiki.bridge.event.ActionExecutedEvent (ssx)],
 with ssx replaced depending on cases by view, download, ...


No clue about this one. Not sure if it's relevant. Maybe Thomas know about
this since it looks like it's related to the new event mechanics introduced
recently that allows event grouping/nesting and such.


 - I created the workspace with another user as admin (but my user is admin
 of the whole wiki). If I click on join workspace I get an error in the
 page, saying that I must invited, and this is normal.


You should not see any Join Workspace if the workspace is in invite only.
Where do you see this button? In the Workspace Directory or in the
Workspace Information Panel of the new workspace?


 But it seems I'm added
 anyway as then I appear in the workspace members list. If I then click on
 Leave workspace I get an error You are not allowed to view this document
 or perform this action.. Maybe an ambiguity with the duplicated users
 profiles ... ?


Make sure you are logged in with the global user and not with a
(not-supposed-to-be-there) local user.

Thanks,
Eduard


 --
 View this message in context:
 http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6973858.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Troubles with XWiki3.2 / Workspace Application

2011-11-08 Thread Eduard Moraru
Hi,

On Tue, Nov 8, 2011 at 1:04 PM, jerem jeremie.bousq...@gmail.com wrote:

 Thanks but this was solved thanks to Thomas, because I had forgotten to set
 the correct aliases, so default urls did not work ... But now it does ! :)

 However my new issue is that it seems main users and workspace users are
 not
 really considered and treated the same way depending on the use-cases ...


Theoretically, there should be no workspace users, only main wiki (global)
users.


 For example in my new workspace (let's call it newws), in table
 activitystream_events I can find both values in ase_user field :
 xwiki:XWiki.jbousque and XWiki.jbousque.
 The top active members then list a distinct entry for both (one with link
 to profile in main wiki, the other with link to profile in newws
 workspace),


Does the link to the profile in newws actually work? Is it an existing
page with an XWikiUser object in it?


 though the user directory only lists one user (the one in
 newws).

By the way a new profile was created for me in newws, auto-magically (but
 not from the start, I think it was created when I clicked on join
 workspace), and this new profile has no link with my main profile (the
 settings are the defaults).

 I just wondered if it was expected behaviour (don't think so), or an issue
 in the workspace app, or again a configuration problem on my side ?


It could be a mix of both. What you could do, if you have the time, is to
try and single out a repeatable scenario that you could also test on a
fresh install (since you mentioned you`re in a migration). You can use XEM
instead of XE since that might help you skip the extra steps required to
configure the WikiManager plugin so you can focus on the Workspace
application. If it's reproduced in a fresh install, then we have more to
work with. If not and it's related only to your specific setup then it will
probably be harder.

Thanks,
Eduard



 --
 View this message in context:
 http://xwiki.475771.n2.nabble.com/Troubles-with-XWiki3-2-Workspace-Application-tp6908844p6973898.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] AUTO: MaryEllen Coleman/Poughkeepsie/IBM is out of the office. (returning 11/09/2011)

2011-11-08 Thread MaryEllen Coleman

I am out of the office until 11/09/2011.

Out on Election Day November 8; back in the office November 9.


Note: This is an automated response to your message  users Digest, Vol 52,
Issue 21 sent on 11/8/2011 4:25:53.

This is the only notification you will receive while this person is away.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] customized page-create interface

2011-11-08 Thread Chris Quenelle

I'm a complete newbie here.  I ran through the Sample Application web page (FAQ 
Application)
and so-far so-good.  I want to improve the user experience for adding a new FAQ 
entry.

For now my users select Add - Page
then click on FAQTemplate
then they should know that they cannot change the 'Space Name' field
then they choose a page name
then they click create

Instead, I'd like to create a customized page which has only:

page name field
create FAQ entry button

Where should I look in the docs to see how to do this?

--chris

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] customized page-create interface

2011-11-08 Thread Guillaume Lerouge
Hi Chris,

welcome to XWiki! The FAQ tutorial actually holds an answer to your
question:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial#HCustomcreationform

Happy coding,

Guillaume

On Tue, Nov 8, 2011 at 6:58 PM, Chris Quenelle ch...@quenelle.org wrote:


 I'm a complete newbie here.  I ran through the Sample Application web page
 (FAQ Application)
 and so-far so-good.  I want to improve the user experience for adding a
 new FAQ entry.

 For now my users select Add - Page
 then click on FAQTemplate
 then they should know that they cannot change the 'Space Name' field
 then they choose a page name
 then they click create

 Instead, I'd like to create a customized page which has only:

 page name field
 create FAQ entry button

 Where should I look in the docs to see how to do this?

 --chris

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] customized page-create interface

2011-11-08 Thread Chris Quenelle

Thanks, Guillaume!  I should have gone back to the tutorial to look.


On Tuesday November 8, at10:03AM, Guillaume Lerouge wrote:

 Hi Chris,
 
 welcome to XWiki! The FAQ tutorial actually holds an answer to your
 question:
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial#HCustomcreationform
 
 Happy coding,
 
 Guillaume
 
 On Tue, Nov 8, 2011 at 6:58 PM, Chris Quenelle ch...@quenelle.org wrote:
 
 
 I'm a complete newbie here.  I ran through the Sample Application web page
 (FAQ Application)
 and so-far so-good.  I want to improve the user experience for adding a
 new FAQ entry.
 
 For now my users select Add - Page
 then click on FAQTemplate
 then they should know that they cannot change the 'Space Name' field
 then they choose a page name
 then they click create
 
 Instead, I'd like to create a customized page which has only:
 
 page name field
 create FAQ entry button
 
 Where should I look in the docs to see how to do this?
 
 --chris
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users