Archive December 2009

Toggle view

Extending the FacesContext (and using a Faces Factory)

JavaServer Faces has always been sold as a piece of flexible and extensible code. It really is. Through its factory facilities you can bend and twist that web framework until it fits. Today I tried to resolve something that has bothered me a long time. For a showcase I have implemented a few supporting lines of code that come handy in lots of places. When prototyping something, that code often ends up in some abstract base class from which managed bean are subclassed or it even ends up in some “helper” class with static methods. In the end you don’t feel that it is at the right place.

Read more

Close a PrimeFaces dialog when no validation messages are available

I’m posting this to memorize a PrimeFaces pattern for reuse. The visibility of PrimeFaces dialog panel can be controlled using the visible attribute. JavaScript widget.open() or widget.hide() modify the visibility state as well.

<p:dialog widgetVar="widget" id="dialog"
	visible="#{not empty facesContext.maximumSeverity}">
	<f:facet name="header">
		<h:outputText value="Form" />
	</f:facet>
	<h:form>
		<h:panelGrid columns="3">
			<h:outputLabel for="input" value="Input" />
			<h:inputText id="input" label="Input" required="true" value="VALUE" />
			<h:message for="input" />
		</h:panelGrid>

		<h:panelGroup>
			<!-- update the form for the case we get validation errors -->
			<p:commandButton value="Update" update="dialog"/>
		</h:panelGroup>
	</h:form>
</p:dialog>

Getting started with eclipse RCP development

Lars Vogel is maintaining a really helpful set of up-to-date articles about eclipse RCP programming.

Blackberry unlocking

A few days ago I had to unlock 2 of my Blackberry devices, a Curve 8300 and a Bold 9000. Yesterday a friend asked me what service I had used. It was unlockberry.co.uk and I was really satisified with the service they provide. However, I recommend that you use their (Black)berry logger software that reads device internal parameters and send that to their team after you have purchased unlocking. That seems to be more reliable than selecting the device type and the network provider.

green red blue grey