Minor update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@85844 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-11-21 09:58:37 +00:00
parent e1db1008fd
commit 73367e5aad
2 changed files with 22 additions and 16 deletions

11
pom.xml
View File

@ -104,7 +104,7 @@
<version>3.0.1</version>
</dependency>
<!-- tabular-data-gwt-service -->
<dependency>
@ -113,6 +113,13 @@
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
</dependency>
<!-- tabular-data-metadata-widget -->
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-metadata-widget</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- LOGGING -->
<dependency>
<groupId>com.allen-sauer.gwt.log</groupId>
@ -150,7 +157,7 @@
<configuration>
<skipTests>true</skipTests>
<exclude>**/GwtTest*.java</exclude>
</configuration>
<!-- TODO check if needed -->
<dependencies>

View File

@ -6,6 +6,7 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TRId;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
import org.gcube.portlets.user.td.metadatawidget.client.MetadataAccordionPanel;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.rpc.AsyncCallback;
@ -38,8 +39,8 @@ public class TabularResourceProperties extends FramedPanel {
protected TextArea rightField;
protected TextField tableTypeNameField;
protected TextArea tableMetaDataField;
protected MetadataAccordionPanel metadataPanel;
protected VerticalLayoutContainer layoutTable;
public TabularResourceProperties(String name, EventBus eventBus) {
super();
@ -110,30 +111,28 @@ public class TabularResourceProperties extends FramedPanel {
tableFieldSet.setCollapsible(true);
tableFieldSet.setResize(true);
VerticalLayoutContainer layoutTable = new VerticalLayoutContainer();
layoutTable = new VerticalLayoutContainer();
tableFieldSet.add(layoutTable);
tableTypeNameField = new TextField();
tableTypeNameField.setReadOnly(true);
tableTypeNameField.setValue("");
layoutTable.add(new FieldLabel(tableTypeNameField, "Type"),
new VerticalLayoutData(1, -1));
tableMetaDataField = new TextArea();
tableMetaDataField.setReadOnly(true);
tableMetaDataField.setResizable(Resizable.BOTH);
tableMetaDataField.setValue("");
layoutTable.add(new FieldLabel(tableMetaDataField, "MetaData"),
new VerticalLayoutData(-1, -1));
new VerticalLayoutData(1, -1));
vl.add(tableFieldSet);
}
protected void updateTable(TableData tableData) {
tableTypeNameField.setValue(tableData.getTypeName());
tableMetaDataField.setValue(tableData.getMetaData());
if(metadataPanel!=null){
layoutTable.remove(metadataPanel);
}
metadataPanel= new MetadataAccordionPanel("Information", tableData.getTrId(), eventBus);
layoutTable.add(new FieldLabel(metadataPanel, "MetaData"),
new VerticalLayoutData(-1, -1));
tableFieldSet.onResize();
}