This is just a quick reminder for myself how to implement programmatic redirects with JBoss Seam and JSF.
I will describe three different techniques:
- Redirecting to a 404 Error Page from a JSF Backing Bean
- Redirecting to an external Website
- Redirecting to a JSF view in a Seam Application
Mehr…
Today I had a hard time implementing time-consuming processes with AJAX status updates. I stripped down everything to a minimal working example. The technologies used in this example are
- Seam 2.2.2
- Richfaces 3.3
- Quartz 1.6
So here is what I wanted to achieve: The user of my application should click a button and in the background, a long running process should do some database stuff. Since this could take a while, I wanted to show some progress to the user. I did not want a progress bar, but I wanted to display some text to the user, depending on what the long-running tasks current status was.
I stripped it all down to an minimal example, which starts a long running process (huge for loop which generates random UUIDs) when a button is clicked and displays the current UUID to the user. With this basic example I hope you can get the ideas behind the a4j:poll component and how to do asynchronous long-running tasks with Seam. I must admit, that I was heavily(!) inspired by Andrey Chorniys blog post Show dynamic progress of time-consuming process in Seam/RichFaces where I shamelessly stole code and adapted it to my needs.
Here are the neccessary steps to get started
Mehr…
I am using Netbeans for a few weeks now and I have to admit, that I really enjoy this IDE. But my happiness with the IDE is not what I want to blog about today
Programmers are (or should be) lazy. We do not want to write the same code again and again. Fortunately every sophisticated IDE has some kind of Code Template mechanism, so does Netbeans. Here are some of my created Templates which I think other people could find it as useful as I do:
Mehr…
We had a Problem with JBoss Seam 2.2.1.CR1 Logger. We were not able to log with parameters. (This is a known bug: https://jira.jboss.org/browse/JBSEAM-4606 )
I was looking for a tutorial which covers upgrading Seam, but I did not find any. So this is my solution how to upgrade from Seam 2.2.1.CR1 to Seam 2.2.1.CR2:
It is kind of a trivial job, because in normal case you just have to replace libraries. Here is a step to step tutorial:
Mehr…
If you install the m2eclipse Plugin for the Maven Integration in Eclipse, this Error could possibly be shown in the Eclipse console:
Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.
If you have this issue, you should edit your eclipse.ini and add the following lines (on a Windows System) :
-vm
C:\path\to\JDK\bin\javaw.exe
Now your Eclipse should use the JDK to run with and the m2eclipse plugin should be happy.
#!/bin/bash
STRING="Hello World"
echo $STRING
This Blog is going to be filled with tutorials, howtos and various other things from the world of IT by degrees. You will find primarily Java, Linux, Eclipse and miscellaneous howtos, which could be mainly interesting for software developers and people who are interested in IT.