WebObjects 5.3 and J2SE 5.0

2006-09-26 Thread Michael Scott
Title: WebObjects 5.3 and J2SE 5.0



Does WebObjects work with J2SE 5.0 yet?

I must have missed the announcement!

The last record I have is an announcement on 25 April 2006 that WebObjects is not compatible. But that was 4 months ago, so surely it is compatible by now!

If this is not the case, has anyone heard any rumours?

Michael Scott



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

This email sent to archive@mail-archive.com

Re: addObjectsToBothSide... not really both side

2006-09-26 Thread Zak Burke
Dev WO wrote on 9/25/06 1:26 PM:
 So this one is a oneToOne relationship, with is specified in both
 entities A and B.

[...]

 A and B have a foreign key to each other, but only A gets it... B's
 foreign key stay null.

I think you may not be modeling the relationship correctly. If you
really want a 1-to-1, A and B should share the same primary key and A
should be propagating its primary key to B.

If both tables have their own primary keys, and both have foreign keys
to each other, things don't really stand up from a relational logic
point of view because you actually have two relationships -- A is joined
to B by by A.b_id and B is joined to A by B.a_id.

Assuming that A.setB() is defined in terms of A.b_id, the reason B.a_id
doesn't update is that B.a() is defined by B.a_id but the relationship
you just set is defined by A.b_id. You have two separate relationships
based on two separate keys.

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

This email sent to archive@mail-archive.com


Re: WebObjects 5.3 and J2SE 5.0

2006-09-26 Thread Ian Joyner
I'm using WO 5.3.2 just fine with J2SE 5. However, I have seen no announcements saying that the previous non-compatibility statement has been removed, so it's caveat emptor. Works great with generics.IanOn 26/09/2006, at 4:28 PM, Michael Scott wrote: Does WebObjects work with J2SE 5.0 yet?  I must have missed the announcement!  The last record I have is an announcement on 25 April 2006 that WebObjects is not compatible.  But that was 4 months ago, so surely it is compatible by now!  If this is not the case, has anyone heard any rumours?  Michael Scott ___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/ian.joyner%40sportstec.comThis email sent to [EMAIL PROTECTED]  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: Converting a .strings text file to a NSArray or NSDictionary

2006-09-26 Thread Jan Grathwohl
Hi Xavier,

you could read the content of your InputStream into a String and then use NSPropertyListSerialization to parse that String into a dictionary:

NSDictionary dict = (NSDictionary)NSPropertyListSerialization.propertyListFromString(fileContent);


Jan

Am 26.09.2006 um 12:06 schrieb Dev WO:

Hi:)

I've got a resource in my Framework (text.strings), I know I can access a specific key using WOResourceManager.stringForKey, but I need to create an array of all the key in the file.

I first though I could go through an InputStream like
rm.inputStreamForResourceNamed (text.strings, FrameworkName, null))

but I'm not sure what to do next...

I think I'm probably not going the easiest way. Maybe WOResourceManager already has a feature to get all the key-value in a NSArray or NSDictionary, but I can't find it.

Any pointer is greatly appreciated.

Thanks

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

This email sent to archive@mail-archive.com

Re: Regular v Servlet resource manager use

2006-09-26 Thread Gavin Eadie

... thanks for your suggestion, Kai, however

At 3:06 PM +0300 9/26/06, Kai S. Wong wrote:
In order to be deployment safe (original or servlet), you need to 
use *URL* method to access your resources.
Replace your original method  inputStreamForResourceNamed to 
pathURLForResourceNamed and open the URL stream via  openStream().


... the Javadoc suggests pathURLForResourceNamed is deprecated:

 Although WebObjects makes heavy use of this method internally, it is
  deprecated and inputStreamForResourceNamed or bytesForResourceNamed
  should be prefered when possible

  which is why I used inputStreamForResourceNamed. 
However, the documentation may be wrong - can a spell-checker would 
be in order (preferred) ...



... regardless of that, I changed my code to use pathURLForResourceNamed:

fileName = base- + APP_PROP;
try {
inStream = app.resourceManager().
  pathURLForResourceNamed(fileName, null, null).
  openStream();
p1 = new UMProperties (inStream);
}
catch (IOException x) {
p1 = new UMProperties ();
}

  the result of this is to crash Tomcat!

INFO: Deploying web application archive MarketplaceApp.war
Sep 26, 2006 10:46:30 AM org.apache.catalina.session.StandardManager doLoad
SEVERE: IOException while loading persisted sessions: 
java.io.StreamCorruptedException

java.io.StreamCorruptedException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1326)
	at 
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)



If I comment out the code above the application executes as a 
servlet, then the app fails because it doesn't find the files it 
needs to read; when I restore the above code, Tomcat croaks.


Sadly, in the Apple documentation, there seems to be almost no 
documentation on how to write anything more than a trivial 
application.  If/when I figure this out, I'll write a piece for the 
Wiki.

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

This email sent to archive@mail-archive.com


Re: WOUnit and EOEditingContext not found

2006-09-26 Thread John Larson

Thanks for the feedback.  That makes much more sense.

John

On Sep 25, 2006, at 5:59 PM, Christian Pekeler wrote:

Same here. Each of our projects has a custom utilities framework  
that contains the helper classes and jars used by all the other  
apps and frameworks. junit-4.1.jar and wounittest2.jar are included  
in those utility frameworks. I don't care that the testing jars  
aren't really required at runtime.


Christian


Once again, /Library/Java/Extensions (and that goes double for / 
System/Library/Java/Extensions) are for _extension_ to the core  
Java API.  Like JDBC drivers.  These are _terrible_ places to  
throw random jars.  Doing so can (and I suspect you found out)  
cause class loader issues.


For WebObjects specific stuff, you can put it in /Library/ 
WebObjects/Extensions.  I am not sure if that is the place for  
WOUnit.  Otherwise, I usually build it into a framework and  
include that.


