Render an image button¶
Apply the shared SAIFImageButton CSS class and, when the activity indicator is enabled, wire up the client-side indicator/form-disable script. This operation is implemented by SAIFImageButton.PreRender.
| Field | Value |
|---|---|
| Operation ID | OP-MENU-015 |
| Trigger | SAIFImageButton.PreRender, during the ASP.NET render phase for any SAIFImageButton instance. |
| Inputs | EnableIndicator. |
| Outputs | CSS class on the rendered <img>/<input>; registered ImageButton.js reference; DisableFormControls attribute. |
| Primary components | SAIFImageButton.PreRender |
| Entry point | SAIF.Presentation.Web.Controls.V2.Menu/SAIFImageButton.vb |
Steps¶
- Set the CSS class to
SAIFImageButton. Enforces BR-MENU-072. - When
EnableIndicatoris true, switch the class toSAIFImageButtonIndicator, publish theDisableFormControlsattribute and register/Resources/Scripts/Controls/ImageButton.jsonce per page. Enforces BR-MENU-073, BR-MENU-074.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["SAIFImageButton.PreRender"]) --> Css["Set CSS class to SAIFImageButton"]
Css --> Indicator{EnableIndicator?}
Indicator -->|Yes| SwitchClass["Switch class to SAIFImageButtonIndicator"]
SwitchClass --> Publish["Publish DisableFormControls attribute"]
Publish --> Register["Register ImageButton.js once per page"]
Register --> End(["Rendered img/input with CSS class"])
Indicator -->|No| End
Failure and edge-case behavior¶
- No exceptional failure paths beyond those noted in the steps above.
Related documentation¶
Sources¶
SAIF.Presentation.Web.Controls.V2.Menu/SAIFImageButton.vb