Ropardo Sowftware development company

Experience software development with ROPARDO S.R.L.

RSS Feed
RSS Feed
  • Home
  • About ROPARDO S.R.L
  • Our websites

XEclipse, XWiki issues with sollutions

Some tips to avoid a headacke when dealing with xwiki and xeclipse:
Common ground: xwiki version: 2.0, xwiki syntax: 2.0

-> If you need to create new and a lot of new documents in a space and time is limited for this activity, an error may occur when you close and want to reopen some already created documents in the project. See error display(error1.jpg) After you click “Ok” the connection to the server will be closed.


error1

Sollution:

As a collegues suggested:

1. Reconnect to the server.
If 1. does not do the trick follow these steps:
a. Close XEclipse application.
b. Go to where you have XEclipse on the operating system, in the folder for the current connection, for example: “…/workspace\mBusiness\.xwikieclipse“, and
delete the folders there , and for the 2 files: “objectsStatus.index” and “pagesStatus.index” be sure the lines in them say only this: “<map/>”
c. restart XEclipse, connect, refresh then look for the page
If c. does not work, restart xwiki server too.
Keep in mind, the above operation will not be a secluded error, it may happen for every single page you want to open. This can happen for hours.
I have not understood why is this behaviour.

-> If when wanting to open a document from XEclipse and you get an UTF_8 enconding error, please follow the steps(a-c) from above.

-> If you want to import some javascripts, css styles do this:
a. create a new document in the same project or where you want to.
b. open that page in the Edit: ?editor=object mode
c. use the right(it’s right if in the presentation layout you have chosen to put them in the right part of the web page) panel, it’s the “ADD OBJECT” one.
From there choose: “XWiki.JavaScriptExtension” or “XWiki.StyleSheetExtension” and then press “Add Object from this Class“.

Then in the left part of the page you will see the newly created object. You can edit it. press it, or the “pencil” near it. Give it a name…does not matter that much but for you to know what the script is about, in the contents put the css style classes or the javascript functions.
d. Save and View.
Where you are now: you have a page, that has one or more objects.
What to do with it: If you want to use them, use the css styles, or the javascript codes then you have to “import” this page(that holds the objects) in every document you want to have a use of them.

Code looks like this:

{{velocity}}
$xwiki.jsx.use('JQueryLogic')
$xwiki.ssx.use("TemplateStyleSheetClass")
{{/velocity}}

(
By this, you can add JQuery into the wiki platform. You may be tempted, like i was, to follow other syntax to import, like this:
$xwiki.jsx.use(“myjavascriptcode.js”,true) // where myjavascriptcode.js is situated in the current used skin.
Using this i had no luck in progressing with anything in jquery.
)
Don’t forget that when using JQuery you need to declare the non-conflict variable. You can place this in the xwiki page :

<script type="text/javascript"><!--mce:0--></script>

(This sorts a table with the id “myTable”)

-> You need to add divs in the page, and still keep the sections already created. You import the css, write the declaration of divs, and when viewing the page you get to
discover that no sections were kept. reason is simple…(now).

Sollution:

1. you declare the page that has the css object etc:

{{velocity}}
$xwiki.ssx.use("TemplateStyleSheetClass")
{{/velocity}}

2. you have 2(or >) css classes : .wrapper, .leftPanel, .rightPanel and you want to put some information in the left panel and something else in the right panel.
Normally you declare : <div>… </div> <div>..</div>
The issue was that the section do Not appear. This should be a section declaration:”== leftsidetext ==” but if trapped in a velocity tag or even html tag declaration
there is no positive reaction :)

Here you have to declare like this:

(% class =" wrapper " %) (((
(%  class =" leftSidePanel " %) (((
== leftsidetext ==
{{html}}
&lt;span&gt;
&lt;a href="/xwiki/bin/edit/projectSpace/MyPage?section=1" style="text-decoration: none;"&gt;Edit&lt;/a&gt;
{{/html}}
(% style="color: blue; font-size: 1em;" %)
'leftsidetext'
{{html}}
&lt;/span&gt;
{{/html}}
)))
(% class =" rightSidePanel "%) (((
'rightsidetext'
)))
)))

code

Notes:
- If you want to place velocity code with a bit of html in the panels, wrapp the velocity code with this :

{{velocity}}{{html}} </code> and close them when you are finish: <code>{{/html}} {{/velocity}}

- If the text does not have a line between the the and the {{/html}} and the {{html}} you will get a html error.

