Hints on javascript debugging

2014-11-17 Thread Chris Mylonas
Hey 5.4 Users, Short version: I notice there's a bit more discussion about javascript lately. Can someone point to a resource on how to debug javascript like a boss? Cheers Slightly longer: I currently have two (i consider minor) problems and I'd like to know more about javascript debugging

Re: beta-22 quickstart and client side validation

2014-11-17 Thread Ulrich Stärk
The data-* attributes are there. Tried with FF 33.something and Chrome 38.0.2125.122, both on Mac 10.9.5. What's odd is that Firebug is telling me on the script tab that there is "No Javascript on this page" while when looking at the source there clearly is and client side alerts are working. M

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Nov 2014 19:59:52 -0200, D Tim Cummings wrote: Thanks Charlouze. This sums up the problem nicely. I have added your comment to https://issues.apache.org/jira/browse/TAP5-2204 which was supposed to resolve this issue but hasn’t.

Re: beta-22 quickstart and client side validation

2014-11-17 Thread Howard Lewis Ship
That's odd, but I haven't played with the 5.4 quickstart yet. First thing to check is that the HTML text fields have the data- arguments that trigger validation on the client. If those are missing, it's a server-side problem (perhaps with the annotations). If they are present but not acted upon, th

Re: [5.4] javascript - simplify the new paradigm please

