RE: T5.1 and Threaded Background Tasks

2010-09-02 Thread Alfie Kirkpatrick
I thought it was also interesting/cool that proxies are serializable, so that you can do things like add a service as a property to a Quartz job and (provided it's a job that runs in the same VM lifetime) it works perfectly. Alfie. -Original Message- From: Howard Lewis Ship [mailto:hls.

RE: Quartz Job setup with JobDetails requires parameter free constructor - how to inject Service bindings

2010-07-13 Thread Alfie Kirkpatrick
It's still a WIP but I created a TapestryJobCreator which gets a PerthreadManager and a Runnable (your service) in the JobDataMap. This just calls run() on the service and does any cleanup. I need to tidy up the job creation part but you could easily get to the point where you had something lik

RE: Good practices for handling page cleanup

2010-04-14 Thread Alfie Kirkpatrick
There's been some discussion on this in the past. The easiest way if AJAX is your only scenario is probably using request.isXHR(). An alternative is to maybe use the ComponentEventLinkEncoder either directly or by intercepting it. It knows whether the request is for a page or component event. h

Page activation context again

2010-02-15 Thread Alfie Kirkpatrick
I've been trawling the archive again on ways to manipulate the page activation context and break up the parameters. The specific scenario I'm working on is that of 'hijacking' part of the activation context by a transformation worker or similar. For example, I'd like to be able to define a

RE: [T5.2.0-SNAPSHOT] Block to String without MarkupWriter

2010-02-15 Thread Alfie Kirkpatrick
A simpler question. In my scenario I want to render a block and do have a MarkupWriter, but cannot see an obvious way to do it (even in 5.2.0-SNAPSHOT). Thanks, Alfie. -Original Message- From: Howard Lewis Ship [mailto:hls...@gmail.com] Sent: 14 February 2010 16:23 To: Tapestry users Su

RE: Workflow Engine for tapestry

2010-01-05 Thread Alfie Kirkpatrick
Agree with others that it runs fine in other app servers, and that it's a nice product to work with. I did some work to replicate the spring integration technique in T5 meaning you can use tapestry services as jBPM handlers, etc provided they aren't per thread scope. I handed this over to Alejandro

Problem with ComponentResources.getElementName()?

2009-11-09 Thread Alfie Kirkpatrick
This call appears to remove any namespace information, so the following are not equivalent: In the first case the element parameter is "ns:something". In the second case calling getElementName() returns 'something' without the namespace. Is this intent

RE: Adding XML process-instruction to tml

2009-11-09 Thread Alfie Kirkpatrick
To: Tapestry users Subject: Re: Adding XML process-instruction to tml A component could do this, by outputting the tag using markupWriter.writeRaw(). On Sun, Nov 8, 2009 at 4:04 AM, Alfie Kirkpatrick wrote: > Hi, I would like to add a PI for xml-stylesheet to some of my pure XML > pages,

Adding XML process-instruction to tml

2009-11-08 Thread Alfie Kirkpatrick
Hi, I would like to add a PI for xml-stylesheet to some of my pure XML pages, eg. in the tml...

Same page, two different content-types

2009-11-03 Thread Alfie Kirkpatrick
Hi, I'd like to have the same page class return two different content types depending on circumstances. Is this possible? The existing ContentTypeWorker modifies the component model which is immutable at runtime. In particular (and I realise this is a hack), I want to use locale to decide betwe

RE: T5: t:delegate and component recursion emulation

2009-10-15 Thread Alfie Kirkpatrick
I can't comment in detail on your solution but it looks a bit convoluted in the TML for my liking. A tree should be a first class component and in this case I am prepared to do a little more work in the component class to make it simple and intuitive to use. I wrote an ajax tree a while back but ju

RE: Accessing the T5 IoC Registry

2009-10-07 Thread Alfie Kirkpatrick
You can inject ObjectLocator into a service but it doesn't sound like this would work for you as it's still essentially injection in the normal way. For webapps TapestryFilter doesn't put the registry in a static anywhere so there is no way to get the registry from 'outside' the dependency injecti

RE: Dynamic form

2009-09-29 Thread Alfie Kirkpatrick
I made a hashmap backed beaneditform for something similar, so the property conduit just read/writes from the hashmap and the model comes from somewhere else (this was a dynamic search form in my case where the model was a JCR repo). Happy to share the code if it would be useful. Regards, Alfie.

RE: How to .tml template access a class's static variable

2009-09-08 Thread Alfie Kirkpatrick
Since it is public static can you not just have: - B.java -- public class B { public String getNameOfA() { return A.getName(); } } - B.tml -- ${nameOfA} Or am I missing something? If it was not static you co

RE: Supporting multiple devices, eg. browser + mobile + TV

2009-09-03 Thread Alfie Kirkpatrick
hristian. On 2009-09-02, at 23:13 , Thiago H. de Paula Figueiredo wrote: > Em Wed, 02 Sep 2009 20:36:21 -0300, Alfie Kirkpatrick > > escreveu: > >> So I think T5 helps separate concerns and assists in building >> multi-device apps (ie. it's a decent framework to do t

RE: Supporting multiple devices, eg. browser + mobile + TV

2009-09-02 Thread Alfie Kirkpatrick
rl Crowder [mailto:carl.crow...@taptu.com] Sent: 02 September 2009 22:36 To: Tapestry users Subject: Re: Supporting multiple devices, eg. browser + mobile + TV Thiago H. de Paula Figueiredo wrote: > Em Wed, 02 Sep 2009 18:10:56 -0300, Alfie Kirkpatrick > escreveu: > >> Am wondering a

Supporting multiple devices, eg. browser + mobile + TV

2009-09-02 Thread Alfie Kirkpatrick
Am wondering about ways to support this scenario cleanly in T5, where visual layout is very different per device but the page classes could be quite similar (clearly this depends to a large extent on whether devices have radically different page flows and layouts). One obvious approach would be

Page lifecycle and ComponentClassTransformWorker

2009-08-11 Thread Alfie Kirkpatrick
Hi, I am attempting to implement an annotation for page classes and corresponding ComponentClassTransformWorker for this. I'm using IncludeJavaScriptLibraryWorker and the AbstractIncludeAssetWorker base class as an example. The problem I'm facing is that the custom perform() method I'm creating

RE: Using a checkbox in a grid component

2009-08-11 Thread Alfie Kirkpatrick
As Sebastian points out if the boolean selected field is part of your pojo it is trivial to bind this to a checkbox in the grid. This was my initial approach for simplicity but in my case the pojos were Hibernate entities and I didn't want this field to be persisted or to clutter up the entity as a

Anyone using Java Rebel and T5?

2009-07-21 Thread Alfie Kirkpatrick
Hi, have recently installed the trial of Java Rebel and wondered if anyone else has been using it and found issues, etc. So far it seems to be reloading my services no problem which is a big win now that I'm so used to having this ability for page/component classes. But have not really used it

RE: Dynamic service binding based on symbol source

2009-07-16 Thread Alfie Kirkpatrick
I managed to implement exactly what I wanted with a single additional bind method overload on ServiceBinderImpl. As usual with Tapestry a fair bit of head scratching but very little resulting work! Have submitted with patch as an enhancement request. If anyone is interested in the detail (or wants

RE: Dynamic service binding based on symbol source

2009-07-15 Thread Alfie Kirkpatrick
"VariantB") Service serviceB) { switch(numeric) { case 2: return serviceA; case 42: return serviceB; default: throw new Exception(); } } if you want to use the Service without qualifier you could define another inteface for the variants g, kr

RE: Dynamic service binding based on symbol source

2009-07-15 Thread Alfie Kirkpatrick
From: Massimo Lusetti [mailto:mluse...@gmail.com] Sent: 14 July 2009 13:47 To: Tapestry users Subject: Re: Dynamic service binding based on symbol source On Tue, Jul 14, 2009 at 2:43 PM, Alfie Kirkpatrick wrote: > I would like to instantiate a different service implementation depending > o

RE: Dynamic service binding based on symbol source

2009-07-14 Thread Alfie Kirkpatrick
imo Lusetti [mailto:mluse...@gmail.com] Sent: 14 July 2009 13:47 To: Tapestry users Subject: Re: Dynamic service binding based on symbol source On Tue, Jul 14, 2009 at 2:43 PM, Alfie Kirkpatrick wrote: > I would like to instantiate a different service implementation depending > on property fil

RE: T5 Page field persistance and multithread problems

2009-07-14 Thread Alfie Kirkpatrick
Hi Kristjan, I think your mail is interesting but tend to agree with the other posters who say this is not a Tapestry issue per se. I do not know of any framework that queues up requests from a particular session to ensure they are not executed in parallel. This would seem to be a bad idea in prin

Dynamic service binding based on symbol source

2009-07-14 Thread Alfie Kirkpatrick
Hi, am trying to do something similar to that outlined in this thread... http://markmail.org/thread/55zw3cg6n7zbfehn, but there was no firm conclusion to it I can see. I would like to instantiate a different service implementation depending on property file configuration, eg. a stub for testing

Coding trap for the unwary or am I totally confused?

2009-07-09 Thread Alfie Kirkpatrick
I have a page with a grid in a form and a checkbox per row in the grid. The checkbox is bound to a property in the page which backs off to a hash set, like so: // TODO: not sure why this works - should not be persisted between requests! private HashSet selectedSet=new HashSet();

RE: Mixin to grid component - adding columns

2009-07-06 Thread Alfie Kirkpatrick
Thanks Robert that all makes sense to me. Had a funny feeling I was going to run up against TAP5-103 again on this one ;-) Regards, Alfie. -Original Message- From: Robert Zeigler [mailto:robe...@scazdl.org] Sent: Mon 06/07/2009 18:18 To: Tapestry users Subject: Re: Mixin to grid componen

