Hi Alex,
We had a similar situation.
We want a bottom toolbar that has a drop down for selection of number of
rows in a page.
After a while another requirement was added: add links that open a popup
window to change columns in the table and another one to open a popup for
filtering the table.
I wanted to add them both to the bottom toolbar.
As Igor said, we use addBottomToolbar.
Our table inherits from DataTable (not DefaultDataTable) because we changed
also the top toolbars.
Here's the code in the customized data table:
addBottomToolbar(new NoRecordsToolbar(this));
addBottomToolbar(new CustomizedBottomTableToolbar(this, rowsPerPage,
popupWindowsModel, showSelectRecordsPerPage));
The NoRecordToolbar is from Wicket.
CustomizedBottomToolbar inherits from AbstractToolbar.
Here's the HTML for the toolbar, the java code is normal with no special
features:
<wicket:panel>
<tr>
<td wicket:id="span" class="select-number-records"><span
style="float: left; vertical-align: bottom;"> <span
wicket:id="modalsLinksList"> <a href="#"
wicket:id="modalLink"><span
wicket:id="modalText">[Link Text]</span></a> </span> </span>
<label
wicket:id="pagingLabel"> </label> <select
wicket:id="pagingSelect">
</select></td>
</tr>
</wicket:panel>
Hope that helps.
Eyal Golan
[EMAIL PROTECTED]
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
P Save a tree. Please don't print this e-mail unless it's really necessary
On Fri, Nov 21, 2008 at 5:49 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
> see #addbottomtoolbar()
>
> -igor
>
> On Fri, Nov 21, 2008 at 2:57 AM, Alex Parvulescu
> <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > i have a question about the toolbars in the DataTable component.
> >
> > my use case is this : i want to embed a small editor in a bottom
> toolbar.Its
> > a simple ok / cancel panel.
> >
> > I see that there no access to the 'bottomToolbars' variable in the
> DataTable
> > its private and final and has no accessors.
> >
> > Plus theres no way i can replace a toolbar, if i try
> > table.get(DataTable.TOOLBAR_COMPONENT_ID) the result is null,
> > another approach is table.replace(new EditToolbar(table)); - which
> outputs
> > an error: org.apache.wicket.WicketRuntimeException: Cannot replace a
> > component which has not been added: id='toolbar'...
> >
> > My guess is that this is because of the DataTable#addToolbar method:
> > toolbar.setRenderBodyOnly(true); ..
> >
> > I have no workaround for this , except to drop the toolbars and start new
> > with some panels.
> >
> > My question is if theres a reason toolbars are hidden away from the user,
> > theres no clear way of working with them, except to initialise, and them
> let
> > them be.
> >
> >
> > btw i am using wicket 1.3.4
> >
> > thanks,
> >
> > Alex
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>