sb:RemoveBar

Mark Birbeck's picture

The sb:RemoveBar method will remove a previous installed soft-bar. There is only one parameter:

internal name
The internal name used when the bar was created with sb:GenerateBar.

The return value will be "Success" if successful, otherwise an error description.

Example

A typical use would be to invoke the function, and then show a message. The message could indicate success or failure:

<xf:action ev:event="my-remove-bar">
  <xf:setvalue
   ref="@retval"
   value="sb:RemoveBar(string(../internalName))"
  />
  <xf:message level="modal">
    '<xf:output ref="name" />'
    has
    <xf:output value="
      if(
        @retval = 'Success',
        ' been removed. You will need to open a new browser window to see the change.',
        concat(' failed to be removed. The error is &#34;', @retval, '&#34;.')
      )"
    />
  </xf:message>
</xf:action>