column

Description: A group of Grid columns with a common grouping title.

JavaDoc: Click here

Body content: A set of Grid columns.

Attributes:

Name Description Data type Required Default value
title The title for the column String No The attribute name interpreted as camel case. (i.e. "someAttribute" would become "Some Attribute")
width Specify the width of the column. Integer No Auto

Examples:

View - JSP file

<dif:document>
    <dif:grid id="grid" title="Grid Sample" data="${stage.services}"
        noDataMessage="No services exist!" groupColumn="providerName">
        <dif:column attribute="providerName" />
        <dif:column attribute="applicationName" />
        <dif:column attribute="ID" title="ID" />
        <dif:column attribute="name" />
        <dif:columnGroup title="Attributes" width="250">
            <dif:column attribute="stageCount" />
            <dif:column attribute="registered" sortable="false" />
        </dif:columnGroup>
    </dif:grid>
</dif:document>

Stage - Class file

public class SomeStage {

    (...)

    @ProviderList
    List<IProvider> providers;

    public List<ServiceRecord> getServices() {
        List<ServiceRecord> services = new ArrayList<ServiceRecord>();

        for (IProvider provider: providers)
            for (IApplication application: provider.getApplications().values())
                for (IService service: application.getServices().values())
                        services.add(new ServiceRecord(service));

        return services;
    }
}

Screenshots:

Grid component sample

See also:

Back to tag reference