Sonntag, 24. Oktober 2010

Created Babel Chat, for chatting in almost every language.

Babel Chat

Just created Babel Chat. A Chat app where you can chat in your prefered language and your partner receives your messages translated in his language.

Created CoolCoders Showcase with Vaadin and Themeroller on JEE

Vaadin

Just deployed CoolCoders Showcase implemented with Vaadin, Themeroller and JEE.

There're further Implementations in Grails, SmartGWT, ICEfaces, Primefaces of the same showcase.

Dienstag, 12. Oktober 2010

Google Code Project with convenient JPA Criteria extensions

Just created a google code project with some convenient JPA Criteria extensions.

Dienstag, 5. Oktober 2010

Porting @ViewScoped JSF Annotation to CDI to use it with Primefaces

Primefaces

Today I spent several hours to use the right scope with Primefaces and CDI/Weld. Finally I found this cool
blog of Steven Verborgh
which describes how to create a view scope for CDI.

With this scope a backing bean keeps alive as long as the user stays on the same page/view.

Freitag, 17. September 2010

Changing Glassfish EJB Timer from embedded Derby to Oracle

Glassfish

This is a small tutorial to persist the Glassfish EJB Timer to an Oracle DB instead of the Derby file DB. It's pretty simple.


Add a new Connection Pool for your Oracle Timer schema.

Create a table with the following create table script.
CREATE
    TABLE EJB__TIMER__TBL
    (
        TIMERID VARCHAR(255) NOT NULL,
        BLOB clob,
        INITIALEXPIRATIONRAW number(20),
        SCHEDULE VARCHAR(255),
        INTERVALDURATION number(20),
        OWNERID VARCHAR(255),
        STATE INTEGER,
        LASTEXPIRATIONRAW number(20),
        PKHASHCODE INTEGER,
        CREATIONTIMERAW number(20),
        CONTAINERID number(20),
        PRIMARY KEY (TIMERID)
    );

Then change the JDBC Resource
jdbc/__TimerPool
to your new connection pool.

Donnerstag, 2. September 2010

Spring at a Glance

Montag, 26. Juli 2010

My Icefaces Showcase

Icefaces

Just deployed my new Icefaces Showcase. In this showcase I implement some solutions from my last icefaces projects. In the first version there's a generic table with configurable columns. It's possible to make columns invisible and change the column order. The columns can be configured in a popup. In the background you can see the effect simultaneously.

I'll be pleased about your feedback.

Donnerstag, 15. Juli 2010

Deployed icefaces-compat-2.0-A3 in my maven repo

Icefaces

Today I changed my Hibernate Spring Icefaces Stub from icefaces-1.8.2 to icefaces-compat-2.0-A3 to get it running on Glassfish V3. The artifacts are available in my maven repo.

Thanks to the Icefaces Team for the auction monitor compat example. This was very helpful.

Mittwoch, 14. Juli 2010

ICEfaces Blogging Contest

Icefaces

Thanks to the ICEfaces Team for winning the 2nd place of the ICEfaces Blogging Contest

Further blogs about ICEfaces will follow.

Dienstag, 6. Juli 2010

Currently my favourite game

Civilisations 4 Ever!!!
Some of my friends wrote the most awesome web civ clone ever. Be careful not to get adicted.

Birth of Nations

Thanks Matt for good advices

Tips for Productivity and Happiness at Work

Dienstag, 26. Januar 2010

Scrum Präsentation

View more presentations from bambo1543.

Sonntag, 3. Januar 2010

Icefaces data table: attribute type specific ouput rendering

Icefaces

I promised in my last post Spring context configured JSF tables to add some more custom icefaces table features.

Based on this post I want to start with "attribute type specific output rendering".

dataTableTemplate.xhtml:
<ice:dataTable value="#{items}"
    var="item"
     rows="10">
    <ice:columns value="#{tableModel.columnModel}" 
        var="columnConfig">
        <f:facet name="header">
            <ice:panelGroup>
                <ice:commandSortHeader columnName="#{columnConfig.field}" >
                    <ice:outputText value="#{columnConfig.label}"/>
                </ice:commandSortHeader>
            </ice:panelGroup>
        </f:facet>
        <ice:outputText value="#{tableModel.cellValue}"/>
    </ice:columns>
</ice:dataTable>

The <ice:outputText value="#{tableModel.cellValue}"/> renders every column as a simple text. To make the rendering type dependent we have to add the column type to the ColumnConfig.

public class ColumnConfig
{

    private String label;

    private String field;

    private Class< ? > clazz = String.class;

    public boolean isString() {
        return clazz.equals(String.class);
    }
    public boolean isBoolean() {
        return clazz.equals(Boolean.class);
    }
    ...
}

web-context.xml:
<bean id="viewUsersBean" class="com.bamboit.webapp.controller.ViewUsersBean" scope="request">
    <constructor-arg index="0" value="com.bamboit.model.User"/><constructor-arg index="1">
        <list>
            <bean class="com.bamboit.model.ColumnConfig">
                <property name="field" value="firstName"/>
                <property name="label" value="user.firstName"/>
            </bean>
            <bean class="com.bamboit.model.ColumnConfig">
                <property name="field" value="lastName"/>
                <property name="label" value="user.lastName"/>
            </bean>
            <bean class="com.bamboit.model.ColumnConfig">
                <property name="field" value="active"/>
                <property name="label" value="user.active"/>
                <property name="clazz" value="java.lang.Boolean"/>
            </bean>
        </list>
    </constructor-arg>
</bean>

The user gets a further boolean attribute named "active". We want to render this as a checkbox.

<ice:dataTable value="#{items}"
    var="item"
     rows="10">
    <ice:columns value="#{tableModel.columnModel}" 
        var="columnConfig">
        <f:facet name="header">
            <ice:panelGroup>
                <ice:commandSortHeader columnName="#{columnConfig.field}" >
                    <ice:outputText value="#{columnConfig.label}"/>
                </ice:commandSortHeader>
            </ice:panelGroup>
        </f:facet>
        <ice:outputText value="#{tableModel.cellValue}" rendered="{columnConfig.string}"/>
        <ice:panelGroup style="text-align:center;" rendered="#{columnConfig.boolean}">
            <ice:selectBooleanCheckbox value="#{tableModel.cellValue}" />
        </ice:panelGroup>
    </ice:columns>
</ice:dataTable>

With the "rendered" attribute either outputText or selectBooleanCheckbox will be rendered depending on the column type. With this technique the column ouput can be customized for different data types like date/timestamp, numbers or what ever you want.