Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Anjo Krank
I'm not sure you understand... the String thing is only the bottleneck. I have caller code like: ERXSQLHelper sqlHelper = ERXSQLHelper.newSQLHelper(ec, model.name ()); ERXSQLHelper sqlHelper = ERXSQLHelper.newSQLHelper(ec, dbc); ERXSQLHelper sqlHelper = ERXSQ

Statistik overlay - how to?

2009-09-21 Thread ute Hoffmann
Hello, has anyone implemented a statistik overlay and can give me a hint? I see two possible way to do so: first- make the links unique with a id which is part of the links, but that seems not right to me, that two links, which are pointing to the same page should be different, even if only

Re: Rewrite Rule

2009-09-21 Thread ute Hoffmann
Upps, I think so. At which Property do I have to look to know. I run in deployment and definitley come via apache but I have not set anything deliberately. I'm a new wonder user so maybe I overlooked something...? Am 21.09.2009 um 18:17 schrieb Guido Neitzer: Are you running in WebServer c

Re: DirectAction with cookies and session

2009-09-21 Thread Chuck Hill
On Sep 21, 2009, at 1:19 PM, Fred Wells wrote: Hello, If I missed this I apologize but I can't seem to find anything on this. I'm trying to test out SWFUpload within one of my WO apps. It is currently set up to store sessionID in cookies. SWFUpload needs a post-upload URL for processing, I

Re: Very interesting case

2009-09-21 Thread Chuck Hill
On Sep 21, 2009, at 2:16 PM, Don Lindsay wrote: I know, I have been piddling with it and probably violated many commandments. That is not something that you can do and expect sane results. It is a binary sort of thing. Either you lock correctly and obey the commandments, or EOF.doCrazy

Re: AjaxAutoComplete - is it possible to have the equivalent of a noDisplayString?

2009-09-21 Thread getsharp
On 22/09/2009, at 6:08 AM, J Stephanos wrote: David: > Unfortunately the text triggers an immediate search on the default string. It doesn't in my case. It is working as expected for me per the AjaxTextHinter javadoc example. I experience the same behaviour as David. AjaxTextHinter d

[Solved] Re: Very interesting case

