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) {
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);
}

View File

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

View File

@ -24,19 +24,30 @@
width="100%">
<b:ControlGroup ui:field="productTitleGroup">
<b:ControlLabel for="titel" title="Item title">
<b>Item title:</b>
<b:ControlLabel for="title" title="Item title">
<b>Title:</b>
</b:ControlLabel>
<b:Controls>
<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" />
</b:Controls>
</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:ControlLabel for="productGrsfType" title="The GRSF Item type">
<b>Item GRSF Type:</b>
<b>GRSF Type:</b>
</b:ControlLabel>
<b:Controls>
<b:TextBox b:id="productGrsfType" alternateSize="LARGE"
@ -87,7 +98,7 @@
<b:ControlGroup ui:field="currentStatusGroup">
<b:ControlLabel for="currentStatus"
title="The current status of this Item">
<b>Item Current Status:</b>
<b>Current Status:</b>
</b:ControlLabel>
<b:Controls>
<b:TextBox b:id="currentStatus" alternateSize="LARGE"
@ -99,7 +110,7 @@
<b:ControlGroup ui:field="listBoxStatusGroup">
<b:ControlLabel for="listboxStatus" title="The new status of this Item">
<b>Item New Status:</b>
<b>New Status:</b>
</b:ControlLabel>
<b:Controls>
<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 sources = extras.get(SOURCES_TITLE_FIELD_KEY);
String title = product.getTitle();
String description = product.getNotes();
// fetch extras
GenericResourceReaderExtras entries = new GenericResourceReaderExtras();
@ -206,6 +207,7 @@ public class GRSFNotificationService extends RemoteServiceServlet implements GRS
toReturn.setKnowledgeBaseIdentifier(uuidKB);
toReturn.setItemTitle(title);
toReturn.setGrsfType(productGRSFType);
toReturn.setDescription(description);
// toReturn.setType(productType);
// toReturn.setSemanticId(semanticId);
// toReturn.setShortTitle(shortTitle);

View File

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