Re: [xwiki-users] Hide Harder-Bar on Login-Screen

2016-04-20 Thread Matthias Wegner
Haha, that's it. Thank you. Regards, Matthias

Am 18.04.2016 um 10:31 schrieb Marius Dumitru Florea [via XWiki]:
> On Sat, Apr 16, 2016 at 9:46 PM, Matthias Wegner <[hidden email] 
> >
> wrote:
>
> > Hi Users,
> >
> > i want to hide the header bar on the login screen and marked for that
> >
> > ###template("startpage.vm")
> >
> > out in login.vm. Then i restart the server. But nothing changed. I 
> cleared
> > the browser cache but this is not the problem.
> >
> > Is this not the right place?
> >
>
> Are you editing skins/flamingo/login.vm ?
>
>
> >
> > Regards,
> > Matthias
> >
> >
> >
> > --
> > View this message in context:
> > 
> http://xwiki.475771.n2.nabble.com/Hide-Harder-Bar-on-Login-Screen-tp7599022.html
> > Sent from the XWiki- Users mailing list archive at Nabble.com.
> > ___
> > users mailing list
> > [hidden email] 
> > http://lists.xwiki.org/mailman/listinfo/users
> >
> ___
> users mailing list
> [hidden email] 
> http://lists.xwiki.org/mailman/listinfo/users
>
>
> 
> If you reply to this email, your message will be added to the 
> discussion below:
> http://xwiki.475771.n2.nabble.com/Hide-Harder-Bar-on-Login-Screen-tp7599022p7599031.html
>  
>
> To unsubscribe from Hide Harder-Bar on Login-Screen, click here 
> <http://xwiki.475771.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=7599022=bWljLm1hdC53ZWduZXJAd2ViLmRlfDc1OTkwMjJ8LTIyMDkyOTgwMA==>.
> NAML 
> <http://xwiki.475771.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>  
>





--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Hide-Harder-Bar-on-Login-Screen-tp7599022p7599112.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] Parameter in different contexts

2016-04-16 Thread Matthias Wegner

Perfect, thanks. Regards, M.

Am 15.04.2016 um 19:10 schrieb Vincent Massol:

On 15 Apr 2016, at 18:58, Matthias Wegner <mic.mat.weg...@web.de> wrote:

Hi Vincent,

sorry i was not specific.

Here an example:

I want to make a page like:
MAIN.Overall
{{velocity}}
#set($SUPERCOUNTER=0)
#set($hql = "where ... order by doc.title asc")
#set($docs = $xwiki.searchDocuments($hql, 0, 0))
#foreach ($dd in $docs)
   #set( $d = $xwiki.getDocument($dd))
   $d.getName()
   {{include document="$dd" context="new"/}}
#end
{{/velocity}}

And another page like:
SOMESPACE.Doc1
{{velocity}}
#set($SUPERCOUNTER=$SUPERCOUNTER + 1)
* Counter: $SUPERCOUNTER
{{/velocity}}

And another page like:
SOMESPACE.Doc2
{{velocity}}
#set($SUPERCOUNTER=$SUPERCOUNTER + 1)
* Counter: $SUPERCOUNTER
#set($SUPERCOUNTER=$SUPERCOUNTER + 1)
* Counter: $SUPERCOUNTER
{{/velocity}}

For that i want expect a result of MAIN.Overall like

Doc1
* Counter: 1
Doc2
* Counter: 2
* Counter: 3

But because of the needed "new" context the SUPERCOUNTER is always not defined. 
So i need something which can store a value independed from a document and can be written 
and is readable. You understod now?

Ok I understand (I think).

There are various solutions, see 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/SavingData

Thanks
-Vincent


Regards,
Matthias

Am 14.04.2016 um 19:18 schrieb Vincent Massol:

Hi Matthias,


On 14 Apr 2016, at 19:05, Matthias Wegner <mic.mat.weg...@web.de> wrote:

Hi All,

i want to count over different document a $counter in velocity. Do you have
an easy way that i can store and read that value so i can use it on all
documents (with different context)?

Sorry, I don’t understand what you want.

WDYM by “count over different document”?

If you wish to run a count query, see
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module

Thanks
-Vincent



Is there a macro for such a job? I not found anything.

Regards,
Matthias

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Parameter-in-different-contexts-tp7598994.html

_

___
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] Hide Harder-Bar on Login-Screen

2016-04-16 Thread Matthias Wegner
Hi Users,

i want to hide the header bar on the login screen and marked for that

###template("startpage.vm")

out in login.vm. Then i restart the server. But nothing changed. I cleared
the browser cache but this is not the problem.

Is this not the right place?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Hide-Harder-Bar-on-Login-Screen-tp7599022.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] Parameter in different contexts

2016-04-15 Thread Matthias Wegner

Hi Vincent,

sorry i was not specific.

Here an example:

I want to make a page like:
MAIN.Overall
{{velocity}}
#set($SUPERCOUNTER=0)
#set($hql = "where ... order by doc.title asc")
#set($docs = $xwiki.searchDocuments($hql, 0, 0))
#foreach ($dd in $docs)
   #set( $d = $xwiki.getDocument($dd))
   $d.getName()
   {{include document="$dd" context="new"/}}
#end
{{/velocity}}

And another page like:
SOMESPACE.Doc1
{{velocity}}
#set($SUPERCOUNTER=$SUPERCOUNTER + 1)
* Counter: $SUPERCOUNTER
{{/velocity}}

And another page like:
SOMESPACE.Doc2
{{velocity}}
#set($SUPERCOUNTER=$SUPERCOUNTER + 1)
* Counter: $SUPERCOUNTER
#set($SUPERCOUNTER=$SUPERCOUNTER + 1)
* Counter: $SUPERCOUNTER
{{/velocity}}

For that i want expect a result of MAIN.Overall like

Doc1
* Counter: 1
Doc2
* Counter: 2
* Counter: 3

But because of the needed "new" context the SUPERCOUNTER is always not 
defined. So i need something which can store a value independed from a 
document and can be written and is readable. You understod now?


Regards,
Matthias

Am 14.04.2016 um 19:18 schrieb Vincent Massol:

Hi Matthias,


On 14 Apr 2016, at 19:05, Matthias Wegner <mic.mat.weg...@web.de> wrote:

Hi All,

i want to count over different document a $counter in velocity. Do you have
an easy way that i can store and read that value so i can use it on all
documents (with different context)?

Sorry, I don’t understand what you want.

WDYM by “count over different document”?

