X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui.workbench%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fworkbench%2Finternal%2Fjcr%2Fparts%2FGenericNodePage.java;h=cc7352b6f342d0f4695f49346510addb1669a565;hb=b4c772a263e0f19f6c283dbbb87d04794072b284;hp=2b19a95d00fa3a3d5fd77295c77ab04a6675d0eb;hpb=0e465414ea4fc79aa4961461efdc0201e1bee154;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/internal/jcr/parts/GenericNodePage.java b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/internal/jcr/parts/GenericNodePage.java index 2b19a95d0..cc7352b6f 100644 --- a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/internal/jcr/parts/GenericNodePage.java +++ b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/internal/jcr/parts/GenericNodePage.java @@ -31,6 +31,7 @@ import javax.jcr.RepositoryException; import org.argeo.ArgeoException; import org.argeo.eclipse.ui.workbench.WorkbenchConstants; import org.argeo.jcr.JcrUtils; +import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridData; @@ -106,6 +107,8 @@ public class GenericNodePage extends FormPage implements WorkbenchConstants { // thus it is still possible to save after a tab // change. super.commit(onSave); + if (currentNode.getSession().hasPendingChanges()) + currentNode.getSession().save(); } } catch (RepositoryException re) { throw new ArgeoException( @@ -169,8 +172,9 @@ public class GenericNodePage extends FormPage implements WorkbenchConstants { AbstractFormPart part, Property prop) { GridData gd; try { - if (prop.getType() == PropertyType.STRING) { - Text txt = tk.createText(parent, prop.getString()); + if (prop.getType() == PropertyType.STRING && !prop.isMultiple()) { + Text txt = tk.createText(parent, prop.getString(), SWT.WRAP + | SWT.MULTI); gd = new GridData(GridData.FILL_HORIZONTAL); txt.setLayoutData(gd); txt.addModifyListener(new ModifiedFieldListener(part));