use of org.apache.wicket.markup.html.panel.Panel in project syncope by apache.
the class ReconciliationWidget method buildExecFragment.
private Fragment buildExecFragment() {
Fragment execFragment = new Fragment("reportResult", "execFragment", this);
execFragment.setOutputMarkupId(true);
Pair<List<ProgressBean>, ReconciliationReport> execResult;
try {
execResult = parseReconciliationReportExec();
} catch (Exception e) {
LOG.error("Could not parse the reconciliation report result", e);
execResult = Pair.of(Collections.<ProgressBean>emptyList(), new ReconciliationReport(new Date()));
}
final List<ProgressBean> progressBeans = execResult.getLeft();
final ReconciliationReport report = execResult.getRight();
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(new ResourceModel("summary")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new ProgressesPanel(panelId, report.getRun(), progressBeans);
}
});
tabs.add(new AbstractTab(Model.of(AnyTypeKind.USER.name())) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new AnysReconciliationPanel(panelId, report.getUsers(), pageRef);
}
});
tabs.add(new AbstractTab(Model.of(AnyTypeKind.GROUP.name())) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new AnysReconciliationPanel(panelId, report.getGroups(), pageRef);
}
});
for (final Anys anys : report.getAnyObjects()) {
tabs.add(new AbstractTab(Model.of(anys.getAnyType())) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new AnysReconciliationPanel(panelId, anys, pageRef);
}
});
}
execFragment.add(new AjaxBootstrapTabbedPanel<>("execResult", tabs));
return execFragment;
}
use of org.apache.wicket.markup.html.panel.Panel in project syncope by apache.
the class JobWidget method buildTabList.
private List<ITab> buildTabList(final PageReference pageRef) {
final List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(new ResourceModel("available")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
availableJobsPanel = new AvailableJobsPanel(panelId, pageRef);
availableJobsPanel.setOutputMarkupId(true);
return availableJobsPanel;
}
});
tabs.add(new AbstractTab(new ResourceModel("recent")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
recentExecPanel = new RecentExecPanel(panelId, pageRef);
recentExecPanel.setOutputMarkupId(true);
return recentExecPanel;
}
});
return tabs;
}
use of org.apache.wicket.markup.html.panel.Panel in project wicket by apache.
the class SimplePageTest method renderHomePage_2a.
/**
* @throws Exception
*/
@Test
public void renderHomePage_2a() throws Exception {
// Render the component without having rendered the page previously
SimplePage page = new SimplePage();
tester.startPage(page);
String document = tester.getLastResponseAsString();
Label label = (Label) page.get("myLabel");
assertNotNull(label);
assertTrue(document.contains("<span wicket:id=\"myLabel\">Test Label</span>"));
Panel panel = (Panel) page.get("myPanel");
assertNotNull(panel);
assertTrue(document.contains("<wicket:panel>Inside the panel<span wicket:id=\"label\">mein Label</span></wicket:panel>"));
label = (Label) page.get("myPanel:label");
assertNotNull(label);
assertTrue(document.contains("<span wicket:id=\"label\">mein Label</span>"));
Border border = (Border) page.get("myBorder");
assertNotNull(border);
assertTrue(document.contains("<wicket:border>before body - <wicket:body>border</wicket:body> - after body</wicket:border>"));
border = (Border) page.get("myBorder2");
assertNotNull(border);
assertTrue(document.contains("<span wicket:id=\"myBorder2\" testAttr=\"myValue\"><wicket:border>before body - <wicket:body>border</wicket:body> - after body</wicket:border></span>"));
// do the same test twice. Igor reported a problem with that, so we have to test it.
border = (Border) page.get("myBorder2");
assertNotNull(border);
assertTrue(document.contains("<span wicket:id=\"myBorder2\" testAttr=\"myValue\"><wicket:border>before body - <wicket:body>border</wicket:body> - after body</wicket:border></span>"));
WebMarkupContainer container = (WebMarkupContainer) page.get("test");
assertNotNull(container);
assertTrue(document.contains("body<span wicket:id=\"myLabel2\">Test Label2</span>"));
label = (Label) page.get("test:myLabel2");
assertNotNull(label);
assertTrue(document.contains("<span wicket:id=\"myLabel2\">Test Label2</span>"));
}
use of org.apache.wicket.markup.html.panel.Panel in project wiquery by WiQuery.
the class SelectableBehaviorTestCase method setUp.
@Override
@Before
public void setUp() {
super.setUp();
selectableBehavior = new SelectableBehavior();
Panel panel = new DivTestPanel("panelId");
WebMarkupContainer component = new WebMarkupContainer("anId");
component.setMarkupId("anId");
component.add(selectableBehavior);
panel.add(component);
tester.startComponentInPage(panel);
}
use of org.apache.wicket.markup.html.panel.Panel in project wiquery by WiQuery.
the class DraggableBehaviorTestCase method setUp.
@Override
@Before
public void setUp() {
super.setUp();
draggableBehavior = new DraggableBehavior();
Panel panel = new DivTestPanel("panelId");
WebMarkupContainer component = new WebMarkupContainer("anId");
component.setMarkupId("anId");
component.add(draggableBehavior);
panel.add(component);
tester.startComponentInPage(panel);
}
Aggregations