Right before I got your e-mail I found that I really wasn't  
keeping the wounittest jar in the right place.  I had it in / 
system/library/java/extensions folder with all the other  
extensions.  I moved it into eclipse/plug-ins and it worked.  I  
have a feeling that I really am not keeping it in the right place  
there either.  Where should I keep it to be like everyone  
else?  It works now, but I feel like that's not right since it's  
really not an eclipse plug-in.


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


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Re: Regular v Servlet resource manager use

2006-09-26 Thread Gavin Eadie

... thanks for your suggestion, Kai, however

At 3:06 PM +0300 9/26/06, Kai S. Wong wrote:
In order to be deployment safe (original or servlet), you need to 
use *URL* method to access your resources.
Replace your original method  inputStreamForResourceNamed to 
pathURLForResourceNamed and open the URL stream via  openStream().


FOLLOW UP from last message

  the problem is that pathURLForResourceNamed(xx, null, null) 
doesn't find the Resource either so it returns null.  Then I try and 
open a stream on null and poof!  My catch clause was only for 
IOException -- silly me.



... but the original question is now back again.

Is there a different way to use resourceManager in a servlet than 
in a regular application.  I'm using XCode 2.4, WO 5.2.4, Mac OS X 
10.4.7, Java 1.5 (with target and source @ 1.4), and Tomcat 5.5.17. 
I'm creating a 'stub' war file - that means all the executable code 
is where it would be for a regular application and and the web.xml 
file says so -- app.woa lives in /Lib/WO/Apps/, frameworks are in 
/Lib/Fwks/, app.war is in Tomcat/webapps

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

This email sent to archive@mail-archive.com


Converting a .strings text file to a NSArray or NSDictionary

2006-09-26 Thread Dev WO
Hi:)I've got a resource in my Framework (text.strings), I know I can access a specific key using WOResourceManager.stringForKey, but I need to create an array of all the key in the file.I first though I could go through an InputStream likerm.inputStreamForResourceNamed ("text.strings", FrameworkName, null))but I'm not sure what to do next...I think I'm probably not going the easiest way. Maybe WOResourceManager already has a feature to get all the key-value in a NSArray or NSDictionary, but I can't find it.Any pointer is greatly appreciated.ThanksXavier ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: Regular v Servlet resource manager use

2006-09-26 Thread Chuck Hill

Hi Gavin,

First off, I know Jacques Schmidt about servlet deployment so this  
may be useless information.  :-)


This resource location is very dependent on paths.  For a regular WO  
app, if the current working directory is not the .woa directory,  
resources will not be found.  I expect something similar applies to  
servlet deployment.  Check and see if there is an option for changing  
the current working directory or things like that.


Chuck

On Sep 26, 2006, at 8:17 AM, Gavin Eadie wrote:


... thanks for your suggestion, Kai, however

At 3:06 PM +0300 9/26/06, Kai S. Wong wrote:
In order to be deployment safe (original or servlet), you need to  
use *URL* method to access your resources.
Replace your original method  inputStreamForResourceNamed to  
pathURLForResourceNamed and open the URL stream via  openStream().


FOLLOW UP from last message

  the problem is that pathURLForResourceNamed(xx, null, null)  
doesn't find the Resource either so it returns null.  Then I try  
and open a stream on null and poof!  My catch clause was only for  
IOException -- silly me.



... but the original question is now back again.

Is there a different way to use resourceManager in a servlet  
than in a regular application.  I'm using XCode 2.4, WO 5.2.4, Mac  
OS X 10.4.7, Java 1.5 (with target and source @ 1.4), and Tomcat  
5.5.17. I'm creating a 'stub' war file - that means all the  
executable code is where it would be for a regular application and  
and the web.xml file says so -- app.woa lives in /Lib/WO/Apps/,  
frameworks are in /Lib/Fwks/, app.war is in Tomcat/webapps

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


This email sent to [EMAIL PROTECTED]



--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.http://www.global-village.net/products/practical_webobjects






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

This email sent to archive@mail-archive.com


Re: Help - Relationships, Bindings, w/Full Text Search

2006-09-26 Thread Chuck Hill

Hi Drew,

On Sep 25, 2006, at 7:56 PM, Drew Thoeni wrote:

On Sep 25, 2006, at 5:21 PM, Chuck Hill wrote:

On Sep 24, 2006, at 8:18 AM, Drew Thoeni wrote:

I'm using Frontbase's full text index to successfully return  
rows. The main goal is to allow users to search large-full text  
columns, returning enterprise objects. I have broken this into  
three specific requirements as I can't seem to fulfill more than  
two, regardless of approach.


1) Search for strings in a large text column using Frontbase's  
full text index (requires SQL such as ...where SATISFIES 
(full_text_index, search_string)
2) Allow user input and pass this as a parameter to the fileSpec  
for a query.
3) Create or return EOs so as to have relationship information so  
as to provide key value coding to related tables.


It seems I'm missing something as I can only meet two of the  
three above at a time. Here are the options performed so far:


A) Using rawRowsForSQL I can do 1 and 2 above. I have converted  
the results into enterprise objects but do not know how to  
perform an addObjectToBothSidesOfRelationshipWithKey which would  
allow access to related objects (such as code tables).


I am not following what your problem here is.  If you have an eo  
as converted from (1) and (2) why can you not do  
eo.addObjectToBothSidesOfRelationshipWithKey(tag, tag)?


Yep. A fair point and there's a good chance I'm looking at this  
cockeyed. A more detailed explanation: I'm pulling back Report rows  
using rawSQL. Once I get the rows back, I'm iterating through,  
creating Report objects and setting their values based on data  
retrieved in the SQL query.


OK, that sounds really wrong.


I then add these all to an array and can display them nicely in a  
WORep


I am not pulling back object IDs (primary and foreign keys) in the  
SQL query because the OIDs are not part of the EOModel;


