Re: BeanEditForm for hibernate entity with version field

2011-05-29 Thread Donny Nadolny
umns marked with @Version. I think I'll open an issue for it. Donny On Sun, May 29, 2011 at 12:59 PM, Taha Tapestry wrote: > Check this out > > https://forum.hibernate.org/viewtopic.php?f=1&t=957807 > > Sent from my iPhone > > On May 29, 2011, at 10:06 PM, Donny N

Re: BeanEditForm for hibernate entity with version field

2011-05-29 Thread Donny Nadolny
tityPersistentFieldStrategy.java > > > > regards > Taha > > > On Sun, May 29, 2011 at 9:48 PM, Donny Nadolny >wrote: > > > Hi Josh, > > > > Yup, it must be. The question is, how do I stop that? I tried following > the > > example from the jum

Re: BeanEditForm for hibernate entity with version field

2011-05-29 Thread Donny Nadolny
orm. > > Josh > On May 29, 2011 7:34 AM, "Donny Nadolny" wrote: > > I've got a BeanEditForm for my User entity which has a version field: > > > > @Version > > public long getVersion() { > > return version; > > } > > public void setVe

Re: BeanEditForm for hibernate entity with version field

2011-05-29 Thread Donny Nadolny
; and might be the culprit here. Can you test it by updating the instance > using hibernate instead. > > regards > Taha > > > On Sun, May 29, 2011 at 8:04 PM, Donny Nadolny >wrote: > > > I've got a BeanEditForm for my User entity which has a version field: &g

BeanEditForm for hibernate entity with version field

2011-05-29 Thread Donny Nadolny
I've got a BeanEditForm for my User entity which has a version field: @Version public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } I've got an admin screen to edit a user, and I would like to make sure I

Re: [T5.2.5] NPE on form submit

2011-05-29 Thread Donny Nadolny
I can't offer any help, but I remember seeing the same thing a few days ago (and I'm running 5.2.4). It only happened once, on a form submit, but everything worked correctly in the browser (the only reason I noticed was because I was doing development at the time and watching the logs). On Mon, Ma

Re: RequestFilter not called (sometimes)

2011-02-21 Thread Donny Nadolny
x27;s ResourceStreamer will return 304 if the "if-modified-since" > http header is sent and the file has not been modified. Both the > context and classpath request handlers use the resource streamer. > > Josh > > On Sat, Feb 19, 2011 at 8:07 AM, Donny Nadolny > wrote

Re: RequestFilter not called (sometimes)

2011-02-20 Thread Donny Nadolny
1.1" 200 3287 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13" Any ideas? I'm not sure why this is happening. On Sun, Feb 20, 2011 at 5:38 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote:

Re: RequestFilter not called (sometimes)

2011-02-19 Thread Donny Nadolny
You can see in the first case the TimingFilter printed out the time each time I hit refresh, but in the second run it didn't. If I kill and restart jetty sometimes it prints, sometimes it doesn't. Have you tried running the quickstart app and verifying if this happens for you too? You get i

RequestFilter not called (sometimes)

2011-02-19 Thread Donny Nadolny
I have a few static javascript files which are used on 3rd party websites, so they have the full url to my website hard coded in to them (for ajax calls). In order to test things locally, I need to replace that url with localhost. I've made a page which returns the modified file, and I want to repl

Add css class to field via mixin

2011-01-27 Thread Donny Nadolny
I'm trying to integrate a 3rd party javascript library in to Tapestry via a mixin. The way it works is that the library adds behavior to fields that have a certain css class. All the mixin needs to do is @Import the proper js & css, and add a css class to the field. I tried adding it with: voi

Re: T.5.2.x Possible page pooling removal impact query

2011-01-21 Thread Donny Nadolny
I glanced over it, it looks okay. A few notes: You didn't give the package name for Logger, Money, or Scalar, so I can't comment on them, although Log4j's Logger is thread safe, and I would guess most loggers are. Pattern is thread safe, but note that Matcher is not. Yes, it is just a matter of lo

Re: t5: 5.2.4 and IE8

2011-01-19 Thread Donny Nadolny
That's how I had it before, it doesn't work. I tried adding it to the end of the normal minified jQuery, and that worked on most browsers (I tested FF 3.6, IE 6, IE 7, and some version of chrome), but it doesn't work on IE 8. I got errors in Tapestry's JS when jQuery was included even with noConfli

Re: Combine scripts doesn't work in 5.2.4?

2011-01-18 Thread Donny Nadolny
Thanks for the clarification. I like this change overall (it can help pageload times because the larger libraries will always be cached by the client after the first pageload), but I think it's missing part of the benefit of how the feature was in 5.1. I have a few libraries which I include on eve

Re: t5: 5.2.4 and IE8

2011-01-18 Thread Donny Nadolny
Hi Angelo, I had this exact problem - jQuery and Prototype don't work out in IE8 (I vaguely remember reading something about IE8 trying to be smart and load/run scripts in parallel, which cause problems). Sometimes prototype code would run, but $ would be referencing jQuery even though I had calle

Re: Upgrade Process from 5.1 to 5.2

2011-01-17 Thread Donny Nadolny
sis for a new > "Breaking Changes" section at the top of the > https://cwiki.apache.org/confluence/display/TAPESTRY/Release+Notes+5.2 > page. Does anybody know of any other "breaking" changes going from > 5.1 to 5.2? > > On Fri, Dec 17, 2010 at 12:29 PM, Donny

Re: Combine scripts doesn't work in 5.2.4?

2011-01-17 Thread Donny Nadolny
Thanks for testing it out. I've filed an issue for it at https://issues.apache.org/jira/browse/TAP5-1416 On Mon, Jan 17, 2011 at 1:36 AM, Angelo C. wrote: > > I did a testing on the Tapestry-Hotel-Booking demo in the > tapestry.apache.org, added following: > > @ApplicationDefaults >@Contribu

Combine scripts doesn't work in 5.2.4?

2011-01-16 Thread Donny Nadolny
I upgraded my app to 5.2.4 as soon as it was marked stable, but here's something I just noticed now: combine scripts doesn't seem to be working. In production mode, combine scripts is supposed to default to true, so all javascript files on the page get combined in to one virtual asset. This isn't h

Re: Re: @SessionState Bug?

2011-01-06 Thread Donny Nadolny
You could still have the problem of someone using @SessionAttribute and giving the variable the same name as some other session variable. I might take it one step further - declare a single class/enum with the names of all of your session variables, and *always* use the name parameter for @Session

Re: Re: @SessionState Bug?

2011-01-06 Thread Donny Nadolny
t; thiag...@gmail.com> wrote: > On Thu, 06 Jan 2011 14:42:09 -0200, Donny Nadolny > wrote: > > Hi Nille, >> > > Hi, guys! > > > I don't think it's the only way to do it. Determining it based on the >> variable name (or maybe name/type pair) w

Re: Re: @SessionState Bug?

2011-01-06 Thread Donny Nadolny
n Thu, Jan 6, 2011 at 11:42 AM, Donny Nadolny wrote: > Hi Nille, > > I don't think it's the only way to do it. Determining it based on the > variable name (or maybe name/type pair) would work. It would just have a > different set of problems. > > Based on types,

Re: Re: @SessionState Bug?

2011-01-06 Thread Donny Nadolny
you were able to maintain that. > What would you expect Tapestry to do in the following case? > Component1 > @SessionState > private String eMailAddress; > > Component2 > @SessionState > private EmailAddress emailAddress; > > regards nillehammer > > - origi

Re: @SessionState Bug?

2011-01-06 Thread Donny Nadolny
the same list myself). > > Thanks, > > mrg > > > On Thu, Jan 6, 2011 at 9:57 AM, Donny Nadolny > wrote: > > Your two lists are the same - they're both of type List so they both get > > assigned to the same thing. See below for why. > > > > The

Re: @SessionState Bug?

2011-01-06 Thread Donny Nadolny
Your two lists are the same - they're both of type List so they both get assigned to the same thing. See below for why. The solution is to make two classes, one that holds the booleans, and one that holds the strings. Technically you would only need to do that for one, but it's probably a good ide

Re: how to get a handle to a service from a POJO class?

2011-01-05 Thread Donny Nadolny
You can use constructor injection. Make a constructor for the object, and have an argument for whichever service you want, and tapestry will pass it in when it constructs the object. It will automatically call the constructor with the most arguments. This is all assuming that you're going to be cr

Re: ComponenentRequestHandler doesn't exist when testing using TestNG

2011-01-05 Thread Donny Nadolny
You can contribute just the name of the file you want ("quartz.properties"), put it in the classpath, eg in src/main/resources, and then in the place where you need to use it, load it from the classloader as a resource: InputStream in = getClass().getResourceAsStream("quartz.properties"); But inste

Re: T5: archiving a page

2010-12-30 Thread Donny Nadolny
oday/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html > > On Thu, Dec 30, 2010 at 5:19 PM, Donny Nadolny > wrote: > > Kind of. You can run it using xvfb (assuming linux), so you don't need a > > full x server. > > > > Selenium is a remote contro

