Just wanted to bump this. We're having trouble validating user input as required by our application because it's pushing the limits of the environment. Here's a little snapshot of our situation.
Our UI is intense. It's all about collecting potentially hundreds of pieces of data and giving a price quote. Here are some pics... http://eio-online.fileburst.com/laszloappspics/driverstab.jpg http://eio-online.fileburst.com/laszloappspics/vehiclestab.jpg We're stuck in that the volume of data we're collecting makes it unwieldy to tell the user after the fact (after they've sought results) that they have 10 or 15 fields strewn about that contain invalid data. We want a user to remain in a field until they get it right. Check out the "vehiclestab.jpg" pic above for instance. Picture a user enters "08ABC" in the third vehicle's garaging zip field. If they try to move to another field, focus should not be yielded. If the user tries to click another tab, or tabslider, focus should not be yielded. We want to tell them to fix the problem immediately and not let them leave the field until they get it right. We've got the individual field validators to do the job. We just can't prevent focus from shifting when someone clicks elsewhere. Java style "shouldYieldFocus()" as described below gets 'er done. We realize this is just a maturity thing. We just wanted to be a squeaky wheel :) -----Original Message----- From: William Krick [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 6:02 PM To: Jim Grandy Cc: [email protected] Subject: RE: [Laszlo-user] laszlo needs a shouldYieldFocus() method If you could do that for me, it would be greatly appreciated. At the moment, I don't really have a need to compile the source other than to integrate this feature. thank you so much for your time -----Original Message----- From: Jim Grandy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 5:50 PM To: William Krick Cc: [email protected] Subject: Re: [Laszlo-user] laszlo needs a shouldYieldFocus() method On Jan 12, 2006, at 2:29 PM, William Krick wrote: > I think the code in LzFocus.as LzFocus.setFocus() would look > something like > this... > > if ( !this.csel.shouldYieldFocus() ) > return; > That looks right. > Then all focusable views would need to have a default > shouldYieldFocus() > method that simply returns true and that the user can override to > return > false if conditions aren't met. I'm not sure where this would go. > LzNode? > LzView? basecomponent? > LzView is a good choice. I don't think LzNodes are (or should be) focusable. Just add a function declaration in LaszloView.as that returns true. > The problem is that I'm not that familiar with the internal > workings of the > whole laszlo architecture so I'm not sure how best to shoehorn this in > without breaking things. > > I haven't tackled building the source yet. That looks pretty daunting. > I forgot you might not have a contributor setup. This took me most of a day to get working when I started, so unless you want to be set up to build for some other reason, it might not be worth your time. Let me know, I can put together a diff for you and get it integrated (or help you with the setup if you are interested). Thanks again! jim > > > -----Original Message----- > From: Jim Grandy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 11, 2006 6:09 PM > To: William Krick > Cc: [email protected] > Subject: Re: [Laszlo-user] laszlo needs a shouldYieldFocus() method > > > Sounds like a relatively straightforward addition, and I agree we > need something like that. > > You've already pretty much written the RFC in your email, and the > change would be small. Could you at minimum write up a JIRA bug? > Contributing the change would also be fantastic, and ensure that it > happened on your timeframe. (I'd start looking in LzFocus.as, in > LzFocus.setFocus(), perhaps just after the line that sets > __LZsfrunning to true.) > > jim > > On Jan 11, 2006, at 2:28 PM, William Krick wrote: > >> We're trying to develop a fairly sophisticated application in laszlo. >> >> One of the most difficult and frustrating parts is validating user >> input and >> this may cause us to give up on laszlo entirely. >> >> We really need the ability to stop a focus change if the contents >> of a field >> is invalid. >> >> In Java, this problem was solved by giving each component a >> shouldYieldFocus() method. >> >> The way this works, when any other component wants to take focus, >> either by >> user action via keyboard or mouse, or programmatically, the focus >> system has >> to call the current focus owner's shouldYieldFocus() method first. >> This >> method by default just always returns true. However, you can >> override the >> method with your own implementation that can return false if certain >> conditions aren't met. Returning false prevents the focus system >> from >> moving focus to the new component. >> >> Laszlo really needs something similar in order for it to be viable >> for >> "real" applications. Otherwise we might as well just go back to >> HTML forms >> and do all our validation server-side. >> >> >> >> _______________________________________________ >> Laszlo-user mailing list >> [email protected] >> http://www.openlaszlo.org/mailman/listinfo/laszlo-user > > > _______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user -- Internal Virus Database is out-of-date. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.14/222 - Release Date: 1/5/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.17/226 - Release Date: 1/10/2006 _______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
