Java Database Application Library


Get JDAL (Java Database Application Library) at SourceForge.net. Fast, secure and Free Open Source software downloads

JDAL Swing Spring Namespace

Since the version 1.2.1 JDAL Swing supports Spring custom namespace with the intenction of simplify the configuration of the context.

The namespace http://www.jdal.org/schema/swing defines the following elements:



Defaults


The element defaults doesnt have attributes and declares the following beans:



Table


The table elemenent simplifies pageable table definition. Assume the following conventión of names in the beans defined in the context of the application.

It's to say that the beans related with the entity of the name simple Entity are named using the following suffixes:

Attributes

Sub-elements

The table element admits an indeterminable number of column elements to define each one of the columns of the table.



Column

The column element is used for the definition of the columns in the table element or has sub-elements and admits the following elements:



Namespace Declaration


To use the namespace, need to declare it in the beans element in a similar way to the rest of the Spring namespaces.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:swing="http://www.jdal.org/schema/swing"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.jdal.org/schema/swing http://www.jdal.org/schema/jdal/jdal-swing.xsd"
 
        default-init-method="init">
 
    <swing:defaults />
 
    <!-- Project -->
    <swing:table entity="info.joseluismartin.gefa.model.Project" tableService="tableService" >
        <swing:columns>
            <swing:column name="name"        displayName="Name" />
            <swing:column name="customer"    displayName="Customer" />
            <swing:column name="bid"         displayName="Bid" />
            <swing:column name="description" displayName="Description" />
            <swing:column name="amount"      displayName="Amount" />
        </swing:columns>
    </swing:table>  
 
</beans>