Looping through staticlist contents; and others
Hi All, I was wondering if there was a simple way to get all the options for a static list - eg, via a query? In a few of my custom classes, I have several staticlist properties - I need to cycle through the available options of each within velocity. Brandon Esbach Software Engineer M/A-Com Eurotec Operations LoughMahon Technology Park, Skehard Road, Blackrock, Cork, Ireland Tel +353 21 4808305
Hi, I too wanted to get all available options for a list property, preferably as a simple ArrayList for easy use in a script. The method I found works with both static lists and db lists, but required programming rights - which is going to be a problem for me. Is there another way to do this that doesn't require programming rights? 1.1.1 All available items for a list property #### $doc contains an instance of class "Main.MyClass" #### whose list prop is called "theList". #set($obj=$doc.getObject("Main.MyClass")) #set($propName="theList") #### These operations that require programming rights #set($xCtx=$context.getContext()) #set($xObj=$obj.getXWikiObject()) #set($xClass=$xObj.getxWikiClass($xCtx)) #set($xProp=$xClass.get($propName)) #set($allItems=$xProp.getList($xCtx)) #foreach ($item in $allItems) * $item #end On 08/02/07, Esbach, Brandon <[email protected]> wrote:
Hi All,
I was wondering if there was a simple way to get all the options for a static list - eg, via a query? In a few of my custom classes, I have several staticlist properties - I need to cycle through the available options of each within velocity.
Brandon Esbach Software Engineer M/A-Com Eurotec Operations LoughMahon Technology Park, Skehard Road, Blackrock, Cork, Ireland Tel +353 21 4808305
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Hi, I have migrated xwiki from 0.9.840 to the latest 1.0 b3 (from subvesion). My content can now display successfully in the new version. I also imported the .xar so I have all the additional spaces/pages created. I can log in via my old userids(including Admin) and the newly created userids. But I have the following issues that I cannot solve: 1. I cannot see XWiki as a space in my spacelist. I can see all other spaces and the space I created after the migration. I tried Admin and superadmin so this shouldn't be a security issue. 2. My previous pages are categorized in 0.9.840 in 15 categories. I could navigate to the pages from the category list. Now all my pages are displayed in the Main space without categorization. Is there a way to get back the categorization for each pages? I noticed there are a couple of predefined categories in the Blog space. 3. Now in 1b3, we can tag a space or page, but how can we leverage this tagging? Is there any snippet that display pages clustered by tags (e.g. something similar to del.icio.us or something else? 4. We can define skins in xwiki.cfg and also in the Global/Space Preferences section. Will the skins defined in the Global/Space Preferences section always take precedence over the one defined in xwiki.cfg? If I create a new skin folder called "xwikitest" with the basic .vm files, should I reference it in the Global/Space Preferences as xwikitest or XWiki.xwikitest? Thanks -Jimmy
Hi Jimmy, On Feb 12, 2007, at 12:57 AM, [email protected] wrote:
Hi,
I have migrated xwiki from 0.9.840 to the latest 1.0 b3 (from subvesion). My content can now display successfully in the new version. I also imported the .xar so I have all the additional spaces/pages created. I can log in via my old userids(including Admin) and the newly created userids. But I have the following issues that I cannot solve:
1. I cannot see XWiki as a space in my spacelist. I can see all other spaces and the space I created after the migration. I tried Admin and superadmin so this shouldn't be a security issue.
This is probably a feature :-) We've removed non public spaces from several panels. However I agree that for users with admin rights they should probably be listed. Edit your panels and you should see the request that excludes the XWiki space. Then maybe you could file a JIRA issue and attach a patch to it to improve the panels?
2. My previous pages are categorized in 0.9.840 in 15 categories. I could navigate to the pages from the category list. Now all my pages are displayed in the Main space without categorization. Is there a way to get back the categorization for each pages? I noticed there are a couple of predefined categories in the Blog space.
I don't have an answer for this. Maybe others know?
3. Now in 1b3, we can tag a space or page, but how can we leverage this tagging? Is there any snippet that display pages clustered by tags (e.g. something similar to del.icio.us or something else?
There's a tags page: http://localhost:8080/xwiki/bin/view/Main/Tags It should be very easy to write a Panel for it. I agree we need some panels for this. Please file a JIRA issue.
4. We can define skins in xwiki.cfg and also in the Global/Space Preferences section. Will the skins defined in the Global/Space Preferences section always take precedence over the one defined in xwiki.cfg? If I create a new skin folder called "xwikitest" with the basic .vm files, should I reference it in the Global/Space Preferences as xwikitest or XWiki.xwikitest?
If you put stuff in the directory structure of xwiki then it would be xwikitest. However you can also create skins by creating a XWiki page, attach to it a XWikiSkins objects, etc. Then you would refer to it with XWiki.xwikitest. See the skin tutorial in the admin guide on xwiki.org Thanks -Vincent ___________________________________________________________________________ Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire. http://fr.mail.yahoo.com
2007/2/12, Vincent Massol <[email protected]>:
Hi Jimmy,
On Feb 12, 2007, at 12:57 AM, [email protected] wrote:
2. My previous pages are categorized in 0.9.840 in 15 categories. I could navigate to the pages from the category list. Now all my pages are displayed in the Main space without categorization. Is there a way to get back the categorization for each pages? I noticed there are a couple of predefined categories in the Blog space.
I don't have an answer for this. Maybe others know?
I assume you are talking about blog posts, to see the categories again you'll have to create a panel (/xwik/bin/view/Panels/) containing this code : --------------------------------- #panelheader('Blog') #set($blogcatdoc = $xwiki.getDocument("Blog.Categories")) #if($xwiki.hasAdminRights()) <font size="-2">(<a href="$blogcatdoc.getURL("inline")">Editer les Categories</a>)</font> #end #set($catdoc = $xwiki.getDocument("Blog.Categories")) #foreach($catobj in $catdoc.getObjects("Blog.Categories")) #set($catname = $catdoc.display("name","view",$catobj)) #if($catname!="") * [${catname}>Blog.Category?category=${catname}] #end #end #panelfooter() ---------------------------------
Hi JV, This sounds like something useful. I think we should include this panel in the default Wiki. WDYT? If you agree could you create a jira issue for this? Thanks a lot -Vincent On Feb 12, 2007, at 4:05 PM, Jean-Vincent Drean wrote:
2007/2/12, Vincent Massol <[email protected]>:
Hi Jimmy,
On Feb 12, 2007, at 12:57 AM, [email protected] wrote:
2. My previous pages are categorized in 0.9.840 in 15 categories. I could navigate to the pages from the category list. Now all my pages are displayed in the Main space without categorization. Is there a way to get back the categorization for each pages? I noticed there are a couple of predefined categories in the Blog space.
I don't have an answer for this. Maybe others know?
I assume you are talking about blog posts, to see the categories again you'll have to create a panel (/xwik/bin/view/Panels/) containing this code :
--------------------------------- #panelheader('Blog') #set($blogcatdoc = $xwiki.getDocument("Blog.Categories")) #if($xwiki.hasAdminRights()) <font size="-2">(<a href="$blogcatdoc.getURL("inline")">Editer les Categories</a>)</font> #end #set($catdoc = $xwiki.getDocument("Blog.Categories")) #foreach($catobj in $catdoc.getObjects("Blog.Categories")) #set($catname = $catdoc.display("name","view",$catobj)) #if($catname!="") * [${catname}>Blog.Category?category=${catname}] #end #end #panelfooter() ---------------------------------
___________________________________________________________________________ Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire. http://fr.mail.yahoo.com
oh I forgot... Please don't hijack thread. What you have done is: take an existing mail, do a reply and change the subject. This leaves several email fields unchanged and thus your mail is badly threaded in proper email viewers as it belongs to an existing thread... :-( Thanks -Vincent On Feb 12, 2007, at 12:57 AM, [email protected] wrote:
Hi,
I have migrated xwiki from 0.9.840 to the latest 1.0 b3 (from subvesion). My content can now display successfully in the new version. I also imported the .xar so I have all the additional spaces/pages created. I can log in via my old userids(including Admin) and the newly created userids. But I have the following issues that I cannot solve:
1. I cannot see XWiki as a space in my spacelist. I can see all other spaces and the space I created after the migration. I tried Admin and superadmin so this shouldn't be a security issue.
2. My previous pages are categorized in 0.9.840 in 15 categories. I could navigate to the pages from the category list. Now all my pages are displayed in the Main space without categorization. Is there a way to get back the categorization for each pages? I noticed there are a couple of predefined categories in the Blog space.
3. Now in 1b3, we can tag a space or page, but how can we leverage this tagging? Is there any snippet that display pages clustered by tags (e.g. something similar to del.icio.us or something else?
4. We can define skins in xwiki.cfg and also in the Global/Space Preferences section. Will the skins defined in the Global/Space Preferences section always take precedence over the one defined in xwiki.cfg? If I create a new skin folder called "xwikitest" with the basic .vm files, should I reference it in the Global/Space Preferences as xwikitest or XWiki.xwikitest?
Thanks
-Jimmy
-- You receive this message as a subscriber of the xwiki- [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/ wws
___________________________________________________________________________ Yahoo! Mail r�invente le mail ! D�couvrez le nouveau Yahoo! Mail et son interface r�volutionnaire. http://fr.mail.yahoo.com
participants (5)
-
Esbach, Brandon -
Jean-Vincent Drean -
jimmy@comkraft.com -
Robin Fernandes -
Vincent Massol