@Override protected IsWidget body(final ApplyContext context) { FlowPanel body = new FlowPanel(); body.add(new HTML(TEMPLATES.errorPanel(Console.CONSTANTS.patch_manager_apply_error_body()))); errorDetails = new ErrorDetails( Console.CONSTANTS.patch_manager_show_details(), Console.CONSTANTS.patch_manager_hide_details()); body.add(errorDetails); body.add( new HTML( "<h3 class=\"patch-followup-header\">" + Console.CONSTANTS.patch_manager_possible_actions() + "</h3>")); HTMLPanel actions = new HTMLPanel( TEMPLATES.appliedFailed( Console.CONSTANTS.patch_manager_apply_error_cancel_title(), Console.CONSTANTS.patch_manager_apply_error_cancel_body(), Console.CONSTANTS.patch_manager_apply_error_select_title(), Console.CONSTANTS.patch_manager_apply_error_select_body())); selectPatch = new DefaultButton(Console.CONSTANTS.patch_manager_select_patch_title()); selectPatch.getElement().setAttribute("style", "min-width:60px;"); selectPatch.addStyleName("primary"); actions.add(selectPatch, "select-different-patch"); body.add(actions); return body; }
@Override protected void onShow(final ApplyContext context) { wizard.grow(); errorDetails.setDetails(context.patchFailedDetails); if (selectPatchHandler == null) { selectPatchHandler = new SelectPatchHandler(); selectPatch.addClickHandler(selectPatchHandler); } selectPatchHandler.context = context; }