Java Code Examples for org.apache.wicket.markup.html.WebMarkupContainer.replace()

The following are Jave code examples for showing how to use replace() of the org.apache.wicket.markup.html.WebMarkupContainer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: engerek   File: AsyncDashboardPanel.java   Source Code and License Vote up 5 votes
@Override
protected void onPostSuccess(AjaxRequestTarget target) {
    WebMarkupContainer dashboardContent = getDashboardContent();
    dashboardContent.replace(getMainComponent(ID_CONTENT));

    PageBase page = (PageBase) getPage();
    showResultIfError(page);

    target.add(this, page.getFeedbackPanel());
}
 
Example 2
Project: engerek   File: AsyncDashboardPanel.java   Source Code and License Vote up 5 votes
@Override
protected void onUpdateError(AjaxRequestTarget target, Exception ex) {
    String message = "Error occurred while fetching data: " + ex.getMessage();
    Label errorLabel = new Label(ID_CONTENT, message);
    WebMarkupContainer dashboardContent = getDashboardContent();
    dashboardContent.replace(errorLabel);

    PageBase page = (PageBase) getPage();
    showResultIfError(page);

    target.add(this, page.getFeedbackPanel());
}