If you wish to run a count query, see
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module

Thanks
-Vincent



Is there a macro for such a job? I not found anything.

Regards,
Matthias

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Parameter-in-different-contexts-tp7598994.html

___
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] Parameter in different contexts

2016-04-14 Thread Matthias Wegner
Hi All,

i want to count over different document a $counter in velocity. Do you have
an easy way that i can store and read that value so i can use it on all
documents (with different context)?

Is there a macro for such a job? I not found anything.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Parameter-in-different-contexts-tp7598994.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] Problem in Extension

2016-04-08 Thread Matthias Wegner
Hi Users,

i programmed two years ago the Citation-Extension at
https://github.com/matthiaw/xwiki-rendering-macro-citations.

Now i found a bug in XWiki 8.x when i add on different pages the
CitationClass-Object. There is a null-pointer-exception at Line 79, see
https://github.com/matthiaw/xwiki-rendering-macro-citations/blob/master/xwiki-rendering-macro-citations/src/main/java/org/xwiki/rendering/citations/CitationClassBuilder.java#L79

The Problem is that all Documents with the custom-object (doc in line 77)
are found, but the method returns an empty null-list for nested documents.

The Macro works when the Document with added XWiki.CitationClass-Objects is
NOT nested. But when it is nested then the reference looks like
Parent\.Child.WebHome. Is the Backlash the Problem? And when yes, where does
it come from?

You have any clue what i can do? Is that a bug or a mistake?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Problem-in-Extension-tp7598895.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] Edit Multiple Pages

2016-03-28 Thread Matthias Wegner
Hi,

is it somehow possible to get a nice editing function to multiple pages when
a want to load a lot of pages at once? At the moment i use

{{include document="Space.Name" context="new"/}}

but i thought if there is a possiblity to edit all included documents via
http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI. Did someone
of you use something similar?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Edit-Multiple-Pages-tp7598677.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] GREAT Nested Feature

2016-03-28 Thread Matthias Wegner
Hi Folks,

i really like the nested feature. I am writting a book and tried different
approaches. From my point of view i like the software Scrivener
(https://www.literatureandlatte.com/), but this has the problem that the
versioning and multiuser-editing is not possible. Also i used
https://titanpad.com/. This has great multiuser-function but a bad
content-editor and no image-usage.

So i tried xwiki with the new nested feature and my citations-extension. Now
i have all i need which is really great. If i could ask for an additional
feature then i like a change highlightning from different users, so a
collaborative writting is possible (like in titanpad). Now i have over 300
pages as book with a great layout, pictures and citations in one system and
can also get a PDF and so on. Thank you ...

But i thing the nested thing is real worth to get to 8.x.

PS: The redicrect-flag by renaming a page causes a lot of trouble to me
because i not recognize it first. Could it be deselected by default?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/GREAT-Nested-Feature-tp7598676.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] Set Parent in XWiki 8.0

2016-03-27 Thread Matthias Wegner
Hi All,

i tested and tried and found a solution which gives my needed result. Now i
get the nested content of a space in nice order and with correct headings.
Looks a bit ugly, but works:

{{velocity}}

#macro(display $idoc)
 #set($depth = $idoc.getSpace().toString().length() -
$idoc.getSpace().toString().replace(".", "").length() )
  #if($depth==1)
##* $depth $idoc.getSpace()
 = [[$idoc.getTitle()>>${idoc.getSpace()}.${idoc.getName()}]]=
  #elseif($depth==2)
##** $depth $idoc.getSpace()
 == [[$idoc.getTitle()>>${idoc.getSpace()}.${idoc.getName()}]]==
  #elseif($depth==3)
##*** $depth $idoc.getSpace()
 === [[$idoc.getTitle()>>${idoc.getSpace()}.${idoc.getName()}]]===
  #elseif($depth==4)
## $depth $idoc.getSpace()
  [[$idoc.getTitle()>>${idoc.getSpace()}.${idoc.getName()}]]
  #elseif($depth==5)
##* $depth $idoc.getSpace()
 =
[[$idoc.getTitle()>>${idoc.getSpace()}.${idoc.getName()}]]=
  #end
  ^^$idoc.getSpace(), Level: $depth^^
  {{include document="${idoc.getSpace()}.${idoc.getName()}"
context="new"/}}
  #getChildren($idoc)
  #foreach ($i in $children)
 #display($i)
  #end
#end

#macro(getChildren $document)
#set($depthParent = $document.getSpace().toString().length() -
$document.getSpace().toString().replace(".", "").length() )
  #set($children = [])
   #set($q = "where doc.space like '%${document.getSpace()}.%' and not
doc.name='WebPreferences' and not doc.space='${document.getSpace()}' order
by doc.title asc")
   #set($r = $xwiki.searchDocuments($q, 0, 0))
   #foreach ($i in $r)
  #set( $idoc = $xwiki.getDocument($i))
  #set($depthChild = $idoc.getSpace().toString().length() -
$idoc.getSpace().toString().replace(".", "").length() )
  #if($depthChild == ($depthParent + 1))
  #set($dummy = $children.add($idoc))
  #end
   #end
#end

#set($hql = "where doc.space like '%${doc.getSpace()}%' and not
doc.name='WebPreferences' and not doc.space='${doc.getSpace()}' order by
doc.title asc")
#set($chapters = $xwiki.searchDocuments($hql, 0, 0))
#foreach ($item in $chapters)
  #set( $d = $xwiki.getDocument($item))
#if($d.getSpace().equals("${doc.getSpace()}.${d.getSpace().substring($mathtool.add($d.getSpace().lastIndexOf('.'),1),$d.getSpace().length())}"))
#display($d)
  #end
#end

{{/velocity}}



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Set-Parent-in-XWiki-8-0-tp7598643p7598671.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] Set Parent in XWiki 8.0

2016-03-25 Thread Matthias Wegner
Hi Vincent,

thanks, now it is clear and works. But i used a query like

#set($hql = "where doc.parent='Book.WebHome' and not 
doc.name='WebPreferences' order by doc.title asc")
#set($chapters = $xwiki.searchDocuments($hql, 0, 0))

to get all Documents in den Space "Book" (old model). It shows all 
documents, even the nested ones. How can i query recursively starting 
with the parent document "Book.WebHome"?

Regards,
Matthias



