Re: dynamic forms concept & possible solutions

2014-04-14 Thread Ilya Obshadko
OK, so we can omit validation when needed. That's great (I wasn't aware of such a method), but I don't like "hidden submit" concept either, it looks more like a workaround rather than a solution. I remember from my earlier experience with Tapestry that simply calling form.submit() without any hid

Re: Why is my tap5.4beta3 Alerts Component rendering all alerts twice?

2014-04-14 Thread Jon Williams
Thanks for the style pointers Thiago. Unfortunately not a fix, the problem remains the same. On Mon, Apr 14, 2014 at 6:24 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri, 11 Apr 2014 09:39:05 -0300, Jon Williams < > williams.jonat...@gmail.com> wrote: > > hi, > > > Hi!

Re: dynamic forms concept & possible solutions

2014-04-14 Thread Thiago H de Paula Figueiredo
On Mon, 14 Apr 2014 09:39:33 -0300, Chris Poulsen wrote: I dont think onSuccess is called if validation fails, perhaps one could adjust the outcome of the validation phase of the form like suggested. Yeah, I just noticed that after I posted the message, and you're right about the validati

Re: dynamic forms concept & possible solutions

2014-04-14 Thread Ville Virtanen
I think Thiago means onSubmit() (If there are errors, it will never reach on success, right?) This also means that client side validation must be disabled, or then a bit of JS must be used to disable it for the hidden button. (Js interface also exists to submit the form iirc, but for these bit

Re: dynamic forms concept & possible solutions

2014-04-14 Thread Chris Poulsen
I dont think onSuccess is called if validation fails, perhaps one could adjust the outcome of the validation phase of the form like suggested. On Mon, Apr 14, 2014 at 2:19 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko > wrote:

Re: Why is my tap5.4beta3 Alerts Component rendering all alerts twice?

2014-04-14 Thread Thiago H de Paula Figueiredo
On Fri, 11 Apr 2014 09:39:05 -0300, Jon Williams wrote:hi,Hi!    private Object onSelectedFromRegister() {        if (registerForm.getHasErrors()) {            return this;        }I'm not sure that's related to your problem, but don't return "this" in event handler methods unless you really want

Re: 5.4 Endless Scroll Component

2014-04-14 Thread Thiago H de Paula Figueiredo
On Sun, 13 Apr 2014 17:38:27 -0300, George Christman wrote: How do you think it will work with the back button? I'm assuming as soon as you navigate away from the page and return with the back button your going to lose your results? As far as I know, back button usually doesn't work with

Re: dynamic forms concept & possible solutions

2014-04-14 Thread Thiago H de Paula Figueiredo
On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko wrote: - if we trigger form submission (it's possible to do that using hidden submit, it's not very elegant, but it works), we have to go through form validation which fails in most cases because at this point form is not yet completed; user

Re: JavaScript method for context encoding

2014-04-14 Thread Thiago H de Paula Figueiredo
On Sun, 13 Apr 2014 06:10:58 -0300, Ilya Obshadko wrote: But there is another problem (which I'm trying to handle right now): how do we manage a dynamic form where controls visibility depends on contents or state of one or more other controls? I believe we need something similar to Trigg

Re: Passing null value into context

2014-04-14 Thread Lance Java
No, you can generate the context as normal. Just use EventContext in the event to support a dynamic number of context values (ie 0 or 1 values). Eg: ... public Object getMyContext() { if (someObject == null) return Collections.emptyList(); return someObject; } void onMyE

dynamic forms concept & possible solutions

2014-04-14 Thread Ilya Obshadko
I've tried to approach the problem from different angles, but unsuccessfully. Let's suppose the following scenario (that's what I'm working on right now actually). You have an event registration form and you may register another participant with you; you're using suggestion (autocomplete) to ente

Re: problems with JavaScript compression on jquery js when deployed to jetty

2014-04-14 Thread John
I see I was actually not running dev mode on Jetty stand alone, so the yui compressor was on only for the maven jetty plugin. Is there a fixed version of yui-compressor I can use with Tapestry 5.3.6? John - Original Message - From: John To: users@tapestry.apache.org Sent: Monday,

Re: Passing null value into context

2014-04-14 Thread Boris Horvat
Ny server side event tyoe do you mean that I have to create link in java? I cant just pass EventContext to context parameter of pagelink. I tried that at it was take as a string of the EventContext toString method On 13 Apr 2014 15:48, "Lance Java" wrote: > This can be done using EventContext as

Re: 5.4 Endless Scroll Component

2014-04-14 Thread Nourredine K.
True. Ajax requests are not stored in the browser's history. But this can be worked around by binding an action (ajax request) to an url hash. This can be done by using a javascript module such as jquery-ajax[1] (see the demo[2]). Never tested. Seems too intrusive and painfull for existing code bu

problems with JavaScript compression on jquery js when deployed to jetty

2014-04-14 Thread John
My Tapestry project works fine when run inside maven using jetty:run, however when deployed to a stand-alone jetty server I get problems with the js compressor. I've tried Jetty 7, 8 and 9 with similar results. I guess compression is off when I run in the maven development environment, but I sti

Re: 5.4 Endless Scroll Component

2014-04-14 Thread Lance Java
Yes, the back button will be broken. I think this is the case with all Tapestry ajax interactions. There's a few javascript libraries that use anchor URL's (#) and the javascript history api to support the back button. I've never tried integrating any of these with tapestry. Perhaps this deserves i