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

Reply via email to