Not to confuse this issue even more, but I had a copy / paste error
in that last mail.  The code to disable default pager rendering:

  <netui-data:configurePager disableDefaultPager="false"/>

should have been:

  <netui-data:configurePager disableDefaultPager="true"/>

  My apologies!

Eddie


On Nov 20, 2007 10:18 AM, Eddie O'Neil <[EMAIL PROTECTED]> wrote:
> Paul--
>
>   If I'm understanding your question correctly, you're just trying to
> get _some_ message displayed that says that there's no data.  Correct?
>
>   Assuming that, the "no data" message is rendered by the data grid's
> pager which is responsible for displaying status information about the
> size of the data set.  In order for this to work, however, the pager
> must render either:
>
> - Automatically.  By default, the pager renders before the opening
> <table> tag.  If the data set is empty, this is where the "no data"
> message would appear.
> - Manually.  In order to precisely control the location of the pager,
> automatic rendering is disabled by setting
>
>     <netui-data:configurePager disableDefaultPager="false"/>
>
> In this case, the <netui-data:renderPager/> tag must be used to render
> the pager somewhere inside the body of the <dataGrid> tag.
>
>   Back to the original question about changing the message, there are
> a variety of ways to do this; the simplest is to add this to the body
> of the <dataGrid> tag:
>
>     <netui:behavior facet="resource" name="datagrid.msg.nodata"
> value="Nothing to see here."/>
>
> This will change the behavior of the data grid by setting a new
> message to display when there's no data.  If you need full i18n
> capability, take a look at the <dataGrid>'s resourceBundlePath
> attribute, which supports creating .properties files for all messages
> rendered by the grid.
>
>   Hope that helps.
>
> Eddie
>
>
>
>
> On Nov 13, 2007 4:28 PM, Carlin Rogers <[EMAIL PROTECTED]> wrote:
> > Hi Paul,
> >
> > Sorry, I thought you were trying to change or remove the message. The
> > actual String that is rendered from the default noDataRender() method
> > is very close to what you had in your email, "No data to display".
> >
> > Do you have a simple repro or a fragment of the JSP you can share?
> > Maybe someone on the list will be able to identify why the data grid
> > in your page has a null body.
> >
> > Carlin
> >
> > On 11/13/07, Gorbas, Paul H [IT] <[EMAIL PROTECTED]> wrote:
> >
> > > Thanks for the suggestions Carlin, I will follow up on them.
> > >
> > > One thing I should point out is I don't particularly care about the
> > > exact content of the "no data" message is, my code is not displaying
> > > anything (That is I get a header and footer but null body) - so that
> > > default behavior you mentioned of the noDataRender() method for some
> > > reason not working in my code ( Or it is working, but it is displaying a
> > > null or empty string. )
> > >
> > >
> > > -Paul G.
> > >
> > > -----Original Message-----
> > > From: Carlin Rogers [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, November 13, 2007 2:50 PM
> > > To: Beehive Users
> > > Subject: Re: How to add default text to datagrid
> > >
> > > 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}">
> > >         ...
> > >     </c:if>
> > >
> > >
> > > Otherwise, I think it would have to be a custom pager that is configured
> > > using...
> > >
> > >     <netui-data:configurePager pagerRendererClass="com.you.className"
> > > ...>
> > >
> > > 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
> > > org/apache/beehive/netui/databinding/datagrid/runtime/util/data-grid-def
> > > ault.properties
> > > 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,
> > > Carlin
> > >
> > >
> >
>

Reply via email to