Podpora tisku. Implementace tisku dynamických sestav.

This commit is contained in:
2014-05-26 21:44:55 +02:00
parent 34c4144f46
commit 25a4d2dfb7
27 changed files with 724 additions and 4 deletions
@@ -84,6 +84,15 @@
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder"/>
<bean id="loginFail" class="info.bukova.isspst.security.LoginFailHandler"/>
<!-- Reporting -->
<bean id="reportDefinition" class="info.bukova.isspst.reporting.ReportDefinition" scope="session">
<aop:scoped-proxy/>
</bean>
<bean id="definitionFiller" class="info.bukova.isspst.reporting.DefinitionFiller"/>
<bean id="genFactory" class="info.bukova.isspst.reporting.GeneratorFactory"/>
<!-- DAO -->
<bean id="userDao" class="info.bukova.isspst.dao.jpa.UserDaoJPA">
+6 -2
View File
@@ -19,7 +19,11 @@
</listener>
<listener>
<listener-class>info.bukova.isspst.DbInitListener</listener-class>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>info.bukova.isspst.AppInitListener</listener-class>
</listener>
<!-- ZK -->
@@ -113,7 +117,7 @@
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/api/</url-pattern>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
<mime-mapping>
@@ -22,3 +22,9 @@ ToolbarRecNew=Nový záznam
ToolbarRecEdit=Úprava aktuálního záznamu
ToolbarRecDelete=Odstranit aktuální záznam
ToolbarRecFilter=Filtr záznamů
ReportReport=Sestava
ReportSend=Odeslat
ReportPrint=Tisk
ReportReports=Sestavy
ReportTitle=Nadpis sestavy:
+10
View File
@@ -0,0 +1,10 @@
<?page title="${labels.ReportReport}" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="${labels.ReportReport}" border="normal" closable="true" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.ReportVM')">
<toolbar>
<toolbarbutton image="/img/send.png" tooltiptext="${labels.ReportSend}"/>
</toolbar>
<iframe width="800px" height="680px" src="/api/report.pdf"/>
</window>
</zk>
+32
View File
@@ -0,0 +1,32 @@
<?page title="${labels.ReportReports}" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="reportDialog" title="${labels.ReportReports}" border="normal" apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('info.bukova.isspst.ui.ReportDialogVM')"
closable="true" width="550px">
<hbox>
<listbox model="@load(vm.reports)" width="250px" height="350px" selectedItem="@bind(vm.selected)">
<template name="model">
<listitem>
<listcell><label value="@load(each.name)"/></listcell>
</listitem>
</template>
</listbox>
<groupbox mold="3d" closable="false" width="270px">
<caption label="${labels.ReportOptions}"></caption>
<hbox>
<label value="${labels.ReportTitle}"/> <textbox value="@bind(vm.reportDefinition.reportTitle)"/>
</hbox>
<vbox children="@load(vm.columns.checks)">
<template name="children">
<checkbox label="@load(each.member)" checked="@bind(each.checked)"/>
</template>
</vbox>
</groupbox>
</hbox>
<hbox>
<button label="${labels.ReportPrint}" onClick="@command('print', window=reportDialog)"/> <button label="${labels.ButtonStorno}" onClick="reportDialog.detach()"/>
</hbox>
</window>
</zk>
+1
View File
@@ -5,5 +5,6 @@
<toolbarbutton image="/img/edit.png" tooltiptext="Upravit" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
<toolbarbutton image="/img/delete.png" tooltiptext="Smazat" id="btnDelete" onClick="@command('delete')" disabled="@load(empty vm.dataBean ? 'true' : 'false')"/>
<toolbarbutton image="/img/funnel.png" tooltiptext="Filtr" id="btnFilter" onClick="@command('filter')" />
<toolbarbutton image="/img/print.png" tooltiptext="Filtr" id="btnPrint" onClick="@command('onPrint')" />
</toolbar>
</zk>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB