Re: You backtracked too far? not back button.

2007-05-21 Thread Dave Elsner
Once again you have saved the day!  Thanks Chuck. I was looking at  
this for hours.


- Dave


On 22/05/2007, at 2:03 PM, Chuck Hill wrote:

Storing the session in a cookie, by chance?  If you have some bad  
HTML (color=""#ffeedd"" note the double quotes) was one recent  
example, IE will make a second request.  If a new session is  
created and new cookies passed back, the next click will result in  
this error as the link is for the previous session.


Chuck

On May 21, 2007, at 8:30 PM, Dave Elsner wrote:


Hi,

I'm getting the dreaded "You backtracked too far" error on Win XP  
- IE6 even though the back button is not being pressed. The error  
occurs when browsing a WO 5.3 website? What are causes of this  
error aprt from pressing the browser back button?  The problem  
only occurs on IE  browser?



- Dave


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 
40global-village.net


This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

You backtracked too far? not back button.

2007-05-21 Thread Dave Elsner

Hi,

I'm getting the dreaded "You backtracked too far" error on Win XP -  
IE6 even though the back button is not being pressed. The error  
occurs when browsing a WO 5.3 website? What are causes of this error  
aprt from pressing the browser back button?  The problem only occurs  
on IE  browser?



- Dave


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Multiple clients in single DB

2007-04-29 Thread Dave Elsner
The classes extend my own component that extends EOGenericRecord.
However I have now removed those flattened classes from the project  
as they are never instantiated directly so they do not need to set  
anything in awakeFromInsertion as their related entities do that.


Dave

On 28/04/2007, at 2:26 AM, Chuck Hill wrote:

What class are the flattened tables?  Usually join tables are  
EOGenericRecord in which case awakeFromInsertion will get called on  
EOGenericRecord, not in your code.


Chuck


On Apr 26, 2007, at 10:35 PM, Dave Elsner wrote:

I spoke to soon,  it seems that awakeFromInsertion does NOT  
register flattened tables being inserted?
I guess I really don't need to store the client for a Flatteren  
join table as it can be determined via the relationships. However  
it seems odd awakeFromInsertion does not get called even though  
there is a "insert" being sent to the DB.


Is there away to know when a flattened table is being inserted?

I have tried both awakeFromInsertion and Chucks  
CooperatingEditingContext.objectsToBeInserted() but neither work.


Dave


On 27/04/2007, at 10:47 AM, Dave Elsner wrote:

Excellent, that was the confirmation I was looking for. For now  
it works for multiple application instances but eventually I will  
run all clients from the single instance.  Thanks.



On 27/04/2007, at 6:35 AM, Lachlan Deck wrote:


Hi Dave,

On 26/04/2007, at 11:33 AM, Dave Elsner wrote:

I have an WO5.3 application I want to deploy to five different  
clients, all have the same DB (Oracle) schema but different  
data. I would like to use a shared database with a new column  
in each table "client" that has the client ID. Then override  
awakeFromInsertion for all EOEntities to set the client ID


That's what I've done (though it's done generically in a super  
class rather than per entity). Something like:

public void awakeFromInsertion( EOEditingContext ec ) {
super.awakeFromInsertion( ec );
if ( ec instanceof MyEditingContext && hasKey( CLIENT_KEY ) ) {
Client currentClient = ( Client )ec.valueForKey( CLIENT_KEY );
if ( hasReverseRelationship )
			addObjectToBothSidesOfRelationshipWithKey( currentClient,  
CLIENT_KEY );

else
takeValueForKey( currentClient, CLIENT_KEY );
}
}

and also add to the Application constructor a loop that sets an  
EOQualifier on each entity in the model limiting objects to the  
current client.


Sure that's one way to do it if you're going to be running them  
as separate instances. I'm dealing with this within the same  
instance(s) by an additional table ClientDomain (Client <-->>  
ClientDomain). I've got some cover methods in my Application  
class that when needed can find the relevant object for a  
request. It stores the result in the userInfo dictionary of the  
request so that this only need be fetched once, if at all -  
seeing as these objects are pre-fetched in a shared ec.


public Client clientForRequest( WORequest aRequest ) throws  
EOObjectNotAvailableException, EOUtilities.MoreThanOneException;
public ClientDomain clientDomainForRequest( WORequest aRequest )  
throws EOObjectNotAvailableException;


I'm then (in a base controller/component) able to have cover  
methods for these. e.g.,

public Client myClient() {
return myApplication().clientForRequest( context() );
}

and whenever I need to create data, I create an instance of my  
subclass of EOEditingContext which is instantiated with an  
additional parameter for the ClientDomain, allowing it to  
localise as necessary internally and for the above valueForKey  
to return the related Client object.



Questions:

* Is this the correct approach to solve this problem? (i.e not  
wanting to update X number of identical DB schemas every-time a  
change is made, keeping the data in the one location for  
reporting)


Perhaps the above helps.

* I tried EOEntity.setRestrictingQualifier  but that overrides  
any single table inheritance setup in the model. Is there away  
to merge two EOQualifiers?


When iterating through each entity, do an EOAndQualifier with  
any existing restricting qualifier so that you don't blow it away.


with regards,
--

Lachlan Deck





 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/delsner% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 
40glob

Re: Multiple clients in single DB

2007-04-26 Thread Dave Elsner
I spoke to soon,  it seems that awakeFromInsertion does NOT register  
flattened tables being inserted?
I guess I really don't need to store the client for a Flatteren join  
table as it can be determined via the relationships. However it seems  
odd awakeFromInsertion does not get called even though there is a  
"insert" being sent to the DB.


Is there away to know when a flattened table is being inserted?

I have tried both awakeFromInsertion and Chucks  
CooperatingEditingContext.objectsToBeInserted() but neither work.


Dave


On 27/04/2007, at 10:47 AM, Dave Elsner wrote:

Excellent, that was the confirmation I was looking for. For now it  
works for multiple application instances but eventually I will run  
all clients from the single instance.  Thanks.



On 27/04/2007, at 6:35 AM, Lachlan Deck wrote:


Hi Dave,

On 26/04/2007, at 11:33 AM, Dave Elsner wrote:

I have an WO5.3 application I want to deploy to five different  
clients, all have the same DB (Oracle) schema but different data.  
I would like to use a shared database with a new column in each  
table "client" that has the client ID. Then override  
awakeFromInsertion for all EOEntities to set the client ID


That's what I've done (though it's done generically in a super  
class rather than per entity). Something like:

public void awakeFromInsertion( EOEditingContext ec ) {
super.awakeFromInsertion( ec );
if ( ec instanceof MyEditingContext && hasKey( CLIENT_KEY ) ) {
Client currentClient = ( Client )ec.valueForKey( CLIENT_KEY );
if ( hasReverseRelationship )
			addObjectToBothSidesOfRelationshipWithKey( currentClient,  
CLIENT_KEY );

else
takeValueForKey( currentClient, CLIENT_KEY );
}
}

and also add to the Application constructor a loop that sets an  
EOQualifier on each entity in the model limiting objects to the  
current client.


Sure that's one way to do it if you're going to be running them as  
separate instances. I'm dealing with this within the same instance 
(s) by an additional table ClientDomain (Client <-->>  
ClientDomain). I've got some cover methods in my Application class  
that when needed can find the relevant object for a request. It  
stores the result in the userInfo dictionary of the request so  
that this only need be fetched once, if at all - seeing as these  
objects are pre-fetched in a shared ec.


public Client clientForRequest( WORequest aRequest ) throws  
EOObjectNotAvailableException, EOUtilities.MoreThanOneException;
public ClientDomain clientDomainForRequest( WORequest aRequest )  
throws EOObjectNotAvailableException;


I'm then (in a base controller/component) able to have cover  
methods for these. e.g.,

public Client myClient() {
return myApplication().clientForRequest( context() );
}

and whenever I need to create data, I create an instance of my  
subclass of EOEditingContext which is instantiated with an  
additional parameter for the ClientDomain, allowing it to localise  
as necessary internally and for the above valueForKey to return  
the related Client object.



Questions:

* Is this the correct approach to solve this problem? (i.e not  
wanting to update X number of identical DB schemas every-time a  
change is made, keeping the data in the one location for reporting)


Perhaps the above helps.

* I tried EOEntity.setRestrictingQualifier  but that overrides  
any single table inheritance setup in the model. Is there away to  
merge two EOQualifiers?


When iterating through each entity, do an EOAndQualifier with any  
existing restricting qualifier so that you don't blow it away.


with regards,
--

Lachlan Deck





 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/delsner% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Multiple clients in single DB

2007-04-26 Thread Dave Elsner
Excellent, that was the confirmation I was looking for. For now it  
works for multiple application instances but eventually I will run  
all clients from the single instance.  Thanks.



On 27/04/2007, at 6:35 AM, Lachlan Deck wrote:


Hi Dave,

On 26/04/2007, at 11:33 AM, Dave Elsner wrote:

I have an WO5.3 application I want to deploy to five different  
clients, all have the same DB (Oracle) schema but different data.  
I would like to use a shared database with a new column in each  
table "client" that has the client ID. Then override  
awakeFromInsertion for all EOEntities to set the client ID


That's what I've done (though it's done generically in a super  
class rather than per entity). Something like:

public void awakeFromInsertion( EOEditingContext ec ) {
super.awakeFromInsertion( ec );
if ( ec instanceof MyEditingContext && hasKey( CLIENT_KEY ) ) {
Client currentClient = ( Client )ec.valueForKey( CLIENT_KEY );
if ( hasReverseRelationship )
			addObjectToBothSidesOfRelationshipWithKey( currentClient,  
CLIENT_KEY );

else
takeValueForKey( currentClient, CLIENT_KEY );
}
}

and also add to the Application constructor a loop that sets an  
EOQualifier on each entity in the model limiting objects to the  
current client.


Sure that's one way to do it if you're going to be running them as  
separate instances. I'm dealing with this within the same instance 
(s) by an additional table ClientDomain (Client <-->>  
ClientDomain). I've got some cover methods in my Application class  
that when needed can find the relevant object for a request. It  
stores the result in the userInfo dictionary of the request so that  
this only need be fetched once, if at all - seeing as these objects  
are pre-fetched in a shared ec.


public Client clientForRequest( WORequest aRequest ) throws  
EOObjectNotAvailableException, EOUtilities.MoreThanOneException;
public ClientDomain clientDomainForRequest( WORequest aRequest )  
throws EOObjectNotAvailableException;


I'm then (in a base controller/component) able to have cover  
methods for these. e.g.,

public Client myClient() {
return myApplication().clientForRequest( context() );
}

and whenever I need to create data, I create an instance of my  
subclass of EOEditingContext which is instantiated with an  
additional parameter for the ClientDomain, allowing it to localise  
as necessary internally and for the above valueForKey to return the  
related Client object.



Questions:

* Is this the correct approach to solve this problem? (i.e not  
wanting to update X number of identical DB schemas every-time a  
change is made, keeping the data in the one location for reporting)


Perhaps the above helps.

* I tried EOEntity.setRestrictingQualifier  but that overrides any  
single table inheritance setup in the model. Is there away to  
merge two EOQualifiers?


When iterating through each entity, do an EOAndQualifier with any  
existing restricting qualifier so that you don't blow it away.


with regards,
--

Lachlan Deck





 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Multiple clients in single DB

2007-04-25 Thread Dave Elsner

Hi,

I have an WO5.3 application I want to deploy to five different  
clients, all have the same DB (Oracle) schema but different data. I  
would like to use a shared database with a new column in each table  
"client" that has the client ID. Then override awakeFromInsertion for  
all EOEntities to set the client ID and also add to the Application  
constructor a loop that sets an EOQualifier on each entity in the  
model limiting objects to the current client.


Questions:

* Is this the correct approach to solve this problem? (i.e not  
wanting to update X number of identical DB schemas every-time a  
change is made, keeping the data in the one location for reporting)


* I tried EOEntity.setRestrictingQualifierbut that overrides any  
single table inheritance setup in the model. Is there away to merge  
two EOQualifiers?




Cheers
Dave
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: WOText Bigger than 255

2007-03-08 Thread Dave Elsner

Hi,

The limitation of 255 characters is most likely the limit specified  
for that columns width in the database and EOModel. If that still  
doesn't fix it it will be  the maxlength property set on the  
WOTextfield which you can increase to whatever size you want.


Regards
Dave


On 09/03/2007, at 3:12 PM, John Shepardson wrote:


Hi, Yet another very easy question from a guy named John.

For the last year I have been using WOTextfield and WOTextAreas in  
my forms
with no problems.  Just set the attribute "value" to have a binding  
of a

method that returns a java string.  Easy as cake.

Now I am a bit stuck trying to get text longer than 255 characters  
into
these fields (maybe 1k or more).  I have tried methods that return  
arrays of

Strings, but they always  leave lots of appostrophies and commas and
parentheses characters in between the text. I'm not sure how to remove
these.

Thank you

John


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/delsner% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: multiple build targets in xcode

2007-01-16 Thread Dave Elsner
Interesting idea, but at the moment I'm editing the "specific stuff"  
very regularly and  having them all in the one project is a nice  
convenience.


After playing around with: Resource Path Types, Executables build  
names, NSProjectSearchPath, WOAllowRapidTurnaround, WOCachingEnabled  
false, and many more - doing a clean before each build has fixed the  
problem (i had tried this before without success). So think for now  
the simplest solution will be to add a build script to clean the  
current target each time I compile to eliminate the risk of me  
forgetting to do it each time.


Thanks for the tip
Dave

On 17/01/2007, at 9:31 AM, Chuck Hill wrote:

Even in Eclipse I would find a different way to do this.  How about  
extracting the client specific stuff into a framework unique to  
that client and then just including the correct framework at  
runtime?  This is what I do and it seems to work well and require a  
minimum of contortions.


Chuck


On Jan 16, 2007, at 2:23 PM, Dave Elsner wrote:


Hi,

I have a project that is used for multiple clients as such several  
java files and WO Components differ for each client.  So using  
Xcode I setup a  target for each client and also duplicated the  
Application Server target for each client, this client Application  
Server target contains all the common files plus the files  
specific for that client.


e.g. My targets look like this

Client A
Client A Application Sever
Web Sever
CLient B
Client B Application Server
Web Server
Client A Application Sever
Client B Application Server
Web Server

This works fine for java files but not for WO Components as Xcode  
always uses the same .wo file even though  I have two versions of  
the file; one included in "client A Application server"  "Copy  
Bundle Resources" build phase and the other version of the file in  
Client B.  What am I doing wrong? Apart from still using VexCode  
and not moving to Eclipse.




Cheers
Dave

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 
40global-village.net


This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects







 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

multiple build targets in xcode

2007-01-16 Thread Dave Elsner

Hi,

I have a project that is used for multiple clients as such several  
java files and WO Components differ for each client.  So using Xcode  
I setup a  target for each client and also duplicated the Application  
Server target for each client, this client Application Server target  
contains all the common files plus the files specific for that client.


e.g. My targets look like this

Client A
Client A Application Sever
Web Sever
CLient B
Client B Application Server
Web Server
Client A Application Sever
Client B Application Server
Web Server

This works fine for java files but not for WO Components as Xcode  
always uses the same .wo file even though  I have two versions of the  
file; one included in "client A Application server"  "Copy Bundle  
Resources" build phase and the other version of the file in Client  
B.  What am I doing wrong? Apart from still using VexCode and not  
moving to Eclipse.




Cheers
Dave

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: EOModel Schema synchronisation

2007-01-07 Thread Dave Elsner

Hi Philippe,

I have used the openbase EOModeler synchronisation tool via the GIU  
and it seems to work fine. From the Openbase manager GUI just right  
click on the DB and select "Synchronize EOModel Schema".  It works  
well for adding and dropping tables and columns, changing columns  
width, data type or accepting null values or not and etc.


The only limitations that I have come across are:
* It does not handle renaming on tables or columns.
* It did have a bug preventing it from syncing one of my EO models  
but I believe they have patched this already. (with in 48 hours of my  
support request)
* It runs the SQL on the DB immediately instead of outputing the SQL  
for you to review. (there might be an option so it can be passed as  
an argument?)


p.s In case you where unaware Openbase also provide a "Schema  
Migrator" tool which is very useful to transfer your DB schema from a  
development/testing DB to your production DB. And no I do not work  
for Openbase.


Regards
David Elsner



On 05/01/2007, at 8:34 PM, Philippe Lafoucrière wrote:


Hello,

I was wondering if so ever tried the synchronize an eomodel in  
openbase using the openisql command "synchronize". I googled for it  
and didn't find any clue on how it works.


To sum up, my choices to sync :

- Use eomodeler sync utility (seems to be broken sometime,  
depending on JDBC adaptator) --> too risky
- use openbase synchronize command --> never tried, and no info  
available, even in openbase doc
- Generate SQL with Entity modeler or EOModeler, and change it by  
hand --> risky too, but the only reasonable solution
- Change directly the schema using the database tools, and hope it  
will fit the new changed eomodel :)


