beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers" <>
Subject Re: How to add default text to datagrid
Date Tue, 13 Nov 2007 20:49:59 GMT
Hi Paul,

One possible solution would be to use JSTL and test the data size.
Between the header and footer you could put your markup within the
following tags...

    <c:if test="${dataGrid.dataSet.size > 0}">

Otherwise, I think it would have to be a custom pager that is
configured using...

    <netui-data:configurePager pagerRendererClass="" ...>

Looking at the implementation of the NetUI datagrid class,
PagerRenderer, it's noDataRender() method returns a string from the
datagrid.msg.nodata message from the
file in the beehive-netui-tags.jar. There are no config options that
I'm aware of to change this message specifically so either the
property file in that jar would need to be modified or you could
implement a custom pager. The custom class would extend an existing
NetUI PagerRenderer such as the PreviousNextPagerRenderer class and
just need to override the noDataRender() method.

Maybe others on this list have some creative solutions.

Good luck,

On 11/13/07, Gorbas, Paul H [IT] <> wrote:
> Sorry, I am grasping at straws here to come up with what *should* be a
> simple solution to a common issue, but I can find a tech reference which
> covers this area.
> When you are using the netui:datagrid control, how do you set the
> default message which displays when the data set is null or empty?
> So if a DataGrid with data displays like this:
> *       HEDADER
> *       <repeat start>
> *               data rows....
> *       <repeat end>
> *       FOOTER
> That is instead of my empty datagrid just displaying:
> *       HEDADER
> *       FOOTER
> It would instead displays something like:
> *       HEDADER
> *               No data to be displayed.
> *       FOOTER
> I would like to avoid having to implement a custom pager class to
> provide this basic functionality.
> Thanks in advance.  If there is a link to a resource I do not know about
> for this type of information I would also appreciate getting it.
> -Paul Gorbas

View raw message