Re: Images from DB to PDF File

2012-11-30 Thread arterzatij
I'll check it Lance, but in the while the Itext solution fits on my requirement they are just pictures, thanks folks it's up and running :) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Images-from-DB-to-PDF-File-tp5718438p5718445.html Sent from the Tapestry - User mail

Re: Images from DB to PDF File

2012-11-30 Thread Lance Java
I've written a component which allows the power of tapestry components to extend to PDFs by integrating with apache FOP. Apache FOP: http://xmlgraphics.apache.org/fop/ PDF Demo: https://github.com/uklance/tapestry-stitch-demo/blob/master/src/main/java/org/lazan/t5/stitch/demo/pages/PDFDemo.java

Re: AJAX updating table row

2012-11-30 Thread Geoff Callender
In onDeactivate(Long serviceID), get the service! Tapestry is trying to render the row so it can send it back in the response - so it needs the service. Cheers, Geoff On 01/12/2012, at 4:01 AM, Pillar wrote: > Hey! Always more questions! > > I'm following this example: Ajax EventLinks in a L

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread Geoff Callender
The following is a working example. It uses hidden version. Try opening in two browsers and changing the person in both - you'll get the optimistic lock exception. Don't check the versions yourself - leave that to Hibernate. http://jumpstart.doublenegative.com.au/jumpstart/examples/inpu

Re: AJAX updating table row

2012-11-30 Thread Paul Stanton
each ajax request is still a new request and therefore properties in your page class are lost from the previous render. unless you mark them as @Persist. but in your case, your `service` property is set by the loop component. this is not going to be "emmulated" by the ajax request processing s

Re: Images from DB to PDF File

2012-11-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Nov 2012 18:06:59 -0200, Bob Obringer wrote: Take a look at iText http://itextpdf.com/ It will provide you with many different approaches to actually get your images out of the database and insert them into a PDF. I've been loading images and inserting them into iText for seve

Re: Images from DB to PDF File

2012-11-30 Thread Bob Obringer
Take a look at iText http://itextpdf.com/ It will provide you with many different approaches to actually get your images out of the database and insert them into a PDF. I've been loading images and inserting them into iText for several years with great success. -- Bob Obringer Sent with S

Images from DB to PDF File

2012-11-30 Thread arterzatij
Hi folks, There is a way to build a pdf files from images stores on DB? I like to do something like follows: The user has a link that contains context params, when the user clicks on it the PDF gonna be generated (as stream response) and then downloaded to client side ... Any point is welc

Re: @Scope PerThread may cause PermGen errors?

2012-11-30 Thread Christian Riedel
Yes, as I said the annotation was just there by accident. But thanks for making it clear. I guess using ObjectLocator.proxy has the same effect? One has to be careful not to misuse this feature. Well, Howards, thanks for taking the minute :-) I already had a peek at the latest 5.4 code and even

Re: newbie question on tapestry-hiberate

2012-11-30 Thread dreamer1212
Thanks Taha and Thiago, sounds like I should embrace tapestry-hibernate for handy projects. -- View this message in context: http://tapestry.1045711.n5.nabble.com/newbie-question-on-tapestry-hiberate-tp5718412p5718436.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: @Scope PerThread may cause PermGen errors?

2012-11-30 Thread Howard Lewis Ship
Per-thread scope means to create a new implementation, via the builder method, once for every request: buldUserCacheSupport() is invoked the first time any method of UserCacheSupport is invoked. EnvironmentalBuilder creates a proxy class and instance, and is intended to only be invoked once per se

@Scope PerThread may cause PermGen errors?

2012-11-30 Thread Christian Riedel
Hi everone, today I found the reason for a recent memory leak and I thought I'd ask what you think of it: Rather by accident I annotated one of the EnvironmentalShadowBuilder-methods with @Scope(PERTHREAD) @Scope(ScopeConstants.PERTHREAD) public UserCacheSupport buildUserCacheSupport()

AJAX updating table row

2012-11-30 Thread Pillar
Hey! Always more questions! I'm following this example: Ajax EventLinks in a Loop . I've modified some code to fit my use case. I have a table that uses a t:loop to iterate through services and show if they are a

Re: Auto resolve base page from HTTP to HTTPS

2012-11-30 Thread George Christman
Ah yes, your correct. Thanks Thiago. Is this something I need to do manually? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Auto-resolve-base-page-from-HTTP-to-HTTPS-tp5718424p5718432.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Thanks for the ideas, I will look into this :) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-optimistic-locking-tp5718413p5718431.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Doesn't seem to work. It does work if I do the following: .tml - .class -- @Property private Integer version; void setupRender() { version = person.getVersion() } void onSuccess() { if(version == person.getVersion) { // do update } else { // don't do

Re: Auto resolve base page from HTTP to HTTPS

