Re: Hibernate

2009-03-24 Thread Jérémy DE ROYER

I do agree with Pierre.

Jérémy

Le 23 mars 09 à 23:48, Houdah - ML Pierre Bernard a écrit :

Last time Iooked at Hibernate it was a half baked alternative to  
EOAccess. Nothing in it that could compare to EOControl.


I was forced to use Hibernate on a WebObjects project. I will never  
never ever again even remotely think about looking into Hibernate.


Pierre

On 24 Feb 2009, at 17:29, Lon Varscsak wrote:


Anyone have any stories (both good and bad) about trying to go from
EOF to Hibernate but continuing to use WO?

-Lon
___
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.bernard%40lists.houdah.com


This email sent to pierre.bern...@lists.houdah.com


- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend



___
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/jeremy.deroyer 
%40ingencys.net


This email sent to jeremy.dero...@ingencys.net



___
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 arch...@mail-archive.com


EOF - Cayenne [Was: Hibernate]

2009-03-24 Thread Andrus Adamchik
If you can't use WO/EOF for whatever reason, just switch to Apache  
Cayenne - user-friendly, powerful and open source. And it will convert  
most EOModels via the GUI for you (and give a good enough  
approximation for those that it can't convert). Seems like a  
straightforward choice to me ;-)


  http://cayenne.apache.org/

Cheers,
Andrus


On Mar 24, 2009, at 9:26 AM, Jérémy DE ROYER wrote:


I do agree with Pierre.

Jérémy

Le 23 mars 09 à 23:48, Houdah - ML Pierre Bernard a écrit :

Last time Iooked at Hibernate it was a half baked alternative to  
EOAccess. Nothing in it that could compare to EOControl.


I was forced to use Hibernate on a WebObjects project. I will never  
never ever again even remotely think about looking into Hibernate.


Pierre

On 24 Feb 2009, at 17:29, Lon Varscsak wrote:


Anyone have any stories (both good and bad) about trying to go from
EOF to Hibernate but continuing to use WO?

-Lon



- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend

___
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 arch...@mail-archive.com


Fwd: Change rewriteURL

2009-03-24 Thread Ramon Havermans
Hi,

I want to use it for outgoing URL's. The method you mentioned doesn't have
any context, so unfortunately I can't use it. I need to have the user
settings from the Session to put them to the URL. This is because I need to
know one setting of the user when the user would get a session time out, I'm
missing the user settings to direct the user to the right page. I use
cookies by default and than it is working, only not with the URLRewriting.

Ramon




2009/3/19 Guido Neitzer guido.neit...@gmail.com

Do you want to do that for incoming rules? Apache mod_rewrite is your
 friend then. For outgoing URLs? There is a nice feature in Wonder,
 where you overwrite a method (was it rewriteUrl()?) in your
 Application.java to get a chance to rewrite any generated URL.

 cug

 On Thu, Mar 19, 2009 at 6:18 AM, Ramon Havermans ra...@cpp.nl wrote:
 
  Hi,
 
  Anyone knows how to change the URL rewriting? I want to add a querystring
 on
  the end of the URL.
 
  Kind regards,
  Ramon
  ___
  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/guido.neitzer%40gmail.com
 
  This email sent to guido.neit...@gmail.com
 

 ___
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 arch...@mail-archive.com

Re: WO 5.4 under windows

2009-03-24 Thread Stefan Klein

Hi Fred,

I'm are working on the same issue.

My configuration is:

Win2003 Server 64bit, Apache 2.2, JDK 1.5 and WO 5.4

I copied the WO Stuff from the Mac to the following structure:

c:/Apple/Library/Frameworks
c:/Apple/WebObjects/JavaApplications (JavaMonitor and wotaskd)
c:/Apple/WebObjects/Configuration/

My applications and frameworks go to c:/Apple/LocalLibrary

I set the NEXT_ROOT environment variable to C:/Apple.

To run wotaskd and JavaMonitor as windows services I use FireDaemon.

At least I compiled the WO Adapter under VisualStudio against Apache 2.2.

We are still testing, but it seems to work fine (famous last words :-) )

Stefan


Frédéric JECKER schrieb:

Hi list,

Does anyone has already succeeded in deploying WO 5.4 apps under 
windows ?
If yes, what's the procedure to follow to update existing server 
installations from 5.2.3 to 5.4 ?
Our clients are running only windows servers with WO 5.2.3 and we wish 
we could update them to the latest WO 5.4 + JDK 1.5.


Thanks for your answers

Fred
___
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/stefan.klein%40buero-sde.de 



This email sent to stefan.kl...@buero-sde.de



___
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 arch...@mail-archive.com


Re: Downgrading WebObjects from 54 to 52 (Julien Verez)

2009-03-24 Thread Susanne Schneider

Hi guys,

shure there is an interesting discussion going on. But the only thing I 
can see is the following:



Message: 1
Date: Mon, 23 Mar 2009 13:46:03 +0100
From: Julien Verez julien.ve...@univ-lille1.fr
Subject: Re: Downgrading WebObjects from 54 to 52
To: stefan.kl...@buero-sde.de
Cc: WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com
Message-ID: 49c7848b.5010...@univ-lille1.fr
Content-Type: text/plain; charset=us-ascii

An HTML attachment was scrubbed...
URL: 
http://lists.apple.com/pipermail/webobjects-dev/attachments/20090323/cb58cd0f/attachment.html
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 23192 bytes
Desc: not available
Url : 
http://lists.apple.com/pipermail/webobjects-dev/attachments/20090323/cb58cd0f/attachment.png
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 23192 bytes
Desc: not available
Url : 
http://lists.apple.com/pipermail/webobjects-dev/attachments/20090323/cb58cd0f/attachment-0001.png
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 23192 bytes
Desc: not available
Url : 
http://lists.apple.com/pipermail/webobjects-dev/attachments/20090323/cb58cd0f/attachment-0002.png
-- next part --
A non-text attachment was scrubbed...
Name: signature_mail_full.png
Type: image/png
Size: 23192 bytes
Desc: not available
Url : 
http://lists.apple.com/pipermail/webobjects-dev/attachments/20090323/cb58cd0f/signature_mail_full.png

--


Please have some mercy with those of us only getting the daily digest 
and contribute in plain text only.


TIA,
Susanne

--
Susanne Schneider
Coordinator secuTrial Development

iAS interActive Systems GmbH
Dieffenbachstraße 33 c, D-10967 Berlin

fon+49(0)30 22 50 50 - 498
fax+49(0)30 22 50 50 - 451
mail   susanne.schnei...@interactive-systems.de
webhttp://www.interActive-Systems.de


Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche
Sitz der Gesellschaft: Berlin
Amtsgericht Berlin Charlottenburg, HRB 106103B

___
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 arch...@mail-archive.com


Re: WO 5.4 under windows

2009-03-24 Thread David Avendasora

Hi Fred,

Would you be willing to document everything in detail and post it to  
the Wiki? Or send it to me and I'll post it to the wiki? If you can  
provide the compiled WO Adaptor for Apache 2.2, that would be even  
better!


The current content on the wiki is quite old refers to WO 5.1 and 5.2,  
referencing copying the frameworks from the installation CD.


I think this is a relatively common question for people now that Apple  
has officially stated that WO applications and all required frameworks  
can be served from any platform.


Dave


On Mar 24, 2009, at 4:46 AM, Stefan Klein wrote:


Hi Fred,

I'm are working on the same issue.

My configuration is:

Win2003 Server 64bit, Apache 2.2, JDK 1.5 and WO 5.4

I copied the WO Stuff from the Mac to the following structure:

c:/Apple/Library/Frameworks
c:/Apple/WebObjects/JavaApplications (JavaMonitor and wotaskd)
c:/Apple/WebObjects/Configuration/

My applications and frameworks go to c:/Apple/LocalLibrary

I set the NEXT_ROOT environment variable to C:/Apple.

To run wotaskd and JavaMonitor as windows services I use FireDaemon.

At least I compiled the WO Adapter under VisualStudio against Apache  
2.2.


We are still testing, but it seems to work fine (famous last  
words :-) )


Stefan


Frédéric JECKER schrieb:

Hi list,

Does anyone has already succeeded in deploying WO 5.4 apps under  
windows ?
If yes, what's the procedure to follow to update existing server  
installations from 5.2.3 to 5.4 ?
Our clients are running only windows servers with WO 5.2.3 and we  
wish we could update them to the latest WO 5.4 + JDK 1.5.


Thanks for your answers

Fred
___
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/stefan.klein%40buero-sde.de

This email sent to stefan.kl...@buero-sde.de



___
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/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com




___
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 arch...@mail-archive.com


Re: Webobjects design: multiple editing contexts

