If you use beads, the JS code in the bead would add "require", for
example, to the <input> element, but the SWF code might be empty since
there is nothing on the SWF side to support a required input field. One
day you or someone might fill in that SWF code block.

If you use beads, the developer would add the beads onto to those fields
that needed them:

<html5:TextInput id="firstName">
    <html5:beads>
       <html5:RequiredFieldBead />
    </html5:beads>
</html5:TextInput>
<html5:TextInput id="nickname" />

Here, the firstName field is required so it includes the
RequiredFieldBead, but the nickname field is optional so you don't add it.

Your alternative, as Alex said, it just to add things as properties to the
HTML5 version of the TextInput component:

<html5:TextInput id="firstName" required="true" />
<html5:TextInput id="nickname" />

it is sure less to type for the developer, but both instances carry with
the code to handle the required property. But since this is HTML5-only, it
wouldn't be a big deal. In fact, you could mix the two:

<htm5:TextInput id="firstName" required="true" />
<js:TextInput id="nickname" />

Then the nickname is just the simpler code.

‹peter

On 9/20/16, 1:43 PM, "OK" <p...@olafkrueger.net> wrote:

>>Yes, beads would be a good thing, but IMO, it is only necessary for the
>>COMPILE::SWF code, since it is the SWF code that doesn't have built-in
>>functionality to rely on.
>
>If we'd go this way, does it mean that at the end users would have to add
>beans to make sure that the SWF version works and also have to add the
>properties to the TextInput component to make sure that the JS version
>works?
>
>Thanks,
>Olaf
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/FlexJS-TextInput-Form-valid
>ation-tp13577p13592.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to