Prepare next development cycle
[gpl/argeo-suite.git] / swt / org.argeo.app.swt / src / org / argeo / app / swt / docbook / DbkVideo.java
index 17ed0e013775ce0922f9f7921cbd9c49cb5839f8..6c42146bb8f7bd45bab03cd6fb67d238c3fc9bc3 100644 (file)
@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.argeo.api.acr.Content;
+import org.argeo.api.acr.ldap.NamingUtils;
 import org.argeo.api.acr.spi.ProvidedContent;
 import org.argeo.app.docbook.DbkAcrUtils;
 import org.argeo.app.docbook.DbkAttr;
@@ -16,7 +17,6 @@ import org.argeo.cms.swt.acr.SwtSection;
 import org.argeo.cms.swt.acr.SwtSectionPart;
 import org.argeo.cms.swt.widgets.StyledControl;
 import org.argeo.cms.ux.acr.ContentPart;
-import org.argeo.util.naming.NamingUtils;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.browser.Browser;
 import org.eclipse.swt.events.SelectionEvent;
@@ -44,13 +44,14 @@ public class DbkVideo extends StyledControl implements SwtSectionPart, ContentPa
                super(parent, style);
                editable = !(SWT.READ_ONLY == (style & SWT.READ_ONLY));
                this.section = section;
-               setStyle(DbkType.videoobject.name());
+               // set data before setting style since it creates the control
                setData(node);
+               setStyle(DbkType.videoobject.name());
        }
 
        @Override
        protected Control createControl(Composite box, String style) {
-               Content mediaobject = getNode();
+               Content mediaobject = getContent();
                Composite wrapper = new Composite(box, SWT.NONE);
                wrapper.setLayout(CmsSwtUtils.noSpaceGridLayout());
 
@@ -78,6 +79,8 @@ public class DbkVideo extends StyledControl implements SwtSectionPart, ContentPa
                        updateB.setText("Update");
                        updateB.addSelectionListener(new Selected() {
 
+                               private static final long serialVersionUID = -8234047511858456222L;
+
                                @Override
                                public void widgetSelected(SelectionEvent e) {
                                        Content videodata = mediaobject.child(DbkType.videoobject).child(DbkType.videodata);
@@ -139,6 +142,8 @@ public class DbkVideo extends StyledControl implements SwtSectionPart, ContentPa
                        deleteB.setText("Delete");
                        deleteB.addSelectionListener(new Selected() {
 
+                               private static final long serialVersionUID = -7552456185687361642L;
+
                                @Override
                                public void widgetSelected(SelectionEvent e) {
                                        mediaobject.remove();