You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 3 Current »
As of Helium 1.46, the normal button, submit button, and view action buttons support appearance bindings. These can be used to programatically alter the appearance of buttons beyond the default appearance.
<submit label="button.label.perform_action" action="performAction"> <appearance function="submitButtonAppearance"/> </submit>
button.label.perform_action=Perform action
DSL_APPEARANCE submitButtonAppearance() { // Preference to disabled appearance if(disableButton()) { return DSL_APPEARANCE.Disable; } else if(highlightButton()) { return DSL_APPEARANCE.Highlight; } // returning null here implies default appearance // equivalent to return DSL_APPEARANCE.Default return null; }
Highlighted button appearance
Disabled button appearance
Add Comment
Add Comment