Maybe this should appear (in a cleaner version) in the wikibook ?

--
Philippe
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/delsner% 
40uow.edu.au


This email sent to [EMAIL PROTECTED]


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: Sending a request to a url but not returning the page to the user

2006-10-08 Thread Dave Elsner
Hi,I do this same thing with this code, there is probably a better way but it works for my needs.		java.net.URLConnection urlConn; 		java.net.URL url = "">new java.net.URL("http://URL TO DIRECT ACTION");		urlConn = url.openConnection();		urlConn.setDoInput (true);		urlConn.setDoOutput (true);		try		{			urlConn.getContent();		}		catch(java.net.ConnectException ce)		{		etc.		 RegardsDavid Elsner On 09/10/2006, at 3:33 AM, Dev WO wrote:Hi,Still trying to figure a couple things:)Actually I need to call a direct action of application B from application A, but I don't want the user of application A to "see" this request. In fact the action he triggers return something for him, but I need a "second" action to take place.More precisely I need to call a direct action on my front office application when an administrative user save something in the back office application to invalidate the front office shared editing context.I think I already saw something like this on the mailing list but I just can't find it:(ThanksXavier___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: Oracle initcap: was MSSQL Server 2005 Unicode Support and EOF

2006-08-06 Thread Dave Elsner
Thanks Dov, you have cleared a few things up.CheersDavid  On 04/08/2006, at 8:30 PM, Dov Rosenberg wrote: Usually the case sensitivity of a database is determined during the installation of the database based on the character encoding chosen. I don’t remember having to specify case sensitivity for any of my Oracle installations however. We usually use ALT32UTF8 encoding.   The reason upper(last_name) does a full table scan is that you do not have any function based indexes defined for that table. With oracle you can create indexes based on a function like upper(). You could always change your logic to uppercase the string before placing it into the SQL string. Then you could do something like  ...where last_name=’SMITH’;   On 8/3/06 8:29 PM, "Dave Elsner" <[EMAIL PROTECTED]> wrote:  Hi,  Firstly I thought I would reply to this existing thread as I believe my situation is similar.  I'm using oracle and have an index on a varchar field that I would like to do a case insensitive search still using the index on last_name since I know all my last_name start with a capital.   e.g   select * from user where last_name = 'smith' will use the index but not return any Smith's because of the upper case 'S'  and if I did a:  select * from user where upper(last_name) = 'SMITH' The select would not use my index and do a full table scan.  What I would like to do is  select * from user where last_name = initcap = 'smith'  Which would return the rows and still use my index. Is there an easy way of doing this instead of using: a) Use _javascript_ to change the form field to Smith instead of smith b) ERXJDBCAdaptor c)  subclass the OraclePlugIn       Regards David     On 02/08/2006, at 8:49 PM, Anjo Krank wrote:  a) post a bug report, wait a year, then chose option two or three b) install Project Wonder, look at how we do it the ERXJDBCAdaptor, which gets patched into the runtime. c) or subclass the MicrosoftPlugIn, use JDBCPlugin.setPlugInNameForSubprotocol("com.somewhere.MyMicrosoftPlugIn", "sqlserver") to patch it into the system (before a model gets loaded). You might need to remove the plugin key from your connection dict for this to work.  Cheers, Anjo  Am 02.08.2006 um 12:36 schrieb Webobjects:    QUESTION: How/where can I modify the JDBC Plugin for EOF to adjust the way it generates the INSERT and UPDATE clauses of the outgoing SQL? QUESTION: How can I modify the JDBC Plugin to do the SELECT qualifiers?    ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.au  This email sent to [EMAIL PROTECTED]  ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/drosenberg%40inquira.com  This email sent to [EMAIL PROTECTED]   --  Dov Rosenberg Inquira Inc 370 Centerpointe Circle, ste 1178 Altamonte Springs, FL 32701 (407) 339-1177 x 102 (407) 339-6704 (fax) [EMAIL PROTECTED] AOL IM: dovrosenberg   ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Oracle initcap: was MSSQL Server 2005 Unicode Support and EOF