Surely the OIDs are part of the EOModel.  I will assume that you mean  
they are not class properties of the entities, but that they are  
defined in the EOModel.  Otherwise, I can't see how EOF could work.


So, as they are part of the EOModel, you _can_ pull back the values  
using your rawRowsForSQL.  So what you want to do is to pull back the  
OID, and then use EOUtilities.objectFromRawRow to convert raw rows  
into EOs.  Note that any data you pull back with the rawRowsForSQL  
will _not_ be used by objectFromRawRow.  So, unless you need to  
display some of that information before converting raw rows into EOs,  
you can make it more efficient by just selecting the OID. What is  
usually done is to select some of the data and the OID and display  
the partial data.  Once the user indicates which rows will be used in  
a process, turn those rows into EOs.


One potential issue with this is that objectFromRawRow works on one  
EO at a time, so for large numbers of EOs, that is a lot of trips to  
the database.  IIRC, you can construct a manual array fault and have  
EOF fetch them all in at once, though I don't recall the methods at  
the moment.  Let me know if you need this.


Chuck


I can't set their values. So, given my knowledge (admittedly  
limited), I don't have foreign keys in Report with which I could  
addObjectToBothSidesOfRelationshipWithKey.


If I had these as complete objects I'd do as you suggest  
aReport.addObjectToBothSidesOfRelationshipWithKey( aCompetitor,  
toCompetitor) and that would work great.


I'm sure there's some way of accomplishing this that I have not  
considered. I've checked this list, Frontbase's list, and Practical  
WebObjects. Perhaps I'm looking for the wrong things.








B) Using objectsWithFetchSpecificationAndBindings I can do 2 and  
3 above. But EOModeler does not allow the SATISFIES term, even  
when typing it into the fetchSepc in Use Raw SQL Expression.


You would need to extend EOF to do that.  Pierre Bernard's  
qualifiers would be the place to start for this.





C) Using a stored procedure I can do 1 and 3 above. However, I do  
not see a way of passing a user-defined search into the store  
procedure from WebObjects.


No ideas on that.


Perhaps there is a much better and non-database specific way to  
quickly search large text fields with features such a stemming,  
wildcards, etc.


For a non-database specific way, see http://lucene.apache.org/   
The basic idea is much like handling the rawsRowsFromSQL result:  
you index the text and store the entity name and PK with the  
text.  Do a Lucene search, and convert the entity name and PK back  
into an EO.  It takes a while to wrap your head around it.



Chuck

--

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












--

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

Re: constructing a url...

2006-09-26 Thread James Cicenia
I display JFreeChart graphs all the time. In this particular graph, a  
bubble graph, I need to popup a window with the project.

Everything is HTML with an image map.

The way jFreeChart renders it, it calls a method to create the  
imagemap urls. I can control that and have wonderfully with
a DirectAction. What I am trying to do instead.. I can pass the  
context to that aforementioned class, is to somehow create
a component action url with just passing it the context and I guess  
the project EO. At that point I am a bit lost on how to

create the URL that can actually reference the project.

Thanks
James

On Sep 25, 2006, at 3:14 PM, Sam Barnum wrote:

So the actual JFreeChart graph is not displayed in an HTML page,  
but as a swing component, correct?


I think you're probably going to need to go with DirectActions.   
Because component actions depend on a context object.  That, or  
you'll need to pass in the WOContext (or a context ID) to the  
JFreeChart, then during invokeAction check to see if the context  
matches the one in the request URL.


On Sep 23, 2006, at 8:01 AM, James Cicenia wrote:


See below:

On Sep 22, 2006, at 3:28 PM, Chuck Hill wrote:



On Sep 21, 2006, at 7:26 PM, James Cicenia wrote:


Chuck -

I have been reading and re-reading that section. And, I still  
can't seem to grasp one
fundamental issue and that is how I am to relate my current  
EOObject to the action.


Each bubble on my graph is a project. Clicking on a bubble  
popups the project window.

So...


They are in a WORepetition, right?


No... jFreeChart when it renders its graphic has its own classes  
to render the associated URL while it does that.
So I can give it a context and any text.. probably pass it an eo  
too. That is about it.


Do I have to create and insert context.elementIDs through each  
iteration jFreeChart does?


confused.

James








I can see how to construct the URL, even invoke an action,  
however, I am still mystified
about how it is to know what object the URL is referring too.  
Does this make sense?


All that you can know is that the URL is for the current item in  
the repetition.  The URL is not for a specific object, just for a  
specific place in the iteration through the tree of WOElements.   
So in your invokeAction method, when context.senderID().equals 
(context.elementID()) then whatever is bound to the 'item' of the  
WORepetition has the correct Project to popup a window for.


I am also not clear on why you don't just use a WOHyperlink for  
this.



Chuck





On Sep 20, 2006, at 11:58 AM, Chuck Hill wrote:


Hi James,


On Sep 19, 2006, at 6:58 PM, James Cicenia wrote:


I need to construct a componentActionURL vs a directActionURL.

Basically I am using jfreeChart and need to create a popup of  
an object.
I can make it work great with direct actions however, for  
reasons unimportant here,

I need a componentActionURL.

My question I think is how to set the action for  
WOContext.componentActionURL?


I think you are thinking about this backwards.  The frameworks  
compute the URL based on where in the tree of WOElements it  
is.  You don't set the action.  The question to ask is, How do  
I know if the incoming action is for me?  The answer is to  
check if context.senderID().equals(context.elementID()).  See  
page 181




--

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/sam% 
40360works.com


This email sent to [EMAIL PROTECTED]


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


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Re: constructing a url...

2006-09-26 Thread Chuck Hill


On Sep 23, 2006, at 8:01 AM, James Cicenia wrote:

On Sep 22, 2006, at 3:28 PM, Chuck Hill wrote:

On Sep 21, 2006, at 7:26 PM, James Cicenia wrote:


Chuck -

I have been reading and re-reading that section. And, I still  
can't seem to grasp one
fundamental issue and that is how I am to relate my current  
EOObject to the action.