Am 25.03.2016 um 14:17 schrieb vmassol [via XWiki]:
> Hi Matthias,
>  i used a query like
> > On 25 Mar 2016, at 13:21, Matthias Wegner <[hidden email] 
> > wrote:
> >
> > Hi Users,
> >
> > i added over 500 Pages to the new XWiki and now want to sort it in 
> depth.
> > But i cant find the "Change Parent" Symbol in Edit-Mode. Where can i 
> change
> > the Parent of a Page?
>
> See 
> http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing#HSettingthepageparent
>
> This page should lead you to 
> http://platform.xwiki.org/xwiki/bin/view/Features/ContentOrganization/ which 
> in turn should lead you to 
> http://platform.xwiki.org/xwiki/bin/view/Features/ContentOrganization/NestedPagesMigration/
>
> Thanks
> -Vincent
>
> > Regards,
> > Matthias
>
> ___
> users mailing list
> [hidden email] 
> http://lists.xwiki.org/mailman/listinfo/users
>
>
> 
> If you reply to this email, your message will be added to the 
> discussion below:
> http://xwiki.475771.n2.nabble.com/Set-Parent-in-XWiki-8-0-tp7598643p7598644.html
>  
>
> To unsubscribe from Set Parent in XWiki 8.0, click here 
> <http://xwiki.475771.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=7598643=bWljLm1hdC53ZWduZXJAd2ViLmRlfDc1OTg2NDN8LTIyMDkyOTgwMA==>.
> NAML 
> <http://xwiki.475771.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>  
>





--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Set-Parent-in-XWiki-8-0-tp7598643p7598667.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] Set Parent in XWiki 8.0

2016-03-25 Thread Matthias Wegner
Hi Users,

i added over 500 Pages to the new XWiki and now want to sort it in depth.
But i cant find the "Change Parent" Symbol in Edit-Mode. Where can i change
the Parent of a Page?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Set-Parent-in-XWiki-8-0-tp7598643.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] XAR-Import

2016-03-21 Thread Matthias Wegner
Ha, ha. I just build a custom xar for you to reproduce the bug and 
compared it to an export from xwiki with the same content. And now i see 
the problem. I had the following structure:


THIS IS NOT WORKING
book.xar
 |_ package.xml
 |_Book
|_article1
|   |_WebHome.xml
|_article2
|_WebHome.xml

THIS IS WORKING
book.xar
 |_ package.xml
 |_Book
|_article1
|   |_WebHome.xml
|_article2
|   |_WebHome.xml
|_WebHome.xml

I missed the WebHome.xml of the "Space". In my Wiki this is empty, so it 
is in my opinion useless to import. But it seems that the importer can 
not handle the missing WebHome.xml of the space. I thought about an 
encoding-problem or something like that, but it was only a missing file. 
Maybe some exception would be great if the integrity of mandatory files 
or fields is not there. I had no clue where to look because no log shows 
any exception.


So, thanks for assistence. Your questions lead me the way ;)

Regards,
Matthias

Am 21.03.2016 um 15:33 schrieb Thomas Mortagne:

Do you see anything in the log ?

If that's a XAR you can safely share and its not too big you should
probably create an issue on http://jira.xwiki.org so that we could
reproduce it.

On Mon, Mar 21, 2016 at 3:30 PM, Matthias Wegner <mic.mat.weg...@web.de> wrote:

IT teils Nothing. The right Circle Moves and it seems that it can not read. It 
shows no files.

Regards, Matthias

Von unterwegs gesendet


Am 21.03.2016 um 11:51 schrieb Thomas Mortagne <thomas.morta...@xwiki.com>:

What dos the UI tells you when you try to import ? Does it find
documents in the XAR ?


On Sun, Mar 20, 2016 at 9:58 PM, Matthias Wegner <mic.mat.weg...@web.de> wrote:
Hi Users,

i made a custom xar-file because i want to import some content into XWiki
8.0. But it seems to stuck. i can upload the file but it is never imported.

The request.log show only
127.0.0.1 - - [20/Mrz/2016:20:51:39 +] "POST
/xwiki/bin/upload/XWiki/XWikiPreferences HTTP/1.1" 302 -
127.0.0.1 - - [20/Mrz/2016:20:51:40 +] "GET
/xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagelist=1
HTTP/1.1" 200 946
127.0.0.1 - - [20/Mrz/2016:20:51:41 +] "POST
/xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagedescriptor=B.xar
HTTP/1.1" 200 133

so i have no clue whats wrong. My created xml-files seem correct. Can i send
you an example, so you can test why it is not working? I have no idea.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/XAR-Import-tp7598556.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





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


Re: [xwiki-users] XAR-Import

2016-03-21 Thread Matthias Wegner
IT teils Nothing. The right Circle Moves and it seems that it can not read. It 
shows no files.

Regards, Matthias

Von unterwegs gesendet

> Am 21.03.2016 um 11:51 schrieb Thomas Mortagne <thomas.morta...@xwiki.com>:
> 
> What dos the UI tells you when you try to import ? Does it find
> documents in the XAR ?
> 
>> On Sun, Mar 20, 2016 at 9:58 PM, Matthias Wegner <mic.mat.weg...@web.de> 
>> wrote:
>> Hi Users,
>> 
>> i made a custom xar-file because i want to import some content into XWiki
>> 8.0. But it seems to stuck. i can upload the file but it is never imported.
>> 
>> The request.log show only
>> 127.0.0.1 - - [20/Mrz/2016:20:51:39 +] "POST
>> /xwiki/bin/upload/XWiki/XWikiPreferences HTTP/1.1" 302 -
>> 127.0.0.1 - - [20/Mrz/2016:20:51:40 +] "GET
>> /xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagelist=1
>> HTTP/1.1" 200 946
>> 127.0.0.1 - - [20/Mrz/2016:20:51:41 +] "POST
>> /xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagedescriptor=B.xar
>> HTTP/1.1" 200 133
>> 
>> so i have no clue whats wrong. My created xml-files seem correct. Can i send
>> you an example, so you can test why it is not working? I have no idea.
>> 
>> Regards,
>> Matthias
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://xwiki.475771.n2.nabble.com/XAR-Import-tp7598556.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


[xwiki-users] XAR-Import

2016-03-20 Thread Matthias Wegner
Hi Users,

i made a custom xar-file because i want to import some content into XWiki
8.0. But it seems to stuck. i can upload the file but it is never imported.

The request.log show only
127.0.0.1 - - [20/Mrz/2016:20:51:39 +] "POST
/xwiki/bin/upload/XWiki/XWikiPreferences HTTP/1.1" 302 - 
127.0.0.1 - - [20/Mrz/2016:20:51:40 +] "GET
/xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagelist=1
HTTP/1.1" 200 946 
127.0.0.1 - - [20/Mrz/2016:20:51:41 +] "POST
/xwiki/bin/get/XWiki/XWikiPreferences?xpage=packagedescriptor=B.xar
HTTP/1.1" 200 133 

