Class ResourceView
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.Container
overit.geocall.basic.ui.container.TableView
overit.geocall.basic.ui.container.ResourceView
- All Implemented Interfaces:
Serializable,EntityContainer,overit.geocall.clipboard.XClip,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,AjaxableComponent,Badgeable,DBViewManager,DraggableDroppable,Hideable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
- Direct Known Subclasses:
overit.geocallapp.wfm.ui.container.ResourceViewMultimediali
The class extends
The
TableView and implements the table used to arranges and manages the web resources (directories, files) of the application.
It provides the methods that allows the user to navigate in the WebResource, and the standard functions used to create, copy and paste, delete and
view the resources. The
WebResource is a file-based or database-based virtual file system depending on the parametrization deifned within the configuration file.
The use of this component is therefore reccomended in cases where the information is stored through the WebResource and you want to
provide a convenient way to find and consult them.- See Also:
- GCApi:
- component
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.basic.ui.container.TableView
TableView.SelectionNested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected intprotected Serializableprotected intprotected booleanprotected Stringprotected Stringprotected Stringprotected booleanprotected WebResourceprotected booleanFields inherited from class overit.geocall.basic.ui.container.TableView
_activeMode, _advancedLayout, _alRowMessages, _alTableMessages, _alTableOrders, _anchor, _begin, _bkgColorName, _bkgColorSwitch, _changedMetaData, _columns, _columnsOrigin, _contentFrame, _cutname, _cutting, _cuttingRow, _dbv, _draggable, _droppable, _end, _event, _event2, _eventmode, _eventr, _footerLastRow, _footerValues, _forceFirstPage, _from, _fullsize, _height, _hiddenCols, _lastSelected, _minWidth, _msg, _msg2, _msgr, _page, _param, _param2, _paramr, _query, _requestedMode, _rows, _selection, _selectionRow, _selectname, _selectset, _someThingDraggable, _somethingHidden, _titleFormat, _to, _visible, _xclass, configurableRows, editable, extensionTabIndex, hiddenProfileCols, navBarTabIndex, NOT_IDENTIFIED_COLUMN_PLACEHOLDER, PARAM_KEY, TABLE_CONFIGURABILITY_PANEL_PATH, TABLE_FIELDS_OBJECT_NAME, TABLE_OBJ_TEMP_PREFIX, TABLE_WIDGET_ATTRIBUTES_OBJECT, TABLE_WIDGET_STATE_CLASSFields inherited from class overit.geocall.basic.ui.Container
_rofields, _rules, DALINK_NO, DALINK_YES, DATE_MAX, DATE_MIN, TIME_MAX, TIME_MIN, TYPE_ACTION, TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_DTZ, TYPE_EURO, TYPE_FILE, TYPE_FILES, TYPE_INTEGER, TYPE_LONG, TYPE_LONGARRAY, TYPE_MAP, TYPE_MAXDATE, TYPE_MAXTIME, TYPE_MEASURE, TYPE_MINDATE, TYPE_MINTIME, TYPE_NEWACTION, TYPE_STRING, TYPE_STRINGARRAY, TYPE_SUBSET, TYPE_SUBSETRANGE, TYPE_SUPPORT, TYPE_TIMERANGEFields inherited from class overit.geocall.ui.Control
_blank, _cleaner, _dblink, _enabled, _ro, _title, altEventIconsList, altIcon, ariaDescription, ariaLabel, badge, badgeformat, FILTER_PREFIXES, LABEL_ATTRIBUTE, LABEL_IN_LINE_ATTRIBUTE, STATE_BLANK, STATE_NORMAL, STATE_RO, STATE_ROBLANKFields inherited from class overit.geocall.ui.Component
_basic, _childrenContainers, _currentId, _gridalign, _gridcols, _gridrows, _gridvalign, _iconElement, _id, _keylabel, _label, _layoutName, _name, _parentContainer, _registryName, _shortcut, _tabindex, _transformations, _valuesContainer, aliasField, BR, configHidden, configuredLabel, configuredLabelInLine, defaultHidden, ELEMENT_BR, ELEMENT_NULL, entityContainer, entityName, extendedField, fullHeight, important, labelInLine, layoutLabel, PIXEL_IMG, safeInlineServiceFields inherited from interface overit.geocall.ui.AjaxableComponent
FRAME_ID_PREFIX, NOTRANSITION, TRANSITION_BODY_MORPH, TRANSITION_BODY_RESIZE, TRANSITION_BORDER_RESIZE, TRANSITION_DOWN, TRANSITION_UP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanCopies a row of the table (seeXBoard)protected booleanCuts a row of the table (seeXBoard)protected booleanPastes a row on the table (seeXBoard)voidfreeClip(boolean delete) Used in drop phase and manage the deletion of the record of the dbv if the drag operation was a cutting one.protected org.apache.ecs.ElementgetCaption(EntitySet es) Returns theSerializableobject that contains the currently cutted resourcesReturn the folder of the resourcesReturns the top folder of the directory tree for the resourcesDeprecated.booleanisCutted(int row) Checks if the resource is currently one of the cutted onesbooleanCalled to delete the desired resourcebooleanCalled to delete all the resources of the ResourceViewbooleanCalled to create a new filebooleanCalled to create a new foldervoidCalled when is opened the page that contains the ResourceViewbooleanCalled to refresh the list of the resources to obtain the updated databooleanCalled to rename the desired resourcebooleanonUnzip(HashGetter hg) Called to unzip a zipped resourcebooleanonUnzipAll(HashGetter hg) Called to unzip all the resourcesbooleanonUnzipDir(HashGetter hg) Called to unzip all the resources of a directorybooleanCalled to navigate on a upper level of the directory treebooleanCalled to upload a new resourcebooleanCalled to view a resourcebooleanCalled to zip a resourceprotected ArrayListpasteContent(int row, Serializable s, boolean local) voidrefresh()Refreshes the list of the resources to obtain the updated dataprotected booleanvoidRestrict the type of the selectable files.voidIndicates if the file must be downloaded or if should open in a new browser tab.voidsetMULTIPLE(String multiple) Indicates if the user is allowed to select more than one file.voidSets the regual expression used to discriminate the resources that must be loaded by the ResourceViewvoidSets the folder of the resourcesvoidSets the top folder of the directory tree for the resourcesprotected voidsetup()Setup the ComponentvoidsetupMetaData(DBView dbv) Called to init all the field starting form the DBView.Methods inherited from class overit.geocall.basic.ui.container.TableView
addPageSizeLookup, buildDisplayScript, buildLoadPageScript, buildScrollScript, buildScrollTopScript, buildSetupScript, buildStuckScript, canPaste, changed, changedMetaData, chooseSelectAction, clickOnControlLightMenu, clickOnControlMenu, collectEntities, doRemove, drag, dragDrop, dragged, drop, findColumnGroup, getColumnByLayoutName, getColumnByName, getColumns, getCurrentPage, getCUTNAME, getCutSet, getCutting, getCuttingSize, getDBView, getDefaultChange, getDropDownMenu, getEntities, getEntityValidator, getExtensionRow, getFieldsProfileVisibilityList, getFieldsUserVisibilityList, getFOOTERLASTROW, getFrameHtml, getHtml, getMode, getNavBar, getNavBarHtml, getOriginalColumns, getPage, getProfileLayoutCustomizations, getProfileStateConf, getProfileStateConfFields, getRo, getRows, getRows, getSelection, getSelectionSize, getSELECTNAME, getSelectSet, getStateConf, getStateConfAttributes, getStateConfFields, getTitle, getTR, getUserComponentAttributesMap, getUserLayoutCustomizations, getXmlColumns, hasTableOrders, invalidateComponentsAttributeMap, isCutSet, isSelected, isSelectSet, isVisible, moveColumn, needsNavBar, onAutoSelect, onBodyClick, onChangeRows, onColumnMove, onControlLightMenu, onControlMenu, onCopy, onCopy, onCut, onCut, onOpenPage, onOrder, onPaste, onPaste, onRemove, onRemove, onSaveLightTableCustomization, onSelect, onSelect, onSelectAll, onSelectNone, onSelectTable, onSingleSelect, onSingleSelect, onTableOrdersMenu, onToggle, selectAction, setANCHOR, setBKGCOLORNAME, setBKGCOLORSWITCH, setCONTENTFRAME, setCUTNAME, setDBView, setDRAGGABLE, setDROPPABLE, setEDITABLE, setENTITY, setEVENT, setEVENT2, setEVENTMODE, setEVENTR, setFOOTERLASTROW, setFooterValues, setFROM, setFULLSIZE, setHEIGHT, setMINWIDTH, setMode, setMODE, setMsg, setMSG, setMsg2, setMSG2, setMsgR, setMSGR, setPARAM, setPARAM2, setPARAMR, setRo, setROWS, setSELECTNAME, setSelectSet, setSELECTSET, setTITLEFORMAT, setTO, setupSelection, setupTableColumns, setupUserHiddenColumns, setVISIBLE, setXCLASS, stuckColumnsEnabled, updateCurrentRowsForPage, updateStateConf, userIsAllowedToEditTablesMethods inherited from class overit.geocall.basic.ui.Container
alert, applyRule, getBASIC, getBLANK, getRO, getROField, onClose, onOpenChildContainer, onRestore, onRule, prepareName, rulesNewValues, setROField, setValues, setValuesMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isImportant, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setConfiguredProperty, setDBLINK, setENABLED, setFUNCTION, setModelProperties, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, getBoolean, getBoolean, getChildrenComponents, getChildrenContainers, getDefaultLabel, getDefaultLayoutLabel, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setValuesContainer, stringForJs, tabIndexerMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIconMethods inherited from interface overit.geocall.ui.Hideable
getVISIBLEMethods inherited from interface overit.geocall.clipboard.XClip
getWM
-
Field Details
-
_wr
-
_resource
-
_topresource
-
_re
-
_fileindex
protected int _fileindex -
_currRowUnzip
protected int _currRowUnzip -
_uploading
protected boolean _uploading -
_accept
-
_multiple
protected boolean _multiple -
download
protected boolean download -
_cuttingResource
-
-
Constructor Details
-
ResourceView
public ResourceView()Creates the ResourceView
-
-
Method Details
-
setRE
Sets the regual expression used to discriminate the resources that must be loaded by the ResourceView- Parameters:
s- A string thet defines a regula expression
-
setRESOURCE
Sets the folder of the resources- Parameters:
s- The string that represents the folder for the resources contained in the ResourceView
-
getResource
Return the folder of the resources- Returns:
- The string that represents the folder for the resources contained in the ResourceView
-
setTOPRESOURCE
Sets the top folder of the directory tree for the resources- Parameters:
s- The string that represents the top folder for the resources contained in the ResourceView
-
getTopResource
Returns the top folder of the directory tree for the resources- Returns:
- The string that represents the top folder for the resources contained in the ResourceView
-
setACCEPT
Restrict the type of the selectable files.- Parameters:
mediaType- it's possible to restrict the accepted file using the following rules:- file_extension: A file extension starting with the dot character, e.g: .gif, .jpg, .png, .doc
- audio/*: All sound files are accepted
- video/*: All video files are accepted
- image/*: All image files are accepted
- media_type: A valid media type, with no parameters. Look at IANA Media Types for a complete list of standard media types
-
setMULTIPLE
Indicates if the user is allowed to select more than one file.- Parameters:
multiple- A string that represents a boolean value ("true" or "1", "false" or "0").
If the string is not recognized as a boolean value, it will be used the default value, that is false
-
setDOWNLOAD
Indicates if the file must be downloaded or if should open in a new browser tab.- Parameters:
s-trueto download the file orfalseto open it into a new browser tab
-
setup
protected void setup()Description copied from class:ComponentSetup the Component -
onOpen
Called when is opened the page that contains the ResourceView -
refresh
public void refresh()Refreshes the list of the resources to obtain the updated data -
setupMetaData
Description copied from class:TableViewCalled to init all the field starting form the DBView. Setup the Selection, sets the value of the position of the column used to select and the field position.- Overrides:
setupMetaDatain classTableView- Parameters:
dbv- The DBView used to populate all the field
-
isCutted
public boolean isCutted(int row) Checks if the resource is currently one of the cutted ones -
getCuttingResource
Returns theSerializableobject that contains the currently cutted resources- Returns:
- The object that contains the currently cutted resources
-
freeClip
public void freeClip(boolean delete) Used in drop phase and manage the deletion of the record of the dbv if the drag operation was a cutting one.
Implements theXClipinterface -
doCopy
Description copied from class:TableViewCopies a row of the table (seeXBoard) -
doCut
Description copied from class:TableViewCuts a row of the table (seeXBoard) -
doPaste
Description copied from class:TableViewPastes a row on the table (seeXBoard) -
pasteContent
- Overrides:
pasteContentin classTableView
-
onDelete
Called to delete the desired resource- Parameters:
o- The HashGetter that contains the number of the row of the resources to be deleted- Returns:
- true
-
onDeleteAll
Called to delete all the resources of the ResourceView- Parameters:
o- Not used- Returns:
- true
-
onRename
Called to rename the desired resource- Parameters:
o- The HashGetter that contains the number of the row of the resources to be renamed- Returns:
- true
-
onUnzip
Called to unzip a zipped resource- Parameters:
hg- The HashGetter that contains the number of the row of the resources to be unzipped- Returns:
- true
-
onUnzipAll
Called to unzip all the resources- Parameters:
hg- Not used- Returns:
- true
-
onUnzipDir
Called to unzip all the resources of a directory- Parameters:
hg- Not used- Returns:
- true
-
onZip
Called to zip a resource- Parameters:
o- HashGetter containing the prompt parameter- Returns:
- true
-
onView
Called to view a resource- Parameters:
o- The HashGetter that contains the number of the row of the resources to be showed- Returns:
- true
-
onUp
Called to navigate on a upper level of the directory tree- Parameters:
o- Not used- Returns:
- true
-
onNewFolder
Called to create a new folder- Parameters:
o- The HashGetter that contains the prompt parameter used as the name of the new folder to create- Returns:
- true
-
onNewFile
Called to create a new file- Parameters:
o- Not used- Returns:
- true
-
onUpload
Called to upload a new resource- Parameters:
o- Not used- Returns:
- true
- Throws:
ValidationException- if the uploaded file's type is not allowed
-
onRefresh
Called to refresh the list of the resources to obtain the updated data- Parameters:
o- Not used- Returns:
- true
-
save
-
getCaption
- Overrides:
getCaptionin classTableView
-
getWebResource
Deprecated.Return theWebResourceon which the ResourceView is based- Returns:
- The WebResource on which the ResourceView is based
-
WebResourceon which the ResourceView is based