2009-03-24 Thread Kieran Kelleher
In any case, I am a believer of doing all initialization lazily in  
WOComponents ... then you don't have to think about the RR cycle and  
if/when you object needs to be initialized


private EOEditingContext _editingContext;

public EOEditingContext editingContext() {
if (_editingContext == null) {
_editingContext = ERXEC.newEditingContext();
}
return _editingContext;
}

HTH, Kieran

PS. If you are going to Multiple EC's, I recommend you use Project  
Wonder  and the safeLocking settings ... if not using Wonder, then  
google for MultiECLocker or whatever it is called.



On Mar 24, 2009, at 8:44 AM, Mark Wardle wrote:


Hi all.

I'm pretty happy with the mechanics of WO now... but I sometimes feel
I'm doing the wrong thing in some aspect of design/architecture.

I am making the leap to using multiple editing contexts (using PW).
I'm using component actions exclusively at present.

When is the appropriate time to create an editingcontext - within a
component's constructor? If so, is it appropriate to pass a handle to
the editingcontext between components? For example, I have a UserEdit
component, that takes a User as a binding, and allows a user to edit
that user's details (subject to permissions). At present, I have a
constructor that creates a new editingcontext, and any setters that
use EOs are careful to get a copy of the EO in the correct
editingcontext.

What if I then have subcomponents that need to use the parent editing
context? Is it appropriate to get the parent's editingcontext from the
EO itself?

Once I start thinking about that, it looks like I'm writing lots of
code which is fairly repetitive and thought that there must be a
better way? Am I missing something obvious? I don't want to make
things highly modal, and I usually don't wish to preserve state
between components unless the user specifically requests it.

Any design tips gratefully received!

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
___
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/kieran_lists%40mac.com

This email sent to kieran_li...@mac.com


___
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 arch...@mail-archive.com


Re: Webobjects design: multiple editing contexts

2009-03-24 Thread Ken Anderson

Mark,

I pass editing contexts through components all the time - it's a nice  
clean way of having a set of components work in a context mode, and  
it's really the only clean way I can think of.  Of course, you could  
just ask the EO that you pass down (presumably to edit the same object  
or children) for the context, but I find passing it down explicitly to  
be cleaner.


You could always use children if you have sub-editing to do where you  
don't want it to affect the parent until you're done - but I find that  
I seldom have that type of situation (usually, the user wants to  
cancel the whole thing, not just a part of an edit).


Ken

On Mar 24, 2009, at 8:44 AM, Mark Wardle wrote:


Hi all.

I'm pretty happy with the mechanics of WO now... but I sometimes feel
I'm doing the wrong thing in some aspect of design/architecture.

I am making the leap to using multiple editing contexts (using PW).
I'm using component actions exclusively at present.

When is the appropriate time to create an editingcontext - within a
component's constructor? If so, is it appropriate to pass a handle to
the editingcontext between components? For example, I have a UserEdit
component, that takes a User as a binding, and allows a user to edit
that user's details (subject to permissions). At present, I have a
constructor that creates a new editingcontext, and any setters that
use EOs are careful to get a copy of the EO in the correct
editingcontext.

What if I then have subcomponents that need to use the parent editing
context? Is it appropriate to get the parent's editingcontext from the
EO itself?

Once I start thinking about that, it looks like I'm writing lots of
code which is fairly repetitive and thought that there must be a
better way? Am I missing something obvious? I don't want to make
things highly modal, and I usually don't wish to preserve state
between components unless the user specifically requests it.

Any design tips gratefully received!

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
___
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/kenlists%40anderhome.com

This email sent to kenli...@anderhome.com


___
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 arch...@mail-archive.com


Re: Webobjects design: multiple editing contexts

2009-03-24 Thread Ricardo J. Parada


On Mar 24, 2009, at 8:44 AM, Mark Wardle wrote:


When is the appropriate time to create an editingcontext - within a
component's constructor?


I do the same thing that Kieran suggested.  My component has an  
editingContext() method which creates its own editing context.



If so, is it appropriate to pass a handle to
the editingcontext between components? For example, I have a UserEdit
component, that takes a User as a binding, and allows a user to edit
that user's details (subject to permissions).


You could do that as long as it's okay to mess with that editing  
context.  But you could run into trouble, for example if you start  
editing your User object and then go somewhere else in the  
application, modify something and save then if the editing context is  
the same as the one used for these components then you may be saving  
the pending edits to the User object as a side effect and not exactly  
what the user would expect.


Soo... what I do is, if your UserEdit component is being handed the  
User object  then it can simply get a copy of of the user object into  
the UserEdit's local editing context.  I do this in a couple of  
different ways.  Here's the one with less code:


/** Returns copy of user object in the UserEdit's local editing  
context */


public User user() {
User user = (User) valueForBinding(user);
return user.localInstanceIn(editingContext());
}

But you could have trouble here when they start editing the user  
object and then in a subsequent request you are handed in a different  
user object.  All of a sudden you will start editing a different user  
object and you still have pending edits for the other user object.


So what I do is usually the version that involves a bit more code.  I  
you are using project Wonder and your component inherits from  
ERXComponent then I usually do this in preAppendToResponse as follows :


public preAppendToResponse(WOResponse response, WOContext context) {
// See what user object we're being handed in
User aUser = (User) valueForBinding(user);

// Convert it to our local editing context
aUser.localInstanceIn(editingContext());

	// If the user handed in is a different user from the one we're  
currently editing...


if (user != aUser) ) {
// ... then throw away any pending edits ...
editingContext().revert();

// ... and start using that user object
user = aUser;
}
}

public User user() {
return user;
}


Now in the real world sometimes I get handed in a brand new object  
which was created in an external editing context and which is okay to  
mess with.  For example let's say the parent component is the one that  
hands in the user object to the UserEdit component, and let's say that  
it was created like this prior to be handed in to UserEdit:


EOEditingContext newEditingContext = ERXEC.newEditingContext();
User aUser = new User();
newEditingContext.insertObject(aUser);
aUser.setFoo(foo);

Then your user edit is handed in this user object.  In this case I  
assume that I can use that editing context and can have the following  
bit of code in preAppendToResponse():


// See what user object we're being handed in
User aUser = (User) valueForBinding(user);

	// See if it's a new object and not exactly the one we're currently  
editing

if (aUser.isNewObject()  aUser != user) {
		// use the externally created editing context as the local editing  
context

_editingContext = aUser.editingContext();
user = aUser;
}


Ok... so that's close to what I do normally.  Not sure if it's the  
best way, but it seems to work for me.





What if I then have subcomponents that need to use the parent editing
context? Is it appropriate to get the parent's editingcontext from the
EO itself?



I document this for the component.  For example, in your UserEdit  
component documentation I would mention that it uses its own editing  
context for editing unless the user object handed in is a new object  
that has not been saved to the database yet.



Once I start thinking about that, it looks like I'm writing lots of
code which is fairly repetitive and thought that there must be a
better way? Am I missing something obvious? I don't want to make
things highly modal, and I usually don't wish to preserve state
between components unless the user specifically requests it.


Yes I've thought about abstracting that code so I don't repeat it.   
The user i-var and binding could be called document.
And have that code in a superclass in preAppendToResponse().  Then the  
UserEdit component would extend that component.  If your subclass has  
some code in preAppendToResponse then you would have to call  
super.preAppendToResponse() to make sure that logic is not skipped.



___
Do not post 

Webobjects design: primary keys with business meaning and allowing users to type them in!

2009-03-24 Thread Mark Wardle
Following on from that question, I have one other design issue

I map patients to local health organisations using their postcode
(zipcode). I have a third-party sourced table with two columns:
postcode and organisation id. Both are unique but have business
meaning. At present, I am using the string postcode and string
organisation id as primary keys.

A user can complete an address for a patient, and types in the postcode.

At the moment, I have a relationship defined with the text entered by
the user as a foreign key acting as a lookup. I don't mind if the
postcode doesn't exist as it may be a new postcode.

I can therefore say:

patient.currentAddress.postcode.localHealthBoard.name

and get the name of the health organisation for that patient. As you
can imagine, there are quite a few postcodes in the UK. I've therefore
used a one-way relationship to avoid excessive fetches.

However, this isn't working - WO complains about not having a null
relationship - presumably because I've sneaked in behind EOF's back
and set the foreign key directly.

Solutions?

1. Instead of a relationship, perform a manual lookup when the
postcode is entered and then set the relationship directly in the
proper way (addBothSides...). Problem then is keeping items in sync
and making sure that when the postcode is changed the relationship is
updated. In particular, health organisation changes may change the
mapping of postcodes to organisations - using a relationship keyed to
postcode will magically update. Manual lookup won't do that. Plus:
when to do manual lookup - during an action - when the mapping table
is updated? what if there are several components that need this

