Re: update a zone from within a component

2009-07-27 Thread Ulrich Stärk
Indeed, that would do the trick just nicely. I was thinking way too complicated, thanks Igor. Uli On 27.07.2009 22:29 schrieb Igor Drobiazko: I'm not sure I understand completely what you are trying to do but why don't you publish an event inside the handler method of the component. This event

Re: Audit logging - how to acces SSO in Hibernate

2009-07-27 Thread Juan E. Maya
What i am doing is to contribute a PageRenderRequestHandler like this: public static void contributePageRenderRequestHandler(OrderedConfiguration configuration, final @Local @InjectService("securityContextPageRenderRequestFilter") PageRenderRequestFilter securityCon

Re: Audit logging - how to acces SSO in Hibernate

2009-07-27 Thread Max Weißböck (info)
Ok, I think I get the idea... But where and when do you set the ThreadLocal? It must be set on every request (each request is another thread...) Do you have a common base class where you handle this? Any other way you do it? Max Am 28.07.2009 um 00:08 schrieb Juan E. Maya: Hey Max, I ha

Re: Audit logging - how to acces SSO in Hibernate

2009-07-27 Thread Juan E. Maya
Hey Max, I had a similar problem and at the end create an object in the ThreadLocal that contains a SecurityContext with the user information (very lightweight object). The idea was taken from Spring-Security. This way u have access to the user in the execution thread. It was kind of weird for me t

Re: Audit logging - how to acces SSO in Hibernate

2009-07-27 Thread Max Weißböck (info)
Sorry, my question seems not to be clear. It is not a Hibernate question, I now how to acces and set the attributes using the event. I already set the creation and modification date in each entity. But what I need too, is who (which user) did the creation/modification of an entity. This inf

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Nathan Beemer
My implementation is based on (what I suspect) is the same post you're referring to. But somewhere I'm missing the mark. I'll try from scratch in a Page rather than via IEngineService and check my mileage. I'll let you know.. Thanks again. On Jul 27, 2009, at 3:47 PM, Norman Franke wrote:

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Norman Franke
In that case, someone posted how to get HTML from a page for sending email a long time ago. This is what I distilled. I do this in a page, but it doesn't use PageRenderSupport: MyPageToRender p = get MyPageToRender(); p.setSomeParameter(value);

Re: Audit logging - how to acces SSO in Hibernate

2009-07-27 Thread Igor Drobiazko
This is a Hibernate question, not Tapestry. Have a look into the event passed to your listener. There is a method called getEntity(). On Mon, Jul 27, 2009 at 10:34 PM, Max Weißböck (info) wrote: > I'm using Hibernate Listeners PreUpdateEventListener and > PreInsertEventListener to do audit loggin

Audit logging - how to acces SSO in Hibernate

2009-07-27 Thread info
I'm using Hibernate Listeners PreUpdateEventListener and PreInsertEventListener to do audit logging in the DB. Now my problem is, how can I get access in the EventListenr class to the SSO where the user is stored? As Hibernate loads the classes as defined in the config file (see below), I can

Re: update a zone from within a component

2009-07-27 Thread Igor Drobiazko
I'm not sure I understand completely what you are trying to do but why don't you publish an event inside the handler method of the component. This event can be handled in the handler method of the containing page by returning the zone's body. On Mon, Jul 27, 2009 at 8:41 PM, Ulrich Stärk wrote:

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Nathan Beemer
Unfortunately, I need to render a Page and capture that output to feed into my PDF lib. And its the rendering to someplace-other-than-the-web browser that is fighting me. Thanks for your help though! On Jul 27, 2009, at 3:02 PM, Norman Franke wrote: Mine is rather long owning to having i

Re: How to use JavaScript for dependent selects?

2009-07-27 Thread Max Weißböck (info)
I had the very same problem, here is the solution I have (with great help from the list - search for it) --- java part --- selection model as found in T5 HowTos in the wicki and with event definition from Chenillekit--- @IncludeJavaScriptLibrary( { "context:js/Chenillekit.js", "context:js/

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Norman Franke
Mine is rather long owning to having it create a PDF. In short, I don't use PageRenderSupport since you don't really need it and it's likely usable only by pages, which this isn't. In my case, I'm filling in a form then flattening it (removing the forms, but leaving the filled in data.) Usi

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Nathan Beemer
Sorry, my response wasn't put together very well. The specific problem I'm having is with the rendering from with my IEngineService.service(IRequestCycle) implementation The latest problem is with the PageRenderSupport error. I've tried a few different approaches, but they all end up with s

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Norman Franke
I am using an IEngineService. I get an output stream from the response and use that to send the data. I don't know what PD4ML expects, but I'd hope it can take an OutputStream. Norman Franke Answering Service for Directors, Inc. www.myasd.com On Jul 27, 2009, at 1:49 PM, Nathan Beemer wrot

Re: update a zone from within a component

2009-07-27 Thread Ulrich Stärk
That's not what I was asking for. Maybe I was a bit unclear. Triggering the update itself is not the problem but returning the correct content for updating the zone from the event handler method of the component. The zone should update itself with it's own content and that's the problem. Inside

Re: update a zone from within a component

2009-07-27 Thread Thiago H. de Paula Figueiredo
Em Mon, 27 Jul 2009 10:20:08 -0300, Ulrich Stärk escreveu: Hi List, Hi! How can I update a zone on a page from within a component placed on that page? I can successfully pass the zone's id to the enclosed component but I can't return the zone's body in any of the components handler m

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Nathan Beemer
I need to have a "Download as PDF" link on some of my pages that will render the given page to PDF and send to client. I'm not familiar with iText, but everything you said sounds good, except the "blast out the data". My trouble is getting a handle on "the data". I'm using PD4ML, but I ca

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Peter Stavrinides
> The first would be pushing a performance hit to > startup-time, so the user doesn't suffer from latency while waiting > for some expensive service to be manifested. In practice this is exactly what is happening in the given example. > At any rate, as HLS suggested, statics are a > design

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Christian Gruber
On Jul 27, 2009, at 11:40 AM, Peter Stavrinides wrote: Create a service wrapper around DatabaseConnection.getReadConnection(). This will put the eager-loading mechanism on your side. I will try this, but this is not relevant to the issue in question, which is how to control the ordering of ea

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Peter Stavrinides
> Create a service wrapper around > DatabaseConnection.getReadConnection(). This will put the > eager-loading mechanism on your side. I will try this, but this is not relevant to the issue in question, which is how to control the ordering of eagerloaded services. The very need to eagerload a serv

Re: T4.1: rendering a page to alternate OutputStream

2009-07-27 Thread Norman Franke
I do this for PDF exporting from iText. I inject the (Http) request and (WebResponse) response along with a linkFactory via hivemind.xml. Then WebResponse.setHeader("Content-Description", "inline; attachment; filename=whatever"); Then just blast out the data to getResponse().getOutputStream

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Howard Lewis Ship
Create a service wrapper around DatabaseConnection.getReadConnection(). This will put the eager-loading mechanism on your side. Alternately, put in proper synchronization semantics on DatabaseConnection static methods.l Use of statics in an application using Tapestry IoC is a design smell. On Mo

T5.1 default locale for app.properties: bug or feature?

2009-07-27 Thread Sergey Didenko
Hi, My application uses *"ru"* as default locale. It works ok for component message properties. I don't have *"acomponent.properties"* files, only *"acomponent_ru.properties" *and it work right. However when I create global message catalogue - *"app_ru.properties"*(without "app.properties"), it i

Re: embedded components

2009-07-27 Thread Ulrich Stärk
I already guessed that I'd get "static structure, dynamic behaviour" as an answer but declaring the component inside the page class *IS* static. I don't see the need to also have it in the template. Uli On 27.07.2009 15:16 schrieb Kristian Marinkovic: i think because of tapestry's rule: stati

update a zone from within a component

2009-07-27 Thread Ulrich Stärk
Hi List, How can I update a zone on a page from within a component placed on that page? I can successfully pass the zone's id to the enclosed component but I can't return the zone's body in any of the components handler methods. How can I get a handle on the zone? Uli --

Re: embedded components

2009-07-27 Thread Kristian Marinkovic
i think because of tapestry's rule: static structure, dynamic behaviour :) what i ended up doing is to have a BlockService that contains a contribution of all available Blocks in my app with a unique id. anytime i need such a component i just ask my service: @Inject private BlockService blockS

Re: Testify injection only works once per test

2009-07-27 Thread rolfst
Hi Paul, Yes there are three groups involved in the suite. How ever no other test from other groups are available. It seems that when I remove the reference to groups in my testng.xml it works fine. For now a workable solution it looks like a bug though not sure wether testng or testify. thank

Re: [T5] JPF-Plugins (or any other plugin-framework) to add page content?

2009-07-27 Thread Lance Java
Tapestry OSGI may help you http://groups.google.com/group/tapestry-osgi/ 2009/7/27 Tobias Wehrum > Hello everyone, > > I need to write an application where multiple page contents should be added > in later via plugins - for example different ways to output things, other > payment modi, or statis

Re: Testify injection only works once per test

2009-07-27 Thread Paul Field
rolfst wrote on 27/07/2009 13:26:23: > >@Test(groups = "rbudisplay") >public void test_rbuselection_fulltype() throws Exception >{ Oooo... it might be something to do with groups. Is your suite specifying that only certain groups are run? (my brain aches whenever I try to work out

Re: Testify injection only works once per test

2009-07-27 Thread rolfst
Hi Paul, I have this test method @Inject private TestPageResultRetriever retriever; @Inject private RBUTypeRepository repository; @Override protected void doSetUp() throws Exception { } @Test(groups = "rbudisplay")

Re: Custom validator for int constraint for a dynamic list

2009-07-27 Thread rolfst
I got it I Used Void.class as its first parameter to its super() changed it to null did the trick rolfst wrote: > > Hi can someone help me on creating an int validator like in the wiki. > However This validator must be used with an ajax loop on a custom > component. > So a message catalog file c

[T5] JPF-Plugins (or any other plugin-framework) to add page content?

2009-07-27 Thread Tobias Wehrum
Hello everyone, I need to write an application where multiple page contents should be added in later via plugins - for example different ways to output things, other payment modi, or statistics. Currently I am reading into http://jpf.sourceforge.net/index.html, but it is not necessairly a JP

embedded components

2009-07-27 Thread Ulrich Stärk
Why do embedded components declared with @Component _have_ to have a corresponding element in the template? If I just want to use them as a return value from some delegating method, why do I still have to declare them in the template, bloating it with unused stuff? Uli -

Re: Testify injection only works once per test

2009-07-27 Thread Christian Gruber
On Jul 27, 2009, at 6:25 AM, Paul Field wrote: If you are setting up state that you want to be fresh for each test, then you should consider using Testify's pertest scope: http://tapestry.formos.com/nightly/tapestry-testify/#Per-test_scope Ah... this is what I was thinking - thanks for poi

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Peter Stavrinides
Sorry, I think I misunderstood you Kristian, reading through your comments again I realized this is your own contribution. I have adjusted the jira accordingly. So in fact it is not possible to order them natively in Tapestry. Cheers, Peter - Original Message - From: "p stavrinides" To

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Kristian Marinkovic
its a custom service... i created it in my project sorry for the misunderstanding g, kris p.stavrini...@albourne.com 27.07.2009 12:23 Bitte antworten an "Tapestry users" An Tapestry users Kopie Thema Re: Tapestry 5 IoC Eagerloading and ordering of services Hi Kristian, Could you

Re: Testify injection only works once per test

2009-07-27 Thread Paul Field
Christian Edward Gruber wrote on 27/07/2009 11:07:41: > I think that @BeforeMethod is a better one to key off-of. If > singleton-scoped objects are the only ones being injected, then > @BeforeClass makes sense, but if you're testing per-request or per- > session objects, then it's best to use

Custom validator for int constraint for a dynamic list

2009-07-27 Thread rolfst
Hi can someone help me on creating an int validator like in the wiki. However This validator must be used with an ajax loop on a custom component. So a message catalog file cannot really work because the number of text fields is not known beforehand. thanx Rolf -- View this message in context:

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread P . Stavrinides
Hi Kristian, Could you please point me to the JavaDoc of this service? Thanks, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/em

Re: Form component generates invalid xhtml

2009-07-27 Thread Sergey Didenko
Added. See https://issues.apache.org/jira/browse/TAP5-796 On Fri, Jul 24, 2009 at 5:12 PM, Sergey Didenko wrote: > I guess nobody have it working the right way, so I'm going to add a JIRA > issue. > > > On Thu, Jul 23, 2009 at 9:00 AM, Sergey Didenko > wrote: > > Yes, these are the first 2 lines

Re: Testify injection only works once per test

2009-07-27 Thread Christian Edward Gruber
I think that @BeforeMethod is a better one to key off-of. If singleton-scoped objects are the only ones being injected, then @BeforeClass makes sense, but if you're testing per-request or per- session objects, then it's best to use @BeforeMethod, since you may be setting state on these whic

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Peter Stavrinides
I added a documentation enhancement request: https://issues.apache.org/jira/browse/TAP5-795 Thanks again, Peter - Original Message - From: "P Stavrinides" To: "Tapestry users" Sent: Monday, 27 July, 2009 12:45:29 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Tapestry 5 Io

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread P . Stavrinides
Thanks Kristian! Thats good enough for me, I think the documentation should include this point though. Cheers, Peter - Original Message - From: "Kristian Marinkovic" To: "Tapestry users" Sent: Monday, 27 July, 2009 11:50:08 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re:

Re: Testify injection only works once per test

2009-07-27 Thread Paul Field
Hi Rolf, > Hi I am using Testify to inject a fake repository into my testng test but I > come op to a problem. > > when i first access the fake repository it gets injected however the second > time i access the repository I get a null pointer exception. > > Now comes another strange thing whe

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread Kristian Marinkovic
hi Peter, because i couldn't control the ordering of eager load services i stated that no developer may define an eager load service himself. instead i created an eager load service (StartupInitializer) that accepts an orderedconfiguration of initializers every developer must contribute to. g,

Re: Tapestry 5 IoC Eagerloading and ordering of services

2009-07-27 Thread P . Stavrinides
Hi, Before I open a jira for this I have devised an coded example to illustrate it, and hopefully get some comments: //Example: The shell of an eagerloaded service public class ImageService { /** Cache to hold thumbnail images */ private static ConcurrentHashMap imageCache_ = n

Re: Session lost when cookies disabled?

2009-07-27 Thread Sergey Didenko
Sorry, I was wrong. In my case the problem was that "redirectTo" url was created before session. And thus before putting jsessionid in url. So the login was working fine - it was appending "jsessionid" to the url and then my code was redirecting to the old "redirectTo" url without "jsessionid". On