2006-08-03 Thread Dave Elsner
Hi,Firstly I thought I would reply to this existing thread as I believe my situation is similar.I'm using oracle and have an index on a varchar field that I would like to do a case insensitive search still using the index on last_name since I know all my last_name start with a capital.e.g   select * from user where last_name = 'smith'will use the index but not return any Smith's because of the upper case 'S'and if I did a:  select * from user where upper(last_name) = 'SMITH'The select would not use my index and do a full table scan.What I would like to do isselect * from user where last_name = initcap = 'smith'Which would return the rows and still use my index. Is there an easy way of doing this instead of using:a) Use _javascript_ to change the form field to Smith instead of smithb) ERXJDBCAdaptorc)  subclass the OraclePlugIn   RegardsDavid  On 02/08/2006, at 8:49 PM, Anjo Krank wrote:a) post a bug report, wait a year, then chose option two or threeb) install Project Wonder, look at how we do it the ERXJDBCAdaptor, which gets patched into the runtime.c) or subclass the MicrosoftPlugIn, use JDBCPlugin.setPlugInNameForSubprotocol("com.somewhere.MyMicrosoftPlugIn", "sqlserver") to patch it into the system (before a model gets loaded). You might need to remove the plugin key from your connection dict for this to work.Cheers, AnjoAm 02.08.2006 um 12:36 schrieb Webobjects: QUESTION: How/where can I modify the JDBC Plugin for EOF to adjust the way it generates the INSERT and UPDATE clauses of the outgoing SQL?QUESTION: How can I modify the JDBC Plugin to do the SELECT qualifiers? ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: WOCheckBox woes.

