Re: Get the session object in castle active record when doing a transaction

2009-09-02 Thread Gerdus van Zyl
I think you need to create a transactionscope yourself like: TransactionScope transaction = new TransactionScope(); then you can use and pass it around as you like. Or what am I missing? And then you need a function like this to get the database connection and enlist it in the transaction:

Re: JSONReturnBinder serialize

2009-09-02 Thread bdaniel7
Thanks, I know that this works, but i needed the Address as part of an Incident. the whole scenario is that i load a list of incidents and based on their addresses, I plot some marks on a google map canvas. On Sep 1, 1:06 pm, John Simons johnsimons...@yahoo.com.au wrote: Try: [return:

Re: Get the session object in castle active record when doing a transaction

2009-09-02 Thread the.wizard
Hello Gerdus, Thank you for replying my post. I still don't understand what you are explain in your post, please explain it more detail. My goal is to save a data using active record object and execute a dml stored procedure in one db transaction. I have create a method that accept ISession

Re: Static Content in the Monorail site root

2009-09-02 Thread James Curran
Funny, I was just about to write a blog post about this. Here's what I use [DefaultAction] public abstract class PlainTextController : SmartDispatcherController { public void DefaultAction() { string template = notfound; if

Debug brail views

2009-09-02 Thread Tomas
Is it possible to find out on which row an error occurs in a brail view? Thanks, Tomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Castle Project Users group. To post to this group, send email to

Re: Get the session object in castle active record when doing a transaction

2009-09-02 Thread Gerdus van Zyl
The code I gave is probably wrong since it does not use the current session I think. (I have moved on from using activerecord sessions and now just use AR for mapping,config and handle nhibernate sessions directly) Anyway see this blog post I just found:

Re: Debug brail views

2009-09-02 Thread Ayende Rahien
It should give you the error line when it happens On Wed, Sep 2, 2009 at 12:14 PM, Tomas tomas.gerhard...@gmail.com wrote: Is it possible to find out on which row an error occurs in a brail view? Thanks, Tomas --~--~-~--~~~---~--~~ You received this

Re: Static Content in the Monorail site root

2009-09-02 Thread Ken Egozi
I add (on the if (HasTemplate...) ) else { Response.StatusCode = 404; } On Wed, Sep 2, 2009 at 2:29 PM, James Curran james.cur...@gmail.com wrote: Funny, I was just about to write a blog post about this. Here's what I use [DefaultAction] public abstract class

Re: Static Content in the Monorail site root

2009-09-02 Thread JakeS
I see now how it handles the root instead of plaintext/about.html -- didn't have my coffee before reading. Thanks again! I'm renaming the .html to .vm for now until I can figure out a way to handle that. On Sep 2, 9:04 am, JakeS jakesteven...@gmail.com wrote: That looks pretty simple, thanks!

Re: Static Content in the Monorail site root

2009-09-02 Thread James Curran
On Wed, Sep 2, 2009 at 10:04 AM, JakeSjakesteven...@gmail.com wrote: That looks pretty simple, thanks! Will I have to use routing to get this to apply to the root of the site, so it works with http://mysite.com/about.html instead of http://mysite.com/plaintext/about.html? And I guess I'll

Re: Static Content in the Monorail site root

2009-09-02 Thread JakeS
Ok, I finally decided to just copy the whole static set of files into a Site subfolder and redirect http://mysite.com/ to http://mysite.com/Site/. If he doesn't like the URLs, I'll have to come up with some routing to fix it later. Thanks for the suggestions. On Sep 2, 10:09 am, JakeS

Re: Static Content in the Monorail site root

2009-09-02 Thread James Curran
On Wed, Sep 2, 2009 at 9:51 AM, Ken Egoziegoz...@gmail.com wrote: I add (on the if (HasTemplate...) ) else {    Response.StatusCode = 404; } Well, right now, it will complain about a missing notfound.vm template, but I guess the 404 response is good too. -- Truth, James

Re: Static Content in the Monorail site root

2009-09-02 Thread JakeS
I guess you could use routing.  How important is it that the about file appear to be in the root?  In my actual site, the controller for most static text is called SiteController, and I use the path of /Site/About.rails.  (SiteController also contains things like Login() Logout())  It's not

Re: Static Content in the Monorail site root

2009-09-02 Thread JakeS
This is turning into quite a mess. It's just not this simple. I have a set of 10 or so static html files that ALSO include references to css, javascript, and images. So inside the html there's something like this: link rel=stylesheet href=css/style.css media=screen / So just plopping this

Re: WcfFacility policies

2009-09-02 Thread Krzysztof Koźmic
For DP most tests that fail are related to generating strongly named assemblies, soomething i should can be dealt with very easily - disallow it. About Windsor Sl support, we should get Davy Brion involved. AFAIR he's expressed interest in helping with it. he may be able to help with doing the

Re: Static Content in the Monorail site root

2009-09-02 Thread James Curran
I believe adding this to your httpHandlers section in your web.config: add path=Site/* verb=GET,HEAD,POST type=System.Web.DefaultHttpHandler validate=True / On Wed, Sep 2, 2009 at 11:22 AM, JakeSjakesteven...@gmail.com wrote: This is turning into quite a mess.  It's just not this

logging controller/action/params

2009-09-02 Thread Jan Limpens
Hello, is it somehow possible to always log controller, action and params, whenever some exception is thrown? -- Jan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Castle Project Users group. To post to this

Re: logging controller/action/params

2009-09-02 Thread Ayende Rahien
Yes, you need a filter for that On Wed, Sep 2, 2009 at 10:42 PM, Jan Limpens jan.limp...@gmail.com wrote: Hello, is it somehow possible to always log controller, action and params, whenever some exception is thrown? -- Jan --~--~-~--~~~---~--~~ You

Windsor and Generics

2009-09-02 Thread the.email.tr...@gmail.com
Hello, Looking for IoC in the Web I Found this http://msdn.microsoft.com/en-us/library/aa973811(loband).aspx In that link I see something like this (for generics) configuration components component id=orders-repository service=NShop.IRepository`1[[NShop.Order, NShop]],

Override ActiveRecord attribute

2009-09-02 Thread Ryan
I have a class whose ActiveRecord table attribute I would like to override at runtime. I'd like to do this because my test database (using SQLite) does not support the table name that my production site uses. So I'd like to have my base test class override the attribute before initializing

Using filters with Castle ActiveRecord

2009-09-02 Thread Morten Brix Pedersen
I read Ayendes great post on NHibernate filters: http://ayende.com/Blog/archive/2009/05/04/nhibernate-filters.aspx But is there a way to use the filters with Castle ActiveRecord? I can enable filters using sesionScope.GetSession().EnableFilter(), but there seems to be no way to define a filter

Re: Windsor and Generics

2009-09-02 Thread Mauricio Scheffer
IRepositoryT is C# specific. The backtick notation is not a Windsor invention, it's how the CLR defines generics in a language independent way, see http://msdn.microsoft.com/en-us/library/w3f99sx1.aspx In your type name, the first namespace says IoCWindor instead of IoCWindsor, not sure if that

Monorail JSONReturnBinder and Complex Objects

2009-09-02 Thread JakeS
I've got a fairly complex object, and I want to send select information from an array of them to JSON. But I can't get it to serialize properly. class Ticket { public ScheduledInstall TimeOfInstall{get;set;} public ContactInfo UserInformation{get;set} } class ScheduledInstall { public

Re: logging controller/action/params

2009-09-02 Thread Jan Limpens
great extension :) already helped me debug 2 serious issues :) thanks!! 2009/9/2 John Simons johnsimons...@yahoo.com.au Jan, Here is what you need to include in your web.config to register the filter that Ayende mentioned above: monorail smtpHost=mailserver smtpPort=25 exception

Re: Monorail JSONReturnBinder and Complex Objects

2009-09-02 Thread John Simons
Will I have to just create a new struct and loop through all the ... Yes The current implementation of JSONReturnBinder has you mentioned before doesn't support the dot notation Properties. You not the first person to ask for this. We would welcome a patch or otherwise add a suggestion to

Re: Monorail JSONReturnBinder and Complex Objects

2009-09-02 Thread JakeS
Thank you very much for confirming. On Sep 2, 11:10 pm, John Simons johnsimons...@yahoo.com.au wrote: Will I have to just create a new struct and loop through all the ... Yes The current implementation of JSONReturnBinder has you mentioned before doesn't support the dot notation