import org.argeo.cms.ui.CmsView;
import org.argeo.eclipse.ui.Selected;
import org.argeo.eclipse.ui.specific.EclipseUiSpecificUtils;
+import org.argeo.jcr.JcrException;
import org.argeo.jcr.JcrUtils;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.rap.rwt.service.ResourceManager;
/*
* ROW LAYOUT
*/
- /** @return the same layout, with space and margins removed. */
- public static RowLayout noSpaceRowLayout(RowLayout rowLayout) {
+ /** @return the same layout, with margins removed. */
+ public static RowLayout noMarginsRowLayout(RowLayout rowLayout) {
rowLayout.marginTop = 0;
rowLayout.marginBottom = 0;
rowLayout.marginLeft = 0;
rowLayout.marginRight = 0;
- rowLayout.spacing = 0;
return rowLayout;
}
- public static RowLayout noSpaceRowLayout(int type) {
- return noSpaceRowLayout(new RowLayout(type));
+ public static RowLayout noMarginsRowLayout(int type) {
+ return noMarginsRowLayout(new RowLayout(type));
}
public static RowData rowData16px() {
}
public static String img(String serverBase, Node fileNode, String width, String height) {
- String src = (serverBase != null ? serverBase : "") + NodeUtils.getDataPath(fileNode);
+// String src = (serverBase != null ? serverBase : "") + NodeUtils.getDataPath(fileNode);
+ String src;
+ try {
+ src = (serverBase != null ? serverBase : "") + getDataPathForUrl(fileNode);
+ } catch (RepositoryException e) {
+ throw new JcrException("Cannot get URL data path for " + fileNode, e);
+ }
return imgBuilder(src, width, height).append("/>").toString();
}