Search Results for

    Show / Hide Table of Contents

    Class NavigateButtonView

    • C#
    • Visual Basic
    public sealed class NavigateButtonView : AbstractView
    Public NotInheritable Class NavigateButtonView
        Inherits AbstractView
    Inheritance
    System.Object
    AbstractView
    NavigateButtonView
    Inherited Members
    AbstractView.Id
    AbstractView.Name
    AbstractView.Type
    AbstractView.HtmlIndent
    AbstractView.NonAllowedCharactersForId
    AbstractView.UpdateValue(String)
    AbstractView.GetIndentStringFromNumber(Int32)
    AbstractView.IdContainsNonAllowedCharacters()
    AbstractView.ShallowCopy()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: HomeSeer.Jui.Views
    Assembly: PluginSdk.dll


    A button is used to navigate the UI to another HomeSeer page.


    Remarks

    This type of view is not recommended for event actions and triggers because it will force the user away from the page they are on. It disrupts the workflow for editing and creating actions and triggers.

    Constructors

    View Source

    NavigateButtonView(String, String, String)

    Create an instance of a ButtonView with an ID and Name

    Declaration
    • C#
    • Visual Basic
    [JsonConstructor]
    public NavigateButtonView(string id, string name, string homeSeerUrl)
    <JsonConstructor>
    Public Sub New(id As String, name As String, homeSeerUrl As String)
    Parameters
    Type Name Description
    System.String id

    The unique ID for the View

    System.String name

    The name of the View. Must not be blank

    System.String homeSeerUrl

    The HomeSeer URL this button navigates to. See HomeSeerUrl for the correct format.

    Exceptions
    Type Condition
    System.ArgumentException

    Thrown if a view is created with an invalid Name or HomeSeerUrl

    Fields

    View Source

    _invalidNameCharacters

    Declaration
    • C#
    • Visual Basic
    const string _invalidNameCharacters = "<>\n\r"
    Const _invalidNameCharacters As String = "<>" & vbLf & vbCr
    Field Value
    Type Description
    System.String

    Properties

    View Source

    HomeSeerUrl

    The HomeSeer URL this button navigates to. This must be a location relative to the hostname of the system. It must start with a /

    For example: "/devices.html"

    Declaration
    • C#
    • Visual Basic
    public string HomeSeerUrl { get; }
    Public ReadOnly Property HomeSeerUrl As String
    Property Value
    Type Description
    System.String

    Methods

    View Source

    GetStringValue()

    Get the value associated with this view as a string if there is one.

    Declaration
    • C#
    • Visual Basic
    public override string GetStringValue()
    Public Overrides Function GetStringValue As String
    Returns
    Type Description
    System.String

    Returns null

    Overrides
    AbstractView.GetStringValue()
    View Source

    ToHtml(Int32)

    Get a string representation of this view converted into HTML

    Declaration
    • C#
    • Visual Basic
    public override string ToHtml(int indent = 0)
    Public Overrides Function ToHtml(indent As Integer = 0) As String
    Parameters
    Type Name Description
    System.Int32 indent
    Returns
    Type Description
    System.String

    An HTML representation of the view as a string

    Overrides
    AbstractView.ToHtml(Int32)
    View Source

    Update(AbstractView)

    Update the view to the new state. This will change the HomeSeerUrl

    Declaration
    • C#
    • Visual Basic
    public override void Update(AbstractView newViewState)
    Public Overrides Sub Update(newViewState As AbstractView)
    Parameters
    Type Name Description
    AbstractView newViewState

    The new state of the view being updated. This view's ID and Type must match the calling view exactly

    Overrides
    AbstractView.Update(AbstractView)
    Exceptions
    Type Condition
    ViewTypeMismatchException

    Thrown when the new view's class doesn't match the calling view

    • View Source
    In This Article
    Back to top HomeSeer Technologies