Re: T5: archiving a page

2010-12-30 Thread Donny Nadolny
Kind of. You can run it using xvfb (assuming linux), so you don't need a full x server. Selenium is a remote control tool for browsers, mainly used for writing tests for webapps. It starts up firefox (or ie, chrome, or safari) and controls the browser, telling it to click on links / type things, a

Re: T5: archiving a page

2010-12-30 Thread Donny Nadolny
You could use selenium to capture a screenshot of the page, as it looks in the browser. See http://release.seleniumhq.org/selenium-remote-control/0.9.2/doc/java/com/thoughtworks/selenium/DefaultSelenium.html#captureScreenshot%28java.lang.String%29 On Thu, Dec 30, 2010 at 10:23 AM, Angelo C. wrote

Re: [T5] Removing project name and port number from URL

2010-12-30 Thread Donny Nadolny
Yes, that will work on jetty too. Also, you don't need to add anything to the web.xml, it will work as-is. I believe there are other ways of doing it (I think there's some xml config you can add to tell it to treat a certain application as the root), but renaming it to ROOT.war is how I've done it

How to include external js library in @Import

2010-12-25 Thread Donny Nadolny
I have a component that relies on an external javascript library, and I've tried to include it using @Import like this: @Import(library={"context:js/somefile.js", "http://maps.google.com/maps/api/js?sensor=false"}, stylesheet="context:css/style.css") But I get the error: Unknown prefix for asset pa

Re: A more general approach to configuring for compatibility

2010-12-22 Thread Donny Nadolny
That would probably be helpful for development of the framework, to make sure certain changes that break backwards compatibility don't get made lightly. It's not a complete solution though - the tapestry javascript file will change, and that will change behavior, as well as the java code behind tho

Get URL for a page that has @ActivationRequestParameter

2010-12-21 Thread Donny Nadolny
I have a page that has a couple of ActivationRequestParameters, as well as an activation context. How can I generate a link for this page? It's a page that generates an RSS feed, so I need to include the URL in a Previously it only had an activation context, so I could generate it with pageRender

Upgrade Process from 5.1 to 5.2

2010-12-17 Thread Donny Nadolny
There's been a few backwards-incompatible changes from 5.1 to 5.2, I think it would be helpful to have a place where these are documented. Since you can't edit the wiki until you sign and mail/fax/scan & email a license agreement, we can document them here and let someone with access make the wiki

Re: [T5.1.0.5] 'Tapestry' is undefined JavaScript error on form submit

2010-12-07 Thread Donny Nadolny
Combine scripts is an optimization that Tapestry can do where it combines all the javascript files in to one virtual file to minimize the number of HTTP requests that the browser has to do. As for your problem, you say you've included jQuery - are you setting no conflict mode on? http://api.jquery

How do you include an html link in an error message for a form

2010-09-02 Thread Donny Nadolny
I have a form where data can be entered, and one of the restrictions is that there is no duplicate data in the db. If there is, I record an error in the form with recordError(Field field, String errorMessage). I can do this fine - but I would like to include a link to the item that already contains

Re: File Handling and Buffer Handling

2010-08-29 Thread Donny Nadolny
What are you trying to do? If it's just normal reading / writing of files, check out the FileUtils class in Commons IO: http://commons.apache.org/io/api-1.4/org/apache/commons/io/FileUtils.html For input and output streams, http://commons.apache.org/io/api-1.4/org/apache/commons/io/IOUtils.html If

Re: Problem with comma and Integer in textfield

2010-08-26 Thread Donny Nadolny
This seems like a bug to me. I tried it out, and if you have an Integer then Tapestry automatically adds the numericformat validator, but ignores the regex validation you gave (the regex worked when I tried a different one, eg ^a+$, just not the one you gave). If you change your code to be private

Re: Component (with a Zone and ActionLink) in a loop

2010-08-14 Thread Donny Nadolny
zone t:id, but doesn't need to be } In the .tml: link [snip other stuff] On Fri, Aug 13, 2010 at 9:44 PM, Thiago H. de Paula Figueiredo wrote: > > On Fri, 13 Aug 2010 22:08:40 -0300, Donny Nadolny > wrote: > >> I have a component that has a Zone and an ActionLink within the

Component (with a Zone and ActionLink) in a loop

2010-08-13 Thread Donny Nadolny
I have a component that has a Zone and an ActionLink within the zone (which updates the zone that contains it). This works fine normally, but when I use it in a loop (actually a nested loop) and click the ActionLink, it only updates the first zone. I've read some previous messages (http://mai