Each bubble on my graph is a project. Clicking on a bubble popups  
the project window.

So...


They are in a WORepetition, right?


No... jFreeChart when it renders its graphic has its own classes to  
render the associated URL while it does that.
So I can give it a context and any text.. probably pass it an eo  
too. That is about it.


Do I have to create and insert context.elementIDs through each  
iteration jFreeChart does?


confused.


Yeah, me too!  :-)  In that case, I think that what you want is to do  
is to create the URL once and append something like ?projectID=123 to  
it.  Then, in the action method, get the projectID form value, use  
EOUtilities.objectWithPrimaryKeyValue to convert 123 to an Project  
EO, then return a page showing that.  It will be similar to a direct  
action with a query string / parameter, but it will hit an action  
method instead of a direct action.  Does that make sense?  Will that  
work with jFreeChart (I have never used that)?


Chuck




I can see how to construct the URL, even invoke an action,  
however, I am still mystified
about how it is to know what object the URL is referring too.  
Does this make sense?


All that you can know is that the URL is for the current item in  
the repetition.  The URL is not for a specific object, just for a  
specific place in the iteration through the tree of WOElements.   
So in your invokeAction method, when context.senderID().equals 
(context.elementID()) then whatever is bound to the 'item' of the  
WORepetition has the correct Project to popup a window for.


I am also not clear on why you don't just use a WOHyperlink for this.


Chuck





On Sep 20, 2006, at 11:58 AM, Chuck Hill wrote:


Hi James,


On Sep 19, 2006, at 6:58 PM, James Cicenia wrote:


I need to construct a componentActionURL vs a directActionURL.

Basically I am using jfreeChart and need to create a popup of  
an object.
I can make it work great with direct actions however, for  
reasons unimportant here,

I need a componentActionURL.

My question I think is how to set the action for  
WOContext.componentActionURL?


I think you are thinking about this backwards.  The frameworks  
compute the URL based on where in the tree of WOElements it is.   
You don't set the action.  The question to ask is, How do I  
know if the incoming action is for me?  The answer is to check  
if context.senderID().equals(context.elementID()).  See page 181




--

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











--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.http://www.global-village.net/products/practical_webobjects






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

This email sent to archive@mail-archive.com


Start up problems

2006-09-26 Thread Gino Pacitti

Hi All

Can anyone help to debug this problem I am having.

I built an app using WO5.3 and deployed on a server with 5.2  
installed and it all worked fine.


Now I am trying to deploy on a 5.3 Tiger server and I get this error  
message in the log:


at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.webobjects.appserver.WOApplication.main 
(WOApplication.java:323)

at Application.main(Application.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects._bootstrap.WOBootstrap.main 
(WOBootstrap.java:71)


Any ideas?

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

This email sent to archive@mail-archive.com


Re: constructing a url...

2006-09-26 Thread James Cicenia

OK --

Here is the real problem

I need for the popup page to know the parent page so that javascript  
can do its magic. If I use a DA then there is really no parent page  
while a component action gives you the parent page.

Maybe what you suggest will work then. I will try that tonight.

James

On Sep 26, 2006, at 12:16 PM, Chuck Hill wrote:



On Sep 23, 2006, at 8:01 AM, James Cicenia wrote:

On Sep 22, 2006, at 3:28 PM, Chuck Hill wrote:

On Sep 21, 2006, at 7:26 PM, James Cicenia wrote:


Chuck -

I have been reading and re-reading that section. And, I still  
can't seem to grasp one
fundamental issue and that is how I am to relate my current  
EOObject to the action.


Each bubble on my graph is a project. Clicking on a bubble  
popups the project window.

So...


They are in a WORepetition, right?


No... jFreeChart when it renders its graphic has its own classes  
to render the associated URL while it does that.
So I can give it a context and any text.. probably pass it an eo  
too. That is about it.


Do I have to create and insert context.elementIDs through each  
iteration jFreeChart does?


confused.


Yeah, me too!  :-)  In that case, I think that what you want is to  
do is to create the URL once and append something like ? 
projectID=123 to it.  Then, in the action method, get the projectID  
form value, use EOUtilities.objectWithPrimaryKeyValue to convert  
123 to an Project EO, then return a page showing that.  It will be  
similar to a direct action with a query string / parameter, but it  
will hit an action method instead of a direct action.  Does that  
make sense?  Will that work with jFreeChart (I have never used that)?


Chuck




I can see how to construct the URL, even invoke an action,  
however, I am still mystified
about how it is to know what object the URL is referring too.  
Does this make sense?


All that you can know is that the URL is for the current item in  
the repetition.  The URL is not for a specific object, just for a  
specific place in the iteration through the tree of WOElements.   
So in your invokeAction method, when context.senderID().equals 
(context.elementID()) then whatever is bound to the 'item' of the  
WORepetition has the correct Project to popup a window for.


I am also not clear on why you don't just use a WOHyperlink for  
this.



Chuck





On Sep 20, 2006, at 11:58 AM, Chuck Hill wrote:


Hi James,


On Sep 19, 2006, at 6:58 PM, James Cicenia wrote:


I need to construct a componentActionURL vs a directActionURL.

Basically I am using jfreeChart and need to create a popup of  
an object.
I can make it work great with direct actions however, for  
reasons unimportant here,

I need a componentActionURL.

My question I think is how to set the action for  
WOContext.componentActionURL?


I think you are thinking about this backwards.  The frameworks  
compute the URL based on where in the tree of WOElements it  
is.  You don't set the action.  The question to ask is, How do  
I know if the incoming action is for me?  The answer is to  
check if context.senderID().equals(context.elementID()).  See  
page 181




--

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











--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.http://www.global-village.net/products/ 
practical_webobjects








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

This email sent to archive@mail-archive.com


Re: addObjectsToBothSide... not really both side

2006-09-26 Thread Dev WO

Hi zak,

Dev WO wrote on 9/25/06 1:26 PM:

So this one is a oneToOne relationship, with is specified in both
entities A and B.


[...]


A and B have a foreign key to each other, but only A gets it... B's
foreign key stay null.


I think you may not be modeling the relationship correctly. If you
really want a 1-to-1, A and B should share the same primary key and A
should be propagating its primary key to B.

If both tables have their own primary keys, and both have foreign keys
to each other, things don't really stand up from a relational logic
point of view because you actually have two relationships -- A is  
joined

to B by by A.b_id and B is joined to A by B.a_id.

Assuming that A.setB() is defined in terms of A.b_id, the reason  
B.a_id

doesn't update is that B.a() is defined by B.a_id but the relationship
you just set is defined by A.b_id. You have two separate relationships
based on two separate keys.


HUU I feel stupid...not the first time though, and probably not  
the last one too;)


In my case, B can exist alone (without any A to relating to it), but  
A cannot exist alone, it must be linked to a B.


Does this change anything?
I'll try to make the relationship between pks.

Thanks:)

Xavier

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

This email sent to archive@mail-archive.com


Re: addObjectsToBothSide... not really both side

2006-09-26 Thread Ken Anderson

You really need to set both directions - EOF will not do it for you.

On Sep 26, 2006, at 3:38 PM, Dev WO wrote:


Hi zak,

Dev WO wrote on 9/25/06 1:26 PM:

So this one is a oneToOne relationship, with is specified in both
entities A and B.


[...]


A and B have a foreign key to each other, but only A gets it... B's
foreign key stay null.


I think you may not be modeling the relationship correctly. If you
really want a 1-to-1, A and B should share the same primary key and A
should be propagating its primary key to B.

If both tables have their own primary keys, and both have foreign  
keys

to each other, things don't really stand up from a relational logic
point of view because you actually have two relationships -- A is  
joined

to B by by A.b_id and B is joined to A by B.a_id.

Assuming that A.setB() is defined in terms of A.b_id, the reason  
B.a_id
doesn't update is that B.a() is defined by B.a_id but the  
relationship
you just set is defined by A.b_id. You have two separate  
relationships

based on two separate keys.


HUU I feel stupid...not the first time though, and probably not  
the last one too;)


In my case, B can exist alone (without any A to relating to it),  
but A cannot exist alone, it must be linked to a B.


Does this change anything?
I'll try to make the relationship between pks.

Thanks:)

Xavier

___
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/lists% 
40anderhome.com


This email sent to [EMAIL PROTECTED]


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

This email sent to archive@mail-archive.com


Re: Start up problems

2006-09-26 Thread Chuck Hill


On Sep 26, 2006, at 12:16 PM, Gino Pacitti wrote:


Hi All

Can anyone help to debug this problem I am having.

I built an app using WO5.3 and deployed on a server with 5.2  
installed and it all worked fine.


Now I am trying to deploy on a 5.3 Tiger server and I get this  
error message in the log:


Looks like something is missing here.  Probably a  
ClassNotFoundError.  Maybe something missing from /Library/Java/ 
Extensions or /Library/WebObjects/Extensions?


Chuck



at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.webobjects.appserver.WOApplication.main 
(WOApplication.java:323)

at Application.main(Application.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)
at com.webobjects._bootstrap.WOBootstrap.main 
(WOBootstrap.java:71)


Any ideas?

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


This email sent to [EMAIL PROTECTED]



--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.http://www.global-village.net/products/practical_webobjects






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

This email sent to archive@mail-archive.com


Re: Help - Relationships, Bindings, w/Full Text Search

2006-09-26 Thread Paul Lynch

On 26 Sep 2006, at 18:10, Chuck Hill wrote:


On Sep 25, 2006, at 7:56 PM, Drew Thoeni wrote:
I am not pulling back object IDs (primary and foreign keys) in the  
SQL query because the OIDs are not part of the EOModel;


Surely the OIDs are part of the EOModel.  I will assume that you  
mean they are not class properties of the entities, but that they  
are defined in the EOModel.  Otherwise, I can't see how EOF could  
work.


I read the original post as saying that the table, which seems to be  
in a legacy database, has primary keys, but he hasn't included them  
in the eomodel as they aren't used in his app (yes, I see the problem  
here).  Presumably he has marked some other unique attributes as the  
primary keys.


I hope I am wrong in my interpretation :-).

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

This email sent to archive@mail-archive.com


Re: constructing a url...

2006-09-26 Thread Chuck Hill


On Sep 26, 2006, at 12:22 PM, James Cicenia wrote:


OK --

Here is the real problem

I need for the popup page to know the parent page so that  
javascript can do its magic.


You mean in Java in your WO app, or in JavaScript in the browser?   
What exactly do you need.




If I use a DA then there is really no parent page while a component  
action gives you the parent page.

Maybe what you suggest will work then. I will try that tonight.


I am confused as to what you are referring to as the parent page in a  
component action.


Chuck



On Sep 26, 2006, at 12:16 PM, Chuck Hill wrote:



On Sep 23, 2006, at 8:01 AM, James Cicenia wrote:

On Sep 22, 2006, at 3:28 PM, Chuck Hill wrote:

On Sep 21, 2006, at 7:26 PM, James Cicenia wrote:


Chuck -

I have been reading and re-reading that section. And, I still  
can't seem to grasp one
fundamental issue and that is how I am to relate my current  
EOObject to the action.


Each bubble on my graph is a project. Clicking on a bubble  
popups the project window.

So...


They are in a WORepetition, right?


No... jFreeChart when it renders its graphic has its own classes  
to render the associated URL while it does that.
So I can give it a context and any text.. probably pass it an eo  
too. That is about it.


Do I have to create and insert context.elementIDs through each  
iteration jFreeChart does?


confused.


