C# 클래스 Castle.MonoRail.Framework.Helpers.PrototypeHelper.JSGenerator

Pendent
상속: DynamicDispatchSupport, IJSGenerator
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

공개 메소드들

메소드 설명
Alert ( object message ) : void

Shows a JS alert

AppendLine ( String content ) : void

Writes the content specified to the generator instance

This is for advanced scenarios and for the infrastructure. Usually not useful.

Assign ( String variable, String expression ) : void

Assigns a javascript variable with the expression.

BuildJSArguments ( object args ) : string

Builds the JS arguments.

Call ( object function ) : void

Calls the specified function with the optional arguments.

CreateCollectionGenerator ( string root ) : IJSCollectionGenerator

Creates a generator for a collection.

CreateElementGenerator ( string root ) : IJSElementGenerator

Creates a generator for an element.

Declare ( string variable ) : void

Declares the specified variable as null.

Hide ( ) : void

Hides the specified elements.

The elements must exist.

InsertHtml ( string position, string id, object renderOptions ) : void

Inserts a content snippet relative to the element specified by the id

The supported positions are Top, After, Before, Bottom

JSGenerator ( IRailsEngineContext context ) : System

Initializes a new instance of the JSGenerator class.

ReApply ( ) : void

Re-apply Behaviour css' rules.

Only makes sense if you are using the Behaviour javascript library.

Record ( IJSGenerator gen, string line ) : void

Records the specified line on the generator.

RedirectTo ( object url ) : void

Redirects to an url using the location.href. This is required as most ajax libs don't care for the redirect status in the http reply.

Remove ( ) : void

Remove the specified elements from the DOM.

The elements must exist.

RemoveTail ( IJSGenerator generator ) : void

Removes the tail.

Render ( object renderOptions ) : object

Outputs the content using the renderOptions approach.

If the renderOptions is a string, the content is escaped and quoted.

If the renderOptions is a dictionary, we extract the key partial and evaluate the template it points to. The content is escaped and quoted.

Replace ( String id, object renderOptions ) : void

Replaces the entire target element -- and not only its innerHTML -- by the content evaluated.

ReplaceHtml ( String id, object renderOptions ) : void

Replaces the content of the specified target element.

ReplaceTailByPeriod ( IJSGenerator generator ) : void

Replaces the tail by period.

Show ( ) : void

Shows the specified elements.

The elements must exist.

ToString ( ) : string

Returns a that represents the current .

Toggle ( ) : void

Toggles the display status of the specified elements.

The elements must exist.

VisualEffect ( String name, String element, IDictionary options ) : void

Generates a call to a scriptaculous' visual effect.

VisualEffectDropOut ( String element, IDictionary options ) : void

Generates a call to a scriptaculous' drop out visual effect.

Write ( String content ) : void

Writes the content specified to the generator instance

This is for advanced scenarios and for the infrastructure. Usually not useful.

비공개 메소드들

메소드 설명
JSGenerator ( ) : System

Collects the public methods

JsEscape ( string content ) : string
JsEscapeWithSQuotes ( string content ) : string

메소드 상세

Alert() 공개 메소드

Shows a JS alert
public Alert ( object message ) : void
message object The message to display.
리턴 void

AppendLine() 공개 메소드

Writes the content specified to the generator instance
This is for advanced scenarios and for the infrastructure. Usually not useful.
public AppendLine ( String content ) : void
content String The content.
리턴 void

Assign() 공개 메소드

Assigns a javascript variable with the expression.
public Assign ( String variable, String expression ) : void
variable String The target variable
expression String The right side expression
리턴 void

BuildJSArguments() 공개 정적인 메소드

Builds the JS arguments.
public static BuildJSArguments ( object args ) : string
args object The args.
리턴 string

Call() 공개 메소드

Calls the specified function with the optional arguments.
public Call ( object function ) : void
function object The function name.
리턴 void

CreateCollectionGenerator() 공개 메소드