2006-07-20 Thread Dave Elsner
Hi Zac,Your HTML should look like this		Wod file:CheckBox1: WOCheckBox {	checked = aBoolean;}Java File: public boolean aBoolean;However  if the form only contains checkboxes an none of them are checked the form does not post any vales back to the server resulting in all the values remaining as is.To overcome this insert a HiddenField on the form e.g type="hidden" name="blah" value="blah"> RegardsDave On 21/07/2006, at 9:27 AM, Zac Konopa wrote:Okay all,I'm having a weird problem and I think it's a result of not having a clear understanding of the working of all the bindings involved.  I've got a WOCheckBox.  I have bound to it's checked attribute a primitive boolean value.  Said boolean is set to "true" when the page is instantiated.  The page is accurately displayed with the check box checked.  If I leave the boxes alone the boolean variable retains it's "true" state.  When I uncheck the box as I understand it the boolean should be assigned the value "false".  Instead I'm getting a null value in my boolean.  Am I misunderstanding the use of the checked binding for WOCheckBox or do I need to look elsewhere in my code?Thanks,Zac___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

more problems with tomcat

2006-06-15 Thread Dave Elsner
Hi,I have deployed multiple WO applications to tomcat successfully. Where WO is not installed on the server.However one of the applications which use to work fine now won't start up and gives the following error:"javax.servlet.UnavailableException: Can't find application bundle. You can either define WOROOT, LOCALROOT and WOAINSTALLROOT as Java system properties (e.g. in your application server's launch script as command line arguments) or in the application Deployment Descriptor file (web.xml)."Any ideas about where I set WOROOT?  I tried the web.xml file  but it never worked and I thought it shouldn't need to be changed from it default anyway.  RegardsDave  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

WO 5.3 and Tomcat property files?

2006-05-18 Thread Dave Elsner

Hi,

What the best approach to use property files from development in and  
for deployment within tomcat? Because it seems they are  not being  
read in at run time


System.getProperty("foo")  always returns null under tomcat, but  
works perfectly in development in Xcode.
I tried printing out System.getProperties()  and none of my  
application properties have been loaded only the built in Java ones  
are there.


How does every one else handle this?

1) Manually add properties asin the web.xml file?

2) Avoid properties altogether ?

3) Something else?

I had a quick look at LEConfigServletEnvEntryMergeTool from lejstuff  
from Andrew Lindesay and it looks promising. As it appears to convert  
property files to  in the web.xml file, but running it out  
of the box I got IO.exceptions.


- Dave

___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: Foreign Key Constraints

2006-05-09 Thread Dave Elsner
Thanks for the clarification. On 10/05/2006, at 1:53 PM, Chuck Hill wrote:On May 9, 2006, at 8:45 PM, Dave Elsner wrote: Hi,I'm generating Foreign Key Constraints from with in EO Modeler, but due to Oracles limitation of 30 character long identifiers That is so 1972.  :-P most of my relationship constraints exceed this limit, so I need to shorten them. If I Edit the SQL generated from EO Modeler from:ALTER TABLE FOO ADD CONSTRAINT FOO_SOME_REALLY_REALLY_LONG_NAME_FK FOREIGN KEY .To:ALTER TABLE FOO ADD CONSTRAINT FOO_BAR_FK FOREIGN KEY .Will this affect how WO and the DB talk... My guess is No.  That once the constraints are created in the DB WebObjects doesn't reefer to them ever again. But instead uses the EOModel rules. e.g. it executes the SQL and if it violates a model rule it give an error otherwise it sends the SQL to the DB and if it violates  a DB constraint then  an exception is returned from the DB and has nothing to do with the model. Right?  So in other words I can rename my Foreign Key Constraints to anything I like and every thing will still work as per usual. Yes, you can rename them as long as you are not using schema synchronization.  I am not sure how this would affect schema synchronization.Chuck-- Coming in 2006 - an introduction to web applications using WebObjects and Xcode     http://www.global-village.net/wointroPractical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    http://www.global-village.net/products/practical_webobjects  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Foreign Key Constraints

