getController

Reading Time: 1 minute

Gets a specific controller item of a page.

Description

vcc.getController(page: string, name: string): Controller | null

Searches page for controller by name. If found, returns the controller, otherwise returns null.

See Types of Controls for a list of available controls.

Parameters

name
Name of control item.

page
The page name which contains the controller item. If missing, the current page is used instead.

Return values

Controller – The control item or null if there is no such control item.

Example

We want to refresh the control in the news page.

vcc.getController('news', 'actual').refresh();

  • István Pálinkás

    This documentation segment contains conflicting statements. First row states: “Searches array for element and returns true if successful.” whatever “array” and “element” is supposed to mean, then “Return values” section states: “The control item or null if there is no such control item.”

    • VCC Live

      Hi István,

      Thank you for bringing this matter to our attention. We’ve fixed the issue.

      Kind regards,
      Peter

Subscribe to our newsletter
or Contact us!
Please note that by subscribing to our newsletter, you agree to receive regular email messages from VCC Live® about service related news and updates. By subscribing to our newsletter, you also agree that VCC Live® will use your data in accordance with the applicable Privacy Policy until you unsubscribe from the newsletter.