2012-11-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Nov 2012 13:12:43 -0200, George Christman wrote: This may be a case for a URL writter, but before I go down that path, I just wanted to first verify there is no setting to handle this automatically. I don't think this words means what you think it means. :P URL rewriting is

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread Taha Siddiqi
If you ready to go deeper, you can change a bit of tapestry-hibernate source code to implement it (NOT TESTED) 1. Add a version field (annotated with @Version) to your entity. 2. Add a field version to PersistedEntity. 3. In EntityPersistentFieldStrategy, store version along with id and entity-t

Re: Auto resolve base page from HTTP to HTTPS

2012-11-30 Thread George Christman
I'm using, public void contributeMetaDataLocator(MappedConfiguration configuration) { configuration.add(MetaDataConstants.SECURE_PAGE, "true"); } to secure all pages and from my understanding @Secure wouldn't be needed. My app uses TapestrySecurity and when you for access the app, Tap

Re: Auto resolve base page from HTTP to HTTPS

2012-11-30 Thread trsvax
If you just mean the page should always be ssl just use @Secure http://tapestry.apache.org/https.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Auto-resolve-base-page-from-HTTP-to-HTTPS-tp5718424p5718426.html Sent from the Tapestry - User mailing list archive at Na

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Nice idea and seems to work. I changed to Integer version, because as you all said it is recommended and timestamp is sligthly less safe. So I have this now: Index.class public class Index { @Inject private PersonRepository personRepo; @Property private

Auto resolve base page from HTTP to HTTPS

2012-11-30 Thread George Christman
Hello, I'm wondering if tapestry has the ability to auto resolve a base page to https rather than http? Would this be something that would need to be done with a URL rewritter, or is this something that can be handled with HTTPS settings? -- View this message in context: http://tapestry.1045711

Re: newbie question on tapestry-hiberate

2012-11-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Nov 2012 09:59:47 -0200, Taha Siddiqi wrote: In my view PROS : 1. Simple:- add dependencies, write a hibernate.cfg.xml and put it in your resources directory and you are done. 2. Done tapestry style, you can inject Session into pages, components(I know bad practise) or service

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Nov 2012 10:08:54 -0200, nquirynen wrote: Hi, Hi! Thanks for the explanation. Yes with "I understand its not working" I meant my approach is failing. I understand optimistic locking is working, but just don't know how to make use of it. So you mean I have to use Persist ins

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread Taha Siddiqi
I don't think @Persist will work. If you ready to go deeper, you can change a bit of tapestry-hibernate source code to implement it (NOT TESTED) 1. Add a version field (annotated with @Version) to your entity. 2. Add a field version to PersistedEntity. 3. In EntityPersistentFieldStrategy, store

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Hi, Thanks for the explanation. Yes with "I understand its not working" I meant my approach is failing. I understand optimistic locking is working, but just don't know how to make use of it. So you mean I have to use Persist instead of activation context? -- View this message in context: http

Re: newbie question on tapestry-hiberate

2012-11-30 Thread Taha Siddiqi
In my view PROS : 1. Simple:- add dependencies, write a hibernate.cfg.xml and put it in your resources directory and you are done. 2. Done tapestry style, you can inject Session into pages, components(I know bad practise) or services. 3. Minimum configuration CONS: 1. Tapestry can handle only

Re: Information about the Servlet Container

2012-11-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Nov 2012 09:27:36 -0200, Peter Wendorff wrote: Hi. Hi! I would like to get some information about the servlet container the application is running in, like the servlet containers name, probably path's and so on. This kind of information, when available, is contained into a

Information about the Servlet Container

2012-11-30 Thread Peter Wendorff
Hi. I would like to get some information about the servlet container the application is running in, like the servlet containers name, probably path's and so on. How could that be achieved in a tapestry component? regards Peter --

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread Lance Java
Should have been -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-optimistic-locking-tp5718413p5718416.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsub

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread Lance Java
In order to use optimistic locking, hibernate recommends that you use an integer version annotated with @Version on your entity. @Entity public class Person implements Serializable { @Column private String name; @Version @Column private Integer version; // getters and set

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread Thiago H de Paula Figueiredo
On Fri, 30 Nov 2012 08:47:55 -0200, nquirynen wrote: Hi, Hi! When I submit the form it will always first get the Person object again through onActivate so I understand why this isnt working. It's actually working. Optimistic locking doesn't seem to actually be what you think it is. Hi

Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Hi, I'm not sure if this question belongs here, but thought it might have been something that others came along too. I have a Tapestry application using Hibernate. Now I am trying to add Hibernate's optimistic locking using a Timestamp. In my Tapestry page I have an activation context to retriev

newbie question on tapestry-hiberate

2012-11-30 Thread dreamer1212
Hi lists, Sorry if this question has been asked or self-explain for tapestry veterans. What're the pros and cons of using tapestry-hibernate, I mean what will I miss if I let spring handle all presistence for me, I don't want to lose the ability to make my transaction declarative... Thanks Dougla