2006-05-09 Thread Dave Elsner
Hi,I'm generating Foreign Key Constraints from with in EO Modeler, but due to Oracles limitation of 30 character long identifiers most of my relationship constraints exceed this limit, so I need to shorten them. If I Edit the SQL generated from EO Modeler from: ALTER TABLE FOO ADD CONSTRAINT FOO_SOME_REALLY_REALLY_LONG_NAME_FK FOREIGN KEY .To:ALTER TABLE FOO ADD CONSTRAINT FOO_BAR_FK FOREIGN KEY .Will this affect how WO and the DB talk... My guess is No.  That once the constraints are created in the DB WebObjects doesn't reefer to them ever again. But instead uses the EOModel rules. e.g. it executes the SQL and if it violates a model rule it give an error otherwise it sends the SQL to the DB and if it violates  a DB constraint then  an exception is returned from the DB and has nothing to do with the model. Right?  So in other words I can rename my Foreign Key Constraints to anything I like and every thing will still work as per usual. - Dave ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Https post but a http response?

2006-05-04 Thread Dave Elsner
Hi,I'm trying to make a login form using HTTPS (from Chucks book page 102) So that the username and password are sent encrypted.I need the response page to be a normal HTTP page is this possible? how?I've tried doing the code below but it still returns a HTTPS page.public void appendToResponse(WOResponse aResponse, WOContext aContext)	{		super.appendToResponse(aResponse,aContext);		if(isLoggedIn)		{			aResponse.setStatus(302);			aResponse.setHeader("http://" + context().request().headerForKey("host") + context().componentActionURL(), "Location");		}		}The reason I need to do this is I need to authenticate users on my server then redirect them to a 3rd party server, and currently the (HTTPS) page returned redirects them to the different domain and their browser gives an warrning that the website is sending your information over an unsecured connection that can be easily read by other people. So thought that if the page returned from the submit page is HTTP the browser won't complain about switching from HTTPS to HTTP.- Dave  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: EOModeler SQL generation

2006-05-04 Thread Dave Elsner

Thanks

I never knew EOSynchronizationFactory or WODBUpdate existed I will  
have to look into both of these thanks again.



On 04/05/2006, at 9:14 PM, Pierre Frisch wrote:

Depending on how often you need to do this you can write a bit of  
Java code to handle that. Create you own subclass of EOEntity that  
do the correct sorting of attributes (you need to overwrite the  
attributes() method) add to your model for each of the entity  
concerned a key entityClass = yourEOEntityClassName. Then use  
EOSynchronizationFactory to generate the SQL statements required.


Pierre

On 4-May-06, at 12:06 AM, Dave Elsner wrote:


Thanks Sacha and Art.

This is what I expected  (i.e copy EOModelers SQL, paste it into a  
text editor). I was just hoping there would be a nicer way incase  
I need to do it multiple times.


The purpose of this "seriously silly requirement" is so that when  
the DBAs use their GUIs or SQL*Plus etc, they don't have to scroll  
horizontally to find that the PK is in the 22nd column of a 35  
column table, so that the most important keys can be found  
instantly which is fair enough. But this seems a pain when I have  
been using OpenBase for so long and can simply click and drag  
columns in the order I want.


- David


On 04/05/2006, at 4:13 PM, Sacha Michel Mallais wrote:


On May 3, 2006, at 9:25 PM, Dave Elsner wrote:

After speaking with our Oracle DBA they would like columns name  
for each table to be created in order of their significants when  
the create table statements are ran.


i.e The Primary Key(s) should be first, the candidate keys then  
foreign keys, then every thing else.


However the default in EOModeler is to order them alphabetically  
is there any way around this? So I can customize the order on a  
per table basis ?


Yes, there is a way around this: get a new DBA.  That is a  
seriously silly requirement.




I would prefer not to write the SQL by hand.


If the insanity persists, hand-coding is probably your best bet.   
EOModeler's output is rather limited anyway, so its nice to be  
able to replicate all the tweaks that you may have to do in a  
single file.



sacha


--
Sacha Michel Mallais Senior Developer / President
Global Village Consulting Inc.   http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
"Good people do not need laws to tell them to act responsibly,
while bad people will find a way around the laws." -- Plato





 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/pierre.frisch 
%40spearway.com


This email sent to [EMAIL PROTECTED]




___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: EOModeler SQL generation

2006-05-04 Thread Dave Elsner
Thanks Sacha and Art.This is what I expected  (i.e copy EOModelers SQL, paste it into a text editor). I was just hoping there would be a nicer way incase I need to do it multiple times.The purpose of this "seriously silly requirement" is so that when the DBAs use their GUIs or SQL*Plus etc, they don't have to scroll horizontally to find that the PK is in the 22nd column of a 35 column table, so that the most important keys can be found instantly which is fair enough. But this seems a pain when I have been using OpenBase for so long and can simply click and drag columns in the order I want. - David On 04/05/2006, at 4:13 PM, Sacha Michel Mallais wrote:On May 3, 2006, at 9:25 PM, Dave Elsner wrote: After speaking with our Oracle DBA they would like columns name for each table to be created in order of their significants when the create table statements are ran.i.e The Primary Key(s) should be first, the candidate keys then foreign keys, then every thing else.However the default in EOModeler is to order them alphabetically is there any way around this? So I can customize the order on a per table basis ? Yes, there is a way around this: get a new DBA.  That is a seriously silly requirement. I would prefer not to write the SQL by hand. If the insanity persists, hand-coding is probably your best bet.  EOModeler's output is rather limited anyway, so its nice to be able to replicate all the tweaks that you may have to do in a single file.sacha-- Sacha Michel Mallais             Senior Developer / PresidentGlobal Village Consulting Inc.   http://www.global-village.net/PGP Key ID: 7D757B65             AIM: smallais"Good people do not need laws to tell them to act responsibly,while bad people will find a way around the laws." -- Plato  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

EOModeler SQL generation

2006-05-03 Thread Dave Elsner
Hi,After speaking with our Oracle DBA they would like columns name for each table to be created in order of their significants when the create table statements are ran.i.e The Primary Key(s) should be first, the candidate keys then foreign keys, then every thing else.However the default in EOModeler is to order them alphabetically is there any way around this? So I can customize the order on a per table basis ?I would prefer not to write the SQL by hand.ThanksDavid  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: more oracle problems