Mixin to grid component - adding columns

2009-07-06 Thread Alfie Kirkpatrick
Hi, I'd like to write a mixin to the grid component which adds a column which is under the control of the mixin. In my case it's a checkbox column where the selected state is held by the mixin. Not sure if this is ultimately going to work (well) but am seeing how far I can take it... So the TML

Accessing the tapesty registry from a service

2009-07-06 Thread Alfie Kirkpatrick
Hi, is there a way to do this? I am building a service for jBPM in my module and it needs to lookup services in the registry. I could do this by hacking TapestryFilter and putting the registry in a singleton but am wondering if there is a neater way. I could also explicitly pass services into my jB

Accessing parameter of container from mixin

2009-07-02 Thread Alfie Kirkpatrick
Hi, I am writing a mixin that can be used with submit, actionlink, linksubmit and other things that support a zone parameter. I need to know the zone name from the container. I can add a zone parameter to my mixin but it's 'namespaced', ie. doesn't pick up the zone parameter of the container.

RE: How to render a page as JSON-formatted AJAX response?

2009-06-18 Thread Alfie Kirkpatrick
Hi Steve, I wrote an overlay component using JQuery which does just that... in fact you can choose whether the block is rendered initially or as a result of an AJAX request if you want to delay the evaluation of what is in the overlay. You don't need any JSON magic, you just render the block from

