http://google.com/search?q=wicket+ajax+visible
On Sat, Jul 12, 2008 at 12:44 AM, vishy_sb <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have a page where I have put an AjaxFallBackButton() and also have a Panel > on it. I want to make the panel visible or invisible by clicking the button. > Kindly refer to the code below: > > //Code for the TestPage > public TestPage() { > Form form = new Form("form"); > add(form); > button = new AjaxFallbackButton("button", form) { > private static final long serialVersionUID = 1L; > > @Override > protected void onSubmit(AjaxRequestTarget target, Form > form) { > target.addComponent(testPanel); > testPanel.setVisible(!testPanel.isVisible()); > } > }; > form.add(button); > testPanel = new TestPanel("testPanel"); > form.add(testPanel); > testPanel.setOutputMarkupId(true); > } > > //Code for the Panel > public TestPanel(String id) { > super(id); > add(new Label("testPanel", "Testing New Panel")); > } > > The problem is that when I click the button, the Panel becomes invisible. > However when I click it again the panel doesn't show up until or unless the > entire page is refreshed. I am newbie to Wicket and I know I am making a > basic mistake but I havn't been able to figure this out. Kindly let me know > where I am going wrong. Thank in advance!!! > > vishy > -- > View this message in context: > http://www.nabble.com/Problem-making-Panel-visible-using-AJAX-tp18413807p18413807.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]