I am playing with the JDK Javascript API (JSR 223) and I wanted to check out the replacement of variables in a String. Then I suddenly got this error:
javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: missing ; before statement (<Unknown source>#1) in <Unknown source> at line number 1
After some reseach I found out, that my variables did contain invalid characters in my case the variable contained a -.
So the Regular Expression for valid Javascript variable names is:
[a-zA-Z_$][0-9a-zA-Z_$]*
It is also possible to use any unicode characters for variables, but of course this is not recommended.
I am playing with the JDK Javascript API (JSR 223) and I wanted to check out the replacement of variables in a String. Then I suddenly got this error:
javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: missing ; before statement (<Unknown source>#1) in <Unknown source> at line number 1
After some reseach I found out, that my variables did contain invalid ...
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…
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 ...
Since I am a developer, I need a terminal very often. I prefer using on my MacOSX System. I use many tabs in iTerm and obviously all terminals point to different locations. I was tired of switching to all relevant locations everytime I start up iTerm. So I decided to give the bookmark feature of iTerm a try.
My goal was to just click on a bookmark and a new tab should appear which has the right folder as default workspace.
Mehr…
I use many tabs in iTerm and obviously all terminals point to different locations. I was tired of switching to all relevant locations everytime I start up iTerm. So I decided to give the bookmark feature of iTerm a try.
Today I struggled with getting my TestNG Integration Tests working in my Seam 2 project. It’s not a very smart idea to use the production/development database for database tests and here’s why:
1. It is damn slow
2. We want to separate “real”/fake data from unit test data.
3. Under normal circumstances we want a clean database or a database with predefined data (see )
4. We want the unit tests to run everywhere. It should not matter if we have a Windows machine, a Linux Buildserver or a MacOSX. It should just work. Oh and I forgot. We even want it to work without Internet Connection.
5. …
So I decided to use HSQLDB for my Unit tests.
The first barrier was getting TestNG working. Mehr…
Today I struggled with getting my TestNG Integration Tests working in my Seam 2 project. The first barrier was getting TestNG working.
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…
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:
Ich nutze seit geraumer Zeit für eine DrupalInstanz Fastgallery um Bildergallerien auf dieser Drupal Webseite zu realisieren. Das Modul ist recht nützlich, wenn man viele Bilder hochladen will, jedoch auf Features wie Kommentare, Bewertungen oder Ähnliches verzichten kann.
Es hat mich jedoch schon immer ein bisschen gestört, dass bei jedem Upgrade das Modul nicht mehr wirklich abwärtskompatibel ist und ich deshalb schon öfter meine Backups einspielen musste weil es mir dann meine Bildergallerien zerschossen hat
Ein Feature was ich bei den alten Version spitze fand ist, dass man Bilder als Gallerieordnerbilder verwenden konnte. Ich dachte immer, dass das Feature verschwunden ist, mit ein bisschen mehr Aufwand geht das ganze jedoch doch:
Mehr…
Ich nutze seit geraumer Zeit für eine DrupalInstanz Fastgallery um Bildergallerien auf dieser Drupal Webseite zu realisieren. Das Modul ist recht nützlich, wenn man viele Bilder hochladen will, jedoch auf Features wie Kommentare, Bewertungen oder Ähnliches verzichten kann.
Es hat mich jedoch schon immer ein bisschen gestört, dass bei jedem Upgrade das Modul nicht mehr ...
JBoss Seam bietet eine wirklich tolle Unterstützung für das Versenden von E-Mails an. Falls jemand nicht weiß wie das funktioniert, hier ist die Referenz dazu.
Wir wollten eine PDF an eine Mail anhängen, die Mail wurde jedoch ohne das Attachment versendet. Hier die Lösung:
Mehr…
Wir wollten eine PDF an eine Mail anhängen, die Mail wurde jedoch ohne das Attachment versendet. Hier die Lösung:
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…
Wir hatten das Problem, dass in der Version 2.2.1.CR1 von JBoss Seam das Logging mit Parametern defekt war (siehe Seam Bugtracker: https://jira.jboss.org/browse/JBSEAM-4606 )
Deshalb hatte ich nach einem Howto gesucht um Seam upzugraden, leider habe ich nichts dazu gefunden. Deshalb hier meine Lösung: