container.add(fragment);
if (mode == UserModalPage.Mode.ADMIN) {
// add Syncope propagation status
PropagationTO syncope = new PropagationTO();
syncope.setResourceName("Syncope");
syncope.setStatus(PropagationTaskExecStatus.SUCCESS);
List<PropagationTO> propagations = new ArrayList<PropagationTO>();
propagations.add(syncope);
propagations.addAll(userTO.getPropagationTOs());
fragment.add(new Label("userInfo", userTO.getUsername() != null
? userTO.getUsername()
: String.valueOf(userTO.getId())));
final ListView<PropagationTO> propRes = new ListView<PropagationTO>("resources", propagations) {
private static final long serialVersionUID = -1020475259727720708L;
@Override
protected void populateItem(final ListItem item) {
final PropagationTO propTO = (PropagationTO) item.getDefaultModelObject();
final ListView attributes = getConnObjectView(propTO);
final Fragment attrhead;
if (attributes.getModelObject() != null && !attributes.getModelObject().isEmpty()) {
attrhead = new Fragment("attrhead", "attrHeadFrag", panel);
} else {
attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", panel);
}
item.add(attrhead);
item.add(attributes);
attrhead.add(new Label("resource", propTO.getResourceName()));
attrhead.add(new Label("propagation", propTO.getStatus() != null
? propTO.getStatus().toString()
: "UNDEFINED"));
final Image image;
final String alt, title;
switch (propTO.getStatus()) {
case SUCCESS:
case SUBMITTED:
case CREATED:
image = new Image("icon", "statuses/active.png");
alt = "success icon";