C# Класс Castle.MonoRail.Framework.Helpers.BehaviourHelper

Exposes the functionality available on the Behaviour js library which Uses css selectors to bind javascript code to DOM elements
Before using it, you must install the scripts. See BehaviourHelper.InstallScripts
Наследование: AbstractHelper
Показать файл Открыть проект

Открытые методы

Метод Описание
AddLoadEvent ( String loadFunctionName ) : String

Renders a script block invoking Behaviour.addLoadEvent(loadFunctionName);

EndBehaviourRegister ( ) : String

Renders the end of a script block that associated events to selector rules StartBehaviourRegister Register

InstallScripts ( ) : String

Renders a script tag refering the Behaviour library code.

ReApply ( ) : String

Renders a script block invoking Behaviour.apply()

Register ( String selector, String eventName, String jsFunctionName ) : String

Adds a entry to a registration array. Invoking it with #form, onsubmit and validate will produce '#form' : function(e){ e.onsubmit = validate; }, StartBehaviourRegister EndBehaviourRegister

StartBehaviourRegister ( ) : String

Renders a script block starting the association of events to selector rules Register EndBehaviourRegister

Описание методов

AddLoadEvent() публичный Метод

Renders a script block invoking Behaviour.addLoadEvent(loadFunctionName);
public AddLoadEvent ( String loadFunctionName ) : String
loadFunctionName String The name of the js function to be invoked when the body is loaded
Результат String

EndBehaviourRegister() публичный Метод

Renders the end of a script block that associated events to selector rules StartBehaviourRegister Register
public EndBehaviourRegister ( ) : String
Результат String

InstallScripts() публичный Метод

Renders a script tag refering the Behaviour library code.
public InstallScripts ( ) : String
Результат String

ReApply() публичный Метод

Renders a script block invoking Behaviour.apply()
public ReApply ( ) : String
Результат String

Register() публичный Метод

Adds a entry to a registration array. Invoking it with #form, onsubmit and validate will produce '#form' : function(e){ e.onsubmit = validate; }, StartBehaviourRegister EndBehaviourRegister
public Register ( String selector, String eventName, String jsFunctionName ) : String
selector String The css selector rule
eventName String The name of the event on the element
jsFunctionName String The function to be invoked in response to the event
Результат String

StartBehaviourRegister() публичный Метод

Renders a script block starting the association of events to selector rules Register EndBehaviourRegister
public StartBehaviourRegister ( ) : String
Результат String