|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.components.Component
org.olat.core.gui.components.download.DisplayOrDownloadComponent
public class DisplayOrDownloadComponent
Description:
The DisplayOrDownloadFileComponent offers a way to open a javascript popup
window and open a resource in this window. Note that this might be blocked by
the browser!
In case the browser can display the content, it will display it in the browser. Otherwhise, it will start downloading the file.
A filedownload is only triggered once. If the component becomes visible a second time, the filedownload will not be initiated again and again. A second filedowload can be triggered by using the triggerFileDownload() method.
Initial Date: 05.11.2009
| Constructor Summary | |
|---|---|
DisplayOrDownloadComponent(java.lang.String name,
java.lang.String fileUrl)
Constructor. |
|
| Method Summary | |
|---|---|
ComponentRenderer |
getHTMLRendererSingleton()
|
void |
triggerFileDownload(java.lang.String fileUrl)
Set the file URL of the file that should be downloaded automatically. |
| Methods inherited from class org.olat.core.gui.components.Component |
|---|
addListener, debuginfoGetListeners, dispatchRequest, getAndClearLatestFiredEvent, getComponentName, getDispatchID, getExtendedDebugInfo, getLatestDispatchedController, getListenerInfo, getParent, getSpanAsDomReplaceable, getTimestamp, getTranslator, isDirty, isDirtyForUser, isDomReplaceable, isEnabled, isVisible, setDirty, setDomReplaceable, setEnabled, setSpanAsDomReplaceable, setVisible, toString, validate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DisplayOrDownloadComponent(java.lang.String name,
java.lang.String fileUrl)
name - the component namefileUrl - a valid URL that points to a file to be downloaded. Note
that this controller does only open the URL in a new window which
triggers the download or display of the file. The dispatching of
the file is up to the caller of this method. NULL if not known at
the moment. Use triggerFileDownload() in such cases later on.| Method Detail |
|---|
public ComponentRenderer getHTMLRendererSingleton()
getHTMLRendererSingleton in class ComponentComponent.getHTMLRendererSingleton()public void triggerFileDownload(java.lang.String fileUrl)
fileUrl - a valid URL that points to a file to be downloaded. Note
that this controller does only open the URL in a new window which
triggers the download or display of the file. The dispatching of
the file is up to the caller of this method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||