Creates a generator for a collection.
public CreateCollectionGenerator ( string root ) : IJSCollectionGenerator
root string The root expression.
리턴 IJSCollectionGenerator

CreateElementGenerator() 공개 메소드

Creates a generator for an element.
public CreateElementGenerator ( string root ) : IJSElementGenerator
root string The root expression.
리턴 IJSElementGenerator

Declare() 공개 메소드

Declares the specified variable as null.
public Declare ( string variable ) : void
variable string The variable name.
리턴 void

Hide() 공개 메소드

Hides the specified elements.
The elements must exist.
public Hide ( ) : void
리턴 void

InsertHtml() 공개 메소드

Inserts a content snippet relative to the element specified by the id

The supported positions are Top, After, Before, Bottom

public InsertHtml ( string position, string id, object renderOptions ) : void
position string The position to insert the content relative to the element id
id string The target element id
renderOptions object Defines what to render
리턴 void

JSGenerator() 공개 메소드

Initializes a new instance of the JSGenerator class.
public JSGenerator ( IRailsEngineContext context ) : System
context IRailsEngineContext The request context
리턴 System

ReApply() 공개 메소드

Re-apply Behaviour css' rules.
Only makes sense if you are using the Behaviour javascript library.
public ReApply ( ) : void
리턴 void

Record() 공개 정적인 메소드

Records the specified line on the generator.
public static Record ( IJSGenerator gen, string line ) : void
gen IJSGenerator The gen.
line string The line.
리턴 void

RedirectTo() 공개 메소드

Redirects to an url using the location.href. This is required as most ajax libs don't care for the redirect status in the http reply.
public RedirectTo ( object url ) : void
url object The URL.
리턴 void

Remove() 공개 메소드

Remove the specified elements from the DOM.
The elements must exist.
public Remove ( ) : void
리턴 void

RemoveTail() 공개 정적인 메소드

Removes the tail.
public static RemoveTail ( IJSGenerator generator ) : void
generator IJSGenerator The generator.
리턴 void

Render() 공개 메소드

Outputs the content using the renderOptions approach.

If the renderOptions is a string, the content is escaped and quoted.

If the renderOptions is a dictionary, we extract the key partial and evaluate the template it points to. The content is escaped and quoted.

public Render ( object renderOptions ) : object
renderOptions object The render options.
리턴 object

Replace() 공개 메소드

Replaces the entire target element -- and not only its innerHTML -- by the content evaluated.
public Replace ( String id, object renderOptions ) : void
id String The target element id
renderOptions object Defines what to render
리턴 void

ReplaceHtml() 공개 메소드

Replaces the content of the specified target element.
public ReplaceHtml ( String id, object renderOptions ) : void
id String The target element id
renderOptions object Defines what to render
리턴 void

ReplaceTailByPeriod() 공개 정적인 메소드

Replaces the tail by period.
public static ReplaceTailByPeriod ( IJSGenerator generator ) : void
generator IJSGenerator The generator.
리턴 void

Show() 공개 메소드

Shows the specified elements.
The elements must exist.
public Show ( ) : void
리턴 void

ToString() 공개 메소드

Returns a that represents the current .
public ToString ( ) : string
리턴 string

Toggle() 공개 메소드

Toggles the display status of the specified elements.
The elements must exist.
public Toggle ( ) : void
리턴 void

VisualEffect() 공개 메소드

Generates a call to a scriptaculous' visual effect.
public VisualEffect ( String name, String element, IDictionary options ) : void
name String The effect name.
element String The target element.
options IDictionary The optional options.
리턴 void

VisualEffectDropOut() 공개 메소드

Generates a call to a scriptaculous' drop out visual effect.
public VisualEffectDropOut ( String element, IDictionary options ) : void
element String The target element.
options IDictionary The optional options.
리턴 void

Write() 공개 메소드

Writes the content specified to the generator instance
This is for advanced scenarios and for the infrastructure. Usually not useful.
public Write ( String content ) : void
content String The content.
리턴 void