2. Somehow set the relationship just before the ec.saveChanges() step
- but I know I'm not allowed to do that during validateForSave() -
when can I do it? Can I hook into the object lifecycle? I've read Chap
3 of Practical Webobjects and see one method there for notifications.

3. Am I missing a simpler method?


Many thanks, and apologies for the (rather) specific questions...

-- 
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
 ___
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 arch...@mail-archive.com


Re: Webobjects design: multiple editing contexts

2009-03-24 Thread Ricardo J. Parada


On Mar 24, 2009, at 10:24 AM, Ricardo J. Parada wrote:


// Convert it to our local editing context
aUser.localInstanceIn(editingContext());


Oops that line of code is incorrect.  Please take note, it should be  
as follows:


aUser = aUser.localInstanceIn(editingContext());



___
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 arch...@mail-archive.com


Re: Webobjects design: multiple editing contexts

2009-03-24 Thread Ricardo J. Parada


On Mar 24, 2009, at 10:30 AM, Mark Wardle wrote:


Thank you for all these replies. I've already committed the lazy
loading editingContext() method for the components that need it!

Ricardo: Thank you for your solutions there...  reading that has made
me realise I'm not making use of bindings properly but instead using
public setters and getters on components. Will take a little longer to
fix! Will digest the rest!


My components normally do this:

public boolean synchronizesVariablesWithBindings() {
return false;
}

So I pull the values when I need them on demand using valueForBinding().
And if I need to set the value for a property bound to a foo binding  
I simply do this:


setValueForBinding(null, foo);

And I make sure I edit the .api file and make foo settable.  So that  
the component editor gives you a warning if somebody binds a property  
to foo that is not settable, i.e. a constant value bound to foo.






Thank you

Mark

2009/3/24 Ricardo J. Parada rpar...@mac.com:


On Mar 24, 2009, at 8:44 AM, Mark Wardle wrote:


When is the appropriate time to create an editingcontext - within a
component's constructor?


I do the same thing that Kieran suggested.  My component has an
editingContext() method which creates its own editing context.


If so, is it appropriate to pass a handle to
the editingcontext between components? For example, I have a  
UserEdit

component, that takes a User as a binding, and allows a user to edit
that user's details (subject to permissions).


You could do that as long as it's okay to mess with that editing  
context.
 But you could run into trouble, for example if you start editing  
your User
object and then go somewhere else in the application, modify  
something and
save then if the editing context is the same as the one used for  
these
components then you may be saving the pending edits to the User  
object as a

side effect and not exactly what the user would expect.

Soo... what I do is, if your UserEdit component is being handed the  
User

object  then it can simply get a copy of of the user object into the
UserEdit's local editing context.  I do this in a couple of  
different ways.

 Here's the one with less code:

/** Returns copy of user object in the UserEdit's local editing  
context */


public User user() {
   User user = (User) valueForBinding(user);
   return user.localInstanceIn(editingContext());
}

But you could have trouble here when they start editing the user  
object and
then in a subsequent request you are handed in a different user  
object.  All
of a sudden you will start editing a different user object and you  
still

have pending edits for the other user object.

So what I do is usually the version that involves a bit more code.   
I you
are using project Wonder and your component inherits from  
ERXComponent then

I usually do this in preAppendToResponse as follows :

public preAppendToResponse(WOResponse response, WOContext context) {
   // See what user object we're being handed in
   User aUser = (User) valueForBinding(user);

   // Convert it to our local editing context
   aUser.localInstanceIn(editingContext());

   // If the user handed in is a different user from the one  
we're

currently editing...

   if (user != aUser) ) {
   // ... then throw away any pending edits ...
   editingContext().revert();

   // ... and start using that user object
   user = aUser;
   }
}

public User user() {
   return user;
}


Now in the real world sometimes I get handed in a brand new object  
which was
created in an external editing context and which is okay to mess  
with.  For
example let's say the parent component is the one that hands in the  
user
object to the UserEdit component, and let's say that it was created  
like

this prior to be handed in to UserEdit:

   EOEditingContext newEditingContext =  
ERXEC.newEditingContext();

   User aUser = new User();
   newEditingContext.insertObject(aUser);
   aUser.setFoo(foo);

Then your user edit is handed in this user object.  In this case I  
assume
that I can use that editing context and can have the following bit  
of code

in preAppendToResponse():

   // See what user object we're being handed in
   User aUser = (User) valueForBinding(user);

   // See if it's a new object and not exactly the one we're  
currently

editing
   if (aUser.isNewObject()  aUser != user) {
   // use the externally created editing context as the  
local

editing context
   _editingContext = aUser.editingContext();
   user = aUser;
   }


Ok... so that's close to what I do normally.  Not sure if it's the  
best way,

but it seems to work for me.




What if I then have subcomponents that need to use the parent  
editing
context? Is it appropriate to get the parent's editingcontext from  
the

EO itself?



I document this for the 

Ajax inside a Repetition

2009-03-24 Thread Dawn Lockhart
I have a repetition with check boxes in each row. It worked like a charm
until I upgraded to WO 5.4 and Wonder revision 8988.

If there are items in the repetition when the page initially loads, they all
work fine, but if I add items to the repetition with an AjaxSubmitButton and
update the container, then only the first row of the repetition works. If I
press F5 and reload the page, then everything works.

wo:AjaxUpdateContainer id=ListUpdateID
wo:WORepetition list=$list item=$item index=$rowNumber
tdwo:AjaxObserveField updateContainerID=$updateContainerID 

action=$checked fullSubmit=$no
wo:checkbox checked=$item.doNotShip /
/wo:AjaxObserveField
/td
td
wo:AjaxUpdateContainer id=$updateContainerID
wo:WOTextField id=$calendarRowId size=12

value=$item.date /nbsp;
wo:CalendarPopUp calendarFieldId=$calendarRowId /
/wo:AjaxUpdateContainer
/td
/wo:WORepetition
/wo:AjaxUpdateContainer

wo:AjaxSubmitButton action=$add value=Add 

updateContainerID=ListUpdateID /

When I look at the generated JavaScript, it seems to only generate the
JavaScript that registers the observe field if I manually refresh the page.
How do I get the fields registered without refreshing the whole page?

I tried removing the observe field and having the checkbox call a setChecked
method in the Java class and that didn't work either, it only hit the
setChecked method for the first row and not subsequent rows unless I
refreshed.

TIA, 
Dawn

 ___
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 arch...@mail-archive.com


A few basic questions about EOF

2009-03-24 Thread Paulo Filipe Andrade
Imagine the following model, where a User has a many to many  
relationship with Message. A user can have many messages and messages  
can be read by many users.


User --- Message

I can model this in EOModeler as a flattened relationship, and as  
expected this will create the many-to-many indirection table  
UserMessage for me.


User -- UserMessage  Message

In the User entity it creates a relationship property messages() that  
allows me to bypass the indirection table (and users() in Messages).


Now for the questions:

1 ==
In the deprecated EOModeler User Guide it states:
 Primary key propagation is also commonly used to generate primary  
keys for join tables in many-to-many relationships.


If the join table has a compound primary key (consisting of the two  
foreign keys to User and Message), how does this apply?


2 ==
Does anybody know how does WebObjects manage flattened relationships  
internally?
Basically I want to know if (besides having more readable code) I  get  
some performance improvements using this.

So which are there any performance differences in these two?

user.messages();
or
user.userMessages().valueForKey(message);


3 ==
Now imagine I need to know if a user has read a message. I would  
simply add a boolean to the indirection table to store this.
Can I still use the flattened relationships WebObjects provides and  
store this boolean in the indirection table?

Are there any caveats I should be aware of?

4 ==

Theoretically if a message has no relation to users, it should be  
deleted.

Does Owns Destination work in this many-to-many scenario?

5 ==

Not directly related to this scenario but I still couldn't quite  
figure out:


When doing a addObjectToBothSideOfRelationship how does EOF know which  
relationship is the inverse relationship?

In Core Data this is explicitly set but not in EOF.



Sorry if this was a bit too long, but I'm trying to tie up loose ends  
in my mental model of EOF.


Thank you for your time,
Paulo F. Andrade






___
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 arch...@mail-archive.com


Re: Change rewriteURL

2009-03-24 Thread Guido Neitzer

On 24. Mar. 2009, at 01:28 , Ramon Centric wrote:

I want to use it for outgoing URL's. The method you mentioned  
doesn't have any context, so unfortunately I can't use it.


You should be able to get all required thread related information from  
ERXThreadStorage and the methods using it (like  
WOContext.currentContext(), ERXSession.session()).


cug
___
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 arch...@mail-archive.com


Re: A few basic questions about EOF

2009-03-24 Thread David Avendasora

Hi Paulo,

