import javax.jcr.Value;
import org.argeo.ArgeoException;
-import org.argeo.cms.CmsException;
import org.argeo.cms.CmsTypes;
import org.argeo.cms.CmsUiProvider;
import org.argeo.cms.text.Img;
private final static String BROWSE_PREFIX = "browse#";
private final static int THUMBNAIL_WIDTH = 400;
private final static int COLUMN_WIDTH = 160;
- private DateFormat timeFormatter = new SimpleDateFormat("dd-MM-yyyy', 'HH:mm");
-
+ private DateFormat timeFormatter = new SimpleDateFormat(
+ "dd-MM-yyyy', 'HH:mm");
// keep a cache of the opened nodes
// Key is the path
public Control createUi(Composite parent, Node context)
throws RepositoryException {
if (context == null)
- throw new CmsException("Context cannot be null");
+ // return null;
+ throw new CmsException("Context cannot be null");
GridLayout layout = CmsUtils.noSpaceGridLayout();
layout.numColumns = 2;
parent.setLayout(layout);
boolean leaveOpened = path.startsWith(currNodePath);
// workaround for same name siblings
- // fix me weird side effect when we go left or click on anb already selected, unfocused node
+ // fix me weird side effect when we go left or click on anb
+ // already selected, unfocused node
if (leaveOpened
&& (path.lastIndexOf("/") == 0
&& currNodePath.lastIndexOf("/") == 0 || JcrUtils
} else if (e.keyCode == SWT.ARROW_LEFT) {
try {
selected = getNode().getParent();
- String newPath = selected.getPath(); //getNode().getParent()
+ String newPath = selected.getPath(); // getNode().getParent()
setEdited(selected);
if (browserCols.containsKey(newPath))
browserCols.get(newPath).setFocus();
// header
Label header = new Label(body, SWT.NONE);
- header.setText(" General");
+ header.setText(" Main user information");
header.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2,
1));
CmsUtils.style(header, UserStyles.USER_FORM_TITLE);
// Change password link
// header
header = new Label(body, SWT.NONE);
- header.setText(" Change password");
+ header.setText(" Reset password");
header.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2,
1));
CmsUtils.style(header, UserStyles.USER_FORM_TITLE);
}
}
- /* DEPENDENCY INJECTION */
- // public void setUserDetailsManager(UserDetailsManager userDetailsManager)
- // {
- // this.userDetailsManager = userDetailsManager;
- // }
-
public void setUserAdminService(UserAdminService userAdminService) {
this.userAdminService = userAdminService;
}
final Button addBtn = new Button(buttonCmp, SWT.PUSH);
addBtn.setText("Create");
+ Composite bottomCmp = new Composite(parent, SWT.NO_FOCUS);
+ bottomCmp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+ bottomCmp.setLayout(new GridLayout());
+
+
// Create the composite that displays the list and a filter
- final UsersTable userTableCmp = new UsersTable(parent, SWT.BORDER,
+ final UsersTable userTableCmp = new UsersTable(bottomCmp, SWT.BORDER,
session);
userTableCmp.populate(true, false);
userTableCmp.setLayoutData(CmsUtils.fillAll());