1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.MonoRail
.Framework
.JSGeneration
18 /// Depicts the operations supported by the element Js generator.
22 /// In practice you can access this generator by using the element accessor.
23 /// For example (using nvelocity syntax):
26 /// $page.el('element id') -> IJSElementGenerator instance
30 public interface IJSElementGenerator
33 /// Gets the parent generator.
35 /// <value>The parent generator.</value>
36 IJSGenerator ParentGenerator { get; }
39 /// Replaces the content of the element.
43 /// The following example uses nvelocity syntax:
46 /// $page.el('elementid').ReplaceHtml("%{partial='shared/newmessage.vm'}")
50 /// <param name="renderOptions">Defines what to render</param>
51 void ReplaceHtml(object renderOptions
);
54 /// Replaces the entire element's content -- and not only its innerHTML --
55 /// by the content evaluated.
59 /// The following example uses nvelocity syntax:
62 /// $page.el('messagediv').Replace("%{partial='shared/newmessage.vm'}")
66 /// <param name="renderOptions">Defines what to render</param>
67 void Replace(object renderOptions
);