[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: cvieira  XML
Profile for cvieira -> Messages posted by cvieira [59] Go to Page: 1, 2, 3, 4 Next 
Author Message
Hi Bjorn,

pdfDescription contains an hex-String. It's correct, i've debugged it... basically is the result of

Code:
ValueManager.encodeHexString(FileManager.readFile(tempFile, true));


If i use the result of this (obtained after debugging) directly on the jsp component, it renders Ok.

Also, if i use a modal popup instead of a new workpage this works well... like this:

Code:
     public void onGeneratePrescriptionReport(ActionEvent ae) {
         try {
             m_pdf = createPdfPrescription(((PatientVisitWorkpage) getWorkpage()).getPatientVisit());
             logger.info(m_pdf);
         } catch (DocumentException ex) {
             Logger.getLogger(Report.class.getName()).log(Level.SEVERE, null, ex);
         } catch (IOException ex) {
             Logger.getLogger(Report.class.getName()).log(Level.SEVERE, null, ex);
         }
 
         /*IWorkpageDispatcher wpd = (IWorkpageDispatcher) getOwningDispatcher().getTopOwner();
         IWorkpageContainer wpc = wpd.getWorkpageContainer();
         IWorkpage wp = new Workpage(wpd,
         "/clinics/report_prescription.jsp",
         "",
         "Prescription Report", null, true);
         wpc.addWorkpage(wp);*/
 
 
         final ModalPopup dlg = getOwningDispatcher().createModalPopup();
         ModalPopup.IModalPopupListener mpl = new DefaultModalPopupListener(dlg) {
 
             @Override
             public void reactOnPopupClosedByUser() {
                 dlg.close();
             }
         };
         dlg.open("/clinics/report.jsp", "Prescription Report", 518, 735, mpl);
         dlg.maximize(true);
     }
 


If instead of opening a modal popup, i use the new workpage approach (commented code), it simply fails... it seems that the getter method does not return what i wanted to return... maybe something related with object instance? I don't think so because it's working fine with modal popup...

Thanks!

Regards,
Hi again,

I've found this on logs, and it looks like the cause for this is not working.

Can you help me understand the logs content for this case? Here they are:

Code:
 2012:02:28 22:41:39:256 | 55     | WARNING  | No property value available for: net.tinylabs.prescryb.workplace.clinics.Report@4ea6a6/pdfPrescription, Error is: javax.el.ELException: Error reading 'pdfPrescription' on type net.tinylabs.prescryb.workplace.clinics.Report
 2012:02:28 22:41:39:257 | 55     | WARNING  |                                  probable complete expression is: #{d.d_8.report.pdfPrescription} (this epxression is only correct in a single-user server scenario)
 


Thanks!

Regards,
Hi,

I'm using pdfrenderer component with no problems, except in one case. I have a button with an actionevent that opens a new workpage where it should be rendered a pdf on a pdfrenderer component. The problem is that i'm trying to set pdfPrescription variable when the action is done, but it cannot get the pdf rendered. Here it is the action method:

Code:
 public class Report extends WorkpageDispatchedBean implements Serializable {
     
     Dispatcher m_dispatcher;
 [...]
     public void onGeneratePrescriptionReport(ActionEvent ae) {
         try {
             m_pdfPrescription = createPdfPrescription(((PatientVisitWorkpage) getWorkpage()).getPatientVisit());
             logger.info(this.m_pdfPrescription);
         } catch (DocumentException ex) {
             Logger.getLogger(PatientVisitMgmt.class.getName()).log(Level.SEVERE, null, ex);
         } catch (IOException ex) {
             Logger.getLogger(PatientVisitMgmt.class.getName()).log(Level.SEVERE, null, ex);
         }
         
         IWorkpageDispatcher wpd = (IWorkpageDispatcher) getOwningDispatcher().getTopOwner();
         IWorkpageContainer wpc = wpd.getWorkpageContainer();
         IWorkpage wp = new Workpage(wpd,
                 "/clinics/report_prescription.jsp",
                 "",
                 "Prescription Report", null, true);
         wpc.addWorkpage(wp);
     }
 [...]
 }
 


Note: If set m_pdfPrescription on constructor, the pdf is correctly rendered.


The jsp looks like this:

Code:
 <!-- ========== CONTENT BEGIN ========== -->
 <f:view>
 <h:form>
 <f:subview id="clinics_report_prescriptiong_sv">
 <t:rowbodypane id="g_1" padding="20" rowdistance="5" >
 <t:rowbodypane id="g_2" >
 <t:row id="g_3" >
 <t:pdfrenderer id="g_4" height="100%" pdf="#{d.report.pdfPrescription}" rendered="true" triggerprint="#{d.report.onTriggerPrint}" width="100%" />
 </t:row>
 </t:rowbodypane>
 </t:rowbodypane>
 <t:pageaddons id="g_pa"/>
 </f:subview>
 </h:form>
 </f:view>
 <!-- ========== CONTENT END ========== -->
 


========

What am i mising here?

Thanks!

Regards,
Hi Bjorn,

I was testing the jrviewer component, and at the beginning i was not loading all necessary jars for use it. I'm now using them and no exception occurs.

So, i'm reading a jrxml file and the component does not render anything. Not even the toolbar is rendered... this also happens on the Editor Toolset. I added the component, but it does not render the component in the preview.

What may be the problem? I'm i missing anything? For example, the pdfrenderer component works fine...

Here is my .jsp file:

Code:
 ~<!-- ========== CONTENT BEGIN ========== -->
 <f:view>
 <h:form>
 <f:subview id="clinics_report_prescriptiong_sv">
 <t:rowbodypane id="g_1" padding="20" rowdistance="5" >
 <t:rowbodypane id="g_2" >
 <t:row id="g_3" >
 <t:jrviewer id="g_4" height="100%" jasperxml="#{d.patientVisitMgmt.xmlPrescription}" rendered="true" width="100%" />
 </t:row>
 </t:rowbodypane>
 </t:rowbodypane>
 <t:pageaddons id="g_pa"/>
 </f:subview>
 </h:form>
 </f:view>
 <!-- ========== CONTENT END ========== -->
 


Thanks!

Regards,
Thanks for the tip!
Regards,
Well thanks! I will give it a try with latest version... if there is any problem i will downgrade till it works

Thanks!

Regards,
Hi Bjorn, but should i expect that it will render xml correctly, if i use latest report designer to create the report?

Thanks,
Hi, can you confirm that jasperreports is still on version 3.7.4, as i look at on some previous posts?

Thank You!

Regards,
Hmmm, i understand your point of view here and i think you're right. I should move then in other direction like log4j, which i use on other projects already.

Thanks your your time!

Regards,
Hmm, only CLog writes to those files right (it's not to late to change code to use it ? I'm using Logger so i might expect to have it only on server side catalina.out.

Thanks!
Hi Bjorn, i did not express clearly. Logs are in fact being written (inside work dir like you said), but what's not being written are my application logs... those log files have only entries from CC.

I'm starting application with loglevel=INFO, and i have some on the application code, but those are not being written.

Any missing configuration from my side?

Thanks!
Hi, i've noticed that on embedded mode application logs are not being written.

Anything different from the normal version? All the logging conf files are configured.

Thanks!
Got it Thanks!
Hi, i'm using jrviewer to show up some reports. My doubts:
* how can we pass parameters to handle on report?
* how can we use as datasource some java object than using jdbc datasource directly on report?

I now this is possible to do accessing jasper objects, but here in CC integration, how can we handle this?

Also, in the demo workplace, there is a reference demo .xml report, but i don't seem to find it...

Any ideas?

Thanks!
Hi Bjorn, the following code:

Code:
 FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
 


... is working perfectly now on CC embedded mode, since last update.

Thanks!
 
Profile for cvieira -> Messages posted by cvieira [59] Go to Page: 1, 2, 3, 4 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team