Re: [xwiki-users] Access object from other page

2016-09-27 Thread Marius Dumitru Florea
On Tue, Sep 27, 2016 at 11:48 PM, Tarekskayv  wrote:

> Hello all,
>
> I just started with xwiki and i've some trouble to access to object from
> another page.
> I don't know if what i'm doing is the best way to do it or not.
>
> First i'll explain what i would like to do, and after explain which way
> i've
> choose to do it.
>
> So, i would like to create a "reference" page.
> I mean in this page create a table with all the datas i need for ex :
>
> *PAGE CONFIG :*
>
> |IP|HOSTNAME|ROLE
> 192.168.0.1|ROUTER|WAN
> 192.168.0.2|FIREWALL|FIREWALL
> 192.168.0.3|SERVER1|AD/DC
> 192.168.0.4|SERVER2|DNS1
> 192.168.0.5|SERVER3|DNS2
> 
>
> Then i create differents FAQ pages where i would like to insert info as
> "connect on DNS1 (ip : 192.168.0.4)"
>
> But if one day, the ip adress or hostname change (for some reason..) i just
> have to change the data in the page CONFIG and automatically will be
> changed
> on all other pages. Like that no need to edit all pages ...
>
>
>
>
> So, what i've done...
> Probably not the best way to do it.
>
> I've create a page with class and object + template.
> It create for each server a new page with all info i need.
> so i've for example :
>
> *PAGE IP : *
> IP : 192.168.0.1
> HOSTNAME : ROUTER
> ROLE : WAN
>
> *PAGE FIREWALL : *
> IP : 192.168.0.2
> HOSTNAME : FIREWALL
> ROLE : FIREWALL
>
> ... for all other page
>
>
> Now, what i'm looking for is on an other page :
>
> *PAGE FAQ 1 *
>
> access to the object of the page FIREWALL and display the content of the
> object.
>
> I can display the object of the own page but not from another page.
>
>
> Could you help me in this task plz
>
>
> my code : i don't know how refer the object of the specific page
>
>

> #set($object = $doc.getObject('test.XWikiTestClass'))
>

$doc is the current document ("PAGE FAQ 1" in your case) and not "FIREWALL"
and so getObject won't find the object you're looking for. You need to
retrieve the document that has the object. See
http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsfromanypageandloopoverallobjectsofsameClass
.

Hope this helps,
Marius


> $object.display('IP', 'view')
> $object.display('HOSTNAME', 'view')
> $object.display('ROLE', 'view')
>
>
> Regards
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.
> com/Access-object-from-other-page-tp7601415.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] Access object from other page

2016-09-27 Thread Tarekskayv
Hello all,

I just started with xwiki and i've some trouble to access to object from
another page.
I don't know if what i'm doing is the best way to do it or not.

First i'll explain what i would like to do, and after explain which way i've
choose to do it.

So, i would like to create a "reference" page. 
I mean in this page create a table with all the datas i need for ex :

*PAGE CONFIG :*

|IP|HOSTNAME|ROLE
192.168.0.1|ROUTER|WAN
192.168.0.2|FIREWALL|FIREWALL
192.168.0.3|SERVER1|AD/DC
192.168.0.4|SERVER2|DNS1
192.168.0.5|SERVER3|DNS2


Then i create differents FAQ pages where i would like to insert info as
"connect on DNS1 (ip : 192.168.0.4)"

But if one day, the ip adress or hostname change (for some reason..) i just
have to change the data in the page CONFIG and automatically will be changed
on all other pages. Like that no need to edit all pages ...




So, what i've done... 
Probably not the best way to do it.

I've create a page with class and object + template.
It create for each server a new page with all info i need. 
so i've for example :

*PAGE IP : *
IP : 192.168.0.1
HOSTNAME : ROUTER
ROLE : WAN

*PAGE FIREWALL : *
IP : 192.168.0.2
HOSTNAME : FIREWALL
ROLE : FIREWALL

... for all other page


Now, what i'm looking for is on an other page :

*PAGE FAQ 1 *

access to the object of the page FIREWALL and display the content of the
object.

I can display the object of the own page but not from another page.


Could you help me in this task plz 


my code : i don't know how refer the object of the specific page

#set($object = $doc.getObject('test.XWikiTestClass'))
$object.display('IP', 'view')
$object.display('HOSTNAME', 'view')
$object.display('ROLE', 'view')


Regards 









--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Access-object-from-other-page-tp7601415.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


[xwiki-users] Skins - Fix Nav Menus when scrooling page content

2016-09-27 Thread Ramon Gomes Brandao
Hi XWiki Team,

I'm trying to design a new skin based on flaming to attend our company's use 
cases (with XE 8.x) and we were required to fix the top menu divs (for 
instance, the menuview div and the headerglobal div), as well as, if possible, 
side panels, while scrooling the page content. The side panels div shoud also 
be scroolabe, when the elements overflow the viewport.

I could not achieve any success overriding some flamingo's CSS and trying to 
fix elements with position CSS statement. How is the best way to achieve that 
using a new skin approach? I won't also forget to be responsible for small 
screens, so fixing side panels and top menu is not a good idea. How is the best 
way to deal with this?

Best Regards,


RAMON BRANDÃO

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


Re: [xwiki-users] Nested Pages - Search Links Not Working

2016-09-27 Thread Keith Davis
>
> What you could do is to grab from
> http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-
> platform-search-solr-ui/
> the XAR file corresponding to the XWiki version you`re currently running
> (btw, what is the version?) and import it so that you can determine if that
> is the cause of your problem.


I downloaded the 8.2.1. XAR file (xwiki-platform-search-solr-ui-8.2.1.xar)
and imported it. Yep, that fixed the problem. :) We do almost zero
customization (and none on Search). I'm not sure how that would have gotten
broken.

Another note on the search results, you need to get to the point where the
> location of your search result is displayed identically to the breadcrumbs
> (since the same code is reused). In your screenshot, I can see that the
> location of the search result does not seem to be displayed similarly to
> the breadcrumbs, so it`s clearly running some old code to display that.


I'm not sure what that means. I know what the breadcrumbs are, but I don't
know how they are supposed to correlate or how you can tell they are wrong
by the search result.

Of course, if it`s an option, re-running the migration would be one very
> good solution too (to make sure you don`t miss anything the second time).
> BTW, what version are you migrating from? (it`s generally useful to mention
> this information when asking for help)


How do I do run the migration again? I've wanted to do that in the past,
but I don't know how. XWiki version is 8.2.1 and I migrated from 8.1.

Thanks for all of your help!

On Thu, Sep 22, 2016 at 4:04 AM, Eduard Moraru  wrote:

> Hi,
>
> On Wed, Sep 21, 2016 at 11:23 PM, Keith Davis 
> wrote:
>
> > No, that does not work either. (Tickets has a question mark by it). I'm
> the
> > links work fine like this:
> >
> > [[Tickets>>Main.Intranet.Tickets]]
> >
>
> Yes, please ignore that. It was a bad idea on my part.
>
> So if your page is properly created, then it`s only a display issue on the
> Search page.
>
>
> > The problem seems to only be in Search.
> >
>
> Then indeed, my money is on the fact that you have a badly/incompletely
> migrated Solr Search page.
>
> What you could do is to grab from
> http://maven.xwiki.org/releases/org/xwiki/platform/
> xwiki-platform-search-solr-ui/
> the XAR file corresponding to the XWiki version you`re currently running
> (btw, what is the version?) and import it so that you can determine if that
> is the cause of your problem.
>
> Then you can go to either Main/Search or Main/SolrSearch (Main/Search
> should be including Main/SolrSearch, that is, if you are using Solr search
> and not something else) and search for your page. If it is now displayed
> properly in the results, then you should look at each imported page (or
> even rollback a previous backup) to figure out what happened, if there are
> custom changes or if the pages were simply not updated during DW. If so,
> you might want to look at the other apps to see if other places are
> affected as well.
>
> Another note on the search results, you need to get to the point where the
> location of your search result is displayed identically to the breadcrumbs
> (since the same code is reused). In your screenshot, I can see that the
> location of the search result does not seem to be displayed similarly to
> the breadcrumbs, so it`s clearly running some old code to display that.
>
> Of course, if it`s an option, re-running the migration would be one very
> good solution too (to make sure you don`t miss anything the second time).
> BTW, what version are you migrating from? (it`s generally useful to mention
> this information when asking for help)
>
> Hope this helps,
> Eduard
>
>
> >
> > On Wed, Sep 21, 2016 at 3:18 PM, Eduard Moraru 
> > wrote:
> >
> > > On Mon, Sep 19, 2016 at 6:18 PM, Keith Davis <
> laurinkeithda...@gmail.com
> > >
> > > wrote:
> > >
> > > > >
> > > > > This means you have a space named "Main.Intranet.Tickets". That's
> the
> > > > > actual space name. It contains dots. It's not the space "Tickets"
> > > inside
> > > > > "Intranet" inside "Main". The actual link to the home page of this
> > > space
> > > > > looks like this:
> > > > >
> > > > > [[Tickets>>Main\.Intranet\.Tickets.WebHome]]
> > > > >
> > > > > Notice how the dots inside the space name must be escaped. I don't
> > know
> > > > how
> > > > > you created this page but it's not a nested page/space as you
> > thought.
> > > > It's
> > > > > actually a top level page/space.
> > > > >
> > > >
> > > > We get really confused on the topic of spaces. I thought we had
> created
> > > > these correctly. We've read through the documentation many times,
> but I
> > > > guess we just don't understand the concept well enough.
> > > >
> > > > I just tried the link as you suggested and that does space / page not
> > > exist
> > > > (the link shows the question mark next to it). The only place we see
> > > > "Main.Intranet.Tickets" show up is in the Search results and that
> link
> > > does
> > > > not work.
> > > >
> > >
>

Re: [xwiki-users] WYSIWYG editor not loading after upgrade to 8.2.1

2016-09-27 Thread simmsj
Clearing the browser cache worked. The fix isn't ideal, but I upgraded a
clone and there's no urgency to upgrade the production instance so I can
wait for the issue to be resolved.

Thanks for the help.

 - Jared



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/WYSIWYG-editor-not-loading-after-upgrade-to-8-2-1-tp7601398p7601410.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


[xwiki-users] XWQL datatype question

2016-09-27 Thread Gerritjan Koekkoek
Hi,


I have this class:

#set( $participationClassName = 
"WaihonaCode.waihonapediaResearchParticipationClass" )


Class properties

researchparticipation.family (family: List of Users)

researchparticipation.research (research: Database List)

researchparticipation.participate (participate: Boolean)

researchparticipation.datasend (datasend: Boolean)



I have this XWQL:


#set( $qParticipations = "from doc.object('$participationClassName') as 
participation where doc.fullName <> 'waihonapediaResearchParticipationTemplate' 
and participation.research = :thisresearch" and participation.family = 
:thisUser)


I'm getting velocity error:

Caused by: org.hibernate.QueryException: could not resolve property: research 
of: com.xpn.xwiki.objects.BaseObject [ select doc.fullName from 
com.xpn.xwiki.doc.XWikiDocument as doc , com.xpn.xwiki.objects.BaseObject as 
participation where


When doing similar on a class where class properties are of type string I have 
no Issues?

What should I do with these properties: List of Users (always only 1) and 
Database List (always only 1)?


Gerritjan Koekkoek
Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
Visit our website
Facebook
email



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


Re: [xwiki-users] Change page into terminal page

2016-09-27 Thread Gerritjan Koekkoek
Hi Vincent



Hi Gerritjan,

>> On 27 Sep 2016, at 10:01, Gerritjan Koekkoek  wrote:
>>
>> We have just migrated from 6.4 to 8.2.x
>>
>>
>> A page holding a UIEXtension object has a parameter:
>>
>> icon=image:cdlsservices.cdlsn...@nw-news-icon.png
>>
>>
>> In a panel we display the pages holding these UIExtension objects
>>
>> To display the image we use:
>>
>> #set($icon = 
>> $services.rendering.render($services.rendering.parse("image:${params.icon}", 
>> 'xwiki/2.1'), 'xhtml/1.0'))
>>
>> It used to generate a string:
>> xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png
>>
>> But after migration it generates:
Actually we did NOT do a migration, just a upgrade of the wiki and a execution 
of the upgrade wizard!

>> xwiki/bin/download/cdlsServices/cdlsNews/WebHome/nw-news-icon.png
>> (notice the WebHome part...)
>
>This shouldn't have changed after upgrading to 8.2.x. Unless you've modified 
>the page >cdlsServices.cdlsNews and transformed it into a non-terminal page 
>(in this case you transformed its >reference from cdlsServices.cdlsNews to 
>cdlsServices.cdlsNews.WebHome).

No we did not migrate the pages to a different structure, just did not touch 
them at all, although, trying to fix the problem I have edited ad saved the 
page many times, but nothing special

>> The browser reports that it can not find the image!. When going to the 
>> attached image and showing it:
>> xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png
>> And this url display's the image.
>>
>> I guess there are multiple paths to a solution here?
>> - Can I change the page holding the UIExtension to a terminal page? How?
>
>Yes but again the upgrade to 8.2.1 isn't changing any page so you must have 
>done something. Have you >executed the Nested Page Migrator on this page for 
>example?
>
>Yes you can change it back to terminal indeed, see > 
>http://platform.xwiki.org/xwiki/bin/view/Features/DocumentLifecycle#HMove2FRename

When I did a rename the target page was already marked as Terminal-page?
But that did not fix my issue.
Then I did a rename unchecking the 'terminal page' box and this made the 
picture appear
(so still using:

#set($icon = 
$services.rendering.render($services.rendering.parse("image:${params.icon}", 
'xwiki/2.1'), 'xhtml/1.0'))


>
>> - different use of rendering services?
>>
>You could also keep the page as Nested (ie non terminal) and use:
>icon=image:cdlsservices.cdlsnews.webh...@nw-news-icon.png

Thanks, this is also a bit cleaner, although I assume I should do it without 
the 'WebHome'

>Thanks
>-Vincent

> - ???
>
>
>
>
> Gerritjan Koekkoek
> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
> Visit our website
> Facebook
Gerritjan Koekkoek | Facebook
www.facebook.com
Gerritjan Koekkoek is on Facebook. Join Facebook to connect with Gerritjan 
Koekkoek and others you may know. Facebook gives people the power to share 
and...



> email
>

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
users -- XWiki Users - lists.xwiki.org Mailing 
Lists
lists.xwiki.org
List for XWiki users. To see the collection of prior postings to the list, 
visit the users Archives. Using users: To post a message to all the list ...



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


Re: [xwiki-users] Change page into terminal page

2016-09-27 Thread Vincent Massol
Hi Gerritjan,

> On 27 Sep 2016, at 10:01, Gerritjan Koekkoek  wrote:
> 
> We have just migrated from 6.4 to 8.2.x
> 
> 
> A page holding a UIEXtension object has a parameter:
> 
> icon=image:cdlsservices.cdlsn...@nw-news-icon.png
> 
> 
> In a panel we display the pages holding these UIExtension objects
> 
> To display the image we use:
> 
> #set($icon = 
> $services.rendering.render($services.rendering.parse("image:${params.icon}", 
> 'xwiki/2.1'), 'xhtml/1.0'))
> 
> It used to generate a string:
> xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png
> 
> But after migration it generates:
> xwiki/bin/download/cdlsServices/cdlsNews/WebHome/nw-news-icon.png
> (notice the WebHome part…)

This shouldn’t have changed after upgrading to 8.2.x. Unless you’ve modified 
the page cdlsServices.cdlsNews and transformed it into a non-terminal page (in 
this case you transformed its reference from cdlsServices.cdlsNews to 
cdlsServices.cdlsNews.WebHome).

> The browser reports that it can not find the image!. When going to the 
> attached image and showing it:
> xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png
> And this url display's the image.
> 
> I guess there are multiple paths to a solution here?
> - Can I change the page holding the UIExtension to a terminal page? How?

Yes but again the upgrade to 8.2.1 isn’t changing any page so you must have 
done something. Have you executed the Nested Page Migrator on this page for 
example?

Yes you can change it back to terminal indeed, see 
http://platform.xwiki.org/xwiki/bin/view/Features/DocumentLifecycle#HMove2FRename

> - different use of rendering services?

You could also keep the page as Nested (ie non terminal) and use:
icon=image:cdlsservices.cdlsnews.webh...@nw-news-icon.png

Thanks
-Vincent

> - ???
> 
> 
> 
> 
> Gerritjan Koekkoek
> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
> Visit our website
> Facebook
> email
> 

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


[xwiki-users] Change page into terminal page

2016-09-27 Thread Gerritjan Koekkoek
We have just migrated from 6.4 to 8.2.x


A page holding a UIEXtension object has a parameter:

icon=image:cdlsservices.cdlsn...@nw-news-icon.png


In a panel we display the pages holding these UIExtension objects

To display the image we use:

#set($icon = 
$services.rendering.render($services.rendering.parse("image:${params.icon}", 
'xwiki/2.1'), 'xhtml/1.0'))

It used to generate a string:
xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png

But after migration it generates:
xwiki/bin/download/cdlsServices/cdlsNews/WebHome/nw-news-icon.png
(notice the WebHome part...)

The browser reports that it can not find the image!. When going to the attached 
image and showing it:
xwiki/bin/download/cdlsServices/cdlsNews/nw-news-icon.png
And this url display's the image.

I guess there are multiple paths to a solution here?
- Can I change the page holding the UIExtension to a terminal page? How?
- different use of rendering services?
- ???




Gerritjan Koekkoek
Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
Visit our website
Facebook
email



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