Hello, 

the panel with detachable model is not refreshing after model has changed.
kindly check the code please.

the panel - ActivityPanel is not refreshing after I press link and status of
the DetachableTcktModel is changed.

public LoansTabPanel(String id, int ticketId) {
            super(id);            
            setModel(new CompoundPropertyModel(new
DetachableTcktModel(ticketId)));
            getMenu();            
            getFullContent();
}

public void getFullContent() {            

            //when ticket was not authorized "sendToAuth" link is visible
            add(new ActivityPanel("activityPanel", getModel()));   
        }

..........

public ActivityPanel(String id, IModel model) {
        super(id, model);       
        tck = (Ticket) getModelObject(); 

        lnkSendToAuth = new Link("sendToAuth") {

            public void onClick() {
           /**
             *after ticket is authorized link "sendToAuth" is disabled 
             * BUT THIS IS NOT WORKING AUTOMATICALLY, 
             * I have to reopen the page. NOT EVEN REFRESH IS HELPING */

                tck.sendToAuthorization(true);  
                info("Ticket was sent to authorization.");
            }
        };
        add(lnkSendToAuth);

}
.... 
public DetachableTcktModel(int ticketID) {
    this.ticketId = ticketID;
}

protected Object load() {
        tck = findTicket(ticketId);
        return tck;
}

public void detach() {
        tck = null;
    }

.....


Any advice what I am doing wrong I would appreciate.

Thanks, Lenka

-- 
View this message in context: 
http://www.nabble.com/refresh-page-with-detachable-model---not-working-tp19608631p19608631.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