Hi,

On Fri, Apr 20, 2012 at 2:37 PM, khanshan <[email protected]> wrote:
> Hello everyone, I an new on wicket. And I am stucked!!!
>
> I have a tabbed page. and I want to implement for each tab different
> behaviour from database acording to onClick of each tab.
>
> here you can see markup.
> ---------------------
> < div wicket:id="tabs">
> <ul>
> <li> #tabs-1 Tab1 </li>
> <li> #tabs-2 Tab2 </li>
> </ul>
> <div id="tabs-1" wicket:id="first"> ......</div>
> <div id="tabs-2" wicket:id="second"> .....</div>
> < /div>
>
>
>
> and here code.
> ------------------
> TabsWebMarkupContainer tab;
> tab = new TabsWebMarkupContainer("tabs");
>
> tab.setOutputMarkupId(true);
> tab.add(new Link("first") {
>            @Override
>            public void onClick() {
>                System.out.println("first tab");
>            }
>        });
>
> Homeform.add(tab);
> ----------------
>
> What is wrong with that code.
> It should output on console "first tab" when I click first tab isnt it??

Yes, it should.
You are assinging a Link component to a <div>, so Wicket will add
'onclick' attribute to that <div>. See whether there are any
JavaScript errors in the browser console.

>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Tab-onclick-behaviour-tp4573620p4573620.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to