C# Class 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
Inheritance: AbstractHelper
Afficher le fichier Open project: nats/castle-1.0.3-mono

Méthodes publiques

Méthode Description
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

Method Details

AddLoadEvent() public méthode

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
Résultat String

EndBehaviourRegister() public méthode

Renders the end of a script block that associated events to selector rules StartBehaviourRegister Register
public EndBehaviourRegister ( ) : String
Résultat String

InstallScripts() public méthode

Renders a script tag refering the Behaviour library code.
public InstallScripts ( ) : String
Résultat String

ReApply() public méthode

Renders a script block invoking Behaviour.apply()
public ReApply ( ) : String
Résultat String

Register() public méthode

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
Résultat String

StartBehaviourRegister() public méthode

Renders a script block starting the association of events to selector rules Register EndBehaviourRegister
public StartBehaviourRegister ( ) : String
Résultat String