Personally, I really dislike compound PKs, but there's no real reason  
not to use them for tables that exist simply for the purpose of  
establishing a mant-to-many relationship.


On Mar 24, 2009, at 1:07 PM, Paulo Filipe Andrade wrote:


1 ==
In the deprecated EOModeler User Guide it states:
 Primary key propagation is also commonly used to generate primary  
keys for join tables in many-to-many relationships.


If the join table has a compound primary key (consisting of the two  
foreign keys to User and Message), how does this apply?


Well, if you didn't have compound PKs, then you really couldn't  
propagate PKs on a to-many relationship.


Since both to-one relationships on the join are required, it will  
simply propagate both of the PKs of the User and Message into the join  
table.




2 ==
Does anybody know how does WebObjects manage flattened relationships  
internally?
Basically I want to know if (besides having more readable code) I   
get some performance improvements using this.

So which are there any performance differences in these two?

user.messages();
or
user.userMessages().valueForKey(message);


I don't think there's much difference at all, but Someone more versed  
in the depths of EOF can probably answer for sure (Chuck?).



3 ==
Now imagine I need to know if a user has read a message. I would  
simply add a boolean to the indirection table to store this.
Can I still use the flattened relationships WebObjects provides and  
store this boolean in the indirection table?

Are there any caveats I should be aware of?


Well, at the point something is no longer purely a join table, it  
takes on business meaning and I would recommend having the table have  
it's own distinct primary key.



4 ==

Theoretically if a message has no relation to users, it should be  
deleted.

Does Owns Destination work in this many-to-many scenario?


This doesn't sound right. If this relationship designates messages  
that have been read by users, then you are saying that a message that  
hasn't been read doesn't exist. While this is an interesting  
philosophical idea, I don't think it really translates into the real  
world. Can't you have unread messages?




5 ==

Not directly related to this scenario but I still couldn't quite  
figure out:


When doing a addObjectToBothSideOfRelationship how does EOF know  
which relationship is the inverse relationship?

In Core Data this is explicitly set but not in EOF.


EOF is smart enough to look in the model and see that there is a  
relationship on the destination that, in turn, has a destination of  
the original object, therefore it must be the inverse.


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 arch...@mail-archive.com

Re: Ajax inside a Repetition

2009-03-24 Thread Travis Britt
It looks like you're binding the ID for your AjaxUpdateContainer in a  
repetition -- are you sure the IDs are unique?


Have you tried wrapping the repetition with the AjaxUpdateContainer  
and updating the entire repetition? Then you should also be able to  
wrap the checkboxes in one AjaxObserveField.


tb

On Mar 24, 2009, at 12:29 PM, Dawn Lockhart wrote:

I have a repetition with check boxes in each row. It worked like a  
charm

until I upgraded to WO 5.4 and Wonder revision 8988.

If there are items in the repetition when the page initially loads,  
they all
work fine, but if I add items to the repetition with an  
AjaxSubmitButton and
update the container, then only the first row of the repetition  
works. If I

press F5 and reload the page, then everything works.

wo:AjaxUpdateContainer id=ListUpdateID
wo:WORepetition list=$list item=$item index=$rowNumber
   tdwo:AjaxObserveField updateContainerID=$updateContainerID

action=$checked fullSubmit=$no
   wo:checkbox checked=$item.doNotShip /
   /wo:AjaxObserveField
   /td
   td
   wo:AjaxUpdateContainer id=$updateContainerID
   wo:WOTextField id=$calendarRowId size=12

value=$item.date /nbsp;
   wo:CalendarPopUp calendarFieldId=$calendarRowId /
   /wo:AjaxUpdateContainer
   /td
/wo:WORepetition
/wo:AjaxUpdateContainer

wo:AjaxSubmitButton action=$add value=Add

updateContainerID=ListUpdateID /

When I look at the generated JavaScript, it seems to only generate the
JavaScript that registers the observe field if I manually refresh  
the page.

How do I get the fields registered without refreshing the whole page?

I tried removing the observe field and having the checkbox call a  
setChecked

method in the Java class and that didn't work either, it only hit the
setChecked method for the first row and not subsequent rows unless I
refreshed.

TIA,
Dawn

___
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/tbritt%40phigment.org

This email sent to tbr...@phigment.org


___
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 arch...@mail-archive.com


Re: Ajax inside a Repetition

2009-03-24 Thread Dawn Lockhart
Yes, I forgot to mention that the ID is unique, I'm appending the rowNumber
to each ID. 

The whole repetition is wrapped in an AjaxUpdateContainer. When you check
the checkbox, I need it to hide/show the calendar. I just realized I forgot
to leave the conditional on the calendar column that hides/shows the field
if the checkbox is checked.

Tried changing the AjaxObserveField's updateContainerID to the outer
container 'ListUpdateID' and still no luck. When an item is added to the
repetition, only the checkbox and calendar in the first row work.


On 3/24/09 2:44 PM, Travis Britt tbr...@phigment.org wrote:

 It looks like you're binding the ID for your AjaxUpdateContainer in a
 repetition -- are you sure the IDs are unique?
 
 Have you tried wrapping the repetition with the AjaxUpdateContainer
 and updating the entire repetition? Then you should also be able to
 wrap the checkboxes in one AjaxObserveField.
 
 tb
 
 On Mar 24, 2009, at 12:29 PM, Dawn Lockhart wrote:
 
 I have a repetition with check boxes in each row. It worked like a
 charm
 until I upgraded to WO 5.4 and Wonder revision 8988.
 
 If there are items in the repetition when the page initially loads,
 they all
 work fine, but if I add items to the repetition with an
 AjaxSubmitButton and
 update the container, then only the first row of the repetition
 works. If I
 press F5 and reload the page, then everything works.
 
 wo:AjaxUpdateContainer id=ListUpdateID
 wo:WORepetition list=$list item=$item index=$rowNumber
tdwo:AjaxObserveField updateContainerID=$updateContainerID
 
 action=$checked fullSubmit=$no
wo:checkbox checked=$item.doNotShip /
/wo:AjaxObserveField
/td
td
wo:AjaxUpdateContainer id=$updateContainerID
wo:not condition=$item.doNotShip
wo:WOTextField id=$calendarRowId size=12
 
 value=$item.date /nbsp;
wo:CalendarPopUp calendarFieldId=$calendarRowId /
/wo:not
/wo:AjaxUpdateContainer
/td
 /wo:WORepetition
 /wo:AjaxUpdateContainer
 
 wo:AjaxSubmitButton action=$add value=Add
 
 updateContainerID=ListUpdateID /
 
 When I look at the generated JavaScript, it seems to only generate the
 JavaScript that registers the observe field if I manually refresh
 the page.
 How do I get the fields registered without refreshing the whole page?
 
 I tried removing the observe field and having the checkbox call a
 setChecked
 method in the Java class and that didn't work either, it only hit the
 setChecked method for the first row and not subsequent rows unless I
 refreshed.
 
 TIA,
 Dawn
 
 ___
 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/tbritt%40phigment.org
 
 This email sent to tbr...@phigment.org
 

 ___
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 arch...@mail-archive.com


Re: A few basic questions about EOF

2009-03-24 Thread Paulo Filipe Andrade

Hi!

Thanks for the comments.

On 2009/03/24, at 17:55, David Avendasora wrote:


Hi Paulo,

Personally, I really dislike compound PKs, but there's no real  
reason not to use them for tables that exist simply for the purpose  
of establishing a mant-to-many relationship.


On Mar 24, 2009, at 1:07 PM, Paulo Filipe Andrade wrote:


1 ==
In the deprecated EOModeler User Guide it states:
 Primary key propagation is also commonly used to generate primary  
keys for join tables in many-to-many relationships.


If the join table has a compound primary key (consisting of the two  
foreign keys to User and Message), how does this apply?


Well, if you didn't have compound PKs, then you really couldn't  
propagate PKs on a to-many relationship.


Since both to-one relationships on the join are required, it will  
simply propagate both of the PKs of the User and Message into the  
join table.




2 ==
Does anybody know how does WebObjects manage flattened  
relationships internally?
Basically I want to know if (besides having more readable code) I   
get some performance improvements using this.

So which are there any performance differences in these two?

user.messages();
or
user.userMessages().valueForKey(message);


I don't think there's much difference at all, but Someone more  
versed in the depths of EOF can probably answer for sure (Chuck?).



3 ==
Now imagine I need to know if a user has read a message. I would  
simply add a boolean to the indirection table to store this.
Can I still use the flattened relationships WebObjects provides and  
store this boolean in the indirection table?

Are there any caveats I should be aware of?


Well, at the point something is no longer purely a join table, it  
takes on business meaning and I would recommend having the table  
have it's own distinct primary key.




Is there a technical reason behind your recommendation or just  
personal preference?



4 ==

Theoretically if a message has no relation to users, it should be  
deleted.

Does Owns Destination work in this many-to-many scenario?


This doesn't sound right. If this relationship designates messages  
that have been read by users, then you are saying that a message  
that hasn't been read doesn't exist. While this is an interesting  
philosophical idea, I don't think it really translates into the real  
world. Can't you have unread messages?


This is unrelated to the read/unread messages. The idea is simple, if  
a Message is no longer referenced by any User it should be deleted.


So if userA and userB are the only ones that have a relation to messageA

userA.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);
userB.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);


editingContext.saveChanges();

At this point messageA would be deleted.





5 ==

Not directly related to this scenario but I still couldn't quite  
figure out:


When doing a addObjectToBothSideOfRelationship how does EOF know  
which relationship is the inverse relationship?

In Core Data this is explicitly set but not in EOF.


EOF is smart enough to look in the model and see that there is a  
relationship on the destination that, in turn, has a destination of  
the original object, therefore it must be the inverse.


Take the hypothetical case where there would be two relations back to  
the source from the destination, what would happen then?




Dave


Paulo F. Andrade






 ___
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 arch...@mail-archive.com

D2W List Question with an Array

2009-03-24 Thread James Cicenia

Hello -

I am trying to figure out how to make my array attribute show up as  
separate columns in the D2WList view.

Anyone have any suggestions?

Thanks
James Cicenia

___
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 arch...@mail-archive.com


Re: A few basic questions about EOF

2009-03-24 Thread Chuck Hill

Hi Paulo,


On Mar 24, 2009, at 12:15 PM, Paulo Filipe Andrade wrote:


Hi!

Thanks for the comments.

On 2009/03/24, at 17:55, David Avendasora wrote:


Hi Paulo,

Personally, I really dislike compound PKs, but there's no real  
reason not to use them for tables that exist simply for the purpose  
of establishing a mant-to-many relationship.


On Mar 24, 2009, at 1:07 PM, Paulo Filipe Andrade wrote:


1 ==
In the deprecated EOModeler User Guide it states:
 Primary key propagation is also commonly used to generate  
primary keys for join tables in many-to-many relationships.


If the join table has a compound primary key (consisting of the  
two foreign keys to User and Message), how does this apply?


Well, if you didn't have compound PKs, then you really couldn't  
propagate PKs on a to-many relationship.


Since both to-one relationships on the join are required, it will  
simply propagate both of the PKs of the User and Message into the  
join table.




2 ==
Does anybody know how does WebObjects manage flattened  
relationships internally?
Basically I want to know if (besides having more readable code) I   
get some performance improvements using this.

So which are there any performance differences in these two?

user.messages();
or
user.userMessages().valueForKey(message);


I don't think there's much difference at all, but Someone more  
versed in the depths of EOF can probably answer for sure (Chuck?).


There is less processing and object creation, so it will be a bit  
faster.  I would not be too concerned with this one way or the other.




3 ==
Now imagine I need to know if a user has read a message. I would  
simply add a boolean to the indirection table to store this.
Can I still use the flattened relationships WebObjects provides  
and store this boolean in the indirection table?

Are there any caveats I should be aware of?


Well, at the point something is no longer purely a join table, it  
takes on business meaning and I would recommend having the table  
have it's own distinct primary key.




Is there a technical reason behind your recommendation or just  
personal preference?


I'd be tempted to keep the compound PK and just make the minimal  
change.  I think this is just personal preference.






4 ==

Theoretically if a message has no relation to users, it should be  
deleted.

Does Owns Destination work in this many-to-many scenario?


This doesn't sound right. If this relationship designates messages  
that have been read by users, then you are saying that a message  
that hasn't been read doesn't exist. While this is an interesting  
philosophical idea, I don't think it really translates into the  
real world. Can't you have unread messages?


This is unrelated to the read/unread messages. The idea is simple,  
if a Message is no longer referenced by any User it should be deleted.


So if userA and userB are the only ones that have a relation to  
messageA


userA.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);
userB.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);


editingContext.saveChanges();

At this point messageA would be deleted.


There is no delete rule that will do this.  I'd probably implement  
this on Message:


public void removeFromUsers(User aUser) {
super.removeFromUsers(aUser);
if (users().count() == 0) {
editingContext().deleteObject(this);
}
}

You might find this problematic if the last user can be removed then  
another one added.  This opens up all sorts of interesting concurrency  
problems.




5 ==

Not directly related to this scenario but I still couldn't quite  
figure out:


When doing a addObjectToBothSideOfRelationship how does EOF know  
which relationship is the inverse relationship?

In Core Data this is explicitly set but not in EOF.


EOF is smart enough to look in the model and see that there is a  
relationship on the destination that, in turn, has a destination of  
the original object, therefore it must be the inverse.


Take the hypothetical case where there would be two relations back  
to the source from the destination, what would happen then?


It looks for one that matches the join columns.  I am not sure what  
happens if you have two identical relationships, nor I am sure why you  
would have two identical relationships.



Chuck


--
Chuck Hill Senior Consultant / VP Development

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 arch...@mail-archive.com


[ANN] AjaxDatePicker and AjaxDefaultSubmitButton

2009-03-24 Thread Chuck Hill
In the interests of keeping folks up to date with what is getting  
added to Wonder...


AjaxDatePicker
Shameless port and adoption of Rails Date Kit (Swazz Calendar with  
extra goodness). This input understands the format symbols %d, %e, %b,  
%m, %B, %y, and %Y. See the NSTimestampFormatter for what these  
symbols do. This component can also understand the corresponding  
symbols from java.text.SimpleDateFormat. You can use any date format  
allowed by these symbols.  The translation from SimpleDateFormat  
symbols to NSTimestampFormatter symbols may have some defects.   
Localization is also supported.  The AjaxExamples page shows a French  
version.


NOTE: the AjaxDatePicker does NOT play nice with the  
AjaxModalDialogOpener. There is some sort of initialization conflict  
(I think) with Prototype that leaves you with a blank page and the  
browser waiting forever for something (and I have not been able to  
determine what it is) as soon as calendar.js loads and initialized. It  
will work if the page the AMD appears on explicitly loads the  
calendar.js in it's HEAD:


public void appendToResponse(WOResponse response, WOContext context) {
super.appendToResponse(response, context);
	ERXResponseRewriter.addScriptResourceInHead(response, context(),  
Ajax, calendar.js);

}
Full details in JavaDoc.


AjaxDefaultSubmitButton

Invisible form submit button that can be included as the first element  
in an Ajax submitted form so that hitting enter performs the action  
bound to this button.  It supports most of the other AjaxSubmitButton  
bindings.



Chuck

--
Chuck Hill Senior Consultant / VP Development

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 arch...@mail-archive.com


Re: D2W List Question with an Array

2009-03-24 Thread Anjo Krank

You mean like

[mail1.subject] [mail2.subject] [mail3.subject]
[mail1.sender] [mail2. sender] [mail3. sender]

?

Am 24.03.2009 um 20:56 schrieb James Cicenia:


Hello -

I am trying to figure out how to make my array attribute show up as  
separate columns in the D2WList view.

Anyone have any suggestions?

Thanks
James Cicenia

___
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/anjo%40krank.net

This email sent to a...@krank.net


___
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 arch...@mail-archive.com


Re: D2W List Question with an Array

2009-03-24 Thread James Cicenia

More like

Project.metrics -- portfolio.metric

Project Name | Metric Name1 | Metric Name2 | Metric NameX

project A   | 200 | 50 | 75
.
.
.


Make sense?

James


On Mar 24, 2009, at 4:11 PM, Anjo Krank wrote:


You mean like

[mail1.subject] [mail2.subject] [mail3.subject]
[mail1.sender] [mail2. sender] [mail3. sender]

?

Am 24.03.2009 um 20:56 schrieb James Cicenia:


Hello -

I am trying to figure out how to make my array attribute show up as  
separate columns in the D2WList view.

Anyone have any suggestions?

Thanks
James Cicenia

___
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/anjo 
%40krank.net


This email sent to a...@krank.net




___
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 arch...@mail-archive.com


Re: D2W List Question with an Array

2009-03-24 Thread Anjo Krank
Which is, like, a standard list? So your question is rather how do I  
display a to-many like a normal list?


Use ERDList as a property-level component.

Though I'm not sure about the relation of project, metric and portfolio.

Cheers, Anjo

Am 24.03.2009 um 22:18 schrieb James Cicenia:


More like

Project.metrics -- portfolio.metric

Project Name | Metric Name1 | Metric Name2 | Metric NameX

project A   | 200 | 50 | 75
.
.
.


Make sense?

James


On Mar 24, 2009, at 4:11 PM, Anjo Krank wrote:


You mean like

