public class WebFileListView extends ResourceListView<File>
File
s; on the server. Here paths are relative to Server (so they can be accessed from outside)ResourceListView.ViewContext
Modifier and Type | Field and Description |
---|---|
static Comparator<File> |
SORT_BY
Deprecated.
|
context, feedbackPanel
Constructor and Description |
---|
WebFileListView(String id,
File currentSelectedRootNode,
List<? extends File> list,
ResourceListView.ViewContext context,
org.apache.wicket.markup.html.form.CheckGroup bulkSelection)
Uses list provided to list them
|
WebFileListView(String id,
ResourceListView.ViewContext context,
org.apache.wicket.markup.html.form.CheckGroup bulkSelection)
Based on configuration in
FileUploadWrapper#getResourceFolderbasePath() ; automatically gets list of files from folder and sub-folders. |
Modifier and Type | Method and Description |
---|---|
String |
getAbsolutePath(File resource)
Get a File absolute path
TODO: Consider making this a web based absolute path instead?
|
String |
getClassForResourceType(File resource)
Return a CSS class name to represent the resource type (if any exists)
|
File |
getCurrentSelectedRootNode() |
String |
getDate(File resource) |
String |
getName(File resource) |
String |
getRelativePath(File resource)
Get a relative path that can be used from the Web
|
Float |
getSizeKB(File resource) |
String |
getStorageRelativePath(File resource)
This path is a path that is indicative of where it is stored on the system
relative to some common reference that sis configured.
|
void |
init() |
boolean |
isResourceImageType(File resource) |
void |
remove(File resource) |
void |
setCurrentSelectedRootNode(File currentSelectedRootNode) |
void |
updateFileView() |
void |
updateFileViewRootNode(File rootNode)
Show all files
|
getContext, onInitialize, populateItem, processThumbnailLink, setContext, setFeedbackPanel
getList, getListItemModel, getModel, getModelObject, getReuseItems, getStartIndex, getViewSize, iterator, moveDownLink, moveUpLink, newItem, onBeginPopulateItem, onPopulate, removeLink, renderChild, renderItem, renderIterator, setList, setModel, setModelObject, setReuseItems, setStartIndex, setViewSize
onBeforeRender, onRender
getMarkupType, getWebPage, getWebRequest
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, newMarkupResourceStream, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeginRequest, onComponentTag, onConfigure, onDetach, onEndRequest, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
@Deprecated public static Comparator<File> SORT_BY
public WebFileListView(String id, File currentSelectedRootNode, List<? extends File> list, ResourceListView.ViewContext context, org.apache.wicket.markup.html.form.CheckGroup bulkSelection)
id
- currentSelectedRootNode
- as File; the default Root (if null then will assume #getDefaultFolder()
)list
- context
- as ViewContext
bulkSelection
- as CheckGroup
; component needed if ViewContext#getBulkActionsMetaSpringBeanName()
is not nullpublic WebFileListView(String id, ResourceListView.ViewContext context, org.apache.wicket.markup.html.form.CheckGroup bulkSelection)
FileUploadWrapper#getResourceFolderbasePath()
; automatically gets list of files from folder and sub-folders.id
- context
- as ViewContext
bulkSelection
- as CheckGroup
; component needed if ViewContext#getBulkActionsMetaSpringBeanName()
is not null@PostConstruct public void init()
public final String getAbsolutePath(File resource)
getAbsolutePath
in class ResourceListView<File>
public final String getName(File resource)
getName
in class ResourceListView<File>
public final String getRelativePath(File resource)
getRelativePath
in class ResourceListView<File>
public String getStorageRelativePath(File resource)
ResourceListView
getStorageRelativePath
in class ResourceListView<File>
public final void remove(File resource)
remove
in class ResourceListView<File>
public final boolean isResourceImageType(File resource)
isResourceImageType
in class ResourceListView<File>
public final String getDate(File resource)
getDate
in class ResourceListView<File>
public final Float getSizeKB(File resource)
getSizeKB
in class ResourceListView<File>
public String getClassForResourceType(File resource)
ResourceListView
getClassForResourceType
in class ResourceListView<File>
public void updateFileViewRootNode(File rootNode)
rootNode
- public void updateFileView()
public File getCurrentSelectedRootNode()
public void setCurrentSelectedRootNode(File currentSelectedRootNode)
Copyright © 2018. All rights reserved.