Product & Development / All about the Nuxeo Platform, from strategy to feature highlights to dev tricks

Product & Development

[Q&A Friday] How can I replace a column in a document listing?

without comments

Today we have a question from Ben who asks How can I replace the Last Contributor column in the default content view for sections and workspaces with the dc:source field?

In Nuxeo JSF UI, every time you see a listing (documents, audit events, anything really…), it’s displayed thanks to a content view.

A content view is a notion to define all the elements needed to get a list of items and perform their rendering. The most obvious use case is the listing of a folderish document content item, where we would like to be able to:

  • define the NXQL query that will be used to retrieve the documents, filtering some of them (documents in the trash for instance)
  • pass on contextual parameters to the query (the current container identifier)
  • define a filtering form to refine the query
  • define what columns will be used for the rendering of the

Written by

June 29th, 2012 at 12:00 pm

[Q&A Friday] Translating Nuxeo

without comments

Hi there,
Here’s an interesting question from Patrick Turcotte about translations:

What would be the best way to contribute them to you?

It’s even more interesting since we have a release candidate coming, which means new features, and hence new labels to translate. So today I’m going to tell you how the translations/labels are managed in Nuxeo.

The first thing to know: Nuxeo provides only English and French translations. All others have been contributed by our community. They are available from two different packages: nuxeo-platform-lang (en and fr) and nuxeo-platform-lang-ext. Here’s the complete list:

  • English (United States)
  • English (United Kingdom)
  • Français
  • Deutsch
  • Italiano
  • Greek (Greece)
  • Español
  • Português
  • Português (Brasil)
  • Polski
  • Català
  • Galego
  • Basque
  • Serbian – Cyrillic
  • русский
  • العربية
  • 中文
  • 日本語
  • Tiếng Việt

Some are up to date, some not so much. So this is a call to action. If you’re reading the blog and want to help, now …

Written by

June 22nd, 2012 at 12:00 pm

[Monday Dev Heaven] Playing with OpenLayers to add GeoLocation to Nuxeo

without comments

Last week I started playing with OpenLayers. It’s an open source JavaScript library that makes it easy to add a dynamic map to a web page. And indeed, they have a wonderful API — it’s easy to use, with good documentation and lots of examples. I’ve really enjoyed this coding session :D

So what I wanted to do with it was quite simple. I wanted to have the possibility to add geographical coordinates to a document and I wanted to display all of them on a map. Once they’re on the map, it would be nice to be able to click on the pointer and display the title and link to the document. Here’s what it looks like in the end:

Update coordinates example

Map pointer exemple

Saving map coordinates to any document

Since I don’t necessarily need every document to be tagged, I’m going to use a mixin. Its associated schema will have …

Written by

June 19th, 2012 at 4:25 pm

[Q&A Friday] Is the Tomcat Manager Supported?

without comments

Today we have a question from smalis who asks if the Tomcat Manager is supported by Nuxeo.

While it’s true that the Manager isn’t accessible by default in the Nuxeo Platform; it’s easy to add. All you need to do is declare a user with access to the manager interface.

Only users with the manager role can access it. So you need to edit the $CATALINA_HOME/conf/tomcat-users.xml file to add them ($CATALINA_HOME is your tomcat installation folder):

Now you can go to localhost:8080/manager/html with the admin:admin credentials and use the manager interface.

This is all really nice, but I don’t like to have it hardcoded like this. So we’re going to use a template. One of the nice things introduced with the upcoming 5.6 version is the ability to use FreeMarker to process configuration files. We can access properties defined in nuxeo.conf. Here’s my ‘templated’ tomcat-users.xml file put under templates/common-base/conf/

Written by

June 15th, 2012 at 3:13 pm

Guess What’s Coming in Nuxeo Platform 5.6…

without comments

In about a month, as announced previously, we will be releasing Nuxeo Platform 5.6. This new major version will include many interesting and valuable features. This article will give an overview of the list of features that will come with this release, to help you understand, evaluate, anticipate, and plan… your Nuxeo projects!

Content Routing – workflow adapted to the business

This is certainly one of the most important features of Nuxeo Platform 5.6. Content Routing is a new default workflow engine for Nuxeo that provides better and simpler workflow capabilities for the Nuxeo Platform. It includes a graphical editor and viewer of document workflows within Nuxeo Studio, as well as tools to monitor and adapt the running instances of these processes.

It also makes the lives of end users simpler with more user-friendly content lifecycle actions.

The use of jBPM, the previous system used for complex workflows within Nuxeo, …

Written by

June 8th, 2012 at 8:46 pm

Posted in Product & Development

Tagged with , ,

[Q&A Friday] How to add a ‘Loading, Please Wait…” message on the preview panel?

with 3 comments

Today we have a question from Bruce Grant, a regular anwsers visitor and active community member. Thanks for that. The question is: How to add a ‘Loading, Please Wait… on the preview panel. This has been asked many times. It is true that while you load a sizable pdf or office file, you won’t get any feedback on the screen telling you the server is working hard to convert it to HTML. This is really frustrating. So I’m going to add a small waiter gif when the preview page is loading, and remove it when the page is done loading.

Let’s start with a simple case, the preview without annotation. There is no GWT for now. It’s really just an iFrame showing the HTML preview. I’m just going to execute some JavaScript code when the iFrame is done loading.

And this is all you have to do. But this …

Written by

June 8th, 2012 at 12:00 pm

[Monday Dev Heaven] Adding thumbnail preview of document content in Nuxeo

with one comment

Last Friday’s post left us with three questions. Let’s jump right into it -
the remaining questions are:

When will I generate the thumbnail and add it to the document?

What if the main Blob of the document changes?

And where will I display that brand new thumbnail?

When to generate the thumbnail?

I want to generate a thumbnail each time the main file of a document is updated. This is the perfect opportunity to use an event listener. There are two events that I need to listen to. The first one is obviously documentCreation. Each time a document is created I need to look for its main file and if it exists, try to generate the thumbnail. The other one is beforeDocumentModification. It’s better than documentModified because this way I can know if the document has dirty fields or not. Which is to say I can know …

Written by

June 4th, 2012 at 7:18 pm

[Q&A Friday] How to get thumbnails for PDF or PSD documents?

with 2 comments

Hi there!

Here’s a common question about thumbnail preview in Nuxeo from systemz: How to get thumbnails from PDF. This question also applies to other files, like Office or PSD files.

I will mostly need two things for my thumbnail:
- somewhere to store it
- a way to generate it.

For the storage part I will use Mixins. In the Nuxeo Platform, this is just a facet that can be added to a document at runtime. I can add it to a document when I know I can generate a thumbnail from the document’s BlobHolder.

The definition of the facet is easy:

Now I have a facet called Thumbnail that adds the thumbnail schema to the document. If you don’t know how to add a facet at runtime, it is quite simple:

Then you can simply do:

And to generate my thumbnail, I will use …

Written by

June 1st, 2012 at 5:02 pm