Edit: online demo added. See link near the end

Up to now, there was no real need for me to use a treetable in my apps. Therefore there has been little interest from me in the PrimeFaces treetable that provides this functionality. So when the need arose, I had a look and it honestly provided way to little functionality for what I need: The treetable is much closer to a tree than the datatable. The fact that more people would like to have a treetable that more closly resembles a datatable is reflected by the issues reported…

Personally, I even have some more requests: sorting, paging, filtering, so the list will become quite extensive if I would report them all.
When you have look at the usage of both components, you already see a big difference. The most common and flexible use of a datatable is in combination with a LazyDataTableModel. This kind of usage of a model is quite different than the TreeNode construction that is required in the treetable (and tree). Then it struck me, if you take a look from the other side, I would have to report only one feature request:

Have the datatable support tree like functionality

Unfortunataly, I needed it kind of quickly, so reporting it and waiting for it to be implemented is… well…  not realy an option and since the use is for a personal project, so going PrimeFaces PRO isn’t realy an option either. Fortunately, the source is open, so I had a look if it could explain the huge difference between a treetable and a datatable. The ‘outside’ usage is ofcourse a reflection of how the components internally work and the treetable is in that way very close to the tree. Luckily we are in the ‘holiday season’ so there was some free time available to start investigating how PrimeFaces components currently are created, work etc… And the be honest, the internals are clearly written, very logical and easy to understand (if you know some basics about jsf components, ajax, events, jquery etc). Since I already made a patch once (against a previous version without the new WidgetBuilder) to give the scrollable datatable an auto height (#3608) So it was then that I decided to try to implement the tree functionality myself…
And after some interesting hours, I was pleased to see it working… I call the result ‘TreeDataTable’. It shares about 98% of the current datatable (maybe more). In fact, it is backwards compatible!!!
Autoheight and tree functionality

Autoheight and tree functionality

This is the treeDataTable in a full page layout where the header is in the ‘north’ layout-section and the treeDataTable occupies 100% of the width AND height of the center section. You can even see the ‘background’ of the datatable filled with empty non-selectable rows if the number of records is lower than the avaliable visible row space. And yes there still needs to be some work done on the odd-even row coloring when collapsing rows (fully expanded it is ok). (fixed, just not updated the image)

And here you see the tree functionality at work and a scrollbar appearing AND the colum headers fitting perfectly.

Expanded some rows, so scrollbar appears...

Expanded some rows, so scrollbar appears…

Expanding is currently done client-side, has no event and the implementation still requires to have the full tree for this page available. But this is not different than with the current TreeTable and  for me this is sufficient.

The empty message works to…

An empty message after severside filtering

An empty message after severside filtering

Showing it is not ‘optimal’ imo and I probably want to display it in the middle of the datatable as an overlay, but that would mean using less of the existing datatable, but maybe some jquery might come to the rescue here.

Filtering works in the way it is done in the current datatable.

Filtering at the 'top level'

Filtering at the ‘top level’

In this example you only see that only top level records that match the filter are shown, but if you want this to be different, just implement it differently in your load method in the TreeTableDataModel (This extends the LazyDataTableModel with one method to get to the children of a node). You could e.g. choose to show matched records and it’s children, or even go ‘up the tree’ to find the ancestor of a matched record that is a top level record. It is totally up to you.

Ofcourse sorting works as well (even multi sorting)

Sorting

Sorting

In addition to all of the above, it also does (personally tested)

  • Draggable columns
  • Resizable columns
  • Dynamic columns
  • Conditional coloring
  • Row editing
  • Single/multiple selection (row and/or checkbox/radiobutton based)
  • Headers, footers
  • Context Menu

What is not tested yet (simply because I do not need it) is:

  • Grouping
  • SubTable
  • Summary Row
  • Expandable Rows
  • Cell Editing
  • Lazy Loading
So where can you get this? Well, nowhere yet. It still needs some tuning and testing and making it into a jar that can be used in a JSF application etc… That will probably happen in the first week of next year, so stay tuned (Yes Mr DJ, you’ll get an ‘internal’ release

But an online demo is available…

And believe me, I have next to no knowledge about all the phases in JSF. So even then it is doable for someone with basic java, html, css and some jquery knowledge (most of which I learned doing this and found things on google) to enhance a fairly complex component.

Upgrading from jBPM3 to….

Posted: 4 August, 2011 in Activiti, jBPM

Funny that moving from jBPM3 to Activiti is not considered upgrading, while moving from jBPM3 to jBPM5 is… So upgrading is only if you stay in in something with the same name… IE6 -> Firefox 5 is not upgrading either than…but IE6-> IE7 is… wow… (not saying jBPM 5 such a small step)

I personally think the differences in language between jBPM3 (jPDL) and Activiti (BPMN2) are comparable to the differences between jBPM3 (jPDL) and jBPM5 (BPMN2), at least the last time I checked. The migration of the definition should (almost) be identical. The difference in API is also of a comparable difficulty so the only difference in ease of migration could be in the runtime data (instanciated processes). I have no clear picture on that anymore, but personaly I would not even try to migrate that and just let one slowly take over the other. This is even mentioned in the jBPM forum

There are some more remarkable remarks in this topic, but since I don’t want to start a flamewar, I won’t go into them… (but had to mention there are, sorry)

 

It is currently almost impossible to not like JEE6. CDI, JSF2, JPA2, Servlet3.0, Bean Validation 1.0 and what not But what then… The default JSF components give you limited functionality, so the quest for selecting an enhanced component suite comes to everybody’s path.

Long, long time ago, in the JSF1.0 era, I just myfaces components, they provided a little more, but not much. Then came the Richfaces with Ajax4JSF. I started using this when Richfaces went from being commercial at Exadel to being part of JBoss. I was fairly pleased for a while but when JSF2 came around, I just wanted to have a component suite that worked with it natively.

My shortlist contained 3: Richfaces 4, Primefaces 2/3 and Icefaces 2. The reason I left OpenFaces out at that time was (I think) because I dislike companies opensourcing their whatever they have because they fail to succeed commercially. Ok, Richfaces was commercial to, once, so I begin to doubt my own arguments a little. It might be because I have a ‘warm feeling’ for JBoss (to a certain extend).

Icefaces fell of the list when I noticed their ‘commercial’ touch, having only a few JSF2 components in the open. Mind you, I have nothing against commercial companies, but using JSF mainly for my personal projects, I did not have the money to buy their enhanced components. The Richfaces project took a long, long time to produces something that was usable, could be demonstrated etc. Now I know they developed a new ‘component development kit’, started all from scratch wanted to deliver high quality components, but I just could not wait.

So Primefaces remained, I started using it at version 2.1 and was fairly pleased. A nice set of components that are easily themable since they use the jquery-ui conventions. This means that with JqueryThemeRoller you can create your own themen within minutes. But as always, the devil is the details. Details here meaning developing more complex applications. For me one of the most important components is the datatable. It should have sufficient functionality to begin with, a clear outlook of what additional functionality will come and when, not to many issues etc…

For the Primefaces datatable there are many feature requests. Some duplicates, some not triaged (invalid in the meantime), some nice to haves, and some must haves. Fixed columns and horizontal scroll is for me a nice to have, but having a multi-select like in file browsers is (almost) a must.

EDIT:
Cagatay validly pointed out that the PF datetable is the most complex component with many features already (for the details see below in his reply) so there was already a lot of time and effort put into it. I should have mentioned that.

So instead of complaining, like some others do, I started implementing this myself. Contratry to what people think, developing JSF2 components is not that hard, and most of the things (all in case of the multi select) had *nothing* to do with JSF, but were merely html/jquery things. So what now…

Well, as you can see in the next post in the same topic by the Primefaces lead, they have a policy that issues that are most often voted for get a higher priority then others, but requests by paying customers have an even higher priority. Now this is not strange, since Primefaces is not backed by a company like JBoss or Oracle and since they are human, they do need to eat and drink and go on holiday now and then. So a vibrant community around Primefaces is a great thing to have.

Every now and then they post a tweet about the number of posts that were reached in the forum. Honestly, this can be interpreted as negative as well. If a huge number of posts is required in the forum, It might be that things are not (always) that obvious or bug free. Both are the case, but posters often forget to search the forum or issue list and just post and so you cannot draw a real conclusion from the number of posts. Yes there are many users, yes there are people that help others, a lot, blog about it etc, but that does not constitute a community.

It is obvious that the Primefaces teammembers to a lot of work in their free time as well, so all the work is very much appreciated, but as mentioned, in my opinion, Primefaces does not realy have a community. I can accept that Prime Technolgy wants to stay in control of the direction Primefaces is going and there is no need for an Apache PMC like ‘environment’ now.

But there are some people that do not get a warm feeling on how things are currently going or at least how they are perceived. So, and this is going to be a bold and not realy well founded statement  but jsut to cause ripples/controversy, I get the impression that the Primefaces team rather waits for a paying customer to come by then to accept patches from the community. It might be wrong, they might jsut be scared of copyright infringement, but that can be solved by a contributors agreement. Heck I do not even want/need commit rights (Git instead of SVN might help here)

Don’t get me wrong ,I do like Primefaces and will continue using it,  but at the same time I do not want to ‘fork’ certain components just to speed up fixings issues, enhancing things  or even introducing new components. I want Primefaces itself get to a higher level and want to HELP

Peace,

Ronald

Activiti in Action

Posted: 9 March, 2011 in Activiti

aia cover

I’m not realy a book buying guy, especially not technical ones since often they are outdated the moment you buy them. In some cases that does not matter since they are a good reference anyhow. So when I noticed that Tijs Rademakers and Ron van Liempd were writing Activiti in Action I hesitated a little for the obvious reason that I’m kind of familiar with Activiti already. Last week however at the NLJUG Activiti university session (a ‘labs’ oriented hands-on free training) held at the Atos location in Utrecht, they surprised us with free vouchers to the MEAP version of the book and a full electronic version when it comes out (thanks for that btw). Since you should not look a gift horse in the mouth (did not expect the translation of this proverb from Dutch to English to be so literal) I started reading and with great joy I must admit. Chapter 4 was released today and so I think it is to early to write an indepth review! But anyone starting with Activiti should pay the lousy €25.15 and buy the book. It already contains well written, good to read, easy to understand,… well I think you get the picture. Oh and in addition, the example code is avaiable to so anyone wanting a jumpstart with Activiti: do not hesitate

Funny thing is that when talking to them about the book, they admitted it was twice as hard to keep up with Activiti since te community and the contributions from the communiti keep growing with each release and with e.g. the businessrule task and the designer they can partly blame themselves. Still I think it is a great buy.

Keep up the good work.

EDIT: According to a tweet by Tijs Rademakers: Use the following code to get 40% of all versions of the #Activiti in Action book: activi40.

Where does the experience really starts?

Posted: 22 February, 2011 in Activiti
Tags:

Scott Francis often write interesting small blogs about things related to BPM. His latest blog (as of this time of writing), The Experience Starts in the First Minute, is about perceiving a BPMS in relation to it’s installation. I agree with him that getting things up and running without expensive consultants is a plus. But…as always the proof of the pudding is in the eating, or using it in case of Rick Hightower and Activiti.

Einstein already said it: “IT should be as simple as possible, but not simpler” (IT being my own addition ;-). Why do I get to this? Simply because I think there is a downside to making things too simple. I’ve seen it happening with jBPM and with Activiti now as well. Tom Baeyens has always advocated that BPMN has both a technical and business aspect to it, Activiti Cycle being the one of the results. But if the installer is that simple any ‘suit’ might think he can do it all by himself, without IT. Yeah… right, would be the same as me saying I do not need sales people to sell my ‘product’ (anyone ever tried cold acquisition?).  The fact that this is true can be seen by the level/quality of the questions in the forums. If things get simpler, you get way more noob questions… People that do not know how to use search(engines), understand reporting issues, understand that the demo setup is just that, a demo setup and nothing to be tweeked for production use. This does not happen on the mailinglist of BetterForm, a great XForms engine. The ‘demo setup is also not difficult there, but you quickly become aware that you need to use it in combination with IT (and this is not critique).

So my suggestion: Pose a question to the user when he (she?) executes ‘ant demo.setup’ asking him if he wears a suit. If he answers ‘yes’ , we should register his ip-address and only allow access to a ‘beginners’ forum for at least a year (yes even if he is from a high-profile consultancy firm ;-)) since experience comes with the years and not in the first minute.

The spirit of opensource

Posted: 22 February, 2011 in opensource

For over a year now, I’m an enthousiastic (personal) user of the the PrimeFaces JSF component set. They made a great choice to not develop the components themselves from full scratch but leverage existing frameworks like JQuery and YUI.

It is backed by Prime Technology, a fairly small company so PrimeFaces does not have the financial backing Like Activity has  (Alfresco) so they need to make money in different ways like consultancy, training, commercial support, commercial license or whatever a creative mind can come up with. Now everybody knows documentation and certainly good documentation, requires huge amounts of work. So to me it is no suprise that the high quality documentation of Primefaces is not going to be free anymore. Especially not since it will contain more information than the previous open documentation did and even more since it still is cheap especially for medium sized companies. So why this blog? PrimeTechnology announced the rules will change. A little that is, but it attracted a response by ‘A project lead’.

If anything is not in the spirit of opensource it is complaining like this. With me being part of the jBPM project for many years and spending many hours in the forum, I think I have a good foundation to comment why I think this is true.

The spirit of open source has nothing to do with free (as in beer) access to documentation. Having decent documentation for free is a gift, having good free documentation should be considered a blessing, not something you can ‘demand’. The spirit of opensource is about using and contributing back and in my opinion contributing back is more than using it, reporting issues and complaning they do not get fixed. That is called leaching. And complaining the businessmodel should be changed, is also a great pile of something that comes out of a cow’s behind (sorry, could not formulated it any more decent).

Has any of you ever looked at why Backbase did not succeed with a fully commercial version, or why openfaces came to existence (anybody remember QuipuKit?), or the rise (and fall?) of Apache ADF (once ‘contributed’ by Oracle and left to rust for the commercial version) or the ‘donation’ by Exadel of Richfaces to JBoss …  Besides the latter, they all have in one way or another a commercial aspect in their project… saying the change Prime Technology is making is that they support the ‘per seat license’ now should be followed then with an ‘a commercial license is unacceptable’, heck, why not even demand the support should be onsite, 24x7x52 (never understood why it was 365) and free. I just get the feeling nothing is good enough for this ‘project lead’ (hiding behind a alias hmmm…)

Even Alfresco had a dual licensed version in the earlier days until they reached a maturity point where I suspect some of there bigger paying customers have said they would not stop buying support if the change was made to what the license model is now.  Primefaces or rather Prime Technology is not there yet.

Companies that rely that havily on documentation that they need a new version every month because PrimeFaces changes that quick (read: improves/grows which is a plus imo) should look ‘inside’ at the quality of their development team. Oh right, better developers are more expensive… why did I forget that. If in the company I work for we start using PrimeFaces, I’ll try my utmost best to make sure we buy a 10 developer documentation each year (although we only have 5 developers). Oh and when PrimeFaces 3 comes out, I’ll buy that documentation personally.

Luckily there are other more constructive comments and I honestly do not think it will hurt the growing community and the ‘peer support’ as some other post mentiones.

Keep up the good work (although opening the project a little more would help, but that is probably a  matter of time)

(edit: some small but annoying typos fixed)

FOSS Projects and communities

Posted: 28 January, 2011 in Activiti, jBPM

A lot has happened the last months in the field of opensource bpm(n2). Activiti getting a jumpstart in many areas, jBPM4 getting ‘killed’ but jBPM in general getting a relaunch with Droolsflow/jBPM5 and Bonita quietly getting better and better. It might not surprise you that I have a strong personal opinion about how things went, but no, this won’t be a rant, since I think nobody gains anything by that and I do not want people I like to feel bad (cause they shouldn’t) nor do I want to diminish any company. Yet, you have to make choices now and then. Read the rest of this entry »

Not really first post…

Posted: 24 January, 2011 in Uncategorized

Or is it? If you have a last post somewhere, you do not really have a first post. On the other hand, it is a first post in this blog which I cannot even call a new blog since it was opened long ago. It was  only used to have an account with my nickname to post on a different blog.

So what can you expect here?

“Answers to everything but life and the universe”

Contrary to what you might think it is not only about technical things. it will certainly be more.

  • Sometimes it will be funny (at least I’ll try to be :-))
  • Every now and then it will be philosophical.
  • From time to time I will just rant, complain or shout to get things of my chest
  • Occasionally there will be beauty, compliments or admiration to share

Just do not expect any answer to life and the universe here, since I am not the one to provide those for you. Heck, I’m not even sure if anybody/anything can. In any other area I’ll try to be as helpful as I can.

Cheers…