public TopPlugin(final IPluginContext context, final IPluginConfig config) { super(context, config); final WebMarkupContainer logo = new WebMarkupContainer("logo"); logo.add(TitleAttribute.set("Hippo Release Version: " + SYSTEM_INFO.getReleaseVersion())); add(logo); final WebComponent toolbar = new WebComponent(BAR_STYLES); final String style = obtainBreadcrumbStyle(config); if (StringUtils.isNotBlank(style)) { toolbar.add(AttributeModifier.replace("style", style)); } add(toolbar); }
/** * Adds components. */ private final void initComps() { WebComponent meta = new WebComponent("meta"); PageParameters parameters = new PageParameters(); parameters.put("cto", continueTo); CharSequence url = urlFor(new BookmarkablePageRequestTarget(BrowserInfoPage.class, parameters)); meta.add(new AttributeModifier("content", true, new Model<String>("0; url=" + url))); add(meta); WebMarkupContainer link = new WebMarkupContainer("link"); link.add(new AttributeModifier("href", true, new Model<Serializable>((Serializable)url))); add(link); add(new BrowserInfoForm("postback") { private static final long serialVersionUID = 1L; /** * @see org.apache.wicket.markup.html.pages.BrowserInfoForm#afterSubmit() */ @Override protected void afterSubmit() { continueToPrevious(); } }); }
/** * Adds components. */ private final void initComps() { WebComponent meta = new WebComponent("meta"); PageParameters parameters = new PageParameters(); parameters.put("cto", continueTo); CharSequence url = urlFor(new BookmarkablePageRequestTarget(BrowserInfoPage.class, parameters)); meta.add(new AttributeModifier("content", true, new Model("0; url=" + url))); add(meta); WebMarkupContainer link = new WebMarkupContainer("link"); link.add(new AttributeModifier("href", true, new Model((Serializable)url))); add(link); add(new BrowserInfoForm("postback") { private static final long serialVersionUID = 1L; /** * @see org.apache.wicket.markup.html.pages.BrowserInfoForm#afterSubmit() */ protected void afterSubmit() { continueToPrevious(); } }); }
public ProgressPanel(String id, ProgressionModel model) { super(id, model); this.model = model; feedbackPanel = new CustomFeedbackPanel("feedbackPanel"); //$NON-NLS-1$ add(feedbackPanel); container = new WebMarkupContainer("container"); //$NON-NLS-1$ add(container); WebComponent bar = new WebComponent("bar"); //$NON-NLS-1$ bar.add(new AttributeModifier("style", getWidthModel(model))); //$NON-NLS-1$ container.add(bar); Label taskname = new Label("taskname", getTaskNameModel(model)); //$NON-NLS-1$ container.add(taskname); Label subtask = new Label("subtask", getSubTaskModel(model)); //$NON-NLS-1$ container.add(subtask); setVisible(false); container.add(new AjaxLink<Void>("cancel") { private static final long serialVersionUID = 3623515953111747368L; @Override public void onClick(AjaxRequestTarget target) { Activator.getDefault().getProgressService().cancel(ProgressPanel.this.model.getId()); } }); }
private void addImageHistoryFLow() { WebComponent imageHistFlow; if (requirementPK != null) { String classCss = " col-md-12 "; FlowInstance flowInstance = requirementService.getRequirement(requirementPK).getFlowInstance(); flowInstance.getTasksOlderFirst(); if (flowInstance.getFlowDefinition().getFlowMap().getAllTasks().size() <= QUANTIDADE_MAX_TAKS_TO_MIDDLE_SIZE) { classCss = " col-md-6 col-md-offset-3 "; } byte[] bytes = generateHistImage(flowInstance); DynamicImageResource imageResource = new DynamicImageResource() { @Override protected byte[] getImageData(IResource.Attributes attributes) { return bytes; } }; imageHistFlow = new Image("imageHist", imageResource); imageHistFlow.setVisible(bytes.length != 0); imageHistFlow.add(new AttributeAppender("class", classCss)); } else { imageHistFlow = new WebComponent("imageHist"); imageHistFlow.setVisible(false); } add(imageHistFlow); }