Re: Content Security Policy without unsafe-inline

2014-02-04 Thread Lance Java
Reading the linked Wikipedia article, that's the only solution I can think of. I think it could be done with just a couple changes and a new Dispatcher. It's tricky because there would be 2 requests (1 for markup and 1 for javascript).

Re: Content Security Policy without unsafe-inline

2014-02-04 Thread Lance Java
I hate both ideas! Encoding in the URL means a useless request and will have issues with maximum url length. A token requires serverside state and relies on some form of time to live.

Re: Content Security Policy without unsafe-inline

2014-02-04 Thread Lance Java
I also think encoding in the URL opens up a security hole.

Re: Content Security Policy without unsafe-inline

2014-02-04 Thread Lance Java
If there was no time to live I could kill your server by requesting lots of pages and never requesting the javascript :) If url encoding I could get your cookie if you visit my (external) site which includes a script from your site.

Re: Content Security Policy without unsafe-inline

2014-02-04 Thread Lance Java
Agreed that the only reasonable solution is a token + ttl. I'm not convinced it's a good idea though.

Re: Content Security Policy without unsafe-inline

2014-02-04 Thread Lance Java
I happen to be a fan of tapestry's multi-page approach and serverside markup generation. On 4 Feb 2014 18:35, Christian Köberl tapestry.christian.koeb...@gmail.com wrote: 2014-02-04 Lance Java lance.j...@googlemail.com: It's tricky because there would be 2 requests (1 for markup and 1

Re: tapestry-hibernate upgrade version?

2014-02-04 Thread Lance Java
If I upgraded it in my pom, would this cause issues else where? Not making any guarantees but it shouldn't be a problem (unless the hibernate api has changed, which I doubt)

Re: No redirect if current client url equals redirect url

2014-01-30 Thread Lance Java
/52e9f9e5e4b0ba0bb0273298/3?page=1#com } On 30 янв. 2014 г., at 11:23, Lance Java lance.j...@googlemail.com wrote: I want to see the response body which will be a json string. On 30 Jan 2014 07:20, Oleg Gulyaev futuj...@gmail.com wrote: On 29 янв. 2014 г., at 19:37, Lance Java lance.j

Re: No redirect if current client url equals redirect url

2014-01-30 Thread Lance Java
FYI I'm assuming Tapestry does something like window.location.href = redirectURL On 30 Jan 2014 07:59, Lance Java lance.j...@googlemail.com wrote: Hmm... Looks good to me. I wonder if this is a browser 'feature' (ie only refresh if the URL changes from current) Do you see this behaviour

Re: Mixup with page resolution

2014-01-30 Thread Lance Java
but I'd also call that a very confusing naming of pages. Agreed! I'd say a possible 'fix' would be for Tapestry to throw exception when it encounters the two ambiguous pages at startup.

Re: No redirect if current client url equals redirect url

2014-01-30 Thread Lance Java
It sounds like the browser is trying to be smart. Please file a jira. I guess we need some clientside logic to refresh the page if the URL is the same.

Re: No redirect if current client url equals redirect url

2014-01-30 Thread Lance Java
I created jira TAP5-2279 On 30 Jan 2014 09:30, Lance Java lance.j...@googlemail.com wrote: It sounds like the browser is trying to be smart. Please file a jira. I guess we need some clientside logic to refresh the page if the URL is the same.

Re: 5.4 Select component isn't resetting on page refresh.

2014-01-29 Thread Lance Java
As bob said, this is a browser feature. You can disable it by adding the following to the form or the select html elements. autocomplete=off

Re: No redirect if current client url equals redirect url

2014-01-29 Thread Lance Java
Can you post the response body from the ajax request? (using dev tools in your browser)

Re: No redirect if current client url equals redirect url

2014-01-29 Thread Lance Java
I want to see the response body which will be a json string. On 30 Jan 2014 07:20, Oleg Gulyaev futuj...@gmail.com wrote: On 29 янв. 2014 г., at 19:37, Lance Java lance.j...@googlemail.com wrote: Can you post the response body from the ajax request? (using dev tools in your browser) I

Re: Tapestry Eclipse Plugin on the Eclipse Market Place

2014-01-23 Thread Lance Java
There was another wtp eclipse plugin here: https://code.google.com/p/tapestrytools But halfway through the developer, Gavin Lei, switched from wtp to the eclipse xml editor because wtp was too heavyweight for most people's needs.

Re: Any thoughts on Tapestry with PhoneGap?

2014-01-22 Thread Lance Java
You're not going to be able to host a tapestry app on the phone since (to my knowledge) you can't run a jvm / servlet container on IOS. I've heard that jetty has been ported to android but you still won't be able to run Tapestry on android since ASM won't work on Dalvik. So, these things taken

Re: Any thoughts on Tapestry with PhoneGap?

2014-01-22 Thread Lance Java
A great blog post. Mott looks like the way forward. I'm going to have to embrace javascript at some stage :(

Re: How do you unit test services with dependent services

2014-01-22 Thread Lance Java
I think it would be easy enough to create a TapestryJUnit4ClassRunner which is similar to SpringJUnit4ClassRunner. eg: @RunWith(TapestryJUnit4ClassRunner.class) @Modules({SecurityModule.class, HibernateModule.class, MyTestModule.class}) @ModuleDefs({SpringModuleDef.class}) public class MyIOCTest

Re: How do you unit test services with dependent services

2014-01-22 Thread Lance Java
You can use IOCUtilities.addDefaultModules(RegistryBuilder) To scan the classpath for META-INF entries. On 21 Jan 2014 19:47, George Christman gchrist...@cardaddy.com wrote: and that is the easiest way to do it ugh lol On Tue, Jan 21, 2014 at 2:30 PM, Dragan Sahpaski

Re: How to use grid with large data sets.

2014-01-17 Thread Lance Java
, but seeing the prepare is called secondly, I'm not sure how to do this. I guess worse case I can just do two queries. On Thu, Jan 16, 2014 at 5:51 PM, Lance Java lance.j...@googlemail.com wrote: If there's a concept in lucene that allows you to bring back the total rowcount and a page of data

Re: How to use grid with large data sets.

2014-01-17 Thread Lance Java
Keep in mind that the grid is just supposed to be an easy way to generate a table. If it's not fit for your purpose, you can always generate your own table without grid.

Re: How to use grid with large data sets.

2014-01-16 Thread Lance Java
One query is for the rowcount, the other is for the results (for a single page). The only way to do it with one query is to add an extra column to the result set for the row count. This value will be exactly the same for every row in the result set. I personally don't see an issue with 2

Re: How to use grid with large data sets.

2014-01-16 Thread Lance Java
If there's a concept in lucene that allows you to bring back the total rowcount and a page of data in a single query then the GridDataSource interface can support that. On 16 January 2014 22:36, Lance Java lance.j...@googlemail.com wrote: One query is for the rowcount, the other

Re: Is Zone.getBody() obsolete?

2014-01-14 Thread Lance Java
Returning zone.getBody() from a component event is still perfectly valid. On 14 Jan 2014 11:41, Geoff Callender geoff.callender.jumpst...@gmail.com wrote: Is there any downside to using AjaxResponseRenderer#addRender(zone) for single-zone updates instead of Zone.getBody()? Can I treat

Re: [OT] Eclipse + Maven + Geb

2014-01-12 Thread Lance Java
groupIdorg.codehaus.groovy/groupId artifactIdgroovy-eclipse-batch/artifactId version2.0.4-04/version /dependency /dependencies /plugin Kalle On Sat, Jan 11, 2014 at 1:28 PM, Lance Java lance.j

[OT] Eclipse + Maven + Geb

2014-01-11 Thread Lance Java
I'm building with maven and trying to write a geb test which will run in eclipse. Does anyone have a pom.xml which will work in eclipse using m2e? Nothing I've found on the web seems to work. Cheers, Lance.

Re: [ANN] JumpStart Preview: for Tapestry 5.4

2014-01-06 Thread Lance Java
Nice work! I love the facelift!

Re: [ANN] JumpStart Preview: for Tapestry 5.4

2014-01-06 Thread Lance Java
-stitch. On 6 January 2014 20:30, Lance Java lance.j...@googlemail.com wrote: Nice work! I love the facelift!

Re: [ANN] tapestry-atmosphere 0.0.1 released

2014-01-03 Thread Lance Java
Yeah, I'm having some issues with jetty on cloudbees. I'll hopefully fix it over the weekend but I also have a baby due any day now... On 2 Jan 2014 23:08, Borut Bolčina borut.bolc...@gmail.com wrote: This application is currently unavailable. 2013/12/29 Lance Java lance.j...@googlemail.com

Re: JGraph

2014-01-03 Thread Lance Java
Here's a couple of examples of integrating clientside charting components with tapestry https://github.com/got5/tapestry5-highcharts https://github.com/uklance/tapestry-graphael And here's an example of integrating a serverside charting library

Re: [ANN] tapestry-atmosphere 0.0.1 released

2014-01-03 Thread Lance Java
It's a toss up... tomcat (cloudbees default container) has special requirements for async https://github.com/Atmosphere/atmosphere/wiki/Installing-AtmosphereServlet-with-or-without-native-support

Re: [ANN] tapestry-atmosphere 0.0.1 released

2014-01-03 Thread Lance Java
Ah... gotcha!!! In the meantime I think I resolved the issue... it's up and running now. On 3 January 2014 17:28, Borut Bolčina borut.bolc...@gmail.com wrote: I ment in comparison to baby :-) 2014/1/3 Lance Java lance.j...@googlemail.com It's a toss up... tomcat (cloudbees default

Re: Is JSR-303 validation possible in a Loop?

2013-12-29 Thread Lance Java
I'm not sure I fully understand the validate parameter on form On 29 December 2013 00:58, Geoff Callender geoff.callender.jumpst...@gmail.com wrote: I'm thinking that Loop and Grid both need a validate parameter like Form has. On 29 December 2013 11:54, Lance Java lance.j

[ANN] tapestry-atmosphere 0.0.1 released

2013-12-29 Thread Lance Java
I've been working hard over the Christmas break to put together tapestry / atmosphere integration to support push application in tapestry (websocket / comet / polling / jsonp). As with tapestry-cometd, the aim of this project is to support push applications without requiring developers to write a

Re: Two-way select ends in NullPointerException

2013-12-28 Thread Lance Java
1. How is mapper initialized. Is it @Injected or is it configured in a render phase method of the container (page / component)? If configured in a render phase (eg @SetupRender) then it will be null in the ajax action. 2. Are you in development mode when debugging? Component member variables are

Re: Is JSR-303 validation possible in a Loop?

2013-12-28 Thread Lance Java
It's possible but requires a bit of fancy footwork. See here: http://tapestry-stitch.uklance.cloudbees.net/mapbindingdemo Note usage of FieldSnapshot and reverse engineering a field name from a control name. On 28 Dec 2013 23:22, Chris Mylonas ch...@opencsta.org wrote: Out of curiosity, is it

Re: [5.4] hibernate events

2013-12-18 Thread Lance Java
Great! Note, you could reduce the verbosity by getting rid of the interface, NOT registering a service and using @Autobuild Ie: @Startup public static void initHibernateEventListener(@Autobuild HibernateInitializerImpl hi) { hi.initialize(); }

Re: submit form with context from js

2013-12-18 Thread Lance Java
You could use 2 buttons (one hidden). Hide the original form submit button and show a button that fires the modal. The modal somehow fires a click event on the hidden submit button.

Re: Excluding the last element in List during sorting

2013-12-17 Thread Lance Java
Tapestry's grid expects a GridDataSource as the source parameter. What you may not know is that tapestry has a TypeCoercer to make things easy for us. If you provide a list as the source of a grid, tapestry will happily TypeCoerce the list to a GridDataSource (which is what is happening in your

Re: [5.4] hibernate events

2013-12-17 Thread Lance Java
I'm not convinced you should be doing this in a HibernateConfigurer since you need the SessionSource. HibernateConfigurers are executed before the SessionFactory exists. Can you add the listener in a @Startup method or some @EagerLoad service?

Re: Excluding the last element in List during sorting

2013-12-17 Thread Lance Java
Yes, and as I said the grid component ALWAYS acts upon a GridDataSource even if you provide a List. So, instead of passing a List to the grid (and having Tapestry create a CollectionGridDataSource under the hood) you should pass your own custom GridDataSource. This custom GridDataSource will

Re: Excluding the last element in List during sorting

2013-12-17 Thread Lance Java
Eg: https://gist.github.com/uklance/8003728 NB not tested and needs to be tweaked to support paging.

Re: Excluding the last element in List during sorting

2013-12-17 Thread Lance Java
I'm assuming it's obvious that the source of the list is irrelevant and that my solution will work regardless.

Re: Excluding the last element in List during sorting

2013-12-17 Thread Lance Java
Awesome, it is working now Great! THANK A LOT, LANCE You're welcome :)

Re: Changing to default localization without extension for the language

2013-12-17 Thread Lance Java
I'm surprised that PersistentLocale does not have the ability to clear the value once it's set. Looking at PersistentLocaleImpl it doesn't allow setting to null. Perhaps you could override / decorate PersistentLocale to support clearing the value (by setting null). If decorating, you'll likely

Re: Excluding the last element in List during sorting

2013-12-14 Thread Lance Java
You'll need your own GridDataSource implementation and a custom implementation for void prepare(int startIndex, int endIndex, ListSortConstraint sortConstraints) Since you're using a list, it'll be easy to extend CollectionGridDataSource.

Re: Tapestry 5.1 and ajax callback

2013-12-11 Thread Lance Java
In a tapestry app, you should NEVER need a servlet (unless integrating a servlet based 3rd party library). There are far better solutions provided out of the box by Tapestry. As Thiago has said, servlets are so 2000.

Re: Tapestry 5.1 and ajax callback

2013-12-10 Thread Lance Java
You could use the onEvent mixin from tapestry-stitch to listen to the change event and update a zone. http://tapestry-stitch.uklance.cloudbees.net/oneventdemo

Re: Completion Proposals support in Eclipse Tapestry5 Plugin

2013-12-09 Thread Lance Java
Very cool. How are you getting all this info. Are you able to use tapestry services? Or are you rolling your own solution? I know gradle has a tooling api so that external tools can query the gradle model. Perhaps Tapestry needs a similar concept? On 9 Dec 2013 10:36, Dmitry Gusev

Re: Trying to get Tapestry Cometd working with T5.4

2013-12-08 Thread Lance Java
I was able to get it to work. Great news! I did notice you have all your js files on the main classpath and will need to be moved to META-INF. Yup, that's the new 5.4 way of doing asets I'm willing to do the work Great, thanks! but I still don't know enough about RequireJS, modules, etc to

Re: component paramter frustrations

2013-12-07 Thread Lance Java
Perhaps you could write your own persistance strategy. @Persist(MyPersistConstants.EVENT_CONTEXT) Which implicitly appends to the actionlink / eventlink context clientside and updates the fields serverside before delegating to the event.

Re: Trying to get Tapestry Cometd working with T5.4

2013-12-07 Thread Lance Java
Seems like the JSONObject(String...) constructor has disappeared. It might just require a recompile against 5.4. I don't have the source in front of me but I'm guessing it's swapped to JSONObject(Object...) which is why I guess a recompile will fix.

Re: Contributing an object that itself can take contributions?

2013-12-07 Thread Lance Java
Since you want two services which implement FooProvider you'll need to disambiguate either by serviceId or by marker annotation. See here for info http://tapestry.apache.org/defining-tapestry-ioc-services.html Another solution is to instead use 2 service interfaces (FooProvider and FooOverrides).

Re: component paramter frustrations

2013-12-07 Thread Lance Java
- From: Lance Java To: Tapestry users Sent: Saturday, December 07, 2013 8:04 AM Subject: Re: component paramter frustrations Perhaps you could write your own persistance strategy. @Persist(MyPersistConstants.EVENT_CONTEXT) Which implicitly appends to the actionlink

Re: Trying to get Tapestry Cometd working with T5.4

2013-12-07 Thread Lance Java
wrote: That would be great if you could do that. I tried to do it, but I was missing your offline jar. On Sat, Dec 7, 2013 at 3:10 AM, Lance Java lance.j...@googlemail.com wrote: Seems like the JSONObject(String...) constructor has disappeared. It might just require a recompile against

Re: component paramter frustrations

2013-12-06 Thread Lance Java
I've said this many times now. You must pass the parameters in the event context. t:actionlink t:id=foo context=[param1,param2,param3]... / onActionFromFoo(String param1, Foo param2, Bar param3) BTW: IMHO actionlink is deprecated and shouldn't be used. Use eventlink instead.

Re: using tapx-templating with T5.4

2013-12-06 Thread Lance Java
I've raised an issue, can you try the fix attached to the issue? https://github.com/uklance/tapestry-offline/issues/4

Re: component paramter frustrations

2013-12-06 Thread Lance Java
Let's consider that your component was being used in a t:loop and that the current loop value was passed to your component as a @Parameter. We know that tapestry's static structure / dynamic behaviour means that there is only 1 instance of your component (rendered multiple times). So, what would

Re: component paramter frustrations

2013-12-06 Thread Lance Java
what would the value IF the @Parameter be should be what would the value OF the @Parameter be (smartphone typo) On 6 Dec 2013 13:54, Lance Java lance.j...@googlemail.com wrote: Let's consider that your component was being used in a t:loop and that the current loop value was passed to your

Re: using tapx-templating with T5.4

2013-12-05 Thread Lance Java
Try tapestry-offline https://github.com/uklance/tapestry-offline Unlike tapx-templating, tapestry-offline can happily live inside a tapestry web application.

Re: Can you get URL context values within a component.

2013-12-04 Thread Lance Java
Components should have knowledge of page activation context. Pass the selected tab as a component parameter. The parameter can be mapped to the page activation context in the page. See the demo here http://tapestry-stitch.uklance.cloudbees.net/tabgroupdemo

Re: Can you get URL context values within a component.

2013-12-04 Thread Lance Java
Oops, smartphone typing. I meant to say Components should never have knowledge of page activation context. On 4 Dec 2013 23:07, Lance Java lance.j...@googlemail.com wrote: Components should have knowledge of page activation context. Pass the selected tab as a component parameter

Re: How does Tapestry SelectModelFactory pick the id

2013-12-02 Thread Lance Java
If you provide an encoder to your loop, select will use that. Otherwise it will ask the ValueEncoderFactory for a ValueEncoder for the type. Note that tapestry-hibernate will provide a ValueEncoder for each of your entities. Note also that ValueEncoderFactory will call the TypeCoercer as a last

Re: Passing blocks as component parameters

2013-12-02 Thread Lance Java
As Kristian has said, this can normally be managed with block delegate. Another way is to declare (or TypeCoerce) your block as a RenderCommand. You can return a RenderCommand from any render phase method. A RenderCommand can delegate to other RenderCommands. Note that rendering mimics tail

Re: component paramter frustrations

2013-12-02 Thread Lance Java
I avoid session usage at all costs (with the exception to the rule being the logged in userId) Why not pass the parameter values in your events so the app is stateless? Also, remember that page. onActivate(...) is called for page render and ajax events so sometimes it's better to initialise here

Re: component paramter frustrations

2013-12-02 Thread Lance Java
As I said, you just pass the parameters in the event context of you events.

Loving the eclipse-tapestry5-plugin

2013-12-02 Thread Lance Java
I've just started using the new(ish) eclipse-tapestry5-plugin and I must say it's great!! The killer feature for me is the '+' button to create a .tml, .css, .js file from a java class in a maven friendly location pre-filled with useful templates. Kudos to Dmitry Gusev for a great plugin. If

Re: Passing blocks as component parameters

2013-12-02 Thread Lance Java
thinking by delegate? I just pass this parameter to the delegate? (I will try this hope it works :)) On Mon, Dec 2, 2013 at 9:50 AM, Lance Java lance.j...@googlemail.com wrote: As Kristian has said, this can normally be managed with block delegate. Another way is to declare (or TypeCoerce

Re: How does Tapestry SelectModelFactory pick the id

2013-12-02 Thread Lance Java
Hmm... not sure why I said loop. If you provide an encoder to your loop, select will use that Should be If you provide an encoder to your select, it will use that. If company is in the basepackage.entities package, then tapestry-hibernate will auto-register a ValueEncoder for it. On 2

[ANN] tapestry-graphael

2013-11-30 Thread Lance Java
I've just created a little component library for generating gRaphaël SVG charts. Currently only pie charts and line charts are supported I'll probably only add other chart types as I need them myself. Demo: http://tapestry-graphael.uklance.cloudbees.net/ Source:

Re: [ANN] tapestry-graphael

2013-11-30 Thread Lance Java
Hi François, Sencha is not free, it's a commercial product which uses gRaphaël for charting.

Re: Strange behavior with JUnit and MVN test in Eclipse

2013-11-29 Thread Lance Java
Taking an educated stab in the dark here but maybe your using the m2e plugin in eclipse and it's resolving one of your dependencies to another project in eclipse At the command line it's resolving the same dependency from your maven repo. On 29 Nov 2013 17:52, Alessio Gambi

Re: grid is showing this column - _persistence Should Refresh Fetch Group

2013-11-28 Thread Lance Java
If you want to handle this globally, you could override / decorate BeanModelSource and call BeanModel.exclude(...) based on some logic.

Re: AW: switch Modal Box

2013-11-28 Thread Lance Java
Create a page for your pdf that can return a StreamResponse from onActivate(...). If the pdf can't be rendered, you show an error. You can either pagelink to the pdf page or return an instance of the pdf page in onSuccess() from a form on another page. On 27 Nov 2013 18:53, Vasili Petrenko

Re: grid is showing this column - _persistence Should Refresh Fetch Group

2013-11-28 Thread Lance Java
it to all the grids through a worker. On Thu, Nov 28, 2013 at 10:56 AM, Lance Java lance.j...@googlemail.com wrote: If you want to handle this globally, you could override / decorate BeanModelSource and call BeanModel.exclude(...) based on some logic.

Re: grid is showing this column - _persistence Should Refresh Fetch Group

2013-11-27 Thread Lance Java
I'm guessing some ejb class transformation has added a _persistence property to your bean. Try t:grid ignore=_persistance... On 28 Nov 2013 02:53, Chris Mylonas ch...@opencsta.org wrote: Hi Tapsters, Can anyone shed any light on the above? I usually use my own home grown hand rolled tables

Re: grid is showing this column - _persistence Should Refresh Fetch Group

2013-11-27 Thread Lance Java
Oops. I meant exclude not ignore. On 28 Nov 2013 07:17, Lance Java lance.j...@googlemail.com wrote: I'm guessing some ejb class transformation has added a _persistence property to your bean. Try t:grid ignore=_persistance... On 28 Nov 2013 02:53, Chris Mylonas ch...@opencsta.org wrote

Re: 5.4 Bug with select nested inside form loop.

2013-11-24 Thread Lance Java
-new*** in toValue() Option 3: @Persist your phones in the session. Your ValueEncoder then converts between object and string using the array index On 23 November 2013 23:06, George Christman gchrist...@cardaddy.com wrote: On Sat, Nov 23, 2013 at 4:48 AM, Lance Java lance.j...@googlemail.com

Re: 5.4 Bug with select nested inside form loop.

2013-11-23 Thread Lance Java
in the select menu. I tried clearing my browser cache as well, no change. Should I file a bug report with JIRA? On Fri, Nov 22, 2013 at 3:24 PM, Lance Java lance.j...@googlemail.com wrote: As I said... I haven't taken the time to fully understand the code. That being said, I'd be willing

Re: The Rise and Fall of Tapestry

2013-11-22 Thread Lance Java
7. Why Howard finally embraced Wicket and started using it in his clients' projects. Drink a shot! 8. When Tapestry became Wicketstry Drink a shot! or Tapwickstry. ... and another!

Re: 5.4 Bug with select nested inside form loop.

2013-11-22 Thread Lance Java
Probably best to see some code before calling it a bug. Perhaps you are initializing a variable in its declaration (instead of @SetupRender) or possibly a @Persist issue?

Re: 5.4 Bug with select nested inside form loop.

2013-11-22 Thread Lance Java
Why is your encoder calling person.getPhones().add(phone)??? That looks totally dodgy!

Re: 5.4 Bug with select nested inside form loop.

2013-11-22 Thread Lance Java
I didn't take the time to fully understand your code but a ValueEncoder's role is solely to serialize between clientside string and serverside object. Nothing more.

Re: 5.4 Bug with select nested inside form loop.

2013-11-22 Thread Lance Java
I'm assuming you know that the encoder is fired every time a conversion between clientside id and serverside object is done. This includes your delete action etc.

Re: Web frameworks

2013-11-18 Thread Lance Java
I'm not sure why... but for some reason a random user comes on this tapestry list about once a year spreading FUD with a message similar to this one. I've never really understood why... Please ignore this thread. On 18 November 2013 19:12, Emmanuel Sowah eso...@gmail.com wrote: Hi guys,

Re: Pre select Tree with zone update

2013-11-17 Thread Lance Java
Jumpstart fires it's own custom leafSelected event when you select a leaf. So you'll need to make sure you mimic this action. From what I can see, that means you'll need to initialise selectedClassification with a value.

Render component markup to HTML string for use in javascript etc.

2013-11-16 Thread Lance Java
I've seen the following question asked countless times in this forum: How do I render the HTML for my component into a string for use in javascript I've added a 'capture' component to tapestry stitch and a demo which demonstrates capturing markup during page render and ajax update. Demo here:

Re: Grid Pagination and Performance

2013-11-13 Thread Lance Java
The grid needs the rowcount to know how many pages there are in total (eg page 1 of N). HibernateGridDataSource and JpaGridDataSource execute 2 types of queries. 1 to get the rowcount and another to get a single page at a time. In my opinion this is a scalable approach.

Re: Grid Pagination and Performance

2013-11-13 Thread Lance Java
The Grid should only ever send a single page of data at a time. Let's get things clear... Are you using @Persist or java.util.List with your large dataset? To maintain scalability you should never coerce GridDataSource to List. Perhaps it's just your choice of language (persist list) that was

Re: T5.3: per page context session storage?

2013-11-07 Thread Lance Java
to edit object with several pages/screens before finally committing it? On Thu, Nov 7, 2013 at 2:03 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Wed, 06 Nov 2013 18:37:24 -0200, Lance Java lance.j...@googlemail.com wrote: Any time someone wants to use the session, I

Re: T5.3: per page context session storage?

2013-11-06 Thread Lance Java
Any time someone wants to use the session, I always ask why. I avoid session usage wherever possible. If there's no real need for it, I suggest you keep your app stateless and use the page activation context / event context to pass parameters.

Re: Tree, jumpstart tree from database and zone demo

2013-11-06 Thread Lance Java
FYI you might be interested in this: http://tapestry-stitch.uklance.cloudbees.net/databasetreedemo

Re: Trying to create a custom mixin which will update zone.

2013-11-02 Thread Lance Java
Nice, I'm not too familiar with 5.4 so the data attributes + dom stuff is all new to me. NB jquery has built in support for data attributes so $field.attr(data-update-zone, spec.zone) can be written as $field.data(update-zone, spec.zone)

Re: Trying to create a custom mixin which will update zone.

2013-10-31 Thread Lance Java
Take a look at the onEvent mixin in tapestry-stitch http://tapestry-stitch.uklance.cloudbees.net/oneventdemo On 31 October 2013 19:44, George Christman gchrist...@cardaddy.com wrote: I was semi able to get it to work using the following code, but it looks as if the onDocument method doesn't

Re: DynamicTemplate issue

2013-10-26 Thread Lance Java
Have you seen the code I provided on the jack of all trades page thread? I've pretty much solved the problem there. Tapestry uses bindings to read and write values during rendering. Eg the prop: binding.

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Lance Java
Martin, again you are saying @CommitAfter is broken when it's not. It's your understanding of @CommitAfter that is broken :) CommitAfter does exactly what is says on the tin, it commits the current transaction after it executes the method.

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Lance Java
I'm assuming a fork is broken too because it's no good for eating soup? Sounds like you need a spoon, it's easy to write your own annotation... Perhaps you want a @MaybeCommitAfter ;)

Re: [5.4.23] Troubleshooting Live Class Reloading

2013-10-25 Thread Lance Java
Just a stab in the dark here but are you using maven and using a version number NOT suffixed with -SNAPSHOT if you are this will cause problems as maven assumes that non snapshot versions (releases) are static.

Re: uberValidator for all text input fields

2013-10-25 Thread Lance Java
You could add an implicit mixin to every textfield using a ClassTransformWorker2. See Taha's blog post here http://tawus.wordpress.com/2011/08/01/tapestry-mixins-classtransformations/

<    1   2   3   4   5   6   7   8   9   10   >