You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2019/03/14 17:52:00 UTC
Strategy to remove all validation error tooltips
Hi,
I'm trying to solve a global problem: how to remove all validation error
messages from a control, a form item or a complete form when navigating
other parts of the application. For example using the drawer navigator
going to other main option, a tabbar going to other content, etc...
So how should we solve this from Royale point of view. I'm not asking for a
code solution, but for a suggestion of what should we do that will serve as
the main idea in order to implement it.
Thanks for any suggestion you can provide :)
--
Carlos Rovira
http://about.me/carlosrovira
Re: Strategy to remove all validation error tooltips
Posted by Carlos Rovira <ca...@apache.org>.
Hi Alex,
El jue., 14 mar. 2019 a las 19:28, Alex Harui (<ah...@adobe.com.invalid>)
escribió:
> Hi Carlos,
>
> IMO:
>
> -Everything you mentioned does or should generate events.
>
ok
> -In theory some view bead or MXML document is in charge of displaying
> validation errors (the validators themselves are hopefully not displaying
> the errors, just returning a status or dispatching an event). That view
> bead or MXML document should be listening for the appropriate events
>
still not, but I hope to refactor this someday
>
> I think the trick is how some view or MXML can get events from other UI
> widgets. I don't think there is a single strategy for that so it would be
> interesting to see various strategies implemented (hopefully as beads) to
> capture appropriate events. Similar to LayoutNotificationBead, some bead
> could be added that watches a component for an event and forwards it to a
> central bead on the app. Another bead might watch the central bead and
> clear the validation errors.
>
just committed a solution that works. Let me know what you think about it.
If is what you recommend or not.
Just take into account that for now validation bead has baked the
visualization for now until I can refactor that.
In the solution:
* NavigationActionNotifier : listen for change or click events and creates "
navigationAction" that bubbles to main app view
* CleanValidationErrors : is in main app view and listen for "
navigationAction" and dispatch "cleanValidationErrors" that Jewel Validator
nows to destroy all error tips
Thanks
Carlos
>
> Just an idea,
> -Alex
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
>
>
Re: Strategy to remove all validation error tooltips
Posted by Alex Harui <ah...@adobe.com.INVALID>.
Hi Carlos,
IMO:
-Everything you mentioned does or should generate events.
-In theory some view bead or MXML document is in charge of displaying validation errors (the validators themselves are hopefully not displaying the errors, just returning a status or dispatching an event). That view bead or MXML document should be listening for the appropriate events
I think the trick is how some view or MXML can get events from other UI widgets. I don't think there is a single strategy for that so it would be interesting to see various strategies implemented (hopefully as beads) to capture appropriate events. Similar to LayoutNotificationBead, some bead could be added that watches a component for an event and forwards it to a central bead on the app. Another bead might watch the central bead and clear the validation errors.
Just an idea,
-Alex
On 3/14/19, 10:58 AM, "Carlos Rovira" <ca...@apache.org> wrote:
Hi,
I'm trying to solve a global problem: how to remove all validation error
messages from a control, a form item or a complete form when navigating
other parts of the application. For example using the drawer navigator
going to other main option, a tabbar going to other content, etc...
So how should we solve this from Royale point of view. I'm not asking for a
code solution, but for a suggestion of what should we do that will serve as
the main idea in order to implement it.
Thanks for any suggestion you can provide :)
--
Carlos Rovira
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cb994389f91dc4459819d08d6a8a6b48b%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636881831370015859&sdata=pfDk%2BfjJY6yoXUvw%2BT2Dr%2F4oENBZek2Z7%2BmUgA5oViA%3D&reserved=0