Search Results for

    Show / Hide Table of Contents

    Class InputView

    • C#
    • Visual Basic
    public sealed class InputView : AbstractView
    Public NotInheritable Class InputView
        Inherits AbstractView
    Inheritance
    System.Object
    AbstractView
    InputView
    Inherited Members
    AbstractView.Id
    AbstractView.Name
    AbstractView.Type
    AbstractView.HtmlIndent
    AbstractView.NonAllowedCharactersForId
    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


    An input view is an editable text box for the user to enter strings, numbers, etc.


    Constructors

    View Source

    InputView(String, String, EInputType)

    Create a new instance of an InputView with an ID, a Name, and the specified style.

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

    The unique ID for the View

    System.String name

    The name of the View

    EInputType type

    The style of the input. DEFAULT: Text

    View Source

    InputView(String, String, String, EInputType)

    Create a new instance of an InputView with an ID, a Name, a Value, and the specified style.

    Declaration
    • C#
    • Visual Basic
    public InputView(string id, string name, string value, EInputType type = EInputType.Text)
    Public Sub New(id As String, name As String, value As String, type As EInputType = EInputType.Text)
    Parameters
    Type Name Description
    System.String id

    The unique ID for the View

    System.String name

    The name of the View

    System.String value

    The value inputted into the field

    EInputType type

    The style of the input. DEFAULT: Text

    Exceptions
    Type Condition
    InvalidValueForTypeException

    Thrown when the value is invalid for the input type

    Fields

    View Source

    _value

    Declaration
    • C#
    • Visual Basic
    string _value
    _value As String
    Field Value
    Type Description
    System.String

    Properties

    View Source

    InputType

    The style of input accepted by this field. This determines the keyboard the user is shown when on a mobile device.

    Declaration
    • C#
    • Visual Basic
    [JsonProperty("input_type")]
    public EInputType InputType { get; set; }
    <JsonProperty("input_type")>
    Public Property InputType As EInputType
    Property Value
    Type Description
    EInputType
    View Source

    Value

    The current value of the field

    Declaration
    • C#
    • Visual Basic
    [JsonProperty("value")]
    public string Value { get; set; }
    <JsonProperty("value")>
    Public Property Value As String
    Property Value
    Type Description
    System.String
    Exceptions
    Type Condition
    InvalidValueForTypeException

    Thrown when the value is invalid for the input type

    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

    The value stored in this view as a string or NULL if there is no value stored.

    Overrides
    AbstractView.GetStringValue()
    Remarks

    The same as Value

    View Source

    IsValueValidForType(String)

    Check if the value is valid for the type set on the input view

    Declaration
    • C#
    • Visual Basic
    public bool IsValueValidForType(string value)
    Public Function IsValueValidForType(value As String) As Boolean
    Parameters
    Type Name Description
    System.String value

    The value to check

    Returns
    Type Description
    System.Boolean

    TRUE if the value is valid for the type or FALSE if it is not

    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 inputted value

    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

    InvalidValueForTypeException

    Thrown when the value is invalid for the input type

    View Source

    UpdateValue(String)

    Update the value of the view

    Declaration
    • C#
    • Visual Basic
    public override void UpdateValue(string value)
    Public Overrides Sub UpdateValue(value As String)
    Parameters
    Type Name Description
    System.String value

    The new value

    Overrides
    AbstractView.UpdateValue(String)
    • View Source
    In This Article
    Back to top HomeSeer Technologies