Hi, I'm following the Cheesr examples in the "Wicket in Action" book and have met a problem when ajaxifying it.
I have Index.java that displays a shopping cart from a custom shopping cart panel (ShoppingCartPanel.java). This custom panel has a remove link for each item, and clicking this removes the item from the list using Ajax. In Index.java I also have a Checkout button that is set to visible when there's items in the shopping cart. I need to refresh this component also using Ajax when I press the remove link in the shopping cart panel, so that it is hidden when the cart is empty. How do I update this component from my custom shopping cart panel? Do I have to make the Checkout button a public variable and refresh it using target.addComponent(Index.checkout) in ShoppingCartPanel.java, or is there an easier and more elegant way to do this? Index.java - http://pastebin.com/m76c0eb71 ShoppingCartPanel.java - http://pastebin.com/m70f20055 Regards, Magnus