2006-04-04 Thread Dave Elsner
Thanks Guido, Anjo, Wojingo  for you help.Removing both the order by or distinct both seem to work but now I understand why. Regards Dave On 04/04/2006, at 8:24 PM, Guido Neitzer wrote:Maybe. Other DBMS, other problems ...I had this problem with Frontbase about a year ago with one of the Wonder methods (ERXBatchingDisplayGroup?).The class only fetched the ids but tried to apply an "order by" - which was a problem.cugOn 04.04.2006, at 12:20 Uhr, Anjo Krank wrote: I guess the problem is not the Order By, but rather the distinct. At least that was the problem with the Postgresql plugin (where we fixed it a long time ago)Cheers, AnjoAm 04.04.2006 um 12:15 schrieb Guido Neitzer: On 04.04.2006, at 6:36 Uhr, Dave Elsner wrote: If I remove the DISTINCT or the ORDER BY then it works fine. Is there any reason the above SQL should not work and if so why is WO generating incorrect SQL? The sql (readable) is:SELECT DISTINCT	t0.academicGeneral,	t0.accessLevel,	t0.activeNameID,	t0.brandNewRecord,	RTRIM(t0.building),	t0.countryID,	t0.degreeID,	t0.email,	RTRIM(t0.fax),	t0.fileName,	t0.filePath,	t0.groupID,	t0.hasFile,	t0.personCode,	RTRIM(t0.phone),	RTRIM(t0.room),	t0.pkID,	RTRIM(t0.serialNumber),	RTRIM(t0.staffNumber),	RTRIM(t0.title),	t0.tobeShown,	t0.type,	t0.updatedNightly,	RTRIM(t0.URL),	RTRIM(t0.wumpusID)FROM	PERSON t0,	PSN_NAME T1WHERE	(t0.type = 3 AND t0.accessLevel <> -1) AND	t0.activeNameID = T1.pkIDORDER BY	T1.lastName ASC,	T1.firstName ASCSo, this is generally a bad idea. You have an "order by" clause on columns that aren't in the result set. As far as I know, this is against the sql standard. Not quite sure and most DBMS can handle that, but for me it's ugly.I don't know why the plugin generated this, but imho it shouldn't.cug-- PharmaLine, Essen, GERMANYSoftware and Database Development ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/krank%40logicunited.comThis email sent to [EMAIL PROTECTED]  -- PharmaLine, Essen, GERMANYSoftware and Database Development  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

more oracle problems

2006-04-03 Thread Dave Elsner

Hi,

After moving an existing application to Oracle 9i. I have encountered  
some problems with the SQL being generated from WebObjects, it  
generates the following SQL:


SELECT DISTINCT t0.academicGeneral, t0.accessLevel, t0.activeNameID,  
t0.brandNewRecord, RTRIM(t0.building), t0.countryID, t0.degreeID,  
t0.email, RTRIM(t0.fax), t0.fileName, t0.filePath, t0.groupID,  
t0.hasFile, t0.personCode, RTRIM(t0.phone), RTRIM(t0.room), t0.pkID,  
RTRIM(t0.serialNumber), RTRIM(t0.staffNumber), RTRIM(t0.title),  
t0.tobeShown, t0.type, t0.updatedNightly, RTRIM(t0.URL), RTRIM 
(t0.wumpusID) FROM PERSON t0, PSN_NAME T1 WHERE (t0.type = 3 AND  
t0.accessLevel <> -1) AND t0.activeNameID = T1.pkID ORDER BY  
T1.lastName ASC, T1.firstName ASC



This SQL produces an error saying:

Next exception:SQL State:42000 -- error code: 1791 -- msg: ORA-01791:  
not a SELECTed expression


	at com.webobjects.jdbcadaptor.JDBCContext._jdbcErrorWithChannel 
(JDBCContext.java:138)
	at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression 
(JDBCChannel.java:310)
	at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression 
(JDBCChannel.java:261)
	at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes 
(JDBCChannel.java:185)
	at  
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationE 
ditingContext(EODatabaseChannel.java:879)




If I remove the DISTINCT or the ORDER BY then it works fine. Is there  
any reason the above SQL should not work and if so why is WO  
generating incorrect SQL?


TIA
- Dave
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: SOLVED Re: converting from openbase to oracle

2006-03-19 Thread Dave Elsner
Lucky for me I just started using Subversion the other week ;)I did the comparison and both models are the same.Chuck I was calling a parent object that had a to-one relationship that was creating child objects for me automatically then I was creating duplicates which was one of my problems. I'm just happy it works now spent  too many days trying to migrate this DB.Also for future reference  it seems the drivers for oracle 9 work okay  "DRIVER_VER" = "9.2.0.5.0"   RegardsDaveOn 20/03/2006, at 3:20 PM, wojingo wrote:Chuck Hill wrote: On Mar 19, 2006, at 7:09 PM, Dave Elsner wrote: Update FYI:I solved this problem it was to do with the model ( Chuck was right  once again ).  I fixed it by turning off propagates primary key and  owns destination for all relationships. Thanks to all that helped. I don't see how this caused the exception below, but if you have  propagates primary key set on to-one, EOF will create the related  object for  you when the main object is created.  If you then create  the related object (again!) in code, an empty object will be left  floating in the editing context.  This will cause exceptions when  saveChanges is called, but I've not see the one you report below.   And that does not explain why the same code worked with Openbase.   Curious...Chuck I was thinking the same thing... Maybe just editing and resaving the file changed something else aswell.You could do a svn diff on the eomodels plist file, if your using version control - and of course as _we all know_ you should be!  :) On 17/03/2006, at 5:06 PM, Dave Elsner wrote: Hi,In the process of migrating all the data from one of our Openbase  8 DB to Oracle 9.To do this I cloned the original EOModel and changed the cloned  model to point to the new Oracle 9 DB, and changed all the column  data type to the appropriate kind.  e.g.  char > VARCHAR2  , text  > CLOB, etcI then run my codeEOEnterpriseObject oldObject =  (EOEnterpriseObject) anEnumerator.nextElement();EOEnterpriseObject newObject =  EOUtilities.createAndInsertInstance (anEditingContext, aNewEntityName);newObject.takeValuesFromDictionary( (NSDictionary) oldObject.valuesForKeys(oldObject.attributeKeys()) );       This works fine for all tables in the DB and all rows until it  reaches a CLOB item and I get the following error:evaluateExpression:   currentPositions, biography, qualifications, awards,  professionalActivites, researchInterests) VALUES (?, EMPTY_CLOB(),  NULL, EMPTY_CLOB(), NULL, NULL, EMPTY_CLOB())" withBindings: 1:2020 (personID)>   evaluateExpression:    t0.currentPositions, t0.qualifications, t0.researchInterests FROM  EXTERN_DTLS t0 WHERE t0.personID = ? FOR UPDATE" withBindings:  1:2020(personID)> fetch canceledmain> 1 row(s) processed   === Rollback Internal TransactionEXCEPTION:com.webobjects.foundation.NSKeyValueCoding$NullI have been stuck on this for a long time and am running out of  ideas?  All columns in the table allow for null values apart from  personID that is set to 2020I've tried changing the CLOB to BLOB and   the java class to  String and NSData but still no luck?Could it be a plug in problem? my java/extensions has  classes12.zip  and ojdbc14.jar   for oracle driversThanksDave ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner% 40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.netThis email sent to [EMAIL PROTECTED]   ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

