Hey I managed to answer my own question. Sweet.

If you change the "Change Ad" link component to an AjaxLink and then
implement this onClick instead you don't end up with a non-bookmarkable url
where once you had one.

public void onClick(AjaxRequestTarget target) {
                if (currentBanner.getClass() == Banner1.class)
                                {
                                     currentBanner = new Banner2("ad");
                                      currentBanner.setOutputMarkupId(true);    
  
                                        
TemplatePage.this.replace(currentBanner);
                                }
                                else
                                {
                                         currentBanner = new Banner1("ad");
                                      currentBanner.setOutputMarkupId(true);  
                                        
TemplatePage.this.replace(currentBanner);
                                }
                 target.addComponent (currentBanner);
            }

However is the non-Ajax link behaviour expected upon a Panel change within
the page? Since the page was obtained via a bookmarkable link do I HAVE to
use an AjaxLink if I want it to remain with  a bookmarkable URL?

Cheers
Nick 
-- 
View this message in context: 
http://www.nabble.com/Template-Page-and-the-URLs-tf4946247.html#a14163023
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to