Recently I stumbled across a problem with the rich:modalPanel component of the JBoss RichFaces component library, which didn’t want to show the data of a backing been.

Let’s assume the following scenario:
You have a DataTable with several rows. Each row contains a “See details…” button. This button will popup a modal panel using rich:componentControl and the panel is populated with data of a backing bean. This backing bean is filled with actual data by clicking our “See details…” button using a4j:actionparam

Read more…

For p300, I am currently using a Selector to check if I can read from or write to a socket.

However, this has lead me to a weird problem: select is called for at most 30 seconds and I get a timeout for writing even though this can’t really be and only happens with some OS combinations. I’ve found this thread in the Sun Forums and adapted my internal logic to the information from this forum thread:

Instead of always selecting for OP_WRITE when I want to write, I just try to write. If I was not able to write everything (that is, buffer.remaining () is bigger than 0) I select for OP_WRITE.

This seems to work fine.

I think I have spent at least 5 hours to get a selectManyCheckbox working properly in JSF. I was getting validation errors and other trouble.

However I have found a great source of information. Also, on some other websites you can read that you should use an array instead of a List for the getter/setter of the backing bean.

Maybe this helps…

I’ve recently spent some hours to track down a mysterious bug and I just couldn’t find it. Since my application is using a lot of Threads/Workers it came to my mind that a RuntimeException I did not catch could be the cause. I wrote a global handler for it and found where the problem was :)

Read more…

A stupid thing about Java NIO and using blocking sockets is that the SO_TIMEOUT is not used anymore even if you set it. You may wonder why anyone will use blocking sockets with NIO? I am doing this in p300 because I want to use the increased performance of using FileChannel.transferFrom.

Read more…

If Eclipse complains that it cannot start JBoss (”Timeout waiting for JBOSS 5.0 to start. Server did not start after 50s.”) then try to set the timeout to a higher value. It can be done in the options:

Windows -> Preferences -> Server -> Server timeout delay

There are a lot of tips and hints out there on the internet, which describe how you could add support for Java Server Faces and Facelets to the Eclipse environment.
Mostly, they deal with adding code completion for JSF/Facelets tags and so on. There are some possibilities to achieve this, ranging from creating TLD files to using the JSP editor in Eclipse for the XHTML code of the Facelets pages.

But the “trick” I prefer is much more simple :D

You want to see it? Well, just download and install the JBoss Tools and you have it all!

Usually, when you enter standard <!-- ... --> html comments in your XHTML definition for a Facelets view, these comments are rendered by Facelets, so they are included in the resulting HTML. Even EL contained in these comments is executed!

In most cases, this is not what you hope to see, because if you want to make real comments, you have to use the <ui:remove> tag, which is not really comfortable.

Read more…

You are wondering why your JUnit tests run very fine when you launch them using Eclipse, whereas they all break down when building your project with a build system like Ant or Maven?

Well, thats probably because you are using assert statements and Eclipse per default is not configured to evaluate them.

To solve this problem, simpy go to Run -> Run… -> Arguments, and in the box labeled VM arguments:, enter either -enableassertions or just -ea.

That’s it!

Recently I visited Jazoon, an international conference for Java developers at Zurich, Switzerland.

Having heard a lot of interesting talks, I want to sum up my impressions and try to figure out some of the latest trends in the world of Java as well as interesting facts for software architects.

This is part 3 of my series of blog posts and deals with

Ajax Push

Having worked with ICEfaces (but suspended work for now due to a lot of bugs), I was curious to hear a talk of one of the guys of ICEfaces, Ted Goddard.

The topic was Ajax Push. Surely, Ajax is a buzzword of today and everybody wants to have some Ajax functionality in his application, maybe just to be cool.

Read more…