I will try to update this post, maybe it’ll helpĀ  somebody. :D

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Get Shareaholic
Tags: html issues velocity xeclipse Xwiki

 Posted in: Java, Web Development, xWiki
December 9, 2009 | Gabriela Radu | 2 Comments

2 Responses

  • Ciprian Radu
    December 10, 2009
    1

    OK, so after reading this I said to myself: if ever needed in the future, avoid using xwiki :)

    At a first glance (because I never used xwiki) it seems that xwiki provides a lot of features, and probably, at least some of it’s complexity, comes as a consequence.

    This web page http://www.wikimatrix.org/compare/XWiki+WikkaWiki+Wiclear+WikiDoc seems an interesting place to compare different wiki implementations. At least from this page (because I am sure there are other wiki implementations as well), xwiki is the only one with Java support. And you get to work with Velocity (http://velocity.apache.org/) and Groovy (http://groovy.codehaus.org/) as programming languages.

    Seems complicated at first, at least from my point of view. I will keep this post in mind. If I will ever have to work with xwiki, maybe this will come in handy.

    PS: Just a thought: is it possible that some of your problems are caused solely by the XEclipse plugin? (there are two unanswered complaints about XEclipse not working properly on the plugin’s main web page http://xeclipse.xwiki.org/xwiki/bin/view/Main/WebHome :) )

  • Gabriela Radu
    December 10, 2009
    2

    “Just a thought: is it possible that some of your problems are caused solely by the XEclipse plugin?” Answer: sure! :)

Leave a Reply

 


  • « Previous post
  • Next post »
  • Recent Posts

    • Installing PyGraphviz on Windows
    • Convert python object to XML representation
    • Liferay Portlet Development
    • Norway Road Show 2011 private meeting invitation
    • Oracle OpenWorld 2011
  • Ropardo is Hiring

  • Subscribe

    • Add to Google Reader or Homepage Add to netvibes TopOfBlogs
  • Recent Comments

    • Rajkumar Pomaji on Bluetooth PC Remote Control
    • Stelian Morariu on GWT 2.1 – Uploading a file using the RPC mechanism
    • Sergio on GWT 2.1 – Uploading a file using the RPC mechanism
    • Artem on Liferay: Deployment will start in a few seconds… and how to realy start
    • rkd80 on GWT 2.1 – Uploading a file using the RPC mechanism
  • Archives

    • November 2011 (1)
    • September 2011 (4)
    • July 2011 (3)
    • June 2011 (2)
    • May 2011 (4)
    • April 2011 (4)
    • March 2011 (3)
    • February 2011 (2)
    • January 2011 (2)
    • December 2010 (1)
    • November 2010 (4)
    • October 2010 (4)
    • August 2010 (3)
    • July 2010 (3)
    • June 2010 (6)
    • May 2010 (8)
    • April 2010 (7)
    • March 2010 (9)
    • February 2010 (6)
    • January 2010 (5)
    • December 2009 (7)
    • November 2009 (9)
    • October 2009 (10)
    • September 2009 (14)
    • August 2009 (10)
    • July 2009 (1)
    • June 2009 (1)
    • May 2009 (1)
    • April 2009 (1)
    • March 2009 (1)
    • October 2008 (3)
    • October 2007 (3)
    • July 2007 (4)
    • June 2007 (1)
    • May 2007 (3)
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Categories

    • News (15)
    • Ropardo Team (8)
    • Ropardo Products (6)
      • File Tracking Client (4)
      • iManagement (2)
    • Software Development (83)
      • Microsoft.NET (22)
      • Java (40)
      • Oracle (8)
      • Power Builder (3)
      • Liferay (5)
      • Lotus Notes (9)
      • xWiki (4)
    • System Adminstration (13)
      • Linux (10)
      • Windows (3)
    • Programming (1)
    • Uncategorized (3)
    • Databases (10)
      • MSSQL (5)
      • PostgreeSQL (3)
    • Microsoft.NET (1)
    • Web Development (28)
      • ASP/ASPX (3)
      • Content Management Systems (1)
      • HTML/CSS (5)
      • Javascrip/AJAX (8)
      • PHP (7)
    • Oracle E Business Suite (6)
  • Tags

    .NET ajax blog C# certification client CMS control css database Debugging django Domino Eclipse extension file tracking filter fun gentoo google Hibernate how to html image iManagement import Java javascript jQuery liferay Linux Lotus Notes lotus script Oracle Oracle BI Publisher 11g PHP portal PostgreSQL powerbuilder Python SQL Telerik velocity xml Xwiki

© 2010 ROPARDO s.r.l..

Powered by WordPress. Styled by Ropardo