Yeah, me too!  :-)  In that case, I think that what you want is to  
do is to create the URL once and append something like ? 
projectID=123 to it.  Then, in the action method, get the  
projectID form value, use EOUtilities.objectWithPrimaryKeyValue to  
convert 123 to an Project EO, then return a page showing that.  It  
will be similar to a direct action with a query string /  
parameter, but it will hit an action method instead of a direct  
action.  Does that make sense?  Will that work with jFreeChart (I  
have never used that)?


Chuck




I can see how to construct the URL, even invoke an action,  
however, I am still mystified
about how it is to know what object the URL is referring too.  
Does this make sense?


All that you can know is that the URL is for the current item in  
the repetition.  The URL is not for a specific object, just for  
a specific place in the iteration through the tree of  
WOElements.  So in your invokeAction method, when  
context.senderID().equals(context.elementID()) then whatever is  
bound to the 'item' of the WORepetition has the correct Project  
to popup a window for.


I am also not clear on why you don't just use a WOHyperlink for  
this.



Chuck





On Sep 20, 2006, at 11:58 AM, Chuck Hill wrote:


Hi James,


On Sep 19, 2006, at 6:58 PM, James Cicenia wrote:


I need to construct a componentActionURL vs a directActionURL.

Basically I am using jfreeChart and need to create a popup of  
an object.
I can make it work great with direct actions however, for  
reasons unimportant here,

I need a componentActionURL.

My question I think is how to set the action for  
WOContext.componentActionURL?


I think you are thinking about this backwards.  The frameworks  
compute the URL based on where in the tree of WOElements it  
is.  You don't set the action.  The question to ask is, How  
do I know if the incoming action is for me?  The answer is to  
check if context.senderID().equals(context.elementID()).  See  
page 181




--

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











--

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











--

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.http://www.global-village.net/products/practical_webobjects






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

This email sent to archive@mail-archive.com


Re: addObjectsToBothSide... not really both side

2006-09-26 Thread Dev WO

I've setup my onetoone on both pk and everything is good:)

Thanks a lot:)

I'll wait for tomorrow for the next question;)


Xavier


You really need to set both directions - EOF will not do it for you.

On Sep 26, 2006, at 3:38 PM, Dev WO wrote:


Hi zak,

Dev WO wrote on 9/25/06 1:26 PM:

So this one is a oneToOne relationship, with is specified in both
entities A and B.


[...]


A and B have a foreign key to each other, but only A gets it... B's
foreign key stay null.


I think you may not be modeling the relationship correctly. If you
really want a 1-to-1, A and B should share the same primary key  
and A

should be propagating its primary key to B.

If both tables have their own primary keys, and both have foreign  
keys

to each other, things don't really stand up from a relational logic
point of view because you actually have two relationships -- A is  
joined

to B by by A.b_id and B is joined to A by B.a_id.

Assuming that A.setB() is defined in terms of A.b_id, the reason  
B.a_id
doesn't update is that B.a() is defined by B.a_id but the  
relationship
you just set is defined by A.b_id. You have two separate  
relationships

based on two separate keys.


HUU I feel stupid...not the first time though, and probably  
not the last one too;)


In my case, B can exist alone (without any A to relating to it),  
but A cannot exist alone, it must be linked to a B.


Does this change anything?
I'll try to make the relationship between pks.

Thanks:)

Xavier

___
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/lists% 
40anderhome.com


This email sent to [EMAIL PROTECTED]





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

This email sent to archive@mail-archive.com


problem generating pdf using apache FOP

2006-09-26 Thread Amedeo Mantica

Dear WebObjects collegues,

I tried everithing, but I get strings such \000d instead if  
carriage return in generated pdf files.


I followed the Practical WeboOjects XML output Chapter (Generating  
PDF from XML)


Any suggestion?

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

This email sent to archive@mail-archive.com


Re: constructing a url...

2006-09-26 Thread James Cicenia

I know this is confusing

My app has a lot of popups. Not my design whereby when a person  
edits something
in the popup and then hits save and then close and refresh I  
automatically submit
the originating page. This has worked great. However with  
DirectActions this does not
work. Only with component actions. I think because the DAs seem like  
just a link and don't

have a real originating page... at least to the javascript.

It is a real pain of the arse interface but that is what the client  
wanted and I made it work.


Except for this subtle issue. However, I hope your other method will  
work.. I will report

back tomorrow.

Thanks again,
James



On Sep 26, 2006, at 4:03 PM, Chuck Hill wrote:



On Sep 26, 2006, at 12:22 PM, James Cicenia wrote:


OK --

Here is the real problem

I need for the popup page to know the parent page so that  
javascript can do its magic.


You mean in Java in your WO app, or in JavaScript in the browser?   
What exactly do you need.




If I use a DA then there is really no parent page while a  
component action gives you the parent page.

Maybe what you suggest will work then. I will try that tonight.


I am confused as to what you are referring to as the parent page in  
a component action.


Chuck



On Sep 26, 2006, at 12:16 PM, Chuck Hill wrote:



On Sep 23, 2006, at 8:01 AM, James Cicenia wrote:

On Sep 22, 2006, at 3:28 PM, Chuck Hill wrote:

On Sep 21, 2006, at 7:26 PM, James Cicenia wrote:


Chuck -

I have been reading and re-reading that section. And, I still  
can't seem to grasp one
fundamental issue and that is how I am to relate my current  
EOObject to the action.


Each bubble on my graph is a project. Clicking on a bubble  
popups the project window.

So...


They are in a WORepetition, right?


No... jFreeChart when it renders its graphic has its own classes  
to render the associated URL while it does that.
So I can give it a context and any text.. probably pass it an eo  
too. That is about it.


Do I have to create and insert context.elementIDs through each  
iteration jFreeChart does?


confused.


Yeah, me too!  :-)  In that case, I think that what you want is  
to do is to create the URL once and append something like ? 
projectID=123 to it.  Then, in the action method, get the  
projectID form value, use EOUtilities.objectWithPrimaryKeyValue  
to convert 123 to an Project EO, then return a page showing  
that.  It will be similar to a direct action with a query  
string / parameter, but it will hit an action method instead of a  
direct action.  Does that make sense?  Will that work with  
jFreeChart (I have never used that)?


