Button: Conversion from ASPX to HTML and TypeScript
The following tables will help you to convert ASPX elements that are related to buttons to HTML or TypeScript elements.
PXButton
The following table shows the correspondence between PXButton and HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
ASPX | HTML or TypeScript |
---|---|
PXButton
|
Is replaced by the qp-button
tag.
|
CommandName
|
Is replaced by the state.bind attribute, which binds the
button to the specified action defined in a
graph.
|
DialogResult
|
Is replaced by dialog-result attribute, which specifies the
response returned by an action. This attribute is required for the standard buttons
of a dialog box. This attribute can have any of the following values:
|
Enabled
|
Is replaced by the enabled attribute, which indicates (if
set to true) that the button is enabled on the
UI.
|
ID
|
Is replaced by the id attribute. This is a required
attribute.
|
Text
|
Is replaced by the caption attribute, which defines the text
that is displayed on the button. The string specified in this attribute is
localizable.
|
Tooltip
|
Use the tooltip attribute of the qpbutton
tag.
For buttons on a table toolbar, use the tooltip parameter while defining an action in the topBarItems property of the gridConfig decorator. For details, see Table (Grid): Configuration of the Table Toolbar
|
Size | Is replaced by the class attribute, which indicates how many columns of width the button should occupy. |
Visible
|
Is replaced by the hidden attribute, which indicates (if set
to true) that the button is not visible on the
UI.
|
PXDSCallbackCommand
The following table shows the correspondence between PXDSCallbackCommand and HTML or TypeScript elements. During the conversion of ASPX pages to HTML and TypeScript, you need to replace these ASPX elements with their analogs in HTML or TypeScript.
ASPX | HTML or TypeScript |
---|---|
PopupCommand | Use the popupCommand property of the
actionConfig decorator.
|
PopupCommandTarget | Use the target property of the actionConfig decorator. |
PopupPanel | Use the popupPanel property in the config attribute of the qp-button tag. |
Obsolete ASPX Controls and Properties
The following table lists obsolete ASPX elements that are related to buttons. You do not need to replace these ASPX elements with any HTML or TypeScript elements.
ASPX Control | Properties |
---|---|
PXButton |
|
PXDSCallbackCommand |
|