so i have no clue whats wrong. My created xml-files seem correct. Can i send
you an example, so you can test why it is not working? I have no idea.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/XAR-Import-tp7598556.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] HQL-Query on custom object with user-list

2016-02-13 Thread Matthias Wegner
Hi Users,

i try to create a hql-query which gives me all documents which contain a
custom object and and a defined property. As properties i have in the object
a multiselect user-list. Now i want to get all documents in which a specific
user is selected in the object. How can i write the hql?

I tried something from
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples but
nothing seems to work because i always get no results.

Could you help me?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/HQL-Query-on-custom-object-with-user-list-tp7597978.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] A custom Map as class parameter

2015-11-04 Thread Matthias Wegner

Hi All,

actually i use a multi-select user-list as parameter on a class for all 
objects-instances. Now in need to add a value to any selected user which 
is in the list in the object. You have any idea how i can solve that in 
a good way?


Example:
Class: Skill
Object 1: Skill A
User-Selection in Object 1: User X, User Y
Object 2: Skill B
User-Selection in Object 2: User X, User Z

Now i need the competence-level for every user on every skill, so i need 
something like

User-Selection in Object WITH level: User X (Level 2), User Y (Level 3)

This information is by definition in a Matrix, so somewhere i need to 
attach it. Maybe i need to create a custom class and use there user and 
skill. What do you think? Can you help me?


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


Re: [xwiki-users] Javascript XObjects

2015-03-02 Thread Matthias Wegner
Hi All,

i found the Javascript-Code
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/resources/uicomponents/suggest/suggest.js
from the Suggest-Widget at
https://network.xwiki.com/xwiki/bin/view/DocXE61En/SuggestWidget.

In the code i used the Ajax-Function from Prototype with

{{velocity}}
{{html}}

DATAbr/
div id=data/div
br/
RESPONSEbr/
div id=response/div


{{/html}}

{{velocity}}

Everything works fine and i get the REST-Responses as json. But when i
switch to application/xml i always get a result in responseText. You know
why?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Javascript-XObjects-tp7594090p7594176.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] Live Sandbox

2015-02-23 Thread Matthias Wegner
Hello,

you know if there is a live-preview in xwiki? Something similar to
http://extensions.polarion.com/extensions/198-wiki-preview-on-the-fly for
polarion (which uses as a sidecar-eclipse-plugin an old xwiki-core. This
Sources are open when you download a trial ;)).

Would be great.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Live-Sandbox-tp7594098.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] Javascript XObjects

2015-02-22 Thread Matthias Wegner
Hi,

i want to read, edit and save xwiki-objects from a page in javascript. I
wrote a post
(http://xwiki.475771.n2.nabble.com/Javascript-RESTful-tp7594084.html) where
i thought i should solve this with rest. I think now is is a lack of
knowledge. Where is documented what the Object 'XWiki' in javascript can do?
I read some source-code from fullcalender and others and see that they use
'XWiki.widgets' or 'XWiki.model', but i have no idea where to lolookinform
myself what XWiki on Javascript-side is to fill my gap of knowledge.

Is there a document where i can look? Or should i use the only the
Javascript XWiki API
(http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI) to read
the object data with velocity or groovy to handle them in javascript. I dont
understood it? What is  a preferred solution?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Javascript-XObjects-tp7594090.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] Javascript RESTful

2015-02-21 Thread Matthias Wegner
Hello,

i like the REST-API and have a library in Java which works perfect. Now i
want to use the RESTful API in Javascript. But i am new to javascript and
tried a lot, but nothing seems to work. Is there a simple example in
javascript with the rest-api?

I don't get what i am doing wrong, because i am not good in javascript.

I tried

require(['jquery'], function ($) {
  $.ajax({
 accepts: {xml: 'text/xml', text: 'text/plain'},
 url: 'http://HOST/xwiki/rest',
type: 'GET',
 dataType: 'xml',
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
 converters: {'text xml': jQuery.parseXML},
 crossDomain: true,
 async: true,
 username: 'username',
 password: 'apassword',
 success: function(data){
alert(Success: +JSON.stringify(data));
 },
error: function(data){
alert(Error: + JSON.stringify(data));
 }
  });
});

Also i tried

var httpRequest = new XMLHttpRequest();
httpRequest.open('PUT', 'http://HOST/xwiki/rest');
httpRequest.setRequestHeader('Accept', 'application/xml'); 
httpRequest.send( null );
alert( JSON.stringify(httpRequest.responseText) );
httpRequest.onreadystatechange = function(){
  if(this.readyState == 4){
   if(this.status == 200){
 alert(this.responseText);
   }
   else{
 alert(this.statusText);
   }
  }
}

I recognized a difference in ajax when i switched to jsonp because i tried
on localhost. But anyway my example work when i use my server outside.

Can you help me?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Javascript-RESTful-tp7594084.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] Empty Document Title

2015-01-29 Thread Matthias Wegner
Ha, ha. I found a solution. I didn't understood why doc.getTitle() is 
not working under Java, but works in Velocity or Groovy-Script. But in 
Java i found that
doc.getRenderedTitle(Syntax.PLAIN_1_0, context) is working.

Regards,
Matthias


