You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Oleg Konovalov <ol...@gmail.com> on 2014/04/27 15:59:45 UTC
Validating DataGroup children
Hi,
I have a popup (TitleWindow) with Form,
which has a DataGroup, consisting of a number of "rows",
which have some GUI widgets (TextInputs, DropDownLists, ComboBoxes, etc)
in ItemRenderer.
I do validate data on that Form.
But how can I do validation of data which user fills on these children rows
(in ItemRenderer)?
TIA,
Oleg.
Re: Validating DataGroup children
Posted by piotrz <pi...@gmail.com>.
Hmm...Maybe you could do something like this:
1) When you click on Submit button -> refresh your dataProvider
2) override property data in your item renderer
3) Check in your overrided property "data" whether with your item renderer
is something wrong - if yes - dispatch your custom event.
4) Catch those event in your parent component
Piotr
-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Validating-DataGroup-children-tp6285p6357.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Validating DataGroup children
Posted by Oleg Konovalov <ol...@gmail.com>.
My question is how do I validate children when I click on Submit button on
parent form, is there some mechanism in DataGroup?
Not sure FocusOut can help here.
Any code samples?
On Apr 27, 2014 11:24 AM, "piotrz" <pi...@gmail.com> wrote:
> Hi Oleg,
>
> You can add to your item renderers validators for example StringValidator
> for your TextInput.
> Next creat custom event for ex. "invalidString" and dispatch it with
> bubbles=true when something goes wrong.
> Add event listener for "invalidString" event to your dataGroup and do
> whatever you want.
>
> Piotr
>
>
>
> -----
> Apache Flex Committer
> piotrzarzycki21@gmail.com
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Validating-DataGroup-children-tp6285p6287.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
Re: Validating DataGroup children
Posted by piotrz <pi...@gmail.com>.
Hi Oleg,
You can add to your item renderers validators for example StringValidator
for your TextInput.
Next creat custom event for ex. "invalidString" and dispatch it with
bubbles=true when something goes wrong.
Add event listener for "invalidString" event to your dataGroup and do
whatever you want.
Piotr
-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Validating-DataGroup-children-tp6285p6287.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Validating DataGroup children
Posted by Evyatar Ben Halevi-Arbib <ev...@gmail.com>.
You can perform the validation on the focusOut event dispatched by the
relevant components
Regards,
Evyatar
On Sun, Apr 27, 2014 at 4:59 PM, Oleg Konovalov <ol...@gmail.com> wrote:
> Hi,
>
>
>
> I have a popup (TitleWindow) with Form,
>
> which has a DataGroup, consisting of a number of "rows",
>
> which have some GUI widgets (TextInputs, DropDownLists, ComboBoxes, etc)
>
> in ItemRenderer.
>
> I do validate data on that Form.
>
>
>
>
> But how can I do validation of data which user fills on these children rows
> (in ItemRenderer)?
>
>
>
>
>
>
> TIA,
>
> Oleg.
>