I am leading the CDI 1.1 specification, and work on JBoss Developer Framework, a set of tutorials and examples for all JBoss users. Previously, I've worked on Infinispan and I led the Seam and Weld projects, and am a founder of the Arquillian project. I've worked on a number of specifications including JSF 2.0, AtInject and Java EE 7. I am a regular speaker at JUGs and conferences such as JavaOne, Devoxx, JAX, JavaBlend, JSFDays, JBoss World, Red Hat Developer Day and JUDCon.
I am currently employed by Red Hat Inc. working on JBoss open source projects. Before working for Red Hat, I used and contributed to Seam whilst working at a UK based staffing agency as IT Development Manager.
| Recent Entries |
|
31. May 2013
|
||
|
13. Nov 2012
|
||
|
05. Jun 2012
|
||
|
01. May 2012
|
||
|
10. Jan 2012
|
||
|
15. Oct 2011
|
||
|
05. Oct 2011
|
||
|
04. Oct 2011
|
||
|
03. Oct 2011
|
||
|
29. Sep 2011
|
||
|
02. Sep 2011
|
||
|
12. Aug 2011
|
||
|
07. Jul 2011
|
||
|
01. Jul 2011
|
I learnt a lot about JBoss Tools whilst writing a quick demo for my talk at Javapolis, and I wanted share a favourite feature with you - hot deploy of Seam components. Now, of course, this works with any seam problems if you set it up right, but JBoss Tools makes it /seamless/ :-). It removes the need for calling out to ant to copy the files to the application server - this makes it so quick you don't even see the progress bar pop up!
So, how do you get this going in your project?
Well, first, create a new WAR project (you can't currently hot-deploy EJB3s - vote for the issue here!)
You can learn more about creating a new project here.
Now, run your project on the server - you'll need to wait a few seconds while the server boots.
Find out more about deploying your project here.
Finally, add a method (note, we are changing the class signature here!) to one of your actions, and add a <h:commandLink /> to your view to call it. Make sure to save both the class and the facelets.
You are restricted to /action/ classes here - you can't hot deploy model classes (entities).
You'll notice that JBoss Tools also provides EL completion in java class files :-)
Seam tells you it has hot deployed the the component.
Refresh the page in your browser, click the button, and the method is called without having to restart your application - now you need another excuse to get a cup of coffee than I had to restart my application!
;-)
Well, that concludes our quick tour of hot deployment with Seam and JBoss Tools. The JBoss Tools docs are a great place to learn more.
Updated - added in <rich:orderingList /> and specify the locale for the calendar
The RichFaces team have released RichFaces 3.1.3.GA. This is the first release since 3.1.0 back in September to include any new components (both 3.1.1 and 3.1.2 were bug fix releases) so I wanted to highlight the key improvements for you.
Time Picker
<rich:calendar value="#{flight.departureDate}"
locale="#{locale}"
datePattern="dd/M/yy hh:mm" />
As you can see, it's also fully internationalisable!
Controlling one component from another
<rich:componentControl /> allows you to fire an action on another component when a javascript event occurs on your current component. This is very powerful, and perhaps hard to understand until you need it, so lets look at a very simple example. Here we have a modal panel (a bit like a css/div based popup), which we want to launch from somewhere in our page:
<rich:modalPanel id="panel" width="350" height="100">
<f:facet name="header">
<h:outputText value="Modal Panel" />
</f:facet>
<h:outputText value="This panel is called using rich:componentControl"/>
</rich:modalPanel>
<h:outputLink value="#"> Show Modal Panel <rich:componentControl for="panel" attachTo="link" operation="show" event="onclick"/> </h:outputLink>
Rather than having to call some JS function, we can just attach a component controller to the link, and tell it what operation to call on what component.
<rich:componentControl /> can do a lot more than this - take a look at the online demo for ideas.
Shuttle list
<rich:listShuttle sourceValue="#{items.availableItems}"
targetValue="#{items.selectedItems}"
var="item"
sourceCaptionLabel="Available Items"
targetCaptionLabel="Currently Active Items">
<rich:column width="18">
<h:graphicImage value="#{item.icon}"/>
</rich:column>
<rich:column>
<h:outputText value="#{item.label}"/>
</rich:column>
</rich:listShuttle>
Notice how we've embedded other rich components to layout the lists!
Orderable list
<rich:orderingList value="#{myMusic}" var="album">
<rich:column>
<f:facet name="header">
Song Name
</f:facet>
<h:outputText value="#{album.title}"/>
</rich:column>
<rich:column>
<f:facet name="header">
Artist Name
</f:facet>
<h:outputText value="#{album.artist.name}" />
</rich:column>
</rich:orderingList>
Context sensitive menu
<s:div id="flower">
<h:graphicImage value="flower.jpg"/>
<rich:contextMenu event="oncontextmenu"
attached="true"
submitMode="none">
<rich:menuItem value="Zoom In"
onclick="enlarge();"/>
<rich:menuItem value="Zoom Out"
onclick="decrease();"/>
</rich:contextMenu>
</s:div>
Here we've attached the context menu to the parent <s:div /> component, so any right click on it causes the menu to show.
There's also
- Big improvements to Portal support (we are just finishing off support for Seam and RichFaces in a portlet)
- A system for customising how styles are loaded (one big lump, or on demand)
- Over 180 bug fixes (see the release notes)
Congratulations to the RichFaces team!
One of the features I am most pleased to see in Seam 2.0.1 is Natural Conversations. Why?
Easy redirect to existing conversations
It can be useful to redirect to an existing conversation if the user requests the same operation twice.
Take this example:
You are on ebay, half way through paying for an item you just won as a Christmas present for your parents. Lets say you're sending it straight to them - you enter your payment details but you can't remember their address. You accidentally reuse the same browser window finding out their address. Now you need to return to the payment for the item.
With a natural conversation its really easy to have the user rejoin the existing conversation, and pick up where they left off - just have them to rejoin the payForItem conversation with the itemId as the conversation id.
User friendly URLs
I've always been a strong believer in the use of user friendly, descriptive, URLs. For some applications this is of less import, of course - the largest (pre Seam) application I wrote was really bad at this as it used frames ;-) . For me this consists of:
- a navigable hierarchy - I can navigate by editing the url
- a meaningful URL (like this Wiki uses -- so don't identify things by random ids)
The first of these is certainly possible in Seam with the use of URLRewrite (I'm also looking forward to seeing stronger integration between URLRewrite and Seam's pages.xml), but the second was harder until now.
Now, with natural conversations, when you are building your hotel booking system (or, of course, whatever your app is) you can generate a URL like http://seam-hotels/book.seam?hotel=BestWesternAntwerpen (of course, whatever parameter hotel maps to on your domain model must be unique) and with URLRewrite easily transfor this to http://seam-hotels/book/BestWesternAntwerpen.
Much better!
Deprecates explicit synthetic conversation ids
I really didn't like the use of explicit synthetic conversation id - they just feel really ugly to me. You know that gut feeling you get about some things? Explicit synthetic conversaton ids are like that for me.
This is available in the recently released 2.0.1.CR1.
I hope this inspires you to go out and think about how you can incorporate natural conversations into your application.
Well, help is on hand. Jacob Orshalick wrote an excellent article on nested conversations which he seems to be making into bit of series with this latest blog posting on conversation timeouts.
Enjoy!
A quick update for those who like living on the edge ;-)
Firstly, I've published a snapshot of Embedded JBoss beta3 - this is a pretty major update to Embedded JBoss (and its components like EJB3, Hibernate etc.) and pretty close to the beta3 release - so it would be great to get some feedback. It's looking good (but there is a known issue with JMS).
If you want to give it a go:
- Tomcat: Follow these instructions to install into a /fresh/ copy of Tomcat.
- SeamTest: Replace your current bootstrap directory and lib/test directory
Secondly, if you've made the move to Java 6 you need a couple of tweaks to Embedded JBoss for the beta3 snapshot:
- Start java with -Dsun.lang.ClassLoader.allowArraySyntax=true
- Java 6 SE includes JAXB 2.0, but Embedded JBoss needs JAXB 2.1. The easiest way to do this is to put the jaxb-api.jar (for JAXB 2.1) into the
endorsed
library directory, then start java with -Djava.endorsed.dirs=/path/to/endorsed/directoy
Your testng launcher would look something like this:
<testng outputdir="/path/to/test/report/directory"> <jvmarg line="-Djava.endorsed.dirs=/path/to/endorsed/directory" /> <jvmarg line="-Dsun.lang.ClassLoader.allowArraySyntax=true" /> <classpath refid="test.classpath" /> <xmlfileset dir="/path/to/src/directory" includes="**/testng.xml" /> </testng>
|
|
|
Showing 106 to 110 of 118 blog entries |
|
|