Fixed shortcut category
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@132929 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a6b996e88e
commit
df5f1217ff
|
@ -50,6 +50,7 @@ public class FileModel extends BaseModelData implements Serializable {
|
|||
public static final String QUERY = "query";
|
||||
public static final String OWNER = "Owner";
|
||||
public static final String OWNERFULLNAME = "Owner Name";
|
||||
public static final String HUMAN_REDABLE_CATEGORY = "HR Category";
|
||||
|
||||
/**
|
||||
* Instantiates a new file model.
|
||||
|
@ -374,15 +375,18 @@ public class FileModel extends BaseModelData implements Serializable {
|
|||
*/
|
||||
public void setShortcutCategory(GXTCategorySmartFolder smfDocuments) {
|
||||
set(SHORTCUTCATEGORY, smfDocuments);
|
||||
if(smfDocuments!=null)
|
||||
set(HUMAN_REDABLE_CATEGORY, smfDocuments.getValue());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the shortcut category.
|
||||
*
|
||||
* @return the shortcut category
|
||||
*/
|
||||
public String getShortcutCategory(){
|
||||
return get(SHORTCUTCATEGORY).toString();
|
||||
public GXTCategorySmartFolder getShortcutCategory(){
|
||||
return (GXTCategorySmartFolder) get(SHORTCUTCATEGORY);
|
||||
}
|
||||
|
||||
|
||||
|
@ -425,6 +429,12 @@ public class FileModel extends BaseModelData implements Serializable {
|
|||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
/**
|
||||
* Equals.
|
||||
*
|
||||
* @param obj the obj
|
||||
* @return true, if successful
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj != null && obj instanceof FileModel) {
|
||||
|
@ -538,6 +548,11 @@ public class FileModel extends BaseModelData implements Serializable {
|
|||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
/**
|
||||
* To string.
|
||||
*
|
||||
* @return the string
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
|
|
@ -171,7 +171,8 @@ public class DialogGetInfo extends Dialog {
|
|||
txtCategory = new TextField<String>();
|
||||
txtCategory.setFieldLabel("Category");
|
||||
txtCategory.setReadOnly(true);
|
||||
textFieldSetValue(txtCategory,fileModel.getShortcutCategory());
|
||||
if(fileModel.getShortcutCategory()!=null)
|
||||
textFieldSetValue(txtCategory,fileModel.getShortcutCategory().getValue());
|
||||
add(txtCategory);
|
||||
|
||||
txtOwner = new TextField<String>();
|
||||
|
|
Loading…
Reference in New Issue