Hi all.
I'm looking for some help with custom components. Basically, I have done a bit of a hack and managed to get something that appears to the user as an editable date field, by placing a TextInput over top of a DateField control and capturing the required events (see attached for the code). Its ugly, but it seems to work to a certain extent. The problems start when I try to incorporate validation in to the test page. Placing a form item with required set to true around the component along with a validator tag doesn't seem to perform the necessary validation. Sometimes typing the date directly will run the validator, but the "hidden" DateField seems to be the component that changes color. Basically, what im asking is: * Can this approach be adapted to include validation from the "parent" application that uses the component? * Or, is there an easier, more elegant way to provide an editable date field? (The docs indicate "editable" property inherited from ComboBase will be ignored) Cheers, Mike ------_=_NextPart_002_01C52620.4339BDD6 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:1295646861; mso-list-type:hybrid; mso-list-template-ids:1436176978 -1107641160 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 {mso-level-start-at:0; mso-level-number-format:bullet; mso-level-text:\F0B7; mso-level-tab-stop:54.0pt; mso-level-number-position:left; margin-left:54.0pt; text-indent:-18.0pt; font-family:Symbol; mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:Arial;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --> </style> </head> <body lang=EN-US link=blue vlink=purple> <div class=Section1> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Hi all.<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>I’m looking for some help with custom components. Basically, I have done a bit of a hack and managed to get something that appears to the user as an editable date field, by placing a TextInput over top of a DateField control and capturing the required events (see attached for the code). Its ugly, but it seems to work to a certain extent. The problems start when I try to incorporate validation in to the test page. Placing a form item with required set to true around the component along with a validator tag doesn’t seem to perform the necessary validation. Sometimes typing the date directly will run the validator, but the “hidden” DateField seems to be the component that changes color. Basically, what im asking is:<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=MsoNormal style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><font size=2 face=Symbol><span style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<font size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Can this approach be adapted to include validation from the “parent” application that uses the component?<o:p></o:p></span></font></p> <p class=MsoNormal style='margin-left:54.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><font size=2 face=Symbol><span style='font-size:10.0pt;font-family:Symbol'><span style='mso-list:Ignore'>·<font size=1 face="Times New Roman"><span style='font:7.0pt "Times New Roman"'> </span></font></span></span></font><![endif]><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Or, is there an easier, more elegant way to provide an editable date field? (The docs indicate “editable” property inherited from ComboBase will be ignored)<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Cheers,<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Mike<o:p></o:p></span></font></p> </div> </body> </html> ------_=_NextPart_002_01C52620.4339BDD6--
bink1F9c8OgFw.bin
Description: EditableDateField.mxml
binlqjF5uYWu6.bin
Description: test_custom_date.mxml

