JetBrains released a new EAP (Early Access Program) for IntelliJ Idea 9 Codename Maia, namely Idea Ultimate Edition v 90:116 90:122.
Grab the packages for your operating system here
he team from Sun/the JSF Expert Group released a page showing what you need to add to your pom.xml to include jsf-2 in your maven project.
Taken from https://javaserverfaces.dev.java.net/maven2, the required parts are:
If you use Glassfish v3 or higher:
1 2 3 4 5 6 | <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> |
If you use Tomcat or Jetty (or any other non JEE6 compliant Servlet Container):
1 2 3 4 5 6 7 8 9 10 | <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0.0</version> </dependency> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.0.0</version> </dependency> |
However, If you put the JBoss repository either in your pom.xml or your ~/.m2/settings.xml
1 2 3 4 5 | <repository> <id>jboss</id> <name>Jboss Maven Repository</name> <url>http://repository.jboss.com/maven2/</url> </repository> |
you can then use the following dependencies (which I think are more appropriate):
1 2 3 4 5 6 7 8 9 10 11 | <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.0.0-FCS</version> </dependency> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.0.0-FCS</version> </dependency> |
Also Sun provides some simple JSF-2 archetypes
While browsing through the Mojarra Sourcecode, I’ve found a interesting set of classes, all bundled around the keyword “Flash”:
./jsf-ri/systest/src/com/sun/faces/systest/FlashViewParamTestCase.java
./jsf-ri/systest/src/com/sun/faces/systest/FlashReaperTestCase.java
./jsf-ri/systest/src/com/sun/faces/systest/FlashReaperBean.java
./jsf-ri/systest/web/flash01.xhtml
./jsf-ri/systest/web/flash02.xhtml
./jsf-ri/systest/web/flashReaper.xhtml
./jsf-ri/src/com/sun/faces/context/flash
./jsf-ri/src/com/sun/faces/context/flash/FlashELResolver.java
./jsf-ri/src/com/sun/faces/context/flash/ELFlash.java
./jsf-ri/systest-per-webapp/flash/src/java/com/sun/faces/systest/FlashTestCase.java
./jsf-ri/systest-per-webapp/flash/web/flash7.xhtml
./jsf-ri/systest-per-webapp/flash/web/flash8.xhtml
./jsf-ri/systest-per-webapp/flash/web/flash2.xhtml
./jsf-ri/systest-per-webapp/flash/web/flash5.xhtml
./jsf-ri/systest-per-webapp/flash/web/flash4.xhtml
./jsf-ri/systest-per-webapp/flash/web/flash3.xhtml
./jsf-ri/systest-per-webapp/flash/web/flash6.xhtml
./jsf-api/src/main/java/javax/faces/context/Flash.java
When looking through the files, I found out, that the famous Flash-Scope of Ruby on Rails (my friend Peter told me about that scope in RoR about a year ago when we where doing stuff with JSF 1.2) got ported to JSF-2.
So, what you now basically can do, is to put an object into flash-scope in one request, e.g.:
<h:form id="nextForm" prependId="false">
<c:set target="#{flash}" property="foo" value="bar" />
....
</h:form>
(Taken from ./jsf-ri/systest/web/flash01.xhtml)
and retrieve it in the next request (but not the request after that one) simply by accessing it through EL
(Taken from ./jsf-ri/systest/web/flash02.xhtml)
foo = ${flash.foo}
Also you can put objects into the flash scope in your controllers:
ELFlash.getFlash().put("key","value");
I know that looks quite dirty because one is polluting the controller with a Singleton, but when done right, you can still make your code perfectly testable š
The files you need to take a look at are:
Update: I found a blog post from Ed Burns about using the Flash Scope, although its still JSP based, it should also give a good introduction!
Martin Ahrer, one of Austrians JSF geniuses shows a way how to integrate PrimeFaces ToolTip component with conditional rendering, only when validation errors occurred.
Although I would have chosen a different approach
(mainly extending the already existent h:message tag), Martins way works quite nice.
Thanks Martin!
Recently (well about two weeks ago), I’ve created a patch to make the great PrimeFaces JSF-2 ready.
Cagatay Civici now made me a contributor of PrimeFaces.. thanks mate!
Hopefully the patch will soon be integrated into the 2.0 branch of PrimeFaces!
Wow! I can’t believe it!
JetBrains just announced, that upcomming IntelliJ Idea 9 will be made open source.
Eclipse and NetBeans now definitely have to fear “The most intelligent IDE” in the world!
Hooray at JetBrains!
So, after almost 5-6 years of Gmail usage with an @gmail.com address, I decided to go with my own domain and change to Google Apps = the REAL GMAIL.
So, I was wondering, if there is a way to migrate my stuff from the “Free Gmail” to the “Google Apps Gmail”, but my (initial) searches ended up with no result, so I did it my way:
This way, I converted nearly all (around 10 messages are missing, according to the “manage labels” view) my gmail-email to my google-apps gmail account. In case, I ever need those 10 mails, I still have my normal gmail account to look for them there.
Because finally someone showed interest in helping me with my Spring Security JSF 2.0 Taglib, I created my first project at Google Code.
The homepage of the project is still located on my server, but maybe I’ll move that too as soon as I find out how to do it.
Actually for a stupid flash game on facebook I was searching for a way to script mouse-movement and clicks on linus/X.org.
Happily, I found a tool that does exactly what I wanted:
It’s called “X Do Tool” or short xdotool . A simple make did it for me and I had my script ready.
First I tried to do clicking by
./xdotool mousedown 1 ; ./xdotool mouseup 1
( 1 is left, 2 middle, 3 right mouse button, according to your xorg.conf ), but then I found that a simple ./xdotool click 1 would also do it;
So for “cheating” at this stupid “who can click the most times in 30 seconds” game on facebook, simply open a console next to your browser, type
while true; do xdotool click 1; done
and depending on the speed of your x-server you get far more than 1000 clicks / 30 seconds. sadly they have some manipulation detection or something like that so you would have to add some “sleep xx” calls to your loop š
I’ve stopped playing around this while having reached around 480 clicks, being placed second after an aquaintance of mine.
Happy “cheating” š
Yeah, that rocks!
The guys from Caucho ported their PHP implementation in Java, named Quercus to the Google App Engine to allow it running on the cloud.
Read more at Quercus on the Google App Engine