[mail1.subject] [mail2.subject] [mail3.subject]
[mail1.sender] [mail2. sender] [mail3. sender]

?

Am 24.03.2009 um 20:56 schrieb James Cicenia:


Hello -

I am trying to figure out how to make my array attribute show up  
as separate columns in the D2WList view.

Anyone have any suggestions?

Thanks
James Cicenia

___
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/anjo%40krank.net

This email sent to a...@krank.net






___
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 arch...@mail-archive.com


Re: D2W List Question with an Array

2009-03-24 Thread James Cicenia

Hmmm,

So ERDList will spread them horizontally and be sortable? Of course  
this is on one of  my non-wonder apps. Another reason to push them to  
allocate some funds my way to upgrade it.


If ERDList can do that, I might be able to convince them.

Thanks
James

On Mar 24, 2009, at 4:23 PM, Anjo Krank wrote:

Which is, like, a standard list? So your question is rather how do  
I display a to-many like a normal list?


Use ERDList as a property-level component.

Though I'm not sure about the relation of project, metric and  
portfolio.


Cheers, Anjo

Am 24.03.2009 um 22:18 schrieb James Cicenia:


More like

Project.metrics -- portfolio.metric

Project Name | Metric Name1 | Metric Name2 | Metric NameX

project A   | 200 | 50 | 75
.
.
.


Make sense?

James


On Mar 24, 2009, at 4:11 PM, Anjo Krank wrote:


You mean like

[mail1.subject] [mail2.subject] [mail3.subject]
[mail1.sender] [mail2. sender] [mail3. sender]

?

Am 24.03.2009 um 20:56 schrieb James Cicenia:


Hello -

I am trying to figure out how to make my array attribute show up  
as separate columns in the D2WList view.

Anyone have any suggestions?

Thanks
James Cicenia

___
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/anjo%40krank.net

This email sent to a...@krank.net








___
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 arch...@mail-archive.com


Re: A few basic questions about EOF

2009-03-24 Thread Paulo Filipe Andrade

Hello Chuck,

On 2009/03/24, at 20:14, Chuck Hill wrote:


4 ==

Theoretically if a message has no relation to users, it should be  
deleted.

Does Owns Destination work in this many-to-many scenario?


This doesn't sound right. If this relationship designates messages  
that have been read by users, then you are saying that a message  
that hasn't been read doesn't exist. While this is an interesting  
philosophical idea, I don't think it really translates into the  
real world. Can't you have unread messages?


This is unrelated to the read/unread messages. The idea is simple,  
if a Message is no longer referenced by any User it should be  
deleted.


So if userA and userB are the only ones that have a relation to  
messageA


userA.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);
userB.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);


editingContext.saveChanges();

At this point messageA would be deleted.


There is no delete rule that will do this.  I'd probably implement  
this on Message:


public void removeFromUsers(User aUser) {
   super.removeFromUsers(aUser);
   if (users().count() == 0) {
   editingContext().deleteObject(this);
   }
}

You might find this problematic if the last user can be removed then  
another one added.  This opens up all sorts of interesting  
concurrency problems.




Actually I've already solved this in my project. I asked this because  
I found out about Owns Destination just a few days ago and it got me  
wondering.


Basically I put a counter on Message marked for OL that serves as a  
reference counting mechanism. Messages are related to Users on  
creation, so I don't need to worry about the counter going up.


If two users unrelate themselves from a Message a the same time I get  
an OL and try again. This way I can prevent dangling messages.





5 ==

Not directly related to this scenario but I still couldn't quite  
figure out:


When doing a addObjectToBothSideOfRelationship how does EOF know  
which relationship is the inverse relationship?

In Core Data this is explicitly set but not in EOF.


EOF is smart enough to look in the model and see that there is a  
relationship on the destination that, in turn, has a destination  
of the original object, therefore it must be the inverse.


Take the hypothetical case where there would be two relations back  
to the source from the destination, what would happen then?


It looks for one that matches the join columns.  I am not sure what  
happens if you have two identical relationships, nor I am sure why  
you would have two identical relationships.




Looking at the join columns makes sense. Thanks.



Chuck


--
Chuck Hill Senior Consultant / VP Development

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








Paulo F. Andrade






___
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 arch...@mail-archive.com


Re: A few basic questions about EOF

2009-03-24 Thread Chuck Hill


On Mar 24, 2009, at 2:46 PM, Paulo Filipe Andrade wrote:

Hello Chuck,
On 2009/03/24, at 20:14, Chuck Hill wrote:


4 ==

Theoretically if a message has no relation to users, it should  
be deleted.

Does Owns Destination work in this many-to-many scenario?


This doesn't sound right. If this relationship designates  
messages that have been read by users, then you are saying that a  
message that hasn't been read doesn't exist. While this is an  
interesting philosophical idea, I don't think it really  
translates into the real world. Can't you have unread messages?


This is unrelated to the read/unread messages. The idea is simple,  
if a Message is no longer referenced by any User it should be  
deleted.


So if userA and userB are the only ones that have a relation to  
messageA


userA.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);
userB.removeObjectFromBothSidesOfRelationshipWithKey(messageA,  
messages);


editingContext.saveChanges();

At this point messageA would be deleted.


There is no delete rule that will do this.  I'd probably implement  
this on Message:


public void removeFromUsers(User aUser) {
  super.removeFromUsers(aUser);
  if (users().count() == 0) {
  editingContext().deleteObject(this);
  }
}

You might find this problematic if the last user can be removed  
then another one added.  This opens up all sorts of interesting  
concurrency problems.




Actually I've already solved this in my project. I asked this  
because I found out about Owns Destination just a few days ago and  
it got me wondering.


Basically I put a counter on Message marked for OL that serves as a  
reference counting mechanism. Messages are related to Users on  
creation, so I don't need to worry about the counter going up.


If two users unrelate themselves from a Message a the same time I  
get an OL and try again. This way I can prevent dangling messages.


Yes, that should be fine.  When the counter can go up again, then  
things get more interesting.  Miguel lives for those sorts of  
problems.  ;-)


Chuck




5 ==

Not directly related to this scenario but I still couldn't quite  
figure out:


When doing a addObjectToBothSideOfRelationship how does EOF know  
which relationship is the inverse relationship?

In Core Data this is explicitly set but not in EOF.


EOF is smart enough to look in the model and see that there is a  
relationship on the destination that, in turn, has a destination  
of the original object, therefore it must be the inverse.


Take the hypothetical case where there would be two relations back  
to the source from the destination, what would happen then?


It looks for one that matches the join columns.  I am not sure what  
happens if you have two identical relationships, nor I am sure why  
you would have two identical relationships.




Looking at the join columns makes sense. Thanks.




--
Chuck Hill Senior Consultant / VP Development

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 arch...@mail-archive.com


Re: WO 5.4 under windows

2009-03-24 Thread Don Lindsay

Hello;

Let me check my notes.  I submitted the steps for installing 5.4 to  
windows last year I think it was, to the list.  I will get back with  
you once I have it.  I also have an installer that does all of the  
installation for hosting on Linux, Windows and Solaris.  I am still  
testing it at this time.  But it should be released shortly.


Thanks

Don
On Mar 24, 2009, at 7:49 AM, David Avendasora wrote:


Hi Fred,

Would you be willing to document everything in detail and post it to  
the Wiki? Or send it to me and I'll post it to the wiki? If you can  
provide the compiled WO Adaptor for Apache 2.2, that would be even  
better!


The current content on the wiki is quite old refers to WO 5.1 and  
5.2, referencing copying the frameworks from the installation CD.


I think this is a relatively common question for people now that  
Apple has officially stated that WO applications and all required  
frameworks can be served from any platform.


Dave


On Mar 24, 2009, at 4:46 AM, Stefan Klein wrote:


Hi Fred,

I'm are working on the same issue.

My configuration is:

Win2003 Server 64bit, Apache 2.2, JDK 1.5 and WO 5.4

I copied the WO Stuff from the Mac to the following structure:

c:/Apple/Library/Frameworks
c:/Apple/WebObjects/JavaApplications (JavaMonitor and wotaskd)
c:/Apple/WebObjects/Configuration/

My applications and frameworks go to c:/Apple/LocalLibrary

I set the NEXT_ROOT environment variable to C:/Apple.

To run wotaskd and JavaMonitor as windows services I use FireDaemon.

At least I compiled the WO Adapter under VisualStudio against  
Apache 2.2.


We are still testing, but it seems to work fine (famous last  
words :-) )


Stefan


Frédéric JECKER schrieb:

Hi list,

Does anyone has already succeeded in deploying WO 5.4 apps under  
windows ?
If yes, what's the procedure to follow to update existing server  
installations from 5.2.3 to 5.4 ?
Our clients are running only windows servers with WO 5.2.3 and we  
wish we could update them to the latest WO 5.4 + JDK 1.5.


