Class NavigateButtonView
public sealed class NavigateButtonView : AbstractView
Inherited Members
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 SourceNavigateButtonView(String, String, String)
Create an instance of a ButtonView with an ID and Name
Declaration
[JsonConstructor]
public NavigateButtonView(string id, string name, string homeSeerUrl)
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
const string _invalidNameCharacters = "<>\n\r"
Field Value
Type | Description |
---|---|
System.String |
Properties
View SourceHomeSeerUrl
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
public string HomeSeerUrl { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceGetStringValue()
Get the value associated with this view as a string if there is one.
Declaration
public override string GetStringValue()
Returns
Type | Description |
---|---|
System.String | Returns null |
Overrides
View SourceToHtml(Int32)
Get a string representation of this view converted into HTML
Declaration
public override string ToHtml(int indent = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | indent |
Returns
Type | Description |
---|---|
System.String | An HTML representation of the view as a string |
Overrides
View SourceUpdate(AbstractView)
Update the view to the new state. This will change the HomeSeerUrl
Declaration
public override void Update(AbstractView newViewState)
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
Exceptions
Type | Condition |
---|---|
ViewTypeMismatchException | Thrown when the new view's class doesn't match the calling view |