use of org.apache.wicket.markup.html.panel.Fragment in project sandbox by irof.
the class FragmentSamplePage method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
// 同じフラグメントを2回入れる
Fragment fragment1 = new Fragment("target1", "myFragment", this);
fragment1.add(new Label("message", "hoge"));
add(fragment1);
Fragment fragment2 = new Fragment("target2", "myFragment", this);
fragment2.add(new Label("message", "fuga"));
add(fragment2);
}
use of org.apache.wicket.markup.html.panel.Fragment in project syncope by apache.
the class AbstractFieldPanel method addRequiredLabel.
public AbstractFieldPanel<T> addRequiredLabel() {
if (!isRequired()) {
setRequired(true);
}
final Fragment fragment = new Fragment("required", "requiredFragment", this);
fragment.add(new Label("requiredLabel", "*"));
replace(fragment);
this.isRequiredLabelAdded = true;
return this;
}
use of org.apache.wicket.markup.html.panel.Fragment in project syncope by apache.
the class TopologyTogglePanel method getSyncopeFragment.
private Fragment getSyncopeFragment(final PageReference pageRef) {
Fragment fragment = new Fragment("actions", "syncopeActions", this);
AjaxLink<String> reload = new IndicatingOnConfirmAjaxLink<String>("reload", "connectors.confirm.reload", true) {
private static final long serialVersionUID = -2075933173666007020L;
@Override
public void onClick(final AjaxRequestTarget target) {
try {
connectorRestClient.reload();
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
} catch (Exception e) {
LOG.error("While reloading all connectors", e);
SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
}
((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
};
fragment.add(reload);
MetaDataRoleAuthorizationStrategy.authorize(reload, RENDER, StandardEntitlement.CONNECTOR_RELOAD);
AjaxLink<String> tasks = new IndicatingAjaxLink<String>("tasks") {
private static final long serialVersionUID = 3776750333491622263L;
@Override
public void onClick(final AjaxRequestTarget target) {
target.add(schedTaskModal.setContent(new SchedTasks(schedTaskModal, pageRef)));
schedTaskModal.header(new ResourceModel("task.custom.list"));
schedTaskModal.show(true);
}
@Override
public String getAjaxIndicatorMarkupId() {
return Constants.VEIL_INDICATOR_MARKUP_ID;
}
};
fragment.add(tasks);
MetaDataRoleAuthorizationStrategy.authorize(tasks, RENDER, StandardEntitlement.TASK_LIST);
return fragment;
}
use of org.apache.wicket.markup.html.panel.Fragment in project syncope by apache.
the class AbstractMultiPanel method getDataFragment.
private Fragment getDataFragment() {
final Fragment contentFragment = new Fragment("content", "dataFragment", AbstractMultiPanel.this);
contentFragment.add(view.setOutputMarkupId(true));
return contentFragment;
}
use of org.apache.wicket.markup.html.panel.Fragment in project syncope by apache.
the class AbstractMultiPanel method getNoDataFragment.
private Fragment getNoDataFragment(final IModel<List<INNER>> model, final String label) {
final Fragment fragment = new Fragment("content", "noDataFragment", AbstractMultiPanel.this);
fragment.add(new Label("field-label", new ResourceModel(label, label)));
fragment.add(getPlusFragment(model, label));
return fragment;
}
Aggregations