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 QUERY = "query";
|
||||||
public static final String OWNER = "Owner";
|
public static final String OWNER = "Owner";
|
||||||
public static final String OWNERFULLNAME = "Owner Name";
|
public static final String OWNERFULLNAME = "Owner Name";
|
||||||
|
public static final String HUMAN_REDABLE_CATEGORY = "HR Category";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new file model.
|
* Instantiates a new file model.
|
||||||
|
@ -374,15 +375,18 @@ public class FileModel extends BaseModelData implements Serializable {
|
||||||
*/
|
*/
|
||||||
public void setShortcutCategory(GXTCategorySmartFolder smfDocuments) {
|
public void setShortcutCategory(GXTCategorySmartFolder smfDocuments) {
|
||||||
set(SHORTCUTCATEGORY, smfDocuments);
|
set(SHORTCUTCATEGORY, smfDocuments);
|
||||||
|
if(smfDocuments!=null)
|
||||||
|
set(HUMAN_REDABLE_CATEGORY, smfDocuments.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the shortcut category.
|
* Gets the shortcut category.
|
||||||
*
|
*
|
||||||
* @return the shortcut category
|
* @return the shortcut category
|
||||||
*/
|
*/
|
||||||
public String getShortcutCategory(){
|
public GXTCategorySmartFolder getShortcutCategory(){
|
||||||
return get(SHORTCUTCATEGORY).toString();
|
return (GXTCategorySmartFolder) get(SHORTCUTCATEGORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -425,6 +429,12 @@ public class FileModel extends BaseModelData implements Serializable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see java.lang.Object#equals(java.lang.Object)
|
* @see java.lang.Object#equals(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* Equals.
|
||||||
|
*
|
||||||
|
* @param obj the obj
|
||||||
|
* @return true, if successful
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj != null && obj instanceof FileModel) {
|
if (obj != null && obj instanceof FileModel) {
|
||||||
|
@ -538,6 +548,11 @@ public class FileModel extends BaseModelData implements Serializable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see java.lang.Object#toString()
|
* @see java.lang.Object#toString()
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* To string.
|
||||||
|
*
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
|
|
@ -171,7 +171,8 @@ public class DialogGetInfo extends Dialog {
|
||||||
txtCategory = new TextField<String>();
|
txtCategory = new TextField<String>();
|
||||||
txtCategory.setFieldLabel("Category");
|
txtCategory.setFieldLabel("Category");
|
||||||
txtCategory.setReadOnly(true);
|
txtCategory.setReadOnly(true);
|
||||||
textFieldSetValue(txtCategory,fileModel.getShortcutCategory());
|
if(fileModel.getShortcutCategory()!=null)
|
||||||
|
textFieldSetValue(txtCategory,fileModel.getShortcutCategory().getValue());
|
||||||
add(txtCategory);
|
add(txtCategory);
|
||||||
|
|
||||||
txtOwner = new TextField<String>();
|
txtOwner = new TextField<String>();
|
||||||
|
|
Loading…
Reference in New Issue