Using JSP taglibs in T5?

2009-06-10 Thread Alfie Kirkpatrick
Do people think this is possible and worth doing, or a complete non-starter? We occasionally want to use products/libraries that come with taglibs as their primary way of integrating functionality into pages. For example, it might be a CMS product with taglibs to render content + formatting into th

LinkSubmit and confirm dialog

2009-06-09 Thread Alfie Kirkpatrick
Hi, would like to write a mixin (or even a subclass) that allows me to throw up a confirm div/message box when the user clicks the link before submitting the form. Basically an 'are you sure?' message. Is this possible? Looking at the LinkSubmit source it is not obvious to me how to do it...

RE: again on webservices

2009-05-20 Thread Alfie Kirkpatrick
If you are after full SOAP web service support it might make more sense to wire in a framework like Axis or Glassfish Metro directly into web.xml and not tie it to Tapestry pages per se. Which does raise a follow up question... has anyone successfully wired Tapestry IOC with a web service framewor

RE: T5: Passing named/structured-type params in URLs?

2009-05-13 Thread Alfie Kirkpatrick
I've been following this thread with interest and have a somewhat different requirement. I have a desire to use a context where the delimeter for one of the values is itself a '/'. For example: /docs/my/path/to/doc/document1/param1/param2 I can do this by hand in a page by having onActi

RE: Solving the T5 Documentation Dilemma

2009-05-13 Thread Alfie Kirkpatrick
-1 for a forum. I like the fact I can choose between users and users-digest, and I can use nabble or markmail to browse the archive. Unless the proposal is to stop the mailing list, I feel that a forum will simply act to fragment discussions which are an invaluable information source. Best rega

RE: automatic zone update

2009-05-06 Thread Alfie Kirkpatrick
I made a simple "LazyZone" component which ajax loads the zone after the page load. Should be simple enough to add a timer to it. You provide a block as a parameter to the component... LazyZone.java - @IncludeJavaScriptLibrary("lazyZone.js") public class LazyZone extends Zone {

Exceptions during registry startup

2009-04-24 Thread Alfie Kirkpatrick
Hi, I am staring at an error in my log: 11:02:22.617 [main] ERROR o.a.t.i.s.T.RegistryStartup - An exception occurred during startup: java.lang.NullPointerException While this is undoubtedly the result of some very poor code on my part, the log doesn't really help me locate it! Is there

Service overrides and registry.getService

2009-03-30 Thread Alfie Kirkpatrick
Hi, I am overriding a service using the following pattern: public static void bind(ServiceBinder binder) { binder.bind(Session.class, TrackedSession.class).withId( "TrackedSession"); } public static void contributeServiceOverride( MappedConfiguration

Palette and translators

2009-03-20 Thread Alfie Kirkpatrick
Hi, I have a slight problem with the Palette component. It does not seem to be picking up my contribution to the translatorSource for my custom property type. The encoding is working fine but the options themselves appear to use toString(). Other single-value fields using this type render ok, so a