Misc Pivot stuff

Padding choices

In wtkx, adding padding usually looks like: styles=”{padding:10}”. Nice if you want 10px all around, but you can also specify each side styles=”{padding:{top:1,left:2,bottom:3,right:4}}”.

Adding validators inline

Normally to add a validator to a component, you code something similar to

@WTKX
private TextInput maxFileSize;
...
...
maxFileSize.setValidator(new IntRangeValidator(0, Integer.MAX_VALUE));

Seems like a bit of a waste? In WTKX, you can include any object that has a no-argument constructor. So we can inline the whole thing.

  1. Include the package to your object as part of the xml namespace (notice xmlns:text)
  2. Define the validator.
  3. attach it to your component

 
     
 
 
...
...
   
...