|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Iframe
org.zkoss.zkex.zul.Jasperreport
public class Jasperreport
The JasperReport component. It is used to generate a Jasper report into an inline frame.
Note: this component is serializable only if the data source (getDatasource())
is serializable.
| Nested Class Summary | |
|---|---|
protected class |
Jasperreport.ExtraCtrl
A utility class to implement AbstractComponent.getExtraCtrl(). |
| Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
AbstractComponent.Children |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
_zclass, RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH |
| Fields inherited from class org.zkoss.zk.ui.AbstractComponent |
|---|
_visible |
| Fields inherited from interface org.zkoss.zk.ui.Component |
|---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
| Constructor Summary | |
|---|---|
Jasperreport()
|
|
Jasperreport(java.lang.String src)
|
|
| Method Summary | |
|---|---|
net.sf.jasperreports.engine.JRDataSource |
getDatasource()
Returns the JasperReports DataSource. |
protected java.lang.String |
getEncodedSrc()
Returns the encoded src ( Iframe.getSrc()). |
java.util.Locale |
getLocale()
Returns the output file locale. |
java.util.Map |
getParameters()
Returns the JasperReports Parameters. |
java.lang.String |
getSrc()
Returns the source (jasper file). |
java.lang.String |
getType()
Returns the output file type. |
void |
invalidate()
Invalidates this component by setting the dirty flag such that it will be redraw the whole content later. |
protected java.lang.Object |
newExtraCtrl()
Used by AbstractComponent.getExtraCtrl() to create a client control. |
void |
setContent(Media media)
Sets the content directly. |
void |
setDatasource(net.sf.jasperreports.engine.JRDataSource dataSource)
Sets the JasperReports DataSource. |
void |
setLocale(java.util.Locale locale)
Sets the output file locale. |
void |
setParameters(java.util.Map parameters)
Sets the JasperReports Parameters. |
void |
setSrc(java.lang.String src)
Sets the source (jasper file). |
void |
setType(java.lang.String type)
Sets the output file type. |
| Methods inherited from class org.zkoss.zul.Iframe |
|---|
getAlign, getContent, getName, getOuterAttrs, getScrolling, isAutohide, isChildable, setAlign, setAutohide, setName, setScrolling |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
|---|
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
|---|
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getMoldSclass, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, redraw, setClass, setDraggable, setDroppable, setFocus, setHeight, setLeft, setMoldSclass, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.zkoss.zul.api.Iframe |
|---|
getAlign, getContent, getName, getScrolling, isAutohide, setAlign, setAutohide, setName, setScrolling |
| Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
|---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
|---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Constructor Detail |
|---|
public Jasperreport()
public Jasperreport(java.lang.String src)
| Method Detail |
|---|
public java.lang.String getSrc()
getSrc in interface IframegetSrc in class Iframepublic void setSrc(java.lang.String src)
If src is changed, the whole component is invalidate.
setSrc in interface IframesetSrc in class Iframesrc - The compiled file (jasper file). If null or empty, nothing is
included.Iframe.setContent(org.zkoss.util.media.Media)public void setContent(Media media)
IframeCalling this method implies setSrc(null).
In other words, the last invocation of Iframe.setContent(org.zkoss.util.media.Media) overrides
the previous Iframe.setSrc(java.lang.String), if any.
setContent in interface IframesetContent in class Iframemedia - the media for this inline frame.Iframe.setSrc(java.lang.String)protected java.lang.String getEncodedSrc()
IframeIframe.getSrc()).
getEncodedSrc in class Iframepublic java.util.Map getParameters()
Default: null.
getParameters in interface Jasperreportpublic void setParameters(java.util.Map parameters)
setParameters in interface Jasperreportparameters - use to fill the reportpublic net.sf.jasperreports.engine.JRDataSource getDatasource()
Default: null.
getDatasource in interface Jasperreportpublic void setDatasource(net.sf.jasperreports.engine.JRDataSource dataSource)
setDatasource in interface JasperreportdataSource - use to fill the reportpublic java.lang.String getType()
Default: pdf.
getType in interface Jasperreportpublic void setType(java.lang.String type)
setType in interface Jasperreporttype - type of output file. If type is null, assign it a default value "pdf".public java.util.Locale getLocale()
Default: null (means the ZK default, Locales.getCurrent())).
getLocale() |
getParameters() with a valueassociated with JRParameter.REPORT_LOCALE |
What is used |
| X | ignored | X |
| null | Y | Y |
| null | null | Locales.getCurrent() |
getLocale in interface Jasperreportpublic void setLocale(java.util.Locale locale)
setLocale in interface Jasperreportlocale - the locale. If null, the ZK default is used
(Locales.getCurrent()).getLocale()public void invalidate()
ComponentIt can be called only in the request-processing and event-processing phases; excluding the redrawing phase.
invalidate in interface Componentinvalidate in class AbstractComponentprotected java.lang.Object newExtraCtrl()
HtmlBasedComponentAbstractComponent.getExtraCtrl() to create a client control.
It is used only by component developers.
Defaut: creates an instance of HtmlBasedComponent.ExtraCtrl.
newExtraCtrl in class Iframe
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||