Am 27.01.2015 um 10:39 schrieb Matthias Wegner:
 Dear Jeremie,

 sorry for the distracting. The object is here not important. I only 
 search for ALL documents which contain one object. From that document 
 i want to read the title (if i get no value from the object). I tried 
 now the queryModule with

 ListDocumentReference foundReferences = new 
 ArrayListDocumentReference();
 try {
 Query query = queryManager.createQuery(SELECT 
 doc.space, doc.name FROM Document doc, doc.object( + className + ) 
 AS obj, Query.XWQL);
 ListObject[] queryResults = query.execute();
 for (Object[] result : queryResults) {
 foundReferences.add(new 
 DocumentReference(context.getDatabase(), (String) result[0], (String) 
 result[1]));
 }
 } catch (Exception e) {
 e.printStackTrace();
 }
 if (foundReferences.size()0) {
 for (DocumentReference documentReference : 
 foundReferences) {
 XWikiDocument doc = 
 context.getWiki().getDocument(documentReference, context);
 System.out.println(doc.getTitle());
 }
 }

 That doens't help at all. I don't get the title from documents. Why is 
 that? You have an idea? Should title = doc.getTitle(); not give back 
 the title? It has nothing to do with the attachend object.

 PS: I created all the documents with AppWithinAMinute. The documents 
 show a title when i open the document in the browser, so why can i 
 read the title with a query from java-side? If you have no idea, than 
 it seems that it is a bug. Then i send an example-code which reproduce 
 this to jira.

 Regards,
 Matthias

 Am 26.01.2015 um 10:23 schrieb jerem [via XWiki]:
 Hi,

 You should be careful with Nabble (or such tools) formatting, that
 generates syntax that is neither plain text nor html, and your code 
 samples
 are then not displayed at all in regular email clients ...

 I put your samples back below:

 groovy:

  String hql = SELECT obj.name FROM BaseObject obj WHERE
 obj.className='Space.SomeClass';
  def results = xwiki.search(hql);
  for (int i = 0; i  results.size(); i++) {
 if(!results.get(i).equals(Space.SomeClassTemplate)) {
Document doc = xwiki.getDocument(results.get(i));
Object obj = document.getObject(Space.SomeClass);
if (obj!=null) {
   Property property = obj.getProperty(title);
   if (property!=null) {
  title = property.getValue();
   } else {
  title = document.getTitle();
  }
  println(title)
 }
  }

 java:

 String className = Space.SomeClass;
 String sql = SELECT obj.name FROM BaseObject obj WHERE 
 obj.className=' +
 className + ';
 ListObject results = context.getWiki().search(sql, context);
 if (results != null) {
for (Object object : results) {
  String docName = object.toString();
  XWikiDocument doc = context.getWiki().getDocument(docName, 
 context);
  EntityReference entRef = doc.resolveClassReference(className);
  BaseObject baseObject = doc.getXObject(entRef);
  if (baseObject != null) {
   System.out.println(doc.getTitle()+ baseObject);
  }
 }

 Note that you don't do the same thing regarding title in groovy and in
 java, obj.getProperty(title) is not at all equivalent to
 document.getTitle() ...
 It's likely that your document has no title, and what works in 
 groovy is
 to get a property title from an object of this doc. At least, I 
 don't see
 any other reason for this empty title :)

 Side note, in java you could inject the QueryManager instead of using 
 the
 search api, as you only do a read-only query:

 @Inject
 private QueryManager queryManager;

 See : http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module

 Hope this helps,

 Jeremie


 2015-01-23 17:39 GMT+01:00 Matthias Wegner [hidden email] 
 /user/SendEmail.jtp?type=nodenode=7593758i=0:

  Hi All,
 
  i have a working groovy script which is:
 
  I use a class and add an object to a document. Everytime a object is
  attached i look for it with the query and do something with the 
 objects.
  the
  strange thing is that i try to port it to a service to java. where 
 i get in
  groovy an title of the document it is NOT given in java.
  The java code of the service
 
  I didn't get it. Did i do something wrong? i never get a title of the
  document. I can read the document, the object of the document, but 
 i did
  not
  get the title. I tried also to get translated documents because i use
  locals

Re: [xwiki-users] Empty Document Title

2015-01-28 Thread Matthias Wegner
Hi Jeremie,

if i edit the page i always see a title. That's strange, right?

Regards,
Matthias

Am 27.01.2015 um 11:23 schrieb jerem [via XWiki]:
 Hi,

 2015-01-27 10:39 GMT+01:00 Matthias Wegner [hidden email] 
 /user/SendEmail.jtp?type=nodenode=7593775i=0:

  Dear Jeremie,
 
  sorry for the distracting. The object is here not important. I only
  search for ALL documents which contain one object. From that document i
  want to read the title (if i get no value from the object). I tried now
  the queryModule with
 
  ListDocumentReference foundReferences = new
  ArrayListDocumentReference();
   try {
   Query query = queryManager.createQuery(SELECT
  doc.space, doc.name FROM Document doc, doc.object( + className + ) AS
  obj, Query.XWQL);
   ListObject[] queryResults = query.execute();
   for (Object[] result : queryResults) {
   foundReferences.add(new
  DocumentReference(context.getDatabase(), (String) result[0], (String)
  result[1]));
   }
   } catch (Exception e) {
   e.printStackTrace();
   }
   if (foundReferences.size()0) {
   for (DocumentReference documentReference :
  foundReferences) {
   XWikiDocument doc =
  context.getWiki().getDocument(documentReference, context);
   System.out.println(doc.getTitle());
   }
   }
 
  That doens't help at all. I don't get the title from documents. Why is
  that? You have an idea? Should title = doc.getTitle(); not give back 
 the
  title? It has nothing to do with the attachend object.
 
  PS: I created all the documents with AppWithinAMinute. The documents
  show a title when i open the document in the browser, so why can i read
  the title with a query from java-side? If you have no idea, than it
  seems that it is a bug. Then i send an example-code which reproduce 
 this
  to jira.
 

 When you browse a page/document created with AppWithinMinutes, you see a
 title, but please could you edit this page (in wiki edit mode), and 
 check
 if there is something in the title field at the top of the editor ?
 There is a possibility that the title is automatically rendered by the
 Sheet document generated by AppWithinMinutes, from a field in the object
 (I'm not sure about this).


 
  Regards,
  Matthias
 
  Am 26.01.2015 um 10:23 schrieb jerem [via XWiki]:
   Hi,
  
   You should be careful with Nabble (or such tools) formatting, that
   generates syntax that is neither plain text nor html, and your code
   samples
   are then not displayed at all in regular email clients ...
  
   I put your samples back below:
  
   groovy:
  
String hql = SELECT obj.name FROM BaseObject obj WHERE
   obj.className='Space.SomeClass';
def results = xwiki.search(hql);
for (int i = 0; i  results.size(); i++) {
   if(!results.get(i).equals(Space.SomeClassTemplate)) {
  Document doc = xwiki.getDocument(results.get(i));
  Object obj = document.getObject(Space.SomeClass);
  if (obj!=null) {
 Property property = obj.getProperty(title);
 if (property!=null) {
title = property.getValue();
 } else {
title = document.getTitle();
}
println(title)
   }
}
  
   java:
  
   String className = Space.SomeClass;
   String sql = SELECT obj.name FROM BaseObject obj WHERE
   obj.className=' +
   className + ';
   ListObject results = context.getWiki().search(sql, context);
   if (results != null) {
  for (Object object : results) {
String docName = object.toString();
XWikiDocument doc = context.getWiki().getDocument(docName, 
 context);
EntityReference entRef = doc.resolveClassReference(className);
BaseObject baseObject = doc.getXObject(entRef);
if (baseObject != null) {
 System.out.println(doc.getTitle()+ baseObject);
}
   }
  
   Note that you don't do the same thing regarding title in groovy 
 and in
   java, obj.getProperty(title) is not at all equivalent to
   document.getTitle() ...
   It's likely that your document has no title, and what works in
   groovy is
   to get a property title from an object of this doc. At least, I
   don't see
   any other reason for this empty title :)
  
   Side note, in java you could inject the QueryManager instead of 
 using the
   search api, as you only do a read-only query:
  
   @Inject
   private QueryManager queryManager;
  
   See : 
 http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module
  
   Hope this helps,
  
   Jeremie
  
  
   2015-01-23 17:39 GMT+01:00 Matthias Wegner [hidden email]
   /user/SendEmail.jtp?type=nodenode=7593758i=0:
  
Hi All,
   
i have a working groovy script which

Re: [xwiki-users] Empty Document Title

2015-01-27 Thread Matthias Wegner
Dear Jeremie,

sorry for the distracting. The object is here not important. I only 
search for ALL documents which contain one object. From that document i 
want to read the title (if i get no value from the object). I tried now 
the queryModule with

ListDocumentReference foundReferences = new 
ArrayListDocumentReference();
 try {
 Query query = queryManager.createQuery(SELECT 
doc.space, doc.name FROM Document doc, doc.object( + className + ) AS 
obj, Query.XWQL);
 ListObject[] queryResults = query.execute();
 for (Object[] result : queryResults) {
 foundReferences.add(new 
DocumentReference(context.getDatabase(), (String) result[0], (String) 
result[1]));
 }
 } catch (Exception e) {
 e.printStackTrace();
 }
 if (foundReferences.size()0) {
 for (DocumentReference documentReference : 
foundReferences) {
 XWikiDocument doc = 
context.getWiki().getDocument(documentReference, context);
 System.out.println(doc.getTitle());
 }
 }

That doens't help at all. I don't get the title from documents. Why is 
that? You have an idea? Should title = doc.getTitle(); not give back the 
title? It has nothing to do with the attachend object.

PS: I created all the documents with AppWithinAMinute. The documents 
show a title when i open the document in the browser, so why can i read 
the title with a query from java-side? If you have no idea, than it 
seems that it is a bug. Then i send an example-code which reproduce this 
to jira.

Regards,
Matthias

Am 26.01.2015 um 10:23 schrieb jerem [via XWiki]:
 Hi,

 You should be careful with Nabble (or such tools) formatting, that
 generates syntax that is neither plain text nor html, and your code 
 samples
 are then not displayed at all in regular email clients ...

 I put your samples back below:

 groovy:

  String hql = SELECT obj.name FROM BaseObject obj WHERE
 obj.className='Space.SomeClass';
  def results = xwiki.search(hql);
  for (int i = 0; i  results.size(); i++) {
 if(!results.get(i).equals(Space.SomeClassTemplate)) {
Document doc = xwiki.getDocument(results.get(i));
Object obj = document.getObject(Space.SomeClass);
if (obj!=null) {
   Property property = obj.getProperty(title);
   if (property!=null) {
  title = property.getValue();
   } else {
  title = document.getTitle();
  }
  println(title)
 }
  }

 java:

 String className = Space.SomeClass;
 String sql = SELECT obj.name FROM BaseObject obj WHERE 
 obj.className=' +
 className + ';
 ListObject results = context.getWiki().search(sql, context);
 if (results != null) {
for (Object object : results) {
  String docName = object.toString();
  XWikiDocument doc = context.getWiki().getDocument(docName, context);
  EntityReference entRef = doc.resolveClassReference(className);
  BaseObject baseObject = doc.getXObject(entRef);
  if (baseObject != null) {
   System.out.println(doc.getTitle()+ baseObject);
  }
 }

 Note that you don't do the same thing regarding title in groovy and in
 java, obj.getProperty(title) is not at all equivalent to
 document.getTitle() ...
 It's likely that your document has no title, and what works in 
 groovy is
 to get a property title from an object of this doc. At least, I 
 don't see
 any other reason for this empty title :)

 Side note, in java you could inject the QueryManager instead of using the
 search api, as you only do a read-only query:

 @Inject
 private QueryManager queryManager;

 See : http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module

 Hope this helps,

 Jeremie


 2015-01-23 17:39 GMT+01:00 Matthias Wegner [hidden email] 
 /user/SendEmail.jtp?type=nodenode=7593758i=0:

  Hi All,
 
  i have a working groovy script which is:
 
  I use a class and add an object to a document. Everytime a object is
  attached i look for it with the query and do something with the 
 objects.
  the
  strange thing is that i try to port it to a service to java. where i 
 get in
  groovy an title of the document it is NOT given in java.
  The java code of the service
 
  I didn't get it. Did i do something wrong? i never get a title of the
  document. I can read the document, the object of the document, but i 
 did
  not
  get the title. I tried also to get translated documents because i use
  locals
  de and en. But even there i get the title back.
 
  You know why?
 
  Regards,
  Matthias
 
 
 
  --
  View this message in context:
  http://xwiki.475771.n2.nabble.com/Empty-Document-Title-tp7593748.html
  Sent from the XWiki- Users mailing list archive at Nabble.com

[xwiki-users] Empty Document Title

2015-01-23 Thread Matthias Wegner
Hi All,

i have a working groovy script which is:

I use a class and add an object to a document. Everytime a object is
attached i look for it with the query and do something with the objects. the
strange thing is that i try to port it to a service to java. where i get in
groovy an title of the document it is NOT given in java.
The java code of the service
 
I didn't get it. Did i do something wrong? i never get a title of the
document. I can read the document, the object of the document, but i did not
get the title. I tried also to get translated documents because i use locals
de and en. But even there i get the title back.

You know why?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Empty-Document-Title-tp7593748.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] Add Content my html form

2015-01-08 Thread Matthias Wegner
Hi,

i want to add some content to a page by a form. I want a grownig buttet list
below. Is there a other way than over the XDOM?



Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Add-Content-my-html-form-tp7593609.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] Run Macro inside velocity

2015-01-08 Thread Matthias Wegner
Hi All,

i just uploaded a new extension to
http://extensions.xwiki.org/xwiki/bin/view/Extension/TaskMacro.

I want to enable in inside


Can i do that?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Run-Macro-inside-velocity-tp7593608.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] Show hidden spaces

2015-01-04 Thread Matthias Wegner
Hi All,

first of all. A happy new year to everybody.
 
I hide some spaces with the extension
http://extensions.xwiki.org/xwiki/bin/view/Extension/Hide+a+space because my
user should not see my macro-space or some other admin-stuff. But i want to
display for myself a simple page where i can list all hidden spaces and
documents. The displaying of documents is easy with
http://extensions.xwiki.org/xwiki/bin/view/Extension/Display+hidden+pages+from+a+specific+space.

But how can i find the hidden spaces? $xwiki.spaces only gives me the
not-hidden ones.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Show-hidden-spaces-tp7593554.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] [AppWithinMinutes] Add Entry by Link from another Page