Chuck




I can see how to construct the URL, even invoke an action,  
however, I am still mystified
about how it is to know what object the URL is referring too.  
Does this make sense?


All that you can know is that the URL is for the current item  
in the repetition.  The URL is not for a specific object, just  
for a specific place in the iteration through the tree of  
WOElements.  So in your invokeAction method, when  
context.senderID().equals(context.elementID()) then whatever is  
bound to the 'item' of the WORepetition has the correct Project  
to popup a window for.


I am also not clear on why you don't just use a WOHyperlink for  
this.



Chuck





On Sep 20, 2006, at 11:58 AM, Chuck Hill wrote:


Hi James,


On Sep 19, 2006, at 6:58 PM, James Cicenia wrote:


I need to construct a componentActionURL vs a directActionURL.

Basically I am using jfreeChart and need to create a popup  
of an object.
I can make it work great with direct actions however, for  
reasons unimportant here,

I need a componentActionURL.

My question I think is how to set the action for  
WOContext.componentActionURL?


I think you are thinking about this backwards.  The  
frameworks compute the URL based on where in the tree of  
WOElements it is.  You don't set the action.  The question to  
ask is, How do I know if the incoming action is for me?   
The answer is to check if context.senderID().equals 
(context.elementID()).  See page 181




--

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











--

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











--

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 

Re: Help - Relationships, Bindings, w/Full Text Search

2006-09-26 Thread Drew Thoeni

Chuck,

Thanks for the pointers (again). You are correct. I do, of course,  
have OIDs in the EOModel. I misspoke on that point. I am not, as you  
pointed out, including them in the class properties. The  
objectFromRawRow is the perfect solution for my problem as the user  
does not bring back many rows at all in the query. I appreciate the  
help.


Regards,

Drew


On Sep 26, 2006, at 1:10 PM, Chuck Hill wrote:


Hi Drew,

On Sep 25, 2006, at 7:56 PM, Drew Thoeni wrote:

On Sep 25, 2006, at 5:21 PM, Chuck Hill wrote:

On Sep 24, 2006, at 8:18 AM, Drew Thoeni wrote:

I'm using Frontbase's full text index to successfully return  
rows. The main goal is to allow users to search large-full text  
columns, returning enterprise objects. I have broken this into  
three specific requirements as I can't seem to fulfill more than  
two, regardless of approach.


1) Search for strings in a large text column using Frontbase's  
full text index (requires SQL such as ...where SATISFIES 
(full_text_index, search_string)
2) Allow user input and pass this as a parameter to the fileSpec  
for a query.
3) Create or return EOs so as to have relationship information  
so as to provide key value coding to related tables.


It seems I'm missing something as I can only meet two of the  
three above at a time. Here are the options performed so far:


A) Using rawRowsForSQL I can do 1 and 2 above. I have converted  
the results into enterprise objects but do not know how to  
perform an addObjectToBothSidesOfRelationshipWithKey which would  
allow access to related objects (such as code tables).


I am not following what your problem here is.  If you have an eo  
as converted from (1) and (2) why can you not do  
eo.addObjectToBothSidesOfRelationshipWithKey(tag, tag)?


Yep. A fair point and there's a good chance I'm looking at this  
cockeyed. A more detailed explanation: I'm pulling back Report  
rows using rawSQL. Once I get the rows back, I'm iterating  
through, creating Report objects and setting their values based on  
data retrieved in the SQL query.


OK, that sounds really wrong.


I then add these all to an array and can display them nicely in a  
WORep


I am not pulling back object IDs (primary and foreign keys) in the  
SQL query because the OIDs are not part of the EOModel;


Surely the OIDs are part of the EOModel.  I will assume that you  
mean they are not class properties of the entities, but that they  
are defined in the EOModel.  Otherwise, I can't see how EOF could  
work.


So, as they are part of the EOModel, you _can_ pull back the values  
using your rawRowsForSQL.  So what you want to do is to pull back  
the OID, and then use EOUtilities.objectFromRawRow to convert raw  
rows into EOs.  Note that any data you pull back with the  
rawRowsForSQL will _not_ be used by objectFromRawRow.  So, unless  
you need to display some of that information before converting raw  
rows into EOs, you can make it more efficient by just selecting the  
OID. What is usually done is to select some of the data and the OID  
and display the partial data.  Once the user indicates which rows  
will be used in a process, turn those rows into EOs.


One potential issue with this is that objectFromRawRow works on one  
EO at a time, so for large numbers of EOs, that is a lot of trips  
to the database.  IIRC, you can construct a manual array fault and  
have EOF fetch them all in at once, though I don't recall the  
methods at the moment.  Let me know if you need this.


Chuck


I can't set their values. So, given my knowledge (admittedly  
limited), I don't have foreign keys in Report with which I could  
addObjectToBothSidesOfRelationshipWithKey.


If I had these as complete objects I'd do as you suggest  
aReport.addObjectToBothSidesOfRelationshipWithKey( aCompetitor,  
toCompetitor) and that would work great.


I'm sure there's some way of accomplishing this that I have not  
considered. I've checked this list, Frontbase's list, and  
Practical WebObjects. Perhaps I'm looking for the wrong things.








B) Using objectsWithFetchSpecificationAndBindings I can do 2 and  
3 above. But EOModeler does not allow the SATISFIES term, even  
when typing it into the fetchSepc in Use Raw SQL Expression.


You would need to extend EOF to do that.  Pierre Bernard's  
qualifiers would be the place to start for this.





C) Using a stored procedure I can do 1 and 3 above. However, I  
do not see a way of passing a user-defined search into the store  
procedure from WebObjects.


No ideas on that.


Perhaps there is a much better and non-database specific way to  
quickly search large text fields with features such a stemming,  
wildcards, etc.