2014-11-17 Thread Chris Poulsen
I'm moving more of the initializer code over to get client id's etc. from data attributes - the "scanner" pattern for initialization that can be seen in some of tapestrys own components works really well (as opposed to setting up javascript modules with an initializer call as you have in your examp

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread Charlouze
I ran into this problem this morning too. I did my investigation in order to post a mail later but I found yours first. 2014-11-17 22:59 GMT+01:00 D Tim Cummings : > Thanks Charlouze. This sums up the problem nicely. I have added your > comment to https://issues.apache.org/jira/browse/TAP5-2204 <

Re: [5.4] javascript - simplify the new paradigm please

2014-11-17 Thread Geoff Callender
Yes indeed. The reason I've developed the habit of using afterRender() is that so often we need to pass the clientId of an embedded component to the JavaScript. In afterRender() we can be sure that all clientIds have been assigned. So now I just use afterRender() without giving it a second tho

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread D Tim Cummings
Thanks Charlouze. This sums up the problem nicely. I have added your comment to https://issues.apache.org/jira/browse/TAP5-2204 which was supposed to resolve this issue but hasn’t. Someone needs to reopen this jira issue. Tim > On 18 Nov 2014

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread D Tim Cummings
> On 18 Nov 2014, at 02:44, Thiago H de Paula Figueiredo > wrote: > > On Mon, 17 Nov 2014 10:41:20 -0200, D Tim Cummings > wrote: > >> Thanks. That wasn’t my question but it does help me. With secure="always", I >> would need the model for render and form submission. So according to what >

Re: tapestry 5.4 and jquery datepicker

2014-11-17 Thread Jan Fryblik
OMG, I'm so blind! Sorry for stupid question! You are right, of course. Thanks! On Mon, 17 Nov 2014 19:14:30 +0100, Thiago H de Paula Figueiredo wrote: On Mon, 17 Nov 2014 15:56:23 -0200, Jan Fryblik wrote: Hi guys, Hi! I'm migration my project from tapestry 5.3.7 to 5.4-bet

Re: URL Rewriting to base

2014-11-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Nov 2014 15:49:14 -0200, George Christman wrote: They are actually unique pages in the app profile/profileIndex profile/about however while rewriting the page links, I found it easier to just strip off profile/ rather than having to strip off profile/about/ just to get to the

Re: tapestry 5.4 and jquery datepicker

2014-11-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Nov 2014 15:56:23 -0200, Jan Fryblik wrote: Hi guys, Hi! I'm migration my project from tapestry 5.3.7 to 5.4-beta22 and I'm facing another tough error. There is tapestry-jquery >4.0.1-SNAPSHOT included in project and there is no usage of datepicker in page where is excepti

tapestry 5.4 and jquery datepicker

2014-11-17 Thread Jan Fryblik
Hi guys, I'm migration my project from tapestry 5.3.7 to 5.4-beta22 and I'm facing another tough error. There is tapestry-jquery 4.0.1-SNAPSHOT included in project and there is no usage of datepicker in page where is exception thrown from. Thank you for any comments or ideas. 18:46:25 [

Re: URL Rewriting to base

2014-11-17 Thread George Christman
They are actually unique pages in the app profile/profileIndex profile/about however while rewriting the page links, I found it easier to just strip off profile/ rather than having to strip off profile/about/ just to get to the two context parameters. I'm assuming the total number of pages will c

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread Charlouze
I agree with Tim. Documentation says that the default is auto and does not require the model to be set in order to pass the submission process. I think it's a bug. As you can see in the select component code

Re: [5.4] javascript - simplify the new paradigm please

2014-11-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Nov 2014 09:30:51 -0200, Chris Poulsen wrote: I tend to think of the the "after render requires" as initializers, Actually, it can be used inside beginRender() or setupRender() with the exact same result. :) Tapestry will only actually add the JavaScript stuff after the whole

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Nov 2014 10:41:20 -0200, D Tim Cummings wrote: Thanks. That wasn’t my question but it does help me. With secure="always", I would need the model for render and form submission. So according to what you are saying I could init the model in onActivate() OR onPrepare() OR (onPrep

Re: URL Rewriting to base

2014-11-17 Thread Thiago H de Paula Figueiredo
On Mon, 17 Nov 2014 12:08:29 -0200, George Christman wrote: I ended up getting it working over the weekend, but boy does it seem like a hack. I used some of your work to help me get going such as SimpleLink, however I needed the parameters so I needed to complete the class. Yeah, my Sim

Re: URL Rewriting to base

2014-11-17 Thread Kalle Korhonen
Hi George, is there a convincing reason to use the same page for these two URLs? To get the same end result with tapestry-routing ( http://tynamo.org/tapestry-routing+guide), I'd create two pages and annotate them like so: @At("/{0}") public class Profile {...} @At("/{0}/{1}") public class About

Re: URL Rewriting to base

2014-11-17 Thread George Christman
I ended up getting it working over the weekend, but boy does it seem like a hack. I used some of your work to help me get going such as SimpleLink, however I needed the parameters so I needed to complete the class. I'll look into a second level cache as that seems to be a better solution than what

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread D Tim Cummings
Thanks. That wasn’t my question but it does help me. With secure="always", I would need the model for render and form submission. So according to what you are saying I could init the model in onActivate() OR onPrepare() OR (onPrepareForSubmit() AND setupRender()). My actual question is why do I

Re: 5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread Chris Poulsen
If you init your model in setupRender it will be null upon form submit (as it is not a render request) - You can use onActivate, onPrepareForSubmit or onPrepare to init the model prior to form submission. -- Chris On Mon, Nov 17, 2014 at 12:39 PM, D Tim Cummings wrote: > I am trying to underst

5.4 beta 22 - Select component secure="auto" throws exception: model is bound to null.

2014-11-17 Thread D Tim Cummings
I am trying to understand the new attribute "secure" of the "select" component. This is either a bug or I don’t understand the attribute. I am running Tapestry 5.4 beta 22. I have copied the code from the Jumpstart7 AJAX filtered grid example where firstInitials is a List created in the setupR

Re: [5.4] javascript - simplify the new paradigm please

2014-11-17 Thread Chris Poulsen
I tend to think of the the "after render requires" as initializers, and the ajaxResponseRenderer (ARR) callbacks as the place to do interaction. I do not think of toggle calls like (show/hide timer) as real initializers. We still use .require to get the client side module "injected" in the ARR, b

Re: URL Rewriting to base

2014-11-17 Thread Thiago H de Paula Figueiredo
On Sat, 15 Nov 2014 00:56:58 -0200, George Christman wrote: Example domain.com/profile/profiledomain to domain.com/profile I do stuff very similar to this in Eloquentia (https://github.com/thiagohp/eloquentia). See https://github.com/thiagohp/eloquentia/tree/master/src/main/java/br/com/

Re: [5.4] javascript - simplify the new paradigm please

2014-11-17 Thread Geoff Callender
Hey, hang on, Chris, weren't you the one who asked "can't you just use javascriptsupport to require and invoke your js module function?". That's what got me doubting the "rule of thumb" that I'd written! Am I missing your point? Cheers Geoff On 17 Nov 2014, at 8:56 pm, Chris Poulsen wrote:

beta-22 quickstart and client side validation

2014-11-17 Thread Ulrich Stärk
I can't seem to get client-side validation to run using the beta-22 quickstart. I see the validation module being loaded on the console ("Loaded module t5/core/validation") but no client-side validation happens with a beaneditform bound to a bean which has fields annotated with @Validate("requir

Re: [5.4] javascript - simplify the new paradigm please

2014-11-17 Thread Chris Poulsen
We're doing something like this in event handlers to perform callbacks void onSetupDialog( @RequestParameter( "params" ) JSONObject json ) { initialLoad = false; extractParams( json ); ajaxResponseRenderer.addRender( "linkDialogModal", ( ( org.apache.ta

Re: [5.4] javascript - simplify the new paradigm please

2014-11-17 Thread Chris Poulsen
You are probably asking for trouble if you try to misuse "initializers" in this way (which also explains why two identical init statements results in only one being executed) -- Chris On Mon, Nov 17, 2014 at 8:45 AM, Charlouze wrote: > Geoff, > > AFAIK, JavascriptSupport is only available at r