SOLVED Re: converting from openbase to oracle

2006-03-19 Thread Dave Elsner
Update FYI:I solved this problem it was to do with the model ( Chuck was right once again ).  I fixed it by turning off propagates primary key and owns destination for all relationships. Thanks to all that helped. RegardsDaveOn 17/03/2006, at 5:06 PM, Dave Elsner wrote:Hi,In the process of migrating all the data from one of our Openbase 8 DB to Oracle 9.To do this I cloned the original EOModel and changed the cloned model to point to the new Oracle 9 DB, and changed all the column data type to the appropriate kind.  e.g.  char > VARCHAR2  , text > CLOB, etcI then run my codeEOEnterpriseObject oldObject =  (EOEnterpriseObject)anEnumerator.nextElement(); EOEnterpriseObject newObject =  EOUtilities.createAndInsertInstance(anEditingContext, aNewEntityName); newObject.takeValuesFromDictionary( (NSDictionary)oldObject.valuesForKeys(oldObject.attributeKeys()) ); 			This works fine for all tables in the DB and all rows until it reaches a CLOB item and I get the following error:evaluateExpression:    evaluateExpression:  fetch canceledmain> 1 row(s) processed   === Rollback Internal TransactionEXCEPTION: com.webobjects.foundation.NSKeyValueCoding$NullI have been stuck on this for a long time and am running out of ideas?  All columns in the table allow for null values apart from personID that is set to 2020I've tried changing the CLOB to BLOB and   the java class to String and NSData but still no luck?Could it be a plug in problem? my java/extensions has classes12.zip  and ojdbc14.jar   for oracle drivers ThanksDave ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

converting from openbase to oracle

2006-03-16 Thread Dave Elsner
Hi,In the process of migrating all the data from one of our Openbase 8 DB to Oracle 9.To do this I cloned the original EOModel and changed the cloned model to point to the new Oracle 9 DB, and changed all the column data type to the appropriate kind.  e.g.  char > VARCHAR2  , text > CLOB, etcI then run my codeEOEnterpriseObject oldObject =  (EOEnterpriseObject)anEnumerator.nextElement(); EOEnterpriseObject newObject =  EOUtilities.createAndInsertInstance(anEditingContext, aNewEntityName); newObject.takeValuesFromDictionary( (NSDictionary)oldObject.valuesForKeys(oldObject.attributeKeys()) ); 			This works fine for all tables in the DB and all rows until it reaches a CLOB item and I get the following error:evaluateExpression:    evaluateExpression:  fetch canceledmain> 1 row(s) processed   === Rollback Internal TransactionEXCEPTION: com.webobjects.foundation.NSKeyValueCoding$NullI have been stuck on this for a long time and am running out of ideas?  All columns in the table allow for null values apart from personID that is set to 2020I've tried changing the CLOB to BLOB and   the java class to String and NSData but still no luck?Could it be a plug in problem? my java/extensions has classes12.zip  and ojdbc14.jar   for oracle drivers ThanksDave ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

SOLVED Re: Shorter URL

2006-03-08 Thread Dave Elsner
Hi Never mindI just changedresponse.setContent( response.contentString().replaceAll( "/cgi-bin/WebObjects/", "" ) ); TO response.setContent( response.contentString().replaceAll( "/cgi-bin/WebObjects/", "/" ) );and it now works RegardsDave On 09/03/2006, at 4:04 PM, Dave Elsner wrote:Thanks Chuck you saved the day yet again.I took a look at  http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/ but didn'tknow how to make it work with dynamic URLs so I changed applications dispatchRequest as below.However it doesn't seem to return the correct response.content()  the second  System.out.println I do shows that it has been replace but the generated page still contains the cgi-bin references?public WOResponse dispatchRequest(WORequest request) {		if ("/favicon.ico".equals(request.uri())) {            return new WOResponse();        }        WOResponse response = super.dispatchRequest(request);		String contentType = response.headerForKey("content-type");if ((contentType == null) || (contentType.toLowerCase().indexOf("text/html") > - 1)) {			response.setContent( response.contentString().replaceAll( "/cgi-bin/WebObjects/", "" ) );			System.out.println("WOResponse = " + response.contentString() );	return response;		}		return super.dispatchRequest(request);    } RegardsDavid ElsnerPh  61+02 42214251 On 09/03/2006, at 3:01 PM, Chuck Hill wrote:Hi Dave,On Mar 8, 2006, at 7:56 PM, Dave Elsner wrote: I know this issue has been covered many times before but I still can't seem to find a solution to:How to remove the "cgi-bin/WebObjects/appName.woa" from the URL permanently   ?I have set up Apaches modRewrite so I can navigate to the Domain name, but as soon as I navigate from the front page the site the URL goes back to using " cgi-bin/WebObjects/appName.woa" How came I change the application so that all hyperlinks and form submit return a URL like:http://mydomain/appname.woa/blahblah that will be translated by apache to http://mydomain/cgi-bin/WebObjects/appname.woa/blahblahMy  rewrite rule would look some thing like:  RewriteRule ^/appname.woa.* /cgi-bin/WebObjects/appname.woa$1 [L,PT]Can I do this in appendToResponce ?  pageWithName?  or changing the Monitors path to the WO Adaptor? In a nutshell, you have to generate the URLs yourself.  There are many ways of doing this:1. Create a class that generates the URL and use this with the href bindings on the components2. Create a custom WOContext subclass to generate the URLS you need3. Use regex to find and change the URLs in dispatchRequest in Application (probably the best place)4. Do something like this: http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/Chuck-- Coming in 2006 - an introduction to web applications using WebObjects and Xcode     http://www.global-village.net/wointroPractical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    http://www.global-village.net/products/practical_webobjects  ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: Shorter URL

