Re: Current Javassist incompatible with Java 8

2013-09-22 Thread Kalle Korhonen
Unfortunately it doesn't quite seem to work with ASM either, although this sounds like easier to fix. Here's the stack trace for a Trivial Tapestry app using 5.3.7 on Java 8: SEVERE: Exception starting filter Tapestry org.apache.tapestry5.ioc.internal.OperationException: Error building service pro

[T5.4] Tapestry isn't lenient enough when loading CSS files

2013-09-22 Thread Lenny Primak
I am trying to integrate an existing GWT framework as tapestry components. One of the .css files its trying to load references an non-existent .png file. Instead of just ignoring it, Tapestry produces a 500 error loading the .css file, which I don't believe there is a workaround for. I believe th

Re: How to best construct and express this service?

2013-09-22 Thread Martin Kersten
@Lance Using Hibernate SessionSource will just create a new session with no thread local awareness. Is there another service that gives me a per thread session? Would be nice to have a service that automatically gives the session of the current thread? Especially if the thread local thingy is worki

Re: Encoding a template as a valid JSON String

2013-09-22 Thread Martin Kersten
I understand. But there was a way to create a place holder id. I am not quite remembering correctly but it was either injecting a component version that is actually not rendered. So we can use the id of this dummy component for the javascript to write this component. 2013/9/22 Lance Java > > Al

Re: Tapestry + Hibernate + Testing

2013-09-22 Thread Boris Horvat
Well ideally I would like to avoid setting up the abstract class but at lest I have a starting point that I believe I can make it to work. I do have one more question though. Is it possible somehow to automate this? I have my business class that recieves hibernate classes vie a constructor and eac

Re: Tapestry + Hibernate + Testing

2013-09-22 Thread Lance Java
I do this http://stackoverflow.com/questions/15664815/how-to-test-dao-layer-in-tapestry-dependent-projects/15671034#15671034 On 22 September 2013 19:16, Boris Horvat wrote: > Hi all, > > How does one make a proper testing of the business layer in tapestry that I > inject into the page as a serv

Re: BaseURLSource with access to current request

2013-09-22 Thread Andy Pahne
I tried another approach, which unfortunately did not work as well. I copied the source of Tapestry's BaseURLSourceImpl. Then renamed it to CustomBaseURLSourceImpl. For the purpose of the test I did not even modify the source, only gave the class a new name. Then I tried to contribute it as a

Re: BaseURLSource with access to current request

2013-09-22 Thread Andy Pahne
Am 22.09.2013 um 18:48 schrieb Nicolas Bouillon : > Hi, > > You can try starting you application server with this JVM options : > > -Dtapestry.hostport-secure=443 -Dtapestry.hostport=80 > > Nicolas. > That is not really an option, because I don't want to deploy to multiple tomcat instances

Re: BaseURLSource with access to current request

2013-09-22 Thread Andy Pahne
No, that does not work. When I try to inject the Request object as a method parameter, the application won't start. An Exception is thrown on startup: 2013-09-22 20:40:30,689 ERROR ServiceOverride:64 - Construction of service ServiceOverride failed: Error invoking service contribution method de

Tapestry + Hibernate + Testing

2013-09-22 Thread Boris Horvat
Hi all, How does one make a proper testing of the business layer in tapestry that I inject into the page as a service? Is there anything specific that one needs to look out for? Should I simple do something like 1) Create an object of the BU layer 2) Mock hibernate with some in-memory db 3) Call

VS: BaseURLSource with access to current request

2013-09-22 Thread Ville Virtanen
If that is not enough, you can also inject the request and us it in the contributed BaseUrlSource to sniff the host. public static void contributeServiceOverride(final MappedConfiguration configuration, final Request request) { BaseURLSource source = new BaseURLSource() {

Re: BaseURLSource with access to current request

2013-09-22 Thread Nicolas Bouillon
Hi, You can try starting you application server with this JVM options : -Dtapestry.hostport-secure=443 -Dtapestry.hostport=80 Nicolas. 2013/9/22 Andy Pahne : > Hi there, > > I have a T5 app, that > - is party protected with SSL (fronted with Apache) > - also has some unprotected content not

BaseURLSource with access to current request

2013-09-22 Thread Andy Pahne
Hi there, I have a T5 app, that - is party protected with SSL (fronted with Apache) - also has some unprotected content not using SSL - is used to run more than one domain ( www.example.com, www.example.co.uk ) - can be completely browsed using https scheme, even the unprotected pages I hav

Re: How to best construct and express this service?

2013-09-22 Thread Barry Books
It's much easier to just create a page at let Tapestry handle the threading. That's what it's built to do. You can just add synchronized to method if you only want one invocation at a time. If you don't want Hudson. Then I'd create a cron service that takes a configuration of times/urls and calls

Re: How to best construct and express this service?

2013-09-22 Thread Martin Kersten
Thanks Lance. This cleanup advise was what i was looking for. Cheers. 2013/9/22 Lance Java > Igor has written a blog about scheduling jobs with tapestry here > > http://blog.tapestry5.de/index.php/2011/09/18/scheduling-jobs-with-tapestry/ > > The hibernate session provided by tapestry is a sing

Re: How to best construct and express this service?

2013-09-22 Thread Lance Java
Igor has written a blog about scheduling jobs with tapestry here http://blog.tapestry5.de/index.php/2011/09/18/scheduling-jobs-with-tapestry/ The hibernate session provided by tapestry is a singleton and can be injected as any other service. The singleton is a proxy to a per-thread instance which

Re: Encoding a template as a valid JSON String

2013-09-22 Thread Lance Java
> Also if I remember correctly doesnt Tapestry always create unique ids for > elements by adding $number to the components name? Whilst it's true that most tapestry components will avoid an id conflict when rendering, in this case it's not tapestry rendering the second instance. A javascript is us

Re: How to best construct and express this service?

2013-09-22 Thread Martin Kersten
:) I know Barry. I marked your former post about this. But I dont want a page right now. But this calling it directly ... well that is a good one. But object.notify is also easy and makes it possible to assume only one invocation of the processor is running once at a time per JVM. But sadly makin