Re: Record locking

2007-02-20 Thread Peter Stavrinides
I don't think the benefits justify the effort involved to maintain all those timestamps, its a bit too complex. Perhaps its better to stick to a single table as well... rather write the session id into the database to checkout a customer record. Allow updates to a customer record if its not ch

Re: [WARNING] Tap 5 redirect after onActivate

2007-02-20 Thread bueggers
ok, thanks Howard Lewis Ship wrote: > > Your snippet is what I have in mind, but I haven't had a chance to > implement it, yet. > > I suspect a 5.0.2 is around the corner, but I'm fighting some fires right > now! > > On 2/20/07, bueggers <[EMAIL PROTECTED]> wrote: >> >> It basically works whe

tacos:PartialFor question

2007-02-20 Thread Chris Perfect
Hello, In the documentation for the PartialFor component it states "This component will not render the contents of a particular loop during an ajax request if the key value of the element/component doesn't exist as an updateComponent to the original request. The values will still be iterated ove

Re: [WARNING] Tap 5 redirect after onActivate

2007-02-20 Thread Howard Lewis Ship
Your snippet is what I have in mind, but I haven't had a chance to implement it, yet. I suspect a 5.0.2 is around the corner, but I'm fighting some fires right now! On 2/20/07, bueggers <[EMAIL PROTECTED]> wrote: It basically works when I do the following. try { response.sendRedirect(

Re: [WARNING] Tap 5 redirect after onActivate

2007-02-20 Thread bueggers
It basically works when I do the following. try { response.sendRedirect("../Error"); } catch (IOException e1) { e1.printStackTrace(); } But this is quite dirty. In the above snippet I can show the error page. But I need to set an error message to the error page. This

Re: Variable numbers of rows

2007-02-20 Thread Justin Walsh
Ok still confused: I've got Names = { elements: {}, GUID: 0; update: function(id, value) { var realId = parseInt(id.split("_")[1], 10); Names.elements[realId] = value; }, add: function() { Names.GUID++; Names.elements[Names.GUID] =

Re: Variable numbers of rows

2007-02-20 Thread Justin Walsh
Justin Walsh wrote: D'oh Just realised that eval is for converting text to object. Sorry. -- Justin Walsh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Variable numbers of rows

2007-02-20 Thread Justin Walsh
Ok - I'm stumbling at the first hurdle here then. I know that this is JSON question but its in the context of this example. I'm looking at: http://www.json.org/js.html and trying to follow their example: So I have var myJSONObject = {"bindings": [ {"ircEvent": "PRIVMSG", "method": "

Re: [WARNING] Tap 5 redirect after onActivate

2007-02-20 Thread bueggers
When I try to return a String or a page in the activate handler, a RuntimeException is thrown saying: 'This type of event does not support return values from event handler methods'. so I think it's a bug. I am using tap 5.0.1 Howard Lewis Ship wrote: > > I think the activate event handler sh

Re: Variable numbers of rows

2007-02-20 Thread Jesse Kuhnert
You don't need a json javascript library, that's the whole point of the protocol. You just eval ' it and you're on your way. If you want to get the response back correctly eval'd for you and such you can implement the function: tapestry.loadJson=function(type, data, http, kwArgs){ } "data" will

Re: Variable numbers of rows

2007-02-20 Thread Justin Walsh
Hi, Very interested in this topic. Just a typo: elements: [], Also changed: return (Names.elements).toJSONString(); to return JSONstring.make(Names.elements); Not sure if this last change is correct - still having problems with the JSON js library: Stupid question - how do you include the JS

Re: [WARNING] How to call the service inside the page class - Tapestry 5 IoC

2007-02-20 Thread Weisu
Thank you for the quick respone. Howard Lewis Ship wrote: > > @Inject("service:com.example.EditCustomerService") > private EditCustomerService _editService; > > public EditCustomerService getEditService() { return _editService; } > > On 2/20/07, Weisu <[EMAIL PROTECTED]> wrote: >> >> I am tryi

Re: Tapestry 5 issue with Eclipse

2007-02-20 Thread Howard Lewis Ship
I've actually been thinking of changing it so that only URLs that are mapped to files on the filesystem are subject to being checked, in which case this approach would work quite well, and probably run a lot faster. On 2/20/07, Matt Ayres <[EMAIL PROTECTED]> wrote: So far I've been unable to rep

Re: How to call the service inside the page class - Tapestry 5 IoC

2007-02-20 Thread Howard Lewis Ship
@Inject("service:com.example.EditCustomerService") private EditCustomerService _editService; public EditCustomerService getEditService() { return _editService; } On 2/20/07, Weisu <[EMAIL PROTECTED]> wrote: I am trying to use T5 IoC. IN T4, you can use @InjectObject("service:com.example.EditCu

How to call the service inside the page class - Tapestry 5 IoC

2007-02-20 Thread Weisu
I am trying to use T5 IoC. IN T4, you can use @InjectObject("service:com.example.EditCustomerService") public abstract EditCustomerService getEditService(); What should I do in T5? Thanks -- View this message in context: http://www.nabble.com/How-to-call-the-service-inside-the-page-class---Tap

Re: [WARNING] Variable numbers of rows

2007-02-20 Thread Jesse Kuhnert
Well, I just assumed ~everyone~ must be using 4.1 by now. =p On 2/20/07, Matt Brock <[EMAIL PROTECTED]> wrote: Jessek wrote: > > Don't forget that json is also included ~in~ > tapestry...http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/json/package-summary.html > Ahem... 4.

Re: [WARNING] Variable numbers of rows

2007-02-20 Thread Matt Brock
Jessek wrote: > > Don't forget that json is also included ~in~ > tapestry...http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/json/package-summary.html > Ahem... 4.1 The OP said he was using Tap 4. :) -- View this message in context: http://www.nabble.com/Variable-numbers-

Re: [WARNING] Variable numbers of rows

2007-02-20 Thread Jesse Kuhnert
Don't forget that json is also included ~in~ tapestry...http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/json/package-summary.html On 2/20/07, Matt Brock <[EMAIL PROTECTED]> wrote: Er, that "Add another name" got link-ified! It should read: < a href ="#" onclick="newName();"

Re: [WARNING] Variable numbers of rows

2007-02-20 Thread Matt Brock
Er, that "Add another name" got link-ified! It should read: < a href ="#" onclick="newName();">Add another name.< / a> -- View this message in context: http://www.nabble.com/Variable-numbers-of-rows-tf3255330.html#a9075237 Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: [WARNING] Variable numbers of rows

2007-02-20 Thread Matt Brock
Michael Prescott-2 wrote: > > We've got a couple of forms where users can edit a list of items, and > also add new items to the bottom. We're currently doing this by sending > preset number of hidden rows, revealed as necessary by Javascript - > although this is a little lame. This is one of t

Re: [WARNING] Any way to determine if a component was rendered?

2007-02-20 Thread Matt Brock
Jessek wrote: > > If you added a hivemind interceptor > (http://hivemind.apache.org/hivemind1/descriptor.html#interceptor) to > intercept all calls to ResponseBuilder.render(IMarkupWriter, IRender > render, IRequestCycle) you'd be able to do what you want. > Thank you, that's exactly what I wa

Re: Any way to determine if a component was rendered?

2007-02-20 Thread Jesse Kuhnert
Do you mean "willRender" ? That would be much harder, but you do have a couple possible options open to you: -) IRequestCycle has a few new component stack related methods, they only contain the immediate stack of components rendering and are forcibly popped of the stack when a component is done

RE: Tapestry 5 issue with Eclipse

2007-02-20 Thread Matt Ayres
So far I've been unable to reproduce the issue after adding this: connection.getInputStream().close(); I'm curious though if there's still an off chance of conflict if Eclipse happens to check during the short period of time that the URLConnection is open. It might be safer to check the t

Any way to determine if a component was rendered?

2007-02-20 Thread Matt Brock
Is there any way to determine if a component was rendered without re-rendering the entire page? I have a page with dozens of components on it, each one is conditional. So, not all of them will render (depending on user permissions, or the result of an @If condition). When I trigger a page liste

Re: Record locking

2007-02-20 Thread Murray Collingwood
Wow - what a lot of responses. First a little more detail - use case (for example): Take a customer record, a basic record has previously been created and the customer has completed some forms so we are now wanting to complete all of the details about contact information, financial details, key a

New line in properties file

2007-02-20 Thread Peter Dawn
guys, within my properties file, there is certain text which i want to flow over onto multiple lines. so how can i specify a new line (aka enter) within the properties file, so that the text breaks up there and starts at the next line when its displayed. thanks.

Re: Tapestry 5 issue with Eclipse

2007-02-20 Thread Howard Lewis Ship
Unfortunately, that's why I didn't notice, I do all my dev on Mac OS X now. The code is very careful to close any files it opens. I wouldn't be surprised if it was a problem inside URLChangeTracker, which opens a connection to each file URL periodically to see if its changed. I left a note behin

Re: Tapestry 5 issue with Eclipse

2007-02-20 Thread Aslak Gronflaten
I'm getting the same (annoying) behaviour on windows as well. Works on osx and linux though. Aslak On 2/21/07, Matt Ayres <[EMAIL PROTECTED]> wrote: I'm encountering an issue with the automatic component reloading in T5 when used with Eclipse. It's really making it difficult to fully take advan

Re: [WARNING] ASO auto-startup (Tap 4)

2007-02-20 Thread Martin Strand
I think the EagerLoad service point is meant for this kind of stuff: http://hivemind.apache.org/hivemind1/hivedocs/service/hivemind.EagerLoad.html On Wed, 21 Feb 2007 00:09:24 +0100, Gurps <[EMAIL PROTECTED]> wrote: ok, what if I have a daemon class that polls something in the database every

Re: [WARNING] ASO auto-startup (Tap 4)

2007-02-20 Thread Gurps
ok, what if I have a daemon class that polls something in the database every now and then. However, on tapestry startup it must be already initialized. Would i use a runnable class and then just use hivemind.Startup? Is this the best practise? Thanks Howard Lewis Ship wrote: > > An "ASO" that

Tapestry 5 issue with Eclipse

2007-02-20 Thread Matt Ayres
I'm encountering an issue with the automatic component reloading in T5 when used with Eclipse. It's really making it difficult to fully take advantage of this great feature. It seems to occur consistently when editing any non-Java file that's on the build path. Sometimes it takes saving the file a

Re: Update Tapestry 3 to 4.1.1

2007-02-20 Thread Marilen Corciovei
Bonjour, Je suis en train d'evaluer une migration de la plateforme que j'ai develope en T3 (produit develope pour un client francais) vers une version plus recente de Tapestry. J'ai pas encore arrive a une conclusion mais j'aimerait echanger des opinions. Cordialement, Len www.len.ro On Mon, 20

Re: Record locking

2007-02-20 Thread Barry Books
Datebase timestamp seems better than a session id. Can't get perpetually locked and works outside a webserver session. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: is there a way to programatically add the declaration of a components library ?

2007-02-20 Thread Andrea Chiumenti
Ok I think that what you need is here www.jfly.org. ciao, kiuma On 2/20/07, Tapestry User List <[EMAIL PROTECTED]> wrote: Let me explain why I need that: I'm developing web application with the notion of plugin. A plugin is a set of tapestry pages which can refers components from a components

German validator Messages not UTF-8?

2007-02-20 Thread Maximilian Weissboeck
Tapestry 4.1.1 It seems like german validator Messages are not UTF-8 encoded. If I define a validator minLengh=10, I get the following error message: (only if I type less then 10 chars :-) - Sie müssen min. 10 Zeichen in das Eingabefeld Anfragetext eingeben But it shold be the german u umlaut:

Re: Tap 5 redirect after onActivate

2007-02-20 Thread Howard Lewis Ship
I think the activate event handler should be able to return a navigational result, such as a page instance or page name. If it does not currently accept that, it's a bug! On 2/20/07, bueggers <[EMAIL PROTECTED]> wrote: I have a detail page that takes an id parameter from the url according to t

Re: is there a way to programatically add the declaration of a components library ?

2007-02-20 Thread Tapestry User List
Let me explain why I need that: I'm developing web application with the notion of plugin. A plugin is a set of tapestry pages which can refers components from a components library which is also in the plugin. I implemented the ITemplateSourceDelegate interface to find templates from the plugin. I

Re: Record locking

2007-02-20 Thread James Carman
The suggestion of using the http session (its id actually) was pretty cool I thought. That allows you to "timeout" the checkout/lock. You need to make sure (as pointed out) that the locks don't get orphaned, thereby locking everyone out of the object/record perpetually (obviously you could write

getting messages in Tapestry 4.1.1

2007-02-20 Thread Andrea Chiumenti
Hello, I need to get tapestry messages into a bean that dosn't directly refers to Tapestry how can I do this ? kiuma

Re: Validator problem

2007-02-20 Thread Andrea Chiumenti
ok it was: but why the validators component property is empty ?? On 2/20/07, Andrea Chiumenti < [EMAIL PROTECTED]> wrote: Hello I'm trying to write a custom validator for my demo app. I have this class: /* * DuplicateValidator.java * * Created on February 20, 2007, 1:24 PM * *

Re: Problems with Tapestry 5 and JBoss

2007-02-20 Thread Howard Lewis Ship
Sorry about your deadline and thanks for taking it as far as you have. Obviously, JBoss compatibility is pretty critical. Something about how JBoss explodes the WAR for deployment is wierd and I'm going to have to debug it to add some kind of work around. I've added a bug and will look into this

Re: Tap 5 redirect after onActivate

2007-02-20 Thread Massimo Lusetti
On 2/20/07, bueggers <[EMAIL PROTECTED]> wrote: But where to do the redirection to an error page in Tap 5? The onActivate method detects the error but how to display other page then? Isn't as simple as injecting infrastructure:Response and then use sendRedirect ? -- Massimo http://meridio.blo

Validator problem

2007-02-20 Thread Andrea Chiumenti
Hello I'm trying to write a custom validator for my demo app. I have this class: /* * DuplicateValidator.java * * Created on February 20, 2007, 1:24 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package org.jfly.demo.edittable.validator

Re: is there a way to programatically add the declaration of a components library ?

2007-02-20 Thread Tapestry User List
A way to resolve my problem would be to externalize the application xml file. Is there a way to link an application xml file outside the war ? So that I will be able to edit this file. Redeploy the war is not a issue if the application xml file is changed. D. 2007/2/20, Tapestry User List <[EMA

is there a way to programatically add the declaration of a components library ?

2007-02-20 Thread Tapestry User List
Hi ! I'm developing a Tapestry application. For adding a component library, I need to edit the application xml file. I need to add dynamically a library at the start of the web application. Is there a way to do that programatically without editing the application xml file? http://jakarta.apache

Tap 5 redirect after onActivate

2007-02-20 Thread bueggers
I have a detail page that takes an id parameter from the url according to the activate/passivate events. This is very fine since the details can be linked from an overview list and the detail-urls are clean and nicely bookmarkable as well. But a problem occurs when there comes an id to the onAct

Re: Record locking

2007-02-20 Thread Barry Books
Murray, I also have records that need to be 'checked out' for some time and your solution seems simple and elegant. So much so I may steal it. I use one sequence for every primary key in the database so a table named "lock" with key primary key timestamp timestamp userid should do it. UserId l

Re: Variable numbers of rows

2007-02-20 Thread James Carman
Yes, tapestry will also use hidden fields to manage the state, but you don't have to worry about it. On 2/20/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: I think T4.1 does this sort of mundane state mgmt kind of stuff for you. On 2/19/07, Michael Prescott <[EMAIL PROTECTED]> wrote: > Sorry, Tap

Re: Record locking

2007-02-20 Thread James Carman
Leaving a database connection open for that period of time (possibly minutes/hours) isn't advisable from what I understand. On 2/19/07, Fred Janon <[EMAIL PROTECTED]> wrote: Yep, SELECT for UPDATE is what's behind TRANSACTION_SERIALIZABLE... On 2/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wr

Re: Problems with Tapestry 5 and JBoss

2007-02-20 Thread James Carman
Does that package exist (com.ec.tap5.pages)? On 2/20/07, Aslak Gronflaten <[EMAIL PROTECTED]> wrote: On 2/18/07, James Carman <[EMAIL PROTECTED]> wrote: > Is Javassist a part of the "shared" classpath in JBoss 4.x? Yes, javassist is the culprit for that part of the problem. Exchanging the one

Re: Problems with Tapestry 5 and JBoss

2007-02-20 Thread Aslak Gronflaten
On 2/18/07, James Carman <[EMAIL PROTECTED]> wrote: Is Javassist a part of the "shared" classpath in JBoss 4.x? Yes, javassist is the culprit for that part of the problem. Exchanging the one that comes with jboss with a newer one ( javassist-3.3.ga.jar ) gets me a little bit further. But then