Re: Tabs - hovering and clicking
seeing the actual stacktrace would be more helpful... -igor On Tue, Mar 25, 2008 at 8:59 AM, Ryan O'Hara [EMAIL PROTECTED] wrote: Hey, I'm new to Wicket. I'm trying to create a tabbed header, which will load Tab classes when hovered. The tab classes are panels, as well. I tried making hoverMenu a panel, but I was getting some errors about it not finding markup. Any help would be greatly appreciated. Below is a code snippet. Thanks, Ryan public class TabbedHeader extends Panel { private Label hoverMenu; public TabbedHeader(final String panelId){ super(panelId); hoverMenu = new Label(hoverMenu, new Model()); hoverMenu.setOutputMarkupId(true); Link link = new Link(loginLink) { public void onClick(){ setResponsePage(Login.class); } }; add(link); link.add(new Label(login, Login)); link.add(new AjaxEventBehavior(onmouseover) { protected void onEvent(AjaxRequestTarget target){ hoverMenu.setModelObject(LoginTab.class); target.addComponent(hoverMenu); } }); //more tab links below ... } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tabs - hovering and clicking
Sorry, I should've been more clear. The code actually compiles and runs as is (with hoverMenu being of type Label, rather than Panel). When the links are hovered, edu.chop.bic.cnv.ui.LoginTab is displayed. The behavior I'm looking for is for the content of LoginTab to be displayed. This class extends Panel. If you need anything else, please let me know. Thanks again. Ryan On Mar 25, 2008, at 12:55 PM, Igor Vaynberg wrote: seeing the actual stacktrace would be more helpful... -igor On Tue, Mar 25, 2008 at 8:59 AM, Ryan O'Hara [EMAIL PROTECTED] wrote: Hey, I'm new to Wicket. I'm trying to create a tabbed header, which will load Tab classes when hovered. The tab classes are panels, as well. I tried making hoverMenu a panel, but I was getting some errors about it not finding markup. Any help would be greatly appreciated. Below is a code snippet. Thanks, Ryan public class TabbedHeader extends Panel { private Label hoverMenu; public TabbedHeader(final String panelId){ super(panelId); hoverMenu = new Label(hoverMenu, new Model()); hoverMenu.setOutputMarkupId(true); Link link = new Link(loginLink) { public void onClick(){ setResponsePage(Login.class); } }; add(link); link.add(new Label(login, Login)); link.add(new AjaxEventBehavior(onmouseover) { protected void onEvent(AjaxRequestTarget target){ hoverMenu.setModelObject(LoginTab.class); target.addComponent(hoverMenu); } }); //more tab links below ... } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tabs - hovering and clicking
see how TabbedPanel works, what you are building is very similar to that i think. -igor On Tue, Mar 25, 2008 at 10:20 AM, Ryan O'Hara [EMAIL PROTECTED] wrote: Sorry, I should've been more clear. The code actually compiles and runs as is (with hoverMenu being of type Label, rather than Panel). When the links are hovered, edu.chop.bic.cnv.ui.LoginTab is displayed. The behavior I'm looking for is for the content of LoginTab to be displayed. This class extends Panel. If you need anything else, please let me know. Thanks again. Ryan On Mar 25, 2008, at 12:55 PM, Igor Vaynberg wrote: seeing the actual stacktrace would be more helpful... -igor On Tue, Mar 25, 2008 at 8:59 AM, Ryan O'Hara [EMAIL PROTECTED] wrote: Hey, I'm new to Wicket. I'm trying to create a tabbed header, which will load Tab classes when hovered. The tab classes are panels, as well. I tried making hoverMenu a panel, but I was getting some errors about it not finding markup. Any help would be greatly appreciated. Below is a code snippet. Thanks, Ryan public class TabbedHeader extends Panel { private Label hoverMenu; public TabbedHeader(final String panelId){ super(panelId); hoverMenu = new Label(hoverMenu, new Model()); hoverMenu.setOutputMarkupId(true); Link link = new Link(loginLink) { public void onClick(){ setResponsePage(Login.class); } }; add(link); link.add(new Label(login, Login)); link.add(new AjaxEventBehavior(onmouseover) { protected void onEvent(AjaxRequestTarget target){ hoverMenu.setModelObject(LoginTab.class); target.addComponent(hoverMenu); } }); //more tab links below ... } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]