Hello,

I tried to make jQuery work in Monorail, I'm using a build from trunk,
from a few weeks ago.
After a lot of search I ended up with this:

public void Configure( IMonoRailConfiguration configuration )
{
1.      configuration.JSGeneratorConfiguration
2.              .AddLibrary( "jquery-1.3.0", typeof( JQueryGenerator ) )
3.              .AddExtension( typeof( CommonJSExtension ) )
4.              .ElementGenerator
5.                  .AddExtension( typeof( JQueryElementGenerator ) )
6.                  .Done
7.              .BrowserValidatorIs( typeof( JQueryValidator ) )
8.              .SetAsDefault();
}

However, in the new.njs file at this line,
$page.replacehtml('newContainer', "%{partial='customers/_new.vm'}")

I get the following error:

<b>MissingMethodException</b>
Message: Constructor on type
'Castle.MonoRail.Framework.JSGeneration.jQuery.JQueryElementGenerator'
 not found.
StackTrace:
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
Binder binder
, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags
bindingAttr, Binder binder, Object[] args
, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at
Castle.MonoRail.Framework.Services.DefaultViewEngineManager.CreateExtensions
(IJSCodeGenerator generator
, List`1 extensions)
at
Castle.MonoRail.Framework.Services.DefaultViewEngineManager.CreateJSCodeGeneratorInfo
(IEngineContext
 engineContext, IController controller, IControllerContext
controllerContext)
at Castle.MonoRail.Framework.Services.DefaultViewEngineManager.Process
(String templateName, TextWriter
 output, IEngineContext context, IController controller,
IControllerContext controllerContext)
at Castle.MonoRail.Framework.Controller.ProcessView()
at Castle.MonoRail.Framework.Controller.RunActionAndRenderView()

If I comment the lines 4,5 and 6, the exception does not happen but
the code also doesn't execute.


Do you know why it happens?
And is there any coherent way of using jQuery in monorail?
And currently can jQuery replace entirely prototype?

Thank you,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to