2014-12-29 Thread Matthias Wegner
Hi,

i need to make the addition of 168 objects to a AppWithinMinutes. I can do
it programmatically, because the user should do it in a simple way. Is there
an url which i can use or did someone a workaround for it? 

When not the only way i can think of is to create a new document with a
embedded object manually by code.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/AppWithinMinutes-Add-Entry-by-Link-from-another-Page-tp7593548.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] Changing Metdata of Attachment

2014-12-13 Thread Matthias Wegner
Hi,

i want to create a custom excel-file. For that i want to use a uploaded
template and the give it some values. I write that to the attachment storage
and want to hcange the metainfo. The file creation with the template works
fine, but the metatdata-change is not shown in xwiki. How can i do that? My
code is so far

{{groovy}}
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;

ArrayListString header = new ArrayListString();
ArrayListHashtablelt;String, String table = new
ArrayListHashtablelt;String, String();
String sheetName = Data;
String fileName = empty.xls;
String templateName = template.xls;
String templateSpace = Main;
String pageName = ExcelTest;
String xwikiPath = /opt/xwiki/openskies_v6.3;
String templatePath =
xwikiPath+/data/storage/xwiki/+templateSpace+/+pageName+/~this/attachments/+templateName+/+templateName;
String filenamePath =
xwikiPath+/data/storage/xwiki/+templateSpace+/+pageName+/~this/attachments/+fileName+/+fileName;

