added description info to be shown

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/widgets/grsf-manage-widget@144046 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-02-22 09:03:47 +00:00
parent e24efc16f6
commit 957e07aaf2
5 changed files with 38 additions and 13 deletions

View File

@ -30,7 +30,7 @@ public class FormEntryModel extends Composite{
public FormEntryModel(String label, String value) { public FormEntryModel(String label, String value) {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
labelEntry.add(new HTML("<b>Item " + label + ":</b>")); labelEntry.add(new HTML("<b> " + label.substring(0, 1).toUpperCase() + label.substring(1) + ":</b>"));
entryValue.setText(value); entryValue.setText(value);
} }

View File

@ -79,6 +79,9 @@ public class ManageProductWidget extends Composite{
@UiField @UiField
TextArea annotationArea; TextArea annotationArea;
@UiField
TextArea descriptionTextArea;
@UiField @UiField
Button cancelButton; Button cancelButton;
@ -170,6 +173,7 @@ public class ManageProductWidget extends Composite{
// productSemanticId.setText(bean.getSemanticId()); // productSemanticId.setText(bean.getSemanticId());
// productShortTitle.setText(bean.getShortTitle()); // productShortTitle.setText(bean.getShortTitle());
// productSource.setText(bean.getSource()); // productSource.setText(bean.getSource());
descriptionTextArea.setText(bean.getDescription());
// check if we need to show more // check if we need to show more
if(bean.getExtrasIfAvailable() != null && !bean.getExtrasIfAvailable().isEmpty()) if(bean.getExtrasIfAvailable() != null && !bean.getExtrasIfAvailable().isEmpty())

View File

@ -24,19 +24,30 @@
width="100%"> width="100%">
<b:ControlGroup ui:field="productTitleGroup"> <b:ControlGroup ui:field="productTitleGroup">
<b:ControlLabel for="titel" title="Item title"> <b:ControlLabel for="title" title="Item title">
<b>Item title:</b> <b>Title:</b>
</b:ControlLabel> </b:ControlLabel>
<b:Controls> <b:Controls>
<b:TextArea alternateSize="LARGE" placeholder="Item title" <b:TextArea alternateSize="LARGE" placeholder="Item title"
enabled="false" width="97%" b:id="name" title="Item title" enabled="false" width="97%" b:id="title" title="Item title"
ui:field="titleTextArea" /> ui:field="titleTextArea" />
</b:Controls> </b:Controls>
</b:ControlGroup> </b:ControlGroup>
<b:ControlGroup ui:field="productDescriptionGroup">
<b:ControlLabel for="description" title="Item description">
<b>Description:</b>
</b:ControlLabel>
<b:Controls>
<b:TextArea alternateSize="LARGE" placeholder="Item description"
enabled="false" width="97%" b:id="description" title="Item description"
ui:field="descriptionTextArea" />
</b:Controls>
</b:ControlGroup>
<b:ControlGroup ui:field="productGrsfTypeGroup"> <b:ControlGroup ui:field="productGrsfTypeGroup">
<b:ControlLabel for="productGrsfType" title="The GRSF Item type"> <b:ControlLabel for="productGrsfType" title="The GRSF Item type">
<b>Item GRSF Type:</b> <b>GRSF Type:</b>
</b:ControlLabel> </b:ControlLabel>
<b:Controls> <b:Controls>
<b:TextBox b:id="productGrsfType" alternateSize="LARGE" <b:TextBox b:id="productGrsfType" alternateSize="LARGE"
@ -87,7 +98,7 @@
<b:ControlGroup ui:field="currentStatusGroup"> <b:ControlGroup ui:field="currentStatusGroup">
<b:ControlLabel for="currentStatus" <b:ControlLabel for="currentStatus"
title="The current status of this Item"> title="The current status of this Item">
<b>Item Current Status:</b> <b>Current Status:</b>
</b:ControlLabel> </b:ControlLabel>
<b:Controls> <b:Controls>
<b:TextBox b:id="currentStatus" alternateSize="LARGE" <b:TextBox b:id="currentStatus" alternateSize="LARGE"
@ -99,7 +110,7 @@
<b:ControlGroup ui:field="listBoxStatusGroup"> <b:ControlGroup ui:field="listBoxStatusGroup">
<b:ControlLabel for="listboxStatus" title="The new status of this Item"> <b:ControlLabel for="listboxStatus" title="The new status of this Item">
<b>Item New Status:</b> <b>New Status:</b>
</b:ControlLabel> </b:ControlLabel>
<b:Controls> <b:Controls>
<b:ListBox b:id="listboxStatus" alternateSize="LARGE" <b:ListBox b:id="listboxStatus" alternateSize="LARGE"

View File

@ -183,6 +183,7 @@ public class GRSFNotificationService extends RemoteServiceServlet implements GRS
// String shortTitle = extras.get(SHORT_TITLE_FIELD_KEY); // String shortTitle = extras.get(SHORT_TITLE_FIELD_KEY);
// String sources = extras.get(SOURCES_TITLE_FIELD_KEY); // String sources = extras.get(SOURCES_TITLE_FIELD_KEY);
String title = product.getTitle(); String title = product.getTitle();
String description = product.getNotes();
// fetch extras // fetch extras
GenericResourceReaderExtras entries = new GenericResourceReaderExtras(); GenericResourceReaderExtras entries = new GenericResourceReaderExtras();
@ -206,6 +207,7 @@ public class GRSFNotificationService extends RemoteServiceServlet implements GRS
toReturn.setKnowledgeBaseIdentifier(uuidKB); toReturn.setKnowledgeBaseIdentifier(uuidKB);
toReturn.setItemTitle(title); toReturn.setItemTitle(title);
toReturn.setGrsfType(productGRSFType); toReturn.setGrsfType(productGRSFType);
toReturn.setDescription(description);
// toReturn.setType(productType); // toReturn.setType(productType);
// toReturn.setSemanticId(semanticId); // toReturn.setSemanticId(semanticId);
// toReturn.setShortTitle(shortTitle); // toReturn.setShortTitle(shortTitle);

View File

@ -19,6 +19,7 @@ public class ManageProductBean implements Serializable{
private String grsfType; // fishery/stock private String grsfType; // fishery/stock
// private String source; // the current source // private String source; // the current source
private Map<String, String> extrasIfAvailable; private Map<String, String> extrasIfAvailable;
private String description;
// info that could change // info that could change
private GRSFStatus currentStatus; private GRSFStatus currentStatus;
@ -35,26 +36,34 @@ public class ManageProductBean implements Serializable{
* @param knowledgeBaseIdentifier * @param knowledgeBaseIdentifier
* @param grsfType * @param grsfType
* @param extrasIfAvailable * @param extrasIfAvailable
* @param description
* @param currentStatus * @param currentStatus
* @param newStatus * @param newStatus
* @param annotation * @param annotation
*/ */
public ManageProductBean(String itemTitle, String catalogueIdentifier, public ManageProductBean(String itemTitle, String catalogueIdentifier,
String knowledgeBaseIdentifier, String grsfType, String knowledgeBaseIdentifier, String grsfType,
Map<String, String> extrasIfAvailable, GRSFStatus currentStatus, Map<String, String> extrasIfAvailable, String description,
GRSFStatus newStatus, String annotation) { GRSFStatus currentStatus, GRSFStatus newStatus, String annotation) {
super(); super();
this.itemTitle = itemTitle; this.itemTitle = itemTitle;
this.catalogueIdentifier = catalogueIdentifier; this.catalogueIdentifier = catalogueIdentifier;
this.knowledgeBaseIdentifier = knowledgeBaseIdentifier; this.knowledgeBaseIdentifier = knowledgeBaseIdentifier;
this.grsfType = grsfType; this.grsfType = grsfType;
this.extrasIfAvailable = extrasIfAvailable; this.extrasIfAvailable = extrasIfAvailable;
this.description = description;
this.currentStatus = currentStatus; this.currentStatus = currentStatus;
this.newStatus = newStatus; this.newStatus = newStatus;
this.annotation = annotation; this.annotation = annotation;
} }
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getCatalogueIdentifier() { public String getCatalogueIdentifier() {
return catalogueIdentifier; return catalogueIdentifier;
@ -125,9 +134,8 @@ public class ManageProductBean implements Serializable{
+ ", catalogueIdentifier=" + catalogueIdentifier + ", catalogueIdentifier=" + catalogueIdentifier
+ ", knowledgeBaseIdentifier=" + knowledgeBaseIdentifier + ", knowledgeBaseIdentifier=" + knowledgeBaseIdentifier
+ ", grsfType=" + grsfType + ", extrasIfAvailable=" + ", grsfType=" + grsfType + ", extrasIfAvailable="
+ extrasIfAvailable + ", currentStatus=" + currentStatus + extrasIfAvailable + ", description=" + description
+ ", newStatus=" + newStatus + ", annotation=" + annotation + ", currentStatus=" + currentStatus + ", newStatus="
+ "]"; + newStatus + ", annotation=" + annotation + "]";
} }
} }