You are perfectly right. All my LoadableDetachable models are called again.
Problem is that the cart is a Fragment and it does not get called.

final class CartFragment extends Fragment{
        private static final long serialVersionUID = 1L;
        Cart cart = getCart();
        Translator translator = new Translator( getStore() );
        private Long getAmount(){
                Long amount = new Long( 0 );
                for( CartItem item : cart.getCartItems() ){
                        amount += item.getAmount();
                }
                        
                return amount;
                        
        }
                
        private Float getPrice(){
                float price = 0;
                for( CartItem cartItem : cart.getCartItems() ){
                        Item item = cartItem.getSubItem().getItem();
                        new ItemFormatter( item ).format( getStore() );
                        price += item.getFormattedPrice() * 
cartItem.getAmount();
                }
                        
                return price;
                        
        }
                
        private Float getMemberPrice(){
                float memberPrice = 0;
                for( CartItem cartItem : cart.getCartItems() ){
                        Item item = cartItem.getSubItem().getItem();
                        new ItemFormatter( item ).format( getStore() );
                        memberPrice += item.getFormattedMemberPrice() * 
cartItem.getAmount();
                }
                        
                return memberPrice;
                        
        }
                
        public CartFragment( String panel, String id ){
                super( panel, id, RootPage.this );
                        // ALL labels are added here
                }
        }
}

In my item page I update the cart via Ajax and call updateCart(
AjaxRequestTarget target )
this add a container with the cart fragment

Any tip of getting around this?
-- 
View this message in context: 
http://www.nabble.com/Clone-a-WebPage-tp17468163p17544341.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]

Reply via email to