rhino

How can you run Javascript using Rhino for Java in a sandbox?

Part of our java application needs to run javascript that is written by non-developers. These non-developers are using javascript for data formatting. (Simple logic and string concatenation mostly). My question is how can I setup the execution of these scripts to make sure scripting errors don't have a major negative impact on the rest...

Has anyone used or written an Ant task to compile (Rhino) JavaScript to Java bytecode?

I'd like to use the Rhino JavaScript compiler to compile some JavaScript to .class bytecode files for use in a project. It seems like this should already exist, since there are groovyc, netrexxc, and jythonc tasks for Groovy, NetREXX(!) and Jython, respectively. Has anyone used or written such an Ant task, or can anyone provide some tips...

Rhino.Commons with StructureMap

Hello there, Has anybody tried to use StructureMap for IoC with Rhino.Commons? Thanks ...

Rhino.Commons + Fluent NHibernate

Hello, Is there a way to use Rhino.Commons with Fluent Nhibernate, (in particular AutoMapping)? Many thanks fromano ...

NHibernate Criteria API, Projections and result

I have the following domain object: public class Data { public virtual int ID { get; set; } public virtual DateTime TimeStamp { get; set; } public virtual int Value { get; set; } public virtual Channel Channel { get; set; } } I'm using Repositories from Rhino.Commons. I need to select sum of values for few cha...

Rhino Mocks - Private Properties On Ctor Test

Hello i have a very simple question , i'm new to rhino this is my class: i want to test the property with Expect.SetPropertyWithArgument can anyone show me how, cuase i tried and its not working.. public class person { public string Name {get;private set;} public person(string name) { Name = name; } } ...

testing an internal class

how to write unit tests to internal classes ??? ...

What happened to Rhino? Is it still under active development?

The last release was in 2008-03-06. What happened to it? Is it still under active development? Are there any replacements? ...

JavaScript (Rhino) use library or include other scripts

In JDK6, is there a way to load multiple scripts, each in a file, and have the one script reference a method of another script? Sort of like "include"? ...

When do i need to flush Rhino Commons UnitOfWork?

When using Rhino Commons UnitOfWork (in a UnitOfWorkApplication for ASP-MVC), I like to use the Rhino Repository static class to save entities like this: Repository<Car>.Save(new Car(Id = 1)); I find that I can then get the entity out immediately after that call using: Car car = Repository<Car>.Get(1); This works fine. However, whe...

Decent JavaScript IDE

What is a decent IDE for developing JavaScript, I'll be writing both client side stuff and writing for Rhino. Ideally It needs to run on Mac OSX, although something that runs on Windows too would be nice. ADDITIONAL: Having had a play with both js2 and Aptana, I think I'll be continuing to use Aptana. Mainly because I find emacs a bit ...

Returning a host object in Rhino

What is the best way to return an host object to JavaScript in Rhino? I have two classes like this: public class Hosted extends org.mozilla.javascript.ScriptableObject { private static final long serialVersionUID = 1; public Hosted() {} public void jsConstructor() {} public String getClassName() { return "Hosted...

Will WPF process an App.xaml file if the hosting application isn't WPF?

First I just want to say I am new to WPF, so please excuse my ignorance... I am creating a .Net plug-in for Rhino 4.0. With the plugin I am developing a UI using WPF. The Rhino 4.0 CAD engine is an MFC/Win32 application. The plugin will execute after the application is run, and it creates the WPF Window and then "sucks" the MFC Windo...

Rhino: restrict Java packages that can be accessed from JavaScript

When embedding a JavaScript interpreter (Rhino) into a Java application (to be able to script that application), how would one go about restricting the Java packages that are available to scripts? For example, only "java.lang.*" should be accessible. ...

Using Rhino Mocks, why does invoking a mocked on a property during test initilization return Expected call #1, Actual call #0?

I currently have a test which tests the presenter I have in the MVP model. On my presenter I have a property which will call into my View, which in my test is mocked out. In the Initilization of my test, after I set my View on the Presenter to be the mocked View, I set my property on the Presenter which will call this method. In my te...

What are CAD apps written in, and how are they organized ?

What are CAD applications (Rhino, Autocad) of today written in and how are they organized internally ? I gave as an example, Autocad and Rhino, although I would love to hear of other examples as well. I'm particularly interested in knowing what is their backend written in (multilanguage ?) and how is it organized, and how do they handle...

How to load .js files into a Rhino context in Java

Here is my situation: I have access to a Rhino Context object in a Java class. I want to read in a bunch of .js files and pass them along to the Rhino context to have them evaluated. I'm not really interested in having the functions in the .js files available in the scripting context so much as I am in just having the variables that a...

scripting in java - javascript from a server-side class file in Java 1.5

I have three types of get requests that are delivered to a class file on web application from a mobile device. Because the mobile device provides no cookies, the log file hit only has in.ter.nal.ip ser.ver.i.p:port 2009-06-05 09:14:44 GET /applicationname/mobiledevicexml reqtype=login&userid=xx### 200 87 - MercuryMobile/1.0 CFNetwork...

nServiceBus, Rhino Service Bus, MassTransit - Videos, Demos, Learning Resources

Hey people would love to hear about any resources you have or know about for nServiceBus, Rhino Service Bus and MassTransit. Videos? Blog posts? Books? Demo Projects etc ...

Split java strings in Rhino

I'm trying to split a java string in a Rhino javascript program var s = new java.lang.String("1 2 3"); s.split(); which give me the error js: Can't find method java.lang.String.split(). The Rhino docs mentioned that all the javascript String.prototype methods (like match, split, etc.) are available on java string if they're not al...