2009-09-21 Thread Don Lindsay
I was making it too difficult. I was able to solve the issue by using the UserAnswers as the primary Display Group. Don On Sep 21, 2009, at 5:16 PM, Don Lindsay wrote: I know, I have been piddling with it and probably violated many commandments. Let me explain what I am doing and see if

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Henrique Prange
Hi Anjo, Anjo Krank wrote: Just so I know: does DI make anything simpler aside from unit testing? Is it worth the cost of un-readbility and un-debugablity? I mean, for foreign code i totally rely on eclipse call graphs... these are a nightmare with interfaces, not to mention missing constructo

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Henrique Prange
Hi Anjo, You would not need a static method to create new ERXSQLHelper objects if you were using a DI container. For example, using Guice you could declare a helper property that must be injected. @Inject ERXSQLHelper helper; If you were too lazy you could let the user define which implement

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Kieran Kelleher
To keep stuff like this below 'clean', I define a list of properties and lookup the property to get the class name er .extensions.sqlHelper.className.mysql=er.extensions.jdbc.MySQLSQLHelper er.extensions.sqlHelper.className.frontbase =er.extensions.jdbc.FrontBaseSQLHelper etc. ..

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Anjo Krank
U-huh. So how about a real world example and not these cooked up things. Take a look at the ERXSQLHelper. Depending on various types of input it creates a concrete subclass. Can DI change this to sth more "clean"? Cheers, Anjo public static ERXSQLHelper newSQLHelper(String databaseProduc

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Andrew Lindesay
Hi Anjo; I guess this could be helpful in _some_ situations; I take for example, the Jetty server. Jetty can have a number of "handlers" added to it. Each handler does something like re-writes, feeds disk- based content, runs servlets etc.. etc.. The Jetty authors could not have envisag

Re: Very interesting case

2009-09-21 Thread Don Lindsay
I know, I have been piddling with it and probably violated many commandments. Let me explain what I am doing and see if anyone has any insight. I have a datamodel with the following: Users (identifier Integer, username string, password string) Pages (identifier Integer, PageDescriptio

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Anjo Krank
Am 21.09.2009 um 22:46 schrieb Andrus Adamchik: To be sure all of that can be achieved without DI. DI just makes it declarative and cleaner, and actually encourages you to follow this specific development pattern. Thanks for the write-up, but yeah, this can all be achieved w/o it. I real

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Andrus Adamchik
Personally I don't even care that much about unit testing web applications. In data-driven apps, even with DI, it is hard to create good mock data for most of your services, as it may depend on a pretty deep object graph. To me DI is all about clean design and decoupling of functionality

Re: Very interesting case

2009-09-21 Thread Chuck Hill
On Sep 21, 2009, at 1:17 PM, Don Lindsay wrote: Hello; I have a component that I am updating a table of answers based on selections made by the user from a worepitition. The code being executed is: try { String sEoQualifierText = "page="; sEoQua

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Anjo Krank
Just so I know: does DI make anything simpler aside from unit testing? Is it worth the cost of un-readbility and un-debugablity? I mean, for foreign code i totally rely on eclipse call graphs... these are a nightmare with interfaces, not to mention missing constructors. Cheers, Anjo Am 2

DirectAction with cookies and session

2009-09-21 Thread Fred Wells
Hello, If I missed this I apologize but I can't seem to find anything on this. I'm trying to test out SWFUpload within one of my WO apps. It is currently set up to store sessionID in cookies. SWFUpload needs a post-upload URL for processing, I need the session information to be available to that

Very interesting case

2009-09-21 Thread Don Lindsay
Hello; I have a component that I am updating a table of answers based on selections made by the user from a worepitition. The code being executed is: try { String sEoQualifierText = "page="; sEoQualifierText += Integer.toString((Integer)thePage()

Re: AjaxAutoComplete - is it possible to have the equivalent of a noDisplayString?

2009-09-21 Thread J Stephanos
Kieran: Thanks - Ajax*TextHinter* works beautifully! This is an example of* Y*et *A*nother *W*onder *N*ugget! David: > Unfortunately the text triggers an immediate search on the default string. It doesn't in my case. It is working as expected for me per the AjaxTextHinter javadoc example. Th

Re: Proper Wonder/App Initialization for testing

2009-09-21 Thread Mike Schrag
initApp is like primeApplication on Wonder steroids ... I actually need to figure out exactly how to run them from Eclipse. Right now I run most things using an app wrapper that uses the JUnit console TestRunner. On Sep 21, 2009, at 3:13 PM, Chuck Hill wrote: On Sep 21, 2009, at 8:55 AM

Re: Default form value encoding was changed after parsing multi-part form. Form values will be lost.

2009-09-21 Thread Mark Wardle
Fantastic. Works perfectly. I think I should create a new empty PW application and check I have all the newer properties set appropriately. Many thanks! Best wishes, Mark 2009/9/21 Chuck Hill : > Have you changed WO versions?  Do you have this in your Properties file? > > er.extensions.ERXAppl

Re: Default form value encoding was changed after parsing multi-part form. Form values will be lost.

2009-09-21 Thread Chuck Hill
Have you changed WO versions? Do you have this in your Properties file? er.extensions.ERXApplication.DefaultEncoding=UTF-8 Chuck On Sep 21, 2009, at 12:34 PM, Mark Wardle wrote: Hi all, I have a component that edits a specific EO allowing upload of a user photo. Using WO 5.4.3 on Snow Leop

Default form value encoding was changed after parsing multi-part form. Form values will be lost.

2009-09-21 Thread Mark Wardle
Hi all, I have a component that edits a specific EO allowing upload of a user photo. Using WO 5.4.3 on Snow Leopard, java.runtime.version=1.6.0_15-b03-219, Project Wonder (revision 9861). It used to work. Something changed - my code, leopard->snow leopard, project wonder? I don't know what! Sudd

Re: Multi-Tenant Data Architecture

2009-09-21 Thread Chuck Hill
Hi Henrique, On Sep 19, 2009, at 8:09 AM, Henrique Prange wrote: Hi all, Is there a way to configure EOF to access separate databases for each tenant in *one* application? I'm working in an application that has a strong non-functional requirement on multi-tenant architecture with isolate

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Andrus Adamchik
Hi Henrique, Nice, thanks for sharing this info. Yeah, going through WOApplication and WOComponentDefinition, I realized I was too optimistic. Most interesting methods that would've enabled DI integration are all private. Quite a bit of code to rewrite to make it work. I was even thinking

Re: Proper Wonder/App Initialization for testing

2009-09-21 Thread Chuck Hill
On Sep 21, 2009, at 8:55 AM, Greg Brown wrote: Hi, I converted an app to use Wonder, and I think my tests need do do something new so that all the Wonder stuff initializes properly. This page: http://wiki.objectstyle.org/confluence/display/WONDER/Integrate+Wonder+Into+an+Existing+Applicati

Re: Optimistic Locking?

2009-09-21 Thread Kieran Kelleher
Be careful if you use multiple OSCs and OSC Synchrnoization (Wonder ERJGroupsSynchronizer for example). In that event you must lock the stack during your (short) transaction in which you check for optimistic lock exception as part of business logic. For conceptual and optimistic locking dis

Re: AjaxAutoComplete - is it possible to have the equivalent of a noDisplayString?

2009-09-21 Thread David Holt
On 21-Sep-09, at 9:09 AM, Kieran Kelleher wrote: I believe AjaxTextHinter in Wonder/Ajax is what you want. This is really cool. I just tried it in an auto search field (like the example in AjaxExample2). Unfortunately the text triggers an immediate search on the default string. Do you kno

Re: Proper Wonder/App Initialization for testing

2009-09-21 Thread Ray Kiddy
On Sep 21, 2009, at 8:55 AM, Greg Brown wrote: Hi, I converted an app to use Wonder, and I think my tests need do do something new so that all the Wonder stuff initializes properly. This page: http://wiki.objectstyle.org/confluence/display/WONDER/Integrate+Wonder+Into+an+Existing+Applicati

Re: Rewrite Rule

2009-09-21 Thread Guido Neitzer
Are you running in WebServer connect mode? cug -- http://www.event-s.net On 20. Sep. 2009, at 02:02 , ute Hoffmann wrote: Hi, should this work for applications which have a session as well, or will it work only for sessionless apps? * * er.extensions.ERXApplication.replaceApplicationPa

Re: AjaxAutoComplete - is it possible to have the equivalent of a noDisplayString?

2009-09-21 Thread Kieran Kelleher
I believe AjaxTextHinter in Wonder/Ajax is what you want. On Sep 21, 2009, at 11:33 AM, J Stephanos wrote: Wonder's AjaxAutoComplete works great - but is it possible to have the equivalent of a noDisplayString? Movie Name: [ enter a movie name here ] We'd like to provide some hint ("enter

Proper Wonder/App Initialization for testing

2009-09-21 Thread Greg Brown
Hi, I converted an app to use Wonder, and I think my tests need do do something new so that all the Wonder stuff initializes properly. This page: http://wiki.objectstyle.org/confluence/display/WONDER/Integrate+Wonder +Into+an+Existing+Application has nothing about tests ;>o Unit type test

Re: HTTPS Connection

2009-09-21 Thread Kieran Kelleher
Don't waste your time with WOHttpConnection. Use Apache HttpClient. http://hc.apache.org/httpclient-3.x/ On Sep 21, 2009, at 10:44 AM, WebObjects - Anazys wrote: Hi all, I'm trying to handle transaction with a bank module.. not really easy.. Is it possible to send https request under WOHTT

AjaxAutoComplete - is it possible to have the equivalent of a noDisplayString?

2009-09-21 Thread J Stephanos
Wonder's AjaxAutoComplete works great - but is it possible to have the equivalent of a noDisplayString? Movie Name: [ enter a movie name here ] We'd like to provide some hint ("enter movie name here") to the user, to enter a movie name in the field. It should disappear when you start typing in

Re: WebObjects and dependency injection (DI)

2009-09-21 Thread Henrique Prange
Hi Andrus, Andrus Adamchik wrote: I know it is not the traditional "WO way" of doing things, but from my experience using a dependency injection container in your app (Spring, Guice, etc.) is one single thing that you can do to dramatically improve the design quality, and produce flexible and

HTTPS Connection

2009-09-21 Thread WebObjects - Anazys
Hi all, I'm trying to handle transaction with a bank module.. not really easy.. Is it possible to send https request under WOHTTPConnection and ERXRequest ? I try many ways but nothing really work as I want. My code : WOHTTPConnection httpConn = new WOHTTPConnection( ,443 ); ERXReques

WebObjects and dependency injection (DI)

2009-09-21 Thread Andrus Adamchik
I know it is not the traditional "WO way" of doing things, but from my experience using a dependency injection container in your app (Spring, Guice, etc.) is one single thing that you can do to dramatically improve the design quality, and produce flexible and maintainable code. WO does a bi

Re: printing margins with LEIPPPrintService from webobjects application

2009-09-21 Thread Andrew Lindesay
Hi Johan; Have you checked the PPD file on your CUPS server for the margins configured there? -- this is possibly a good first thing to check. Otherwise, the 'LEIPPDocPrintJob' is a simple implementation of IPP communications and it is ignoring anything other than Media you are supplying

printing margins with LEIPPPrintService from webobjects application

2009-09-21 Thread Johan Henselmans
I am working on a eticketing system and one of the requirements is that the application will print out real tickets at the location (it's easier for access control to print humanly easy recognizable tickets somewhere before the access control than to check the barcode electronically from a

Re: Optimistic Locking?

2009-09-21 Thread Andrew Lindesay
Hi Chan; In general, optimistic locking will put an extra helping of WHERE clause at the end of your UPDATE statements. The extra WHERE clause is to check that nothing has changed in the database row since the enterprise-object was fetched from the database -- ie; check to make sure nobod

Optimistic Locking?

2009-09-21 Thread Chan Yeow Heong, Jerome
How do I tell if Optimistic Locking is working? I've made a EOF Model with a versions field. Everything but the id and the versions field has the lock symbol unchecked in WoLIPS. In my EOEditingContext delegate's editingContextWillSaveChanges method I incremented the versions field by 1. I