use of org.apache.wicket.markup.repeater.RepeatingView in project midpoint by Evolveum.
the class PageAssignmentConflicts method initLayout.
private void initLayout() {
Form mainForm = new Form(ID_MAIN_FORM);
mainForm.setOutputMarkupId(true);
add(mainForm);
RepeatingView conflictsPanel = new RepeatingView(ID_CONFLICTS_PANEL);
conflictsPanel.setOutputMarkupId(true);
List<AssignmentConflictDto> conflicts = getSessionStorage().getRoleCatalog().getConflictsList();
for (AssignmentConflictDto dto : conflicts) {
AssignmentConflictPanel panel = new AssignmentConflictPanel(conflictsPanel.newChildId(), Model.of(dto));
conflictsPanel.add(panel);
}
mainForm.add(conflictsPanel);
AjaxSubmitButton back = new AjaxSubmitButton(ID_BACK, createStringResource("PageAssignmentConflicts.back")) {
@Override
public void onSubmit(AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) {
redirectBack();
}
};
mainForm.add(back);
AjaxSubmitButton submit = new AjaxSubmitButton(ID_SUBMIT, createStringResource("PageAssignmentConflicts.submit")) {
@Override
public void onSubmit(AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) {
redirectBack();
}
};
mainForm.add(submit);
}
use of org.apache.wicket.markup.repeater.RepeatingView in project gitblit by gitblit.
the class BasePage method getBottomScriptContainer.
private RepeatingView getBottomScriptContainer() {
RepeatingView bottomScriptContainer = (RepeatingView) get("bottomScripts");
if (bottomScriptContainer == null) {
bottomScriptContainer = new RepeatingView("bottomScripts");
bottomScriptContainer.setRenderBodyOnly(true);
add(bottomScriptContainer);
}
return bottomScriptContainer;
}
use of org.apache.wicket.markup.repeater.RepeatingView in project gitblit by gitblit.
the class BasePage method addBottomScript.
/**
* Adds a HTML script element loading the javascript designated by the given path.
*
* @param scriptPath
* page-relative path to the Javascript resource; normally starts with "scripts/"
*/
protected void addBottomScript(String scriptPath) {
RepeatingView bottomScripts = getBottomScriptContainer();
Label script = new Label(bottomScripts.newChildId(), "<script type='text/javascript' src='" + urlFor(new JavascriptResourceReference(this.getClass(), scriptPath)) + "'></script>\n");
bottomScripts.add(script.setEscapeModelStrings(false).setRenderBodyOnly(true));
}
use of org.apache.wicket.markup.repeater.RepeatingView in project wiquery by WiQuery.
the class WiQueryTester method getRepeatingView.
public RepeatingView getRepeatingView(String path) {
Page renderedPage = getLastRenderedPage();
assertComponent(path, RepeatingView.class);
RepeatingView rv = (RepeatingView) renderedPage.get(path);
return rv;
}
use of org.apache.wicket.markup.repeater.RepeatingView in project midpoint by Evolveum.
the class TestConnectionMessagesPanel method initLayout.
private void initLayout() {
setOutputMarkupId(true);
WebMarkupContainer messagesPanel = new WebMarkupContainer(ID_MESSAGES_PANEL);
messagesPanel.setOutputMarkupId(true);
add(messagesPanel);
ListView<ConnectorStruct> connectorView = new ListView<ConnectorStruct>(ID_CONNECTOR_MESSAGES_PANEL, connectorResourceResults) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<ConnectorStruct> item) {
Label connectorNameLabel = new Label(ID_CONNECTOR_NAME, item.getModelObject().connectorName);
item.add(connectorNameLabel);
RepeatingView connectorResultView = new RepeatingView(ID_CONNECTOR_MESSAGES);
List<OpResult> resultsDto = item.getModelObject().connectorResultsDto;
if (resultsDto != null) {
initResultsPanel(connectorResultView, resultsDto, parentPage);
}
item.add(connectorResultView);
}
};
messagesPanel.add(connectorView);
RepeatingView resultView = new RepeatingView(ID_RESOURCE_MESSAGES);
if (modelResourceResults.getObject() != null) {
initResultsPanel(resultView, modelResourceResults.getObject(), parentPage);
}
resultView.setOutputMarkupId(true);
messagesPanel.add(resultView);
}
Aggregations