Thanks for your answers

Fred
___
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/stefan.klein%40buero-sde.de

This email sent to stefan.kl...@buero-sde.de



___
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/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com




___
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/pccdonl 
%40mac.com


This email sent to pccd...@mac.com


___
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 arch...@mail-archive.com


Re: D2W List Question with an Array

2009-03-24 Thread James Cicenia

And I quote:

Used to edit a toMany relationship by allowing the user to pick the  
eos that belong in the relationship.


How is that useful for showing my report?

Wondering?

James

On Mar 24, 2009, at 4:23 PM, Anjo Krank wrote:

Which is, like, a standard list? So your question is rather how do  
I display a to-many like a normal list?


Use ERDList as a property-level component.

Though I'm not sure about the relation of project, metric and  
portfolio.


Cheers, Anjo

Am 24.03.2009 um 22:18 schrieb James Cicenia:


More like

Project.metrics -- portfolio.metric

Project Name | Metric Name1 | Metric Name2 | Metric NameX

project A   | 200 | 50 | 75
.
.
.


Make sense?

James


On Mar 24, 2009, at 4:11 PM, Anjo Krank wrote:


You mean like

[mail1.subject] [mail2.subject] [mail3.subject]
[mail1.sender] [mail2. sender] [mail3. sender]

?

Am 24.03.2009 um 20:56 schrieb James Cicenia:


Hello -

I am trying to figure out how to make my array attribute show up  
as separate columns in the D2WList view.

Anyone have any suggestions?

Thanks
James Cicenia

___
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/anjo%40krank.net

This email sent to a...@krank.net








 ___
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 arch...@mail-archive.com

Re: Getting Image File's Dimensions

2009-03-24 Thread Andrew Lindesay

Hello Johnny;

See;

LEImageHelper.getWidthForJPEG(..)
LEImageHelper.getH...

Handles;

PNG
GIF
JPEG
SVG

cheers.

If you need to discover an image file's dimensions (height / width)  
would you advise using the java methods or is there a better Mac OS  
X centric way to accomplish that?


___
Andrew Lindesay
www.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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


OpenBase and Cannot update primary-key 'fooID' from '1364' to '1364' on object of entity Foo

2009-03-24 Thread Ricardo J. Parada


Hi All,

I searched Google first for similar problems and I found some but I  
could not figure out what the resolution was.  These were old messages  
(2004 or 2006 I think).  But anyways, I think I have a clue.


EOF thinks that the primary key value has changed but it hasn't.  So  
my guess is that the value in the snapshot of the EO and the value in  
the EO are not matching... not completely sure why.


I have the primary key fooID turned on as a class property in my Foo  
entity.  I'm thinking that may have something to do.  Maybe if I turn  
it off will make it go away.


fooID in OpenBase is a foo_id of type long.  In my eomodel I used the  
id prototype from ERPrototype.  Which it says the external type is  
an int.  But like I said, in OpenBase it is really a long.


Could this long in OpenBase vs. int in my eomodel cause a problem like  
this?


Has anybody ran into this problem with OpenBase?

Thanks,
Ricardo

___
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 arch...@mail-archive.com


Re: Getting Image File's Dimensions

2009-03-24 Thread Mike Schrag
Yeah, I actually have yet another framework (that isn't committed to  
Wonder (yet)) that also has a JNI ImageIO implementation for pulling  
image metadata.  I don't recall if I wrote other variations of that  
one.  It's relatively simple to do in Java2D, but it's not nearly as  
fast as the native one (obviously).


ms

On Mar 24, 2009, at 6:56 PM, Johnny Miller wrote:


Hello,

If you need to discover an image file's dimensions (height / width)  
would you advise using the java methods or is there a better Mac OS  
X centric way to accomplish that?


Thanks in advance,

Johnny



___
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 arch...@mail-archive.com


Re: OpenBase and Cannot update primary-key 'fooID' from '1364' to '1364' on object of entity Foo

2009-03-24 Thread Chuck Hill


On Mar 24, 2009, at 5:19 PM, Ricardo J. Parada wrote:



Hi All,

I searched Google first for similar problems and I found some but I  
could not figure out what the resolution was.  These were old  
messages (2004 or 2006 I think).  But anyways, I think I have a clue.


EOF thinks that the primary key value has changed but it hasn't.  So  
my guess is that the value in the snapshot of the EO and the value  
in the EO are not matching... not completely sure why.


I have the primary key fooID turned on as a class property in my Foo  
entity.  I'm thinking that may have something to do.  Maybe if I  
turn it off will make it go away.


Exposing the PK, while generally considered naughty, will not cause  
this.  Exposing a FK _will_.



fooID in OpenBase is a foo_id of type long.  In my eomodel I used  
the id prototype from ERPrototype.  Which it says the external  
type is an int.  But like I said, in OpenBase it is really a long.


Could this long in OpenBase vs. int in my eomodel cause a problem  
like this?


Has anybody ran into this problem with OpenBase?



I think Mike is on this.  Usually it is a Long vs Integer problem  
where the value is the same, but the class is not.



Chuck


--
Chuck Hill Senior Consultant / VP Development

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 arch...@mail-archive.com


Re: OpenBase and Cannot update primary-key 'fooID' from '1364' to '1364' on object of entity Foo

2009-03-24 Thread Ricardo J. Parada


On Mar 24, 2009, at 8:28 PM, Chuck Hill wrote:



Hi All,

I searched Google first for similar problems and I found some but I  
could not figure out what the resolution was.  These were old  
messages (2004 or 2006 I think).  But anyways, I think I have a clue.


EOF thinks that the primary key value has changed but it hasn't.   
So my guess is that the value in the snapshot of the EO and the  
value in the EO are not matching... not completely sure why.


I have the primary key fooID turned on as a class property in my  
Foo entity.  I'm thinking that may have something to do.  Maybe if  
I turn it off will make it go away.


Exposing the PK, while generally considered naughty, will not cause  
this.  Exposing a FK _will_.


Thanks Chuck.. I just went through my eomodel and turned off the class  
property icon on some foreign keys and primary keys that had it on.  I  
DONT really need them on.





fooID in OpenBase is a foo_id of type long.  In my eomodel I used  
the id prototype from ERPrototype.  Which it says the external  
type is an int.  But like I said, in OpenBase it is really a long.


Could this long in OpenBase vs. int in my eomodel cause a problem  
like this?


Has anybody ran into this problem with OpenBase?



I think Mike is on this.  Usually it is a Long vs Integer problem  
where the value is the same, but the class is not.


Hmm... maybe I can try changing the type in OpenBase for foreign keys  
and primary keys to use int to see if the problem goes away.


Anyways, thanks for the info.


___
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 arch...@mail-archive.com


Re: Getting Image File's Dimensions

2009-03-24 Thread Miguel Arroz

Hi!

  We use ImageInfo: http://freshmeat.net/projects/imageinfo/

  This is a Java class that looks at the image file/stream/whatever  
and, very quickly (without loading the full image to RAM) gets some  
info, like file type, dimensions, etc. So far it has worked pretty well.


  Yours

Miguel Arroz

On 2009/03/24, at 22:56, Johnny Miller wrote:


Hello,

If you need to discover an image file's dimensions (height / width)  
would you advise using the java methods or is there a better Mac OS  
X centric way to accomplish that?


Thanks in advance,

Johnny
___
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/arroz%40guiamac.com

This email sent to ar...@guiamac.com


...
http://www.survs.com



smime.p7s
Description: S/MIME cryptographic signature
 ___
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 arch...@mail-archive.com

What is the official plug-in for OpenBase?

2009-03-24 Thread Ricardo J. Parada


Does anybody know what is the official plug-in for OpenBase?  I use  
the OpenBaseJDBC.jar I downloaded from OpenBase months ago.  And I  
removed the one in /Library/Java/Extensions.  I noticed that when it  
obtains primary keys from the database it uses the select NEWID  
mechanism.


But I also noticed that there are some frameworks in my system for  
OpenBase which I believe got installed when I installed OpenBase...  
and so I'm wondering if I should be using one of those instead for my  
WO application.  In particular it seems like  
OpenBasePKPlugin.framework could be the one.


$ ls -d /Library/Frameworks/OpenBase*
/Library/Frameworks/OpenBaseAPI.framework
/Library/Frameworks/OpenBaseAdmin.framework
/Library/Frameworks/OpenBaseAdvancedAPI.framework
/Library/Frameworks/OpenBaseCR.framework
/Library/Frameworks/OpenBaseEOAdaptor.framework
/Library/Frameworks/OpenBaseForms.framework
/Library/Frameworks/OpenBaseLogin.framework
/Library/Frameworks/OpenBaseManager.framework
/Library/Frameworks/OpenBaseNet.framework
/Library/Frameworks/OpenBasePKPlugin.framework

