|
||||||||||
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.Iframe
org.zkoss.zkex.zul.Jasperreport
public class Jasperreport
The JasperReport component. It is used to generate a Jasper report into an inline frame.
Available in ZK PE and ZK EE.
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 HtmlBasedComponent.getExtraCtrl() . |
class |
Jasperreport.JasperreporteExporterImpl
|
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
org.zkoss.zk.ui.AbstractComponent.Children |
Field Summary |
---|
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
_zclass |
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl |
---|
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE |
Constructor Summary | |
---|---|
Jasperreport()
|
|
Jasperreport(String src)
|
Method Summary | |
---|---|
Connection |
getDataConnection()
Returns the JasperReports Data Connection. |
net.sf.jasperreports.engine.JRDataSource |
getDatasource()
Returns the JasperReports DataSource. |
protected String |
getEncodedSrc()
|
Object |
getExtraCtrl()
|
JasperreportExporterFactory |
getJasperreporteExporterFactory()
|
Locale |
getLocale()
Returns the output file locale. |
Map<String,Object> |
getParameters()
Returns the JasperReports Parameters. |
org.zkoss.util.media.Media |
getReport()
Returns a AMedia contains report's byte stream. |
String |
getSrc()
Returns the source (jasper file). |
String |
getType()
Returns the output file type. |
void |
invalidate()
|
boolean |
isHibernate()
Returns whether enable the hibernate data source. |
void |
setContent(org.zkoss.util.media.Media media)
Sets the content directly. |
void |
setDataConnection(Connection connection)
Sets the JasperReports Data Connection. |
void |
setDatasource(net.sf.jasperreports.engine.JRDataSource dataSource)
Sets the JasperReports DataSource. |
void |
setHibernate(boolean hibernate)
Sets whether enable the hibernate data source. |
void |
setJasperreporteExporterFactory(JasperreportExporterFactory factory)
Set the factory to use your own exporter, reference to JasperreportExporterFactory |
void |
setJasperreporteExporterFactory(String clsnm)
|
void |
setLocale(Locale locale)
Sets the output file locale. |
void |
setParameters(Map<String,Object> parameters)
Sets the JasperReports Parameters. |
void |
setSrc(String src)
Sets the source (jasper file). |
void |
setType(String type)
Sets the output file type. |
Methods inherited from class org.zkoss.zul.Iframe |
---|
getAlign, getContent, getName, getScrolling, isAutohide, isChildable, renderProperties, service, setAlign, setAutohide, setName, setScrolling |
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
clone, focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflex, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidth, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly |
Methods inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Jasperreport()
public Jasperreport(String src)
Method Detail |
---|
public String getSrc()
getSrc
in class org.zkoss.zul.Iframe
public void setSrc(String src)
If src is changed, the whole component is redrawn.
setSrc
in class org.zkoss.zul.Iframe
src
- The compiled file (jasper file). If null or empty, nothing is
included.public void setContent(org.zkoss.util.media.Media media)
Default: null.
Calling this method implies setSrc(null).
In other words, the last invocation of setContent(org.zkoss.util.media.Media)
overrides
the previous setSrc(java.lang.String)
, if any.
setContent
in class org.zkoss.zul.Iframe
media
- the media to display.setSrc(java.lang.String)
public Map<String,Object> getParameters()
Default: null.
public void setParameters(Map<String,Object> parameters)
"exportParameter"
and value as
another parameter Map.
For example:
String key = JRXlsAbstractExporterParameter.PROPERTY_ONE_PAGE_PER_SHEET.toString();
Map parameters = new HashMap();
Map exportParams = new HashMap();
exportParams.put(key, false);
parameters.put("exportParameter", exportParams);
report.setParameters(parameters);
parameters
- use to fill the reportpublic void setHibernate(boolean hibernate)
public boolean isHibernate()
Default: false
public net.sf.jasperreports.engine.JRDataSource getDatasource()
Default: null.
public void setDatasource(net.sf.jasperreports.engine.JRDataSource dataSource)
dataSource
- use to fill the reportpublic void setDataConnection(Connection connection)
connection
- use to fill the reportpublic Connection getDataConnection()
Default: null
public String getType()
Default: pdf.
public void setType(String type)
type
- type of output file. If type is null, assign it a default value "pdf".public 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() |
public void setLocale(Locale locale)
locale
- the locale. If null, the ZK default is used
(Locales.getCurrent()
).getLocale()
public void setJasperreporteExporterFactory(JasperreportExporterFactory factory)
JasperreportExporterFactory
factory
- public JasperreportExporterFactory getJasperreporteExporterFactory()
public void setJasperreporteExporterFactory(String clsnm) throws NoSuchMethodException, InstantiationException, InvocationTargetException, ClassNotFoundException, IllegalAccessException
clsnm
-
NoSuchMethodException
InstantiationException
InvocationTargetException
ClassNotFoundException
IllegalAccessException
setJasperreporteExporterFactory(JasperreportExporterFactory)
protected String getEncodedSrc()
getEncodedSrc
in class org.zkoss.zul.Iframe
public Object getExtraCtrl()
getExtraCtrl
in interface org.zkoss.zk.ui.sys.ComponentCtrl
getExtraCtrl
in class org.zkoss.zul.Iframe
public org.zkoss.util.media.Media getReport()
public void invalidate()
invalidate
in interface org.zkoss.zk.ui.Component
invalidate
in class org.zkoss.zk.ui.AbstractComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |