|
Barry,
Basically when you use renderer
as editor, there is no reason to deal with labelFunction as you have powerful
control with built-in mask at your disposal.
The locale mask gets packaged within control
(wrapped DateField) as that particular functionality is quite
generic.
There is no trivial (out of the box way to add
props to MXML) . You have to use mx:Component in order to "embed" those
props to the class.
That approach is very limiting and does not lend
itself easily to data driven programming.
Alternative it to create class factory. I do not
have trivial factory here, but here is (very ugly and untested)
version of the implementation:
...........
rendererIsEditor="true"
itemRenderer="{new WrappedClassFactory(com.theriabook.controls.DateField, {dateFormat:locale.getDateFormat()}}" /> public class WrappedClassFactory extends
ClassFactory {
public function
WrappedClassFactory (cls:Class, props:Object) {
super();
this.properties = props;
}}
This should work and allow you to add as many
properties to the itemRenderer as you need.
Warning. This approach is addictive. It will
change the way you code. If you are in application and not software development
and have team of junior programmers it might cause project
delivery delay. On contrary, if you are in software development and have
experienced team it can benefit you greatly. Attached is a screenshot from
Chapter 11 of upcoming book on Flex - BOTH controls on the left and right are
datagrids showing the same data. "expando" property contains additional render
attributes, styles, runtime property and styles (ie clculated on data change),
etc. Enjoy.
Sincerely,
Anatole Tartakovsky
----- Original Message -----
__._,_.___
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
barry.gif
Description: GIF image