Anwyas, maybe a question for openbase support.  :-)

___
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 arch...@mail-archive.com


Re: What is the official plug-in for OpenBase?

2009-03-24 Thread Ricardo J. Parada
I think I may have found the answer... here's a page from openbase  
that talks about that:



http://openbase.wikidot.com/connectivity-apis:web-objects





On Mar 24, 2009, at 9:47 PM, Ricardo J. Parada wrote:



Does anybody know what is the official plug-in for OpenBase?  I use  
the OpenBaseJDBC.jar I downloaded from OpenBase months ago.  And I  
removed the one in /Library/Java/Extensions.  I noticed that when it  
obtains primary keys from the database it uses the select NEWID  
mechanism.


But I also noticed that there are some frameworks in my system for  
OpenBase which I believe got installed when I installed OpenBase...  
and so I'm wondering if I should be using one of those instead for  
my WO application.  In particular it seems like  
OpenBasePKPlugin.framework could be the one.


$ ls -d /Library/Frameworks/OpenBase*
/Library/Frameworks/OpenBaseAPI.framework
/Library/Frameworks/OpenBaseAdmin.framework
/Library/Frameworks/OpenBaseAdvancedAPI.framework
/Library/Frameworks/OpenBaseCR.framework
/Library/Frameworks/OpenBaseEOAdaptor.framework
/Library/Frameworks/OpenBaseForms.framework
/Library/Frameworks/OpenBaseLogin.framework
/Library/Frameworks/OpenBaseManager.framework
/Library/Frameworks/OpenBaseNet.framework
/Library/Frameworks/OpenBasePKPlugin.framework

Anwyas, maybe a question for openbase support.  :-)

___
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/rparada 
%40mac.com


This email sent to rpar...@mac.com


___
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 arch...@mail-archive.com


Re: What is the official plug-in for OpenBase?

2009-03-24 Thread Chuck Hill


On Mar 24, 2009, at 6:47 PM, Ricardo J. Parada wrote:



Does anybody know what is the official plug-in for OpenBase?  I use  
the OpenBaseJDBC.jar I downloaded from OpenBase months ago.  And I  
removed the one in /Library/Java/Extensions.  I noticed that when it  
obtains primary keys from the database it uses the select NEWID  
mechanism.


But I also noticed that there are some frameworks in my system for  
OpenBase which I believe got installed when I installed OpenBase...  
and so I'm wondering if I should be using one of those instead for  
my WO application.  In particular it seems like  
OpenBasePKPlugin.framework could be the one.


$ ls -d /Library/Frameworks/OpenBase*
/Library/Frameworks/OpenBaseAPI.framework
/Library/Frameworks/OpenBaseAdmin.framework
/Library/Frameworks/OpenBaseAdvancedAPI.framework
/Library/Frameworks/OpenBaseCR.framework
/Library/Frameworks/OpenBaseEOAdaptor.framework
/Library/Frameworks/OpenBaseForms.framework
/Library/Frameworks/OpenBaseLogin.framework
/Library/Frameworks/OpenBaseManager.framework
/Library/Frameworks/OpenBaseNet.framework


I am pretty sure those are all Obj-C frameworks.



/Library/Frameworks/OpenBasePKPlugin.framework


I am not sure about that one.  See if it has Resources/Java/*.jar in it.

WO comes with an OpenBase plugin bundled.



Anwyas, maybe a question for openbase support.  :-)




That too.  :-)

Chuck


--
Chuck Hill Senior Consultant / VP Development

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 arch...@mail-archive.com


Re: ECLEMMA Code coverage tool

2009-03-24 Thread Chuck Hill
Finally getting back to this.  Running with TestNG, I don't get any  
coverage data written either.  Greg, were you using it with TestNG? 
I'd like to take a look at making a WO launcher for it so that it can  
be used with Selenium functional tests.


Chuck

On Aug 22, 2008, at 11:04 AM, Chuck Hill wrote:

Thanks for the information.  I was making it too hard.  I will try  
and find time to take a stab at it.


Cheers!

Chuck


On Aug 22, 2008, at 11:01 AM, Greg Hulands wrote:

I've had success using it in both 3.3 and 3.4. There was nothing  
special to setup... it just worked.


Greg

On 22/08/2008, at 10:58 AM, Chuck Hill wrote:



On Aug 22, 2008, at 6:16 AM, Frédéric JECKER wrote:


Hi folks,

Has anyone succeeded in performing code coverage for a WO app  
using the ECLEmma plugin ?

When I run my tests, the report stays at 0% code coverage.
I also tried Clover from atlassian which gives me good results  
(but which is far overpriced)


Regards

Fred


I took a very brief look at this.  I think that a combined WOLips/ 
ECLEmma Eclipse launcher maybe required.  I have not looked into  
it beyond that.  It does look very interesting.



Chuck

--
Chuck Hill Senior Consultant / VP Development

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/ghulands%40mac.com

This email sent to ghula...@mac.com





--
Chuck Hill Senior Consultant / VP Development

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








--
Chuck Hill Senior Consultant / VP Development

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 arch...@mail-archive.com


Re: What is the official plug-in for OpenBase?

2009-03-24 Thread Ricardo J. Parada


On Mar 24, 2009, at 10:09 PM, Chuck Hill wrote:


/Library/Frameworks/OpenBasePKPlugin.framework


I am not sure about that one.  See if it has Resources/Java/*.jar in  
it.


WO comes with an OpenBase plugin bundled.


Yes it does...

$ ls /Library/Frameworks/OpenBasePKPlugin.framework/Resources/Java/
openbasepkplugin.jar

And that .jar has a single  
com.webobjects.jdbcadaptor.OpenBasePKPlugIn.class file which extends  
the JDBCPlugIn class.


I know that initially my application was generating primary keys using  
the EO_PK_TABLE.  And then I downloaded a newer OpenBaseJDBC.jar many  
months ago and my application started generating primary keys using  
the select NEWID scheme.  But I have never used the  
OpenBasePKPlugin.framework in my classpath following the instructions  
on that page.


But as soon as I did that I started running into a problem right  
away.  I started getting exception fetching EOs that have a java  
enumerated types as one of their properties.  So I removed the  
OpenBasePKPlugin.framework from my classpath and emptied back the  
Plugin text field in the entity modeler.  And as soon as I did that  
the problem went away.


So I'm just back to using just the updated OpenBaseJDBC.jar which  
already does the select NEWID for primary key generation.


I don't think the OpenBasePKPlugin.framework is needed.  That page has  
to be really old.  It still talks about EOModeler.  They need to  
update it to Eclipse/WOLips entity modeler.  :-)


Maybe scott keith will read this email and update that page since I  
had no luck subscribing to the openbase dev list.


 ___
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 arch...@mail-archive.com

Re: ECLEMMA Code coverage tool

2009-03-24 Thread Chuck Hill
OK, it looks like I just had my classpath messed up so it was seeing  
the .jar before the source files.  It seems to just work.  At least  
partially.   Now to get it to do coverage on a web app!


Chuck


On Mar 24, 2009, at 7:34 PM, Chuck Hill wrote:

Finally getting back to this.  Running with TestNG, I don't get any  
coverage data written either.  Greg, were you using it with  
TestNG?I'd like to take a look at making a WO launcher for it so  
that it can be used with Selenium functional tests.


Chuck

On Aug 22, 2008, at 11:04 AM, Chuck Hill wrote:

Thanks for the information.  I was making it too hard.  I will try  
and find time to take a stab at it.


Cheers!

Chuck


On Aug 22, 2008, at 11:01 AM, Greg Hulands wrote:

I've had success using it in both 3.3 and 3.4. There was nothing  
special to setup... it just worked.


Greg

On 22/08/2008, at 10:58 AM, Chuck Hill wrote:



On Aug 22, 2008, at 6:16 AM, Frédéric JECKER wrote:


Hi folks,

Has anyone succeeded in performing code coverage for a WO app  
using the ECLEmma plugin ?

When I run my tests, the report stays at 0% code coverage.
I also tried Clover from atlassian which gives me good results  
(but which is far overpriced)


Regards

Fred


I took a very brief look at this.  I think that a combined WOLips/ 
ECLEmma Eclipse launcher maybe required.  I have not looked into  
it beyond that.  It does look very interesting.



Chuck

--
Chuck Hill Senior Consultant / VP Development

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/ghulands%40mac.com

This email sent to ghula...@mac.com





--
Chuck Hill Senior Consultant / VP Development

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








--
Chuck Hill Senior Consultant / VP Development

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









--
Chuck Hill Senior Consultant / VP Development

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 arch...@mail-archive.com