2006-03-08 Thread Dave Elsner
Thanks Chuck you saved the day yet again.I took a look at  http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/ but didn'tknow how to make it work with dynamic URLs so I changed applications dispatchRequest as below.However it doesn't seem to return the correct response.content()  the second  System.out.println I do shows that it has been replace but the generated page still contains the cgi-bin references?public WOResponse dispatchRequest(WORequest request) {		if ("/favicon.ico".equals(request.uri())) {            return new WOResponse();        }        WOResponse response = super.dispatchRequest(request);		String contentType = response.headerForKey("content-type");if ((contentType == null) || (contentType.toLowerCase().indexOf("text/html") > - 1)) {			response.setContent( response.contentString().replaceAll( "/cgi-bin/WebObjects/", "" ) );			System.out.println("WOResponse = " + response.contentString() );	return response;		}		return super.dispatchRequest(request);    } RegardsDavid ElsnerPh  61+02 42214251 On 09/03/2006, at 3:01 PM, Chuck Hill wrote:Hi Dave,On Mar 8, 2006, at 7:56 PM, Dave Elsner wrote: I know this issue has been covered many times before but I still can't seem to find a solution to:How to remove the "cgi-bin/WebObjects/appName.woa" from the URL permanently   ?I have set up Apaches modRewrite so I can navigate to the Domain name, but as soon as I navigate from the front page the site the URL goes back to using " cgi-bin/WebObjects/appName.woa" How came I change the application so that all hyperlinks and form submit return a URL like:http://mydomain/appname.woa/blahblah that will be translated by apache to http://mydomain/cgi-bin/WebObjects/appname.woa/blahblahMy  rewrite rule would look some thing like:  RewriteRule ^/appname.woa.* /cgi-bin/WebObjects/appname.woa$1 [L,PT]Can I do this in appendToResponce ?  pageWithName?  or changing the Monitors path to the WO Adaptor? In a nutshell, you have to generate the URLs yourself.  There are many ways of doing this:1. Create a class that generates the URL and use this with the href bindings on the components2. Create a custom WOContext subclass to generate the URLS you need3. Use regex to find and change the URLs in dispatchRequest in Application (probably the best place)4. Do something like this: http://www.jewelryluv.com/fashion/pageWithName/ModRewrite/Chuck-- Coming in 2006 - an introduction to web applications using WebObjects and Xcode     http://www.global-village.net/wointroPractical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    http://www.global-village.net/products/practical_webobjects  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Shorter URL

2006-03-08 Thread Dave Elsner

Hi,

I know this issue has been covered many times before but I still  
can't seem to find a solution to:


How to remove the "cgi-bin/WebObjects/appName.woa" from the URL  
permanently   ?


I have set up Apaches modRewrite so I can navigate to the Domain  
name, but as soon as I navigate from the front page the site the URL  
goes back to using " cgi-bin/WebObjects/appName.woa" How came I  
change the application so that all hyperlinks and form submit return  
a URL like:


http://mydomain/appname.woa/blahblah that will be translated by  
apache to http://mydomain/cgi-bin/WebObjects/appname.woa/blahblah


My  rewrite rule would look some thing like:  RewriteRule ^/ 
appname.woa.* /cgi-bin/WebObjects/appname.woa$1 [L,PT]


Can I do this in appendToResponce ?  pageWithName?  or changing the  
Monitors path to the WO Adaptor?



Regards
Dave


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: tomcat deployment

2006-02-12 Thread Dave Elsner
Hi Andrew,Thanks for your help, I don't have time to try it out just yet but I think that should work.I already had a draft copy of your tomcat deployment notes thanks for pointing me to your site to get the up to date one and your framework look very useful also =) RegardsDavid On 10/02/2006, at 9:13 PM, [EMAIL PROTECTED] wrote:Hello Dave; I have followed the documentation on deploying WO to tomcat.It works on my mac, but when I try it on a PC i get the following error:"Exception loading sessions from persistent storage java.lang.NullPointerException" This is probably caused by the servlet container attempting to serialise your session objects and the WOSessions are generally not going to let themselves get serialised.  You can download some notes I've made about Tomcat deployment off my website, but I think if you check the attribute distributable is set to "false" on the "Manager" element in the server config (assuming Tomcat 5) then this ought to prevent the container from trying to do this.cheers.___Andrew Lindesaywww.lindesay.co.nz___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

tomcat deployment

2006-02-09 Thread Dave Elsner
HiI have followed the documentation on deploying WO to tomcat.It works on my mac, but when I try it on a PC i get the following error:"Exception loading sessions from persistent storage java.lang.NullPointerException"Any ideas? CheersDavid Elsner  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: Repetition and OnClick of TR

2006-01-12 Thread Dave Elsner
Thanks thats a perfect start to what I wanted. RegardsDavid On 13/01/2006, at 5:36 AM, Alex Johnson wrote:I recommend having doing something like this:orWhere WOHyperlink1's action is bound to editLink. If you use the latter, watch out for textnodes (aka white-space). Whichever one you use, you'll probably want to make the onclick a little more robust, but these should point you in the right direction.The other option, I think, might be to use WOGenericContainer for the    tag, binding invokeAction to editLink and onclick to a method that returns  "window.location='" + context().componentActionUrl() + "'", but I have never tried this.Alex Johnson|| | ||| || | ||| | | |  || || |||\\ SITE 9 \\ SITE9.COM \\ 503.248.4440 \\On Jan 11, 2006, at 5:59 PM, Dave Elsner wrote: Hi,Does any one have an easy solution to place a _javascript_ onClick of a table row thats in a WORepeition  the Action i need to call  is:        public WOComponent editLink()      {              editFlag = true;                myDisplayGroup.selectObject(aItem);           return this.context().page();      }  I tried adding: public String onClickLocation()        {                  return "document.location='';";        }  WOActionURL1: WOActionURL {  action = "">  }  and setting onClick to that but that doesn't replace WOActionURL1 with the real url.  I also tried adding a _javascript_ function using the WOActionURL1 which calls  editLink() okay but it then has no idea of where the current repeition is up to and I get aItem = null;  I have got it to work using a DA  but would like a more light weight solution that can be easily reused.  ---Dave ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/alex%40site9.comThis email sent to [EMAIL PROTECTED]  ___Do not post admin requests to the list. They will be ignored.Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)Help/Unsubscribe/Update your Subscription:http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.auThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Repetition and OnClick of TR

2006-01-11 Thread Dave Elsner
Hi,Does any one have an easy solution to place a _javascript_ onClick of a table row thats in a WORepeitionthe Action i need to call  is:	public WOComponent editLink()    {		editFlag = true;		myDisplayGroup.selectObject(aItem);         return this.context().page();    }I tried adding: public String onClickLocation()	{		return "document.location='';";	}WOActionURL1: WOActionURL {action = "">}and setting onClick to that but that doesn't replace WOActionURL1 with the real url.I also tried adding a _javascript_ function using the WOActionURL1 which calls  editLink() okay but it then has no idea of where the current repeition is up to and I get aItem = null;I have got it to work using a DA  but would like a more light weight solution that can be easily reused. ---Dave ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: new window and refreshing parent

2006-01-09 Thread Dave Elsner
Hi Gino,You can use _javascript_ to do this. Something like:if (window.opener && !window.opener.closed ){	opener.location.reload();}window.close();or you could try opener.myform.submit();Then place a WOConditional on the parent page that if the image has data show it. CheersDave On 09/01/2006, at 10:15 PM, Gino Pacitti wrote:HiHas anyone had any experience with this type of situation.I have a modal window created with an image upload function.Once the image is uploaded I want the parent window to refresh so the image is visible..Any help appreciated..BestGino___WebObjects-dev mailing list[EMAIL PROTECTED]http://www.omnigroup.com/mailman/listinfo/webobjects-dev  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com