header.add(X)
header.add(Y)
header.add(Z)

HashtableString, String tableRow = new HashtableString, String();
tableRow.put(X, Q);
tableRow.put(Y, W);
tableRow.put(Z, R);
table.add(tableRow);

tableRow = new HashtableString, String();
tableRow.put(X, E);
tableRow.put(Y, F);
tableRow.put(Z, G);
table.add(tableRow);

public String convert(Long value) {
   return value.toString();
}

try {
   HSSFWorkbook wb = null;
   HSSFSheet sheet = null;
   
   File templateFile = new File(templatePath);
   boolean templateExists = templateFile.exists();
   if (templateExists) {
  POIFSFileSystem fs = new POIFSFileSystem(new
FileInputStream(templateFile));
  wb = new HSSFWorkbook(fs);
  sheet = wb.getSheetAt(0);
   } else {
  wb = new HSSFWorkbook();
  sheet = wb.createSheet(sheetName);
   }

   HSSFRow headerRow = null;
   if (templateExists) {
  headerRow = sheet.getRow(0);
   } else {
  headerRow = sheet.createRow(0);
   }
   for (short i = 0; i  header.size(); i++) {
  HSSFCell cell = null;
  if (templateExists) {
 cell = headerRow.getCell(i);
  } else {
 cell = headerRow.createCell(i);
  }
  cell.setCellValue(header.get(i));
   }

   for (int ii = 0; ii  table.size(); ii++) {
  HSSFRow row = null;
  if (templateExists) {
 row = sheet.getRow(ii+1);
  } else {
 row = sheet.createRow(ii+1);
  }
  for (short i = 0; i  header.size(); i++) {
 HSSFCell cell = null;
 if (templateExists) {
cell = row.getCell(i);
 } else {
cell = row.createCell(i);
 }
 String s = table.get(ii).get(header.get(i));
 cell.setCellValue(s);
  }
   }

   File excelOut = new File(filenamePath);
   FileOutputStream fileOut = new FileOutputStream(filenamePath);
   wb.write(fileOut);
   fileOut.close();

  File meta = new
File(xwikiPath+/data/storage/xwiki/+templateSpace+/+pageName+/~this/attachments/
+ fileName + /~METADATA.xml);
  Document metadata = new SAXBuilder().build(meta);

  Element root = metadata.getRootElement();
  for (Element child : root.getChildren()) {
 if (child.getChildText(filename).equals(fileName)) {
if (child.getChildText(version).equals(1.1)) {
  
child.getChild(filesize).setText(convert(excelOut.length()));
  
child.getChild(date).setText(convert(Calendar.getInstance().getTime().getTime()));
}
 }
  }
  XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
  outputter.output(metadata, new FileOutputStream(meta));

} catch (FileNotFoundException e) {
   e.printStackTrace();
} catch (IOException e) {
   e.printStackTrace();
} catch (JDOMException e) {
   e.printStackTrace();
}

{{/groovy}}

[[Downloadattach:empty.xls]]



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Changing-Metdata-of-Attachment-tp7593478.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] Eclipse + Jetty + Maven

2014-10-16 Thread Matthias Wegner
Hello,

i want to easily push a button and deploy an own extension from eclipse to a
jetty-based xwiki. Do you know an example? I not found something on the web.
At the moment i create the jar with maven from eclipse, copy the jar
manually and start the xwiki-server with the start script. 

Is there a way to do it all at once?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Eclipse-Jetty-Maven-tp7592763.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] Unkown Macro

2014-08-09 Thread Matthias Wegner
Hi Users,

i coded a own macro and removed it later on. I removed the macro-tag from
every page i use but in the search in the upper part of the page the error
message unkown macro: macroname occurs. Did you know what i have to do to
remove the ugly messages?

Regards,
Mathias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Unkown-Macro-tp7591621.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] Code-minimization in RESTful Client

2014-06-01 Thread Matthias Wegner
Hi XWiki-Fans,

i am starting a REST-Client for XWiki and want to code a small Client. I
uploaded the main-class to 
http://www.file-upload.net/download-8990392/RestfulClient.java.html
http://www.file-upload.net/download-8990392/RestfulClient.java.html  .

Since yesterday i have a working GET and PUT-Method for a Page. You can
start it with



