Hi Etienne, That's just the thing that I need. I was tried it and works it. Thank you very much.
Anton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Etienne Studer Sent: Monday, October 23, 2006 1:32 AM To: [email protected]; Anton Levcik Subject: RE: [ULC-developer] Transfer serialisabled data using invokeUI Hi Anton Sure you can. Just serialize the onject into an ByteArrayOutputStream and transfer the resulting byte array to the client. There you can deserialize using a ByteArrayInputStream. You still have to make sure that both client and server contain the class to serialize and deserialize on the classpath. Etienne -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anton Levcik Sent: Saturday, October 21, 2006 12:06 AM To: '[EMAIL PROTECTED] Com'; [EMAIL PROTECTED] Subject: RE: [ULC-developer] Transfer serialisabled data using invokeUI Hi Janak, Etienne, Alberto, Thank you very much for advices and interest. I agree with you, that simplest way how to use Jsper Reports is through generating pdf files on the server and sendig it to client. But this way has some depressions, that in this moment are not important. Important for me in this discussion is answer for question: "Is it possible transfer serializable object using ULC to client?". It is general question related not only to Jasper Reports, but related situations, when I use classes, which internal structure I dont know, and I need to use these objects on client side. Typicaly, object is generated on the server and will used on the client. If it were possible, would be it strong argument against AJAX, because with ULC I would be able to optimise J2EE client applications. It is very impractical save that object to file, transfer it to client, read from file and deserialisable it. In addition, it is out of application control. Currently it is probably not possible. Or am I mistaken? Thanks and regards Levcik Anton -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Janak Mulani Sent: Friday, October 20, 2006 7:56 PM To: Anton Levcik Cc: '[EMAIL PROTECTED] Com' Subject: RE: [ULC-developer] Transfer serialisabled data using invokeUI Hi Anton, In the Coder for JasperPrint class, in the writeObject method, you should be writing out attributes of the object such that you can recreate the object in the readObject method on the otherside. However, as others have suggested it is better to create a PDF file of the report on the server and have it sent to the client or have it opened from the client using a URL. This will enable you to print the reports too. Thanks and regards, Janak >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of Anton Levcik >Sent: Friday, October 20, 2006 1:06 PM >To: '[EMAIL PROTECTED] Com' >Subject: RE: [ULC-developer] Transfer serialisabled data using invokeUI > > >Hi Janak, > >Thanks for advice, but when I write custom coder, I have problem how to >put, for example JasperPrint object, to the IObjectOutputStream in >metode writeObject, or how to get JasperPrint object from >IObjectInputStream in metode readObject custom reader object. > >JasperReports product has utilities JRLoader and JRSaver which work >with streams, but those streams are java.io streams. >ULC is not attached with those streams. > >Thence I tried put JasperPrint object directly to IObjectOutputStream >Object through methode writeObject (JasperPrint implements >Serialisable) and get it directly from IObjectInputStream object >through readObject methode, but in this case, occures error: StackOverflowError. >I tried it in DevelopmentRunner ULC 6.1.1. > >Source code for custom coder I attached with this mail. > >Thanks fo advice. > >Anton Levcik CIS Bratislava, Slovakia > > > > > >-----Original Message----- >From: Janak Mulani [mailto:[EMAIL PROTECTED] >Sent: Thursday, October 19, 2006 1:15 PM >To: Anton Levcik >Cc: '[EMAIL PROTECTED] Com' >Subject: RE: [ULC-developer] Transfer serialisabled data using invokeUI > >Hi Anton, > >Yes, this is possible. > >You will have to write a Coder for the class whose instance you want to >send to the client as an argument to invokeUI() call. > >Please see sections 3.4.4 and 4.4 of the ULC Extensions Guide. > >Once you have written a Coder you will have to register it with the >CoderRegistryProvider on the client and server. > >The CoderRegistryProviders are specified as parameters to the ULC >client (Applet param or JNLP param) and ULC server (servlet param). > >For the DevelopmentRunner use setClientRegistryProviderClassName() and >setServerRegistryProviderClassName() APIs. > >Thanks and regards, > >Janak > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of Anton Levcik >Sent: Wednesday, October 18, 2006 3:41 PM >To: '[EMAIL PROTECTED] Com' >Subject: [ULC-developer] Transfer serialisabled data using invokeUI > > >Hi, > >It is possible write extension so that I may transfer serialisabled >data from server to client side using invokeUI methode? > >I like to integrate Jasper Reports to ULC client and I know it using >transfer files between server and client. But it would be better use >output stream on the server side and transfer design or report to the >viewer using input stream to the client side. >I see possible solution to write custom coder for Serialisable type. It >si possible? > >Thanks for advice > > Levcik Anton CIS Bratislava Slovakia > > > _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
