You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "chathuraka.waas" <ch...@gmail.com> on 2014/04/09 07:56:45 UTC

Customized Navigation Toolbar not getting added to the table.

hi,

i'm trying to add a navigation bar to my table. but its not getting
displayed. I have a customized data table and i'm trying to add my
customized navigation bar to it.  Here's my code. Please note this
NavigationToolbar class is not the one in API. 

in Customized tabel. 

addBottomToolbar(new NavigationToolbar(this));

customized navigation bar. 

public class NavigationToolbar extends AbstractToolbar {
	private static final long serialVersionUID = 6646820801010951840L;

	public NavigationToolbar(final DataTable<?,Object> table) {
		super(table);
		add(new NavigatorLabel("navigatorLabel", table));
		add(new Navigator("navigator", (DataTable<?,Object>) table) {
			private static final long serialVersionUID = 1541054336938996456L;

			@Override
			protected void onAjaxEvent(AjaxRequestTarget target) {
				target.add(table);
	}
}

<wicket:panel xmlns:wicket="http://wicket.apache.org/">
	<div class="fan-nav">
		1-3 of 3
		 
	</div>
</wicket:panel>

what am i doing wrong here. 

Thanks in advance. 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized Navigation Toolbar not getting added to the table.

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
I feel like having a deja vu


On Wed, Apr 9, 2014 at 8:37 AM, Martin Grigorov <mg...@apache.org>wrote:

> OK.
> Now fix it as I suggested - try with <tr><td>...</td></tr>.
> You cannot put a <div> directly in <table>.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Wed, Apr 9, 2014 at 9:33 AM, chathuraka.waas
> <ch...@gmail.com>wrote:
>
> > Hi Martin,
> >
> > my markup in the customizedtable.html is like this,
> >
> > <div class="bottom-toolbar">
> >                 <wicket:container wicket:id="bottomToolbars"
> > class="fan-nav"></wicket:container>
> > </div>
> >
> >
> > but in runtime it doesnt create any markup. when i inspected with firebug
> > it
> > shows as,
> >
> > <div class="bottom-toolbar">
> >
> > </div>
> >
> > regards,
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297p4665299.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Customized Navigation Toolbar not getting added to the table.

Posted by "chathuraka.waas" <ch...@gmail.com>.
Hi,

was able to resolve the issue by adding following markup. 

<tfoot wicket:id="bottomToolbars">
                    <wicket:container
wicket:id="toolbars"></wicket:container>
</tfoot>


			
			<div wicket:id="navigator">First | Previous |  Next
<NavigationToolbar.html#>   |  Last <NavigationToolbar.html#>  </div>
                        <div
wicket:id="navigatorLabel">[navigator-label]</div>
                
	


Thanks for all the help guys. 

Regards, 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297p4665326.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized Navigation Toolbar not getting added to the table.

Posted by "chathuraka.waas" <ch...@gmail.com>.
Hi Martin,

Thanks for your advices and help on this matter. as you suggessted i added
the following markup. 


                
                 

                    <wicket:container
wicket:id="topToolbars"></wicket:container>
                                                        
                
                    

                        	
                            [cell]
                        
                    
                
                

                    	
                        <div class="bottom-toolbar">
                            <wicket:container wicket:id="bottomToolbars"
class="fan-nav"></wicket:container>
                        </div>
                    
                
            


but it still doesnt work. this is what i get it in run time for the
bottom-toolbar. 




<div class="bottom-toolbar"> </div>





and i also noticed that top toolbar also doesnt get added. im' using this
code to add the table row header values. 

addTopToolbar(new AjaxFallbackHeadersToolbar(this, dataProvider));

i'm not sure where has i got it wrong. 

Regards, 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297p4665310.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized Navigation Toolbar not getting added to the table.

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

I recommend you to read a book on HTML. It will save you a lot of time in
the future.

Ernesto's deja vu is this mail thread -
http://markmail.org/message/4xkyroiyqt6l4thg. Here you have problems with
what HTML is needed to construct an HTML table that a browser will render
properly. Please re-read it.

Don't put <tfoot> in your markup. Just wrap the initial markup (the one
with the <div>) with <tr><td> [HERE IS THE DIV] </td></tr>.

Martin Grigorov
Wicket Training and Consulting


On Wed, Apr 9, 2014 at 9:48 AM, chathuraka.waas
<ch...@gmail.com>wrote:

> hi martin,
>
> updated the markup as u mentioned,
>
> <tfoot>
>
>
>
>
>
> </tfoot>
>
> but its still not working. its generating the following,
>
> <tfoot>
>
>
>
>
> </tfoot>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297p4665303.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Customized Navigation Toolbar not getting added to the table.

Posted by "chathuraka.waas" <ch...@gmail.com>.
hi martin,

updated the markup as u mentioned, 

<tfoot>
                    

                        	
                        
                    
</tfoot>

but its still not working. its generating the following, 

<tfoot>
           

                	 
          
</tfoot>

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297p4665303.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized Navigation Toolbar not getting added to the table.

Posted by Martin Grigorov <mg...@apache.org>.
OK.
Now fix it as I suggested - try with <tr><td>...</td></tr>.
You cannot put a <div> directly in <table>.

Martin Grigorov
Wicket Training and Consulting


On Wed, Apr 9, 2014 at 9:33 AM, chathuraka.waas
<ch...@gmail.com>wrote:

> Hi Martin,
>
> my markup in the customizedtable.html is like this,
>
> <div class="bottom-toolbar">
>                 <wicket:container wicket:id="bottomToolbars"
> class="fan-nav"></wicket:container>
> </div>
>
>
> but in runtime it doesnt create any markup. when i inspected with firebug
> it
> shows as,
>
> <div class="bottom-toolbar">
>
> </div>
>
> regards,
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297p4665299.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Customized Navigation Toolbar not getting added to the table.

Posted by "chathuraka.waas" <ch...@gmail.com>.
Hi Martin,

my markup in the customizedtable.html is like this, 

<div class="bottom-toolbar">
                <wicket:container wicket:id="bottomToolbars"
class="fan-nav"></wicket:container>
</div>


but in runtime it doesnt create any markup. when i inspected with firebug it
shows as, 

<div class="bottom-toolbar">
             
</div>

regards,

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297p4665299.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Customized Navigation Toolbar not getting added to the table.

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Check the produced markup.


On Wed, Apr 9, 2014 at 8:56 AM, chathuraka.waas
<ch...@gmail.com>wrote:

> hi,
>
> i'm trying to add a navigation bar to my table. but its not getting
> displayed. I have a customized data table and i'm trying to add my
> customized navigation bar to it.  Here's my code. Please note this
> NavigationToolbar class is not the one in API.
>
> in Customized tabel.
>
> addBottomToolbar(new NavigationToolbar(this));
>
> customized navigation bar.
>
> public class NavigationToolbar extends AbstractToolbar {
>         private static final long serialVersionUID = 6646820801010951840L;
>
>         public NavigationToolbar(final DataTable<?,Object> table) {
>                 super(table);
>                 add(new NavigatorLabel("navigatorLabel", table));
>                 add(new Navigator("navigator", (DataTable<?,Object>)
> table) {
>                         private static final long serialVersionUID =
> 1541054336938996456L;
>
>                         @Override
>                         protected void onAjaxEvent(AjaxRequestTarget
> target) {
>                                 target.add(table);
>         }
> }
>
> <wicket:panel xmlns:wicket="http://wicket.apache.org/">
>         <div class="fan-nav">
>

The toolbars are table rows either in the <thead> or the <tfoot>.
In both cases they have to use <tr> as the root/main HTML element, not
<div> as you do.



>                 1-3 of 3
>
>         </div>
> </wicket:panel>
>
> what am i doing wrong here.
>
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Customized-Navigation-Toolbar-not-getting-added-to-the-table-tp4665297.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>