You have an idea how i can compress the method /createMethodGet(UriBuilder
builder)/ and /putPage(String wiki, String space, Page page)/ in a elegant
way. They are so big and i want to add also methods for objects, classes and
so on. Also the Delete-Method is needed. When i do that in the actual way i
produce a lot of redundant lines which i want to avoid.

I have not really a problem, its more like a puzzle with the question how to
split the logic in a nice way.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Code-minimization-in-RESTful-Client-tp7590804.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] Example RESTful API

2014-05-30 Thread Matthias Wegner
Hello All,

i asked at StackOverflow and get a helpful answer, so i want to share it,
see
http://stackoverflow.com/questions/23936870/how-to-unmarshal-a-schema-based-request-result-correctly-i-e-xwiki/23938933#23938933
 

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Example-RESTful-API-tp7590680p7590780.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] Example RESTful API

2014-05-28 Thread Matthias Wegner
Hi i isolated my problem to the code



with the example xml  test.xml
http://xwiki.475771.n2.nabble.com/file/n7590747/test.xml  

The error is


I  am new to REST and have no idea what's wrong. The loaded xml from REST
seems correct, the classes from the schema seem ok. You have any idea?



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Example-RESTful-API-tp7590680p7590747.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] Edit many Object Values in one page/table

2014-03-26 Thread Matthias Wegner
Hi Devs,

i want to set a table where i can edit many objects from an
AppWithinAMinute. I want to edit the values directly in the table and save
them, so it the changing of values is faster (less clicks) possible.

Did anyone of you something similar before?

Regards,
Matthias







--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Edit-many-Object-Values-in-one-page-table-tp7589833.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] Get UserList from BaseObject

2014-02-18 Thread Matthias Wegner
Hi Devs,

i use a custom class (from App within a Minute) which has a list of users as
a class field. For a StringField i use



How can i read the Users from the BaseObject?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Get-UserList-from-BaseObject-tp7589196.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] Error saving document with text in object

2014-02-14 Thread Matthias Wegner
Perfect. That's it. I created the object with
AbstractMandatoryDocumentInitializer and first set a TextField (String). I
changed it to TextAreaField, but the Attribut was not reset. I deleted the
attrib manually from the class and after a new server-start everything works
fine.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Error-saving-document-with-text-in-object-tp7589117p7589138.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] Error saving document with text in object

2014-02-13 Thread Matthias Wegner
Hi All,

i use a Changelistener on a Document to update an object. Now i added a
larger text to the object an get the exception data exception: string data,
right truncation;  table: XWIKISTRINGS column: XWS_VALUE.

First i replaced the german ü,ö,ä,ß, but they are not the reason as you
can see.

Did someone know that error?

My text which throws the exception is


Is there a character which i shoudl remove?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Error-saving-document-with-text-in-object-tp7589117.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] Include a page with a specific and/or default locale

2014-02-13 Thread Matthias Wegner
Hi Vincent,

that helps. I get now what i want but use groovy with


I just wrote it to document the solution.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Include-a-page-with-a-specific-and-or-default-locale-tp7588954p7589118.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] Include a page with a specific and/or default locale

2014-02-04 Thread Matthias Wegner
Hi Vincent,

that's right. In my mind i thought to use a html form to select the prefered
locale which creates than the content in the selected language. With content
i mean x pages with the locale de and en. When i select en in the
creator-page (even if it is in de), the i want to get english content
because i selected it. 

When the 3rd x page only has the locale de, then i want to get the
information if en exist (null is fine), so i can use the de-version
instead.

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Include-a-page-with-a-specific-and-or-default-locale-tp7588954p7588967.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] Include a page with a specific and/or default locale

2014-02-03 Thread Matthias Wegner
Hi All,

i have some pages in Locale de and en. I want to use another page with the
include macro to load a set of defined pages in one language (or with a
default language, when the other is not set). Is that possible?

You know a similar solution if the include macro could not be used?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Include-a-page-with-a-specific-and-or-default-locale-tp7588954.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] Upgrade from 5.1 to 5.3 (Portable Version)

2014-02-02 Thread Matthias Wegner
Hi All,

everything works fine now and the upgrade is done. Just to document this:

1. Unzip v5.3 and copy v5.1-Data-Directory to it
2. Copy needed or customized files from to v5.1 to v5.3, i.e. xwiki.cfg,
apis, templates, resources, ...
3. Optional: Remove if necessary unwanted plugins
4. Delete solr-Directory from data-Directory (Reason:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki53#HSolrSearchIndex)
5. Restart v5.3 (Don't Worry, the ReIndexing need a while in background)
6. Follow the Upgrade in the Browser to get all depended v5.3-Extensions
7. Have Fun 

PS: At the moment this seems to be the only way to get a working file-based
v5.3 for attachments, because the Attachment Porter is not working under
v5.3. It would be nice if a file-based-portable-version could be downloaded
from xwiki.

Regards,
Matthias




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Upgrade-from-5-1-to-5-3-Portable-Version-tp7588918p7588931.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] Upgrade from 5.1 to 5.3 (Portable Version)

2014-02-01 Thread Matthias Wegner
Hello,

i use a portable version v5.1 with jetty. With
http://extensions.xwiki.org/xwiki/bin/view/Extension/Filesystem+Attachment+Porter
i exported all the attachments and change to filesystem. Now i want to
upgrade to v5.3.

I tried to install 5.3 and overwrite the data-dir and the xwiki.cfg. This is
not working and throws exceptions. Did anyone try that and can give me some
hint how this is working?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Upgrade-from-5-1-to-5-3-Portable-Version-tp7588918.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] Upgrade from 5.1 to 5.3 (Portable Version)

2014-02-01 Thread Matthias Wegner
Hi Caleb,

sure. Please see https://ezcrypt.it/QT7n#6xOV4Iswn3t6jof2kUPrIFjz

If i ust the v5.3 xwiki.cfg and only set the attachment-lines to ...=file
then the GooglePluginException not occurs. The others are similar if i copy
the complete v5.1 xwiki.cfg to v5.3.

As said i copied the complete data-dir from v5.1 to v5.3

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Upgrade-from-5-1-to-5-3-Portable-Version-tp7588918p7588920.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] Upgrade from 5.1 to 5.3 (Portable Version)

2014-02-01 Thread Matthias Wegner
Ok, now the Exception is this:
https://ezcrypt.it/RT7n#m2QC9d3AHQZNVz9w8Jv4ucNR

Regards,
Matthias





--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Upgrade-from-5-1-to-5-3-Portable-Version-tp7588918p7588922.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