Monday, March 25, 2013

JSF 2.1 Tip of the Day: RichFaces 4.3.x Drag and Drop

Multiple DnD Targets
The Primefaces version of my drag-n-drop (DnD) for JSF has been very popular. I didn't want my friends at Red Hat feeling left out. I did a couple of examples using drag-n-drop with the same arrow demo as the Primefaces example: JSF 2.1.x Tip of the Day: Primefaces 3.5 <p:ring/> Drag-N-Drop Example.

I did have a little more fun with using Java to clone some of the arrows so that you could see how to use them multiple times.

Requirements

Details

The project was developed using NetBeans 7.3 and Apache Maven. The Mercurial project can be found on BitBucket here: richfaces-dnd-examples

Code


Patterns for Scaling Mercurial and Git

I just finished reading over the Refcard Git Patterns and Anti-PatternsScaling from Workgroup to Enterprise by Luca Milanesio from GerritForge. He has done a great job describing patterns and anti-patterns that don't just apply to Git, but any distributed source control system. The obvious focus of this Refcard is Git, but the patterns are essentially the same sans the commands.

I thought that the card was well done, and is a nice and easy read.

Friday, March 22, 2013

JSF 2.1.x Tip of the Day: Primefaces 3.5 <p:ring/> Drag-N-Drop Example

Camp Old Indian
I was trying to come up with an example to demonstrate <p:ring /> along with Drag-and-Drop (DnD). I had an idea of using a target to drop things on. I was sitting in my living room watching my youngest son creating a world on little big planet, and I remembered his first time shooting a bow. He had a perfect bullseye.

I decided that I would drag-n-drop arrows in honor of my son. I mentioned the idea to him, and he loved it. So here it is... a useful example that was fun to create. In this example, I will demonstrate the <p:ring />, and <p:fieldSet /> components primarily. I have added some effects to a <p:dialog /> if you select an arrow and dismiss it.






Requirements

I used NetBeans 7.3 to develop the Apache Maven based project. The Mercurial project can be found on BitBucket here: primefaces-ring-dnd.

Example

index.xhtml



IndexBean.java



Arrow.java



Conclusion

This is a very simple example of what you can do with a Primefaces, Mojarra, and Netbeans.
Arrow Ring and Target

Popular Posts