For a non-database specific way, see http://lucene.apache.org/   
The basic idea is much like handling the rawsRowsFromSQL result:  
you index the text and store the entity name and PK with the  
text.  Do a Lucene search, and convert the entity name and PK  
back into an EO.  It takes a 

Re: constructing a url...

2006-09-26 Thread Mark Morris

James,

I've done something similar to this, but quite a few years ago.  I  
haven't followed this whole thread, but maybe the same concept will  
work for you.


I created a ClosePopUpPage component that I would call from my pop  
up page submit action.  (So right off the bat, any changes in the pop- 
up page are processed.)


When the ClosePopUpPage loads, the javascript in the onLoad does  
something like (this is from memory)


window.opener.submitFromPopUpForm.submit(); window.close();

This relied on an informal interface that the form to be submitted  
on the main window had a certain name.  And you needed to make sure  
the resulting action didn't do anything unexpected.  But the end  
result is that the changes in the pop-up were reflected in the  
refreshed main page.


Hope this can help in your situation.

Regards,
Mark

On Sep 26, 2006, at 5:20 PM, James Cicenia wrote:


I know this is confusing

My app has a lot of popups. Not my design whereby when a person  
edits something
in the popup and then hits save and then close and refresh I  
automatically submit
the originating page. This has worked great. However with  
DirectActions this does not
work. Only with component actions. I think because the DAs seem  
like just a link and don't

have a real originating page... at least to the javascript.

It is a real pain of the arse interface but that is what the client  
wanted and I made it work.


Except for this subtle issue. However, I hope your other method  
will work.. I will report

back tomorrow.

Thanks again,
James



On Sep 26, 2006, at 4:03 PM, Chuck Hill wrote:



On Sep 26, 2006, at 12:22 PM, James Cicenia wrote:


OK --

Here is the real problem

I need for the popup page to know the parent page so that  
javascript can do its magic.


You mean in Java in your WO app, or in JavaScript in the browser?   
What exactly do you need.




If I use a DA then there is really no parent page while a  
component action gives you the parent page.

Maybe what you suggest will work then. I will try that tonight.


I am confused as to what you are referring to as the parent page  
in a component action.


Chuck



On Sep 26, 2006, at 12:16 PM, Chuck Hill wrote:



On Sep 23, 2006, at 8:01 AM, James Cicenia wrote:

On Sep 22, 2006, at 3:28 PM, Chuck Hill wrote:

On Sep 21, 2006, at 7:26 PM, James Cicenia wrote:


Chuck -

I have been reading and re-reading that section. And, I still  
can't seem to grasp one
fundamental issue and that is how I am to relate my current  
EOObject to the action.


Each bubble on my graph is a project. Clicking on a bubble  
popups the project window.

So...


They are in a WORepetition, right?


No... jFreeChart when it renders its graphic has its own  
classes to render the associated URL while it does that.
So I can give it a context and any text.. probably pass it an  
eo too. That is about it.


Do I have to create and insert context.elementIDs through each  
iteration jFreeChart does?


confused.


Yeah, me too!  :-)  In that case, I think that what you want is  
to do is to create the URL once and append something like ? 
projectID=123 to it.  Then, in the action method, get the  
projectID form value, use EOUtilities.objectWithPrimaryKeyValue  
to convert 123 to an Project EO, then return a page showing  
that.  It will be similar to a direct action with a query  
string / parameter, but it will hit an action method instead of  
a direct action.  Does that make sense?  Will that work with  
jFreeChart (I have never used that)?


Chuck




I can see how to construct the URL, even invoke an action,  
however, I am still mystified
about how it is to know what object the URL is referring too.  
Does this make sense?


All that you can know is that the URL is for the current item  
in the repetition.  The URL is not for a specific object, just  
for a specific place in the iteration through the tree of  
WOElements.  So in your invokeAction method, when  
context.senderID().equals(context.elementID()) then whatever  
is bound to the 'item' of the WORepetition has the correct  
Project to popup a window for.


I am also not clear on why you don't just use a WOHyperlink  
for this.



Chuck





On Sep 20, 2006, at 11:58 AM, Chuck Hill wrote:


Hi James,


On Sep 19, 2006, at 6:58 PM, James Cicenia wrote:


I need to construct a componentActionURL vs a directActionURL.

Basically I am using jfreeChart and need to create a popup  
of an object.
I can make it work great with direct actions however, for  
reasons unimportant here,

I need a componentActionURL.

My question I think is how to set the action for  
WOContext.componentActionURL?


I think you are thinking about this backwards.  The  
frameworks compute the URL based on where in the tree of  
WOElements it is.  You don't set the action.  The question  
to ask is, How do I know if the incoming action is for  
me?  The answer is to check if context.senderID().equals 
(context.elementID()).  

EO/Java class default Values

2006-09-26 Thread Tarun Reddy
Sorry if this is dirt simply but I seem to be missing something that every google search, as well as page 170 in Joshua Marker's book suggest should work.I have a small app where there is an WOHyperlink called "Submit new idea" that calls a method that creates a new "Idea" object and the returns a new "EditIdea" page. public EditIdea submitIdeaAction() {    	EditIdea nextPage = (EditIdea) pageWithName("EditIdea");    	    	// Initialize your component here		EOEditingContext ec = session().defaultEditingContext();		ec.revert();Idea aNewIdea = (Idea) EOUtilities.createAndInsertInstance(ec, "Idea");nextPage.editIdea = aNewIdea;return nextPage;    	    }In the Idea class (which is an EOGenerator class) has a constructor method that by sets the status of the class to "PROPOSED". 	private static final String PROPOSED = "P";	public Idea() {		super();		setProposedStatus();	}	public void setProposedStatus() {		setStatus(PROPOSED);	}However, by the time I get to the EditIdea page, the Idea's status is null. Huh? I know the constructor above is getting called, but I don't know why it gets reset on the EditIdea page.Help please!Tarun ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com