Re: [Wonder-disc] Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Mike Schrag
How about inserting the closing "]" as soon as one types the opening  
"[" in the context of a binding value?
Valid point -- totally could do that ... Trying to think if there's a  
case where this would get confused, but it seems pretty  
straightforward.  Patches welcome :)


ms

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

This email sent to [EMAIL PROTECTED]


Re: [Wonder-disc] [ANN] New Screencast

2008-03-27 Thread Mike Schrag
Well, it's SUPPOSED to be the case that it only generates a closing  
tag if the WO's API file says it's a component content, but either the  
API files are wrong (very possible -- most people are lazy with API  
files) or there's a bug in that (also very possible because I'm lazy  
with correctness :) ).


ms

On Mar 27, 2008, at 6:25 PM, Archibald Singleton wrote:



On 26 Mar 2008, at 09:57, David LeBer wrote:

I just posted part 2 of my WO/Project Wonder/Wolips Series.




Really cool, thanks! This is a really great format to WO learners.

Btw, I got tired of almost always deleting the automatically  
inserted wo closing tag. So disable this functionality and turned  
out there's a check box (Assit closing tag) that one can uncheck @  
WOLips -> HMLT Editor -> Code Assist


= tmk =

___
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/mschrag%40mdimension.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 [EMAIL PROTECTED]


Re: [Wonder-disc] Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Archibald Singleton


On 27 Mar 2008, at 20:19, Lachlan Deck wrote:

[snip]

On a related note, I wish eclipse would behave more like TextMate  
which always does the Right Things e.g. surrounding the selection  
with the opening char and corresponding closing char when one type  
a opening char type with some text selected.


Not as handy but...
* Hit cmd+opt+z --> Configure Templates...
* New... (define as attached + for double quotes)
* cmd+opt+z


Not as handy indeed but still very useful, thanks!

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

This email sent to [EMAIL PROTECTED]


Re: [Wonder-disc] Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Neil MacLennan

* $xxx is the standard inline markup of just about every template
language, which, for one, also makes it consistent with the velocity
templates that we use other places inside of WOLips


and I wish it wasn't.
Plenty times (in just about every template language) the 'xxx' makes  
it through to the final rendered HTML for one reason or another and  
sends corporate "policing" web page filters through the roof, for the  
*other* common use of 'xxx'. My vote is for, er, 'yyy'? iStockPhoto  
used to be a prime culprit for this.


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

This email sent to [EMAIL PROTECTED]

Re: [Wonder-disc] [ANN] New Screencast

2008-03-27 Thread Archibald Singleton


On 26 Mar 2008, at 09:57, David LeBer wrote:

I just posted part 2 of my WO/Project Wonder/Wolips Series.




Really cool, thanks! This is a really great format to WO learners.

Btw, I got tired of almost always deleting the automatically inserted  
wo closing tag. So disable this functionality and turned out there's a  
check box (Assit closing tag) that one can uncheck @ WOLips -> HMLT  
Editor -> Code Assist


= tmk =

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

This email sent to [EMAIL PROTECTED]


Re: [Wonder-disc] Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Archibald Singleton


On 27 Mar 2008, at 19:01, Guido Neitzer wrote:

On 27.03.2008, at 15:47, Mike Schrag wrote:


My bullet points on the subject :)


* [xxx] guarantees you an extra character to type on every binding  
-- completion can never fill it in for you because it never knows  
when you're done


Just because we're entertaining this idea:

How about inserting the closing "]" as soon as one types the opening  
"[" in the context of a binding value? On a related note, I wish  
eclipse would behave more like TextMate which always does the Right  
Things e.g. surrounding the selection with the opening char and  
corresponding closing char when one type a opening char type with some  
text selected.




* even Apple doesn't use [xxx] syntax for cocoa bindings OR ObjC  
2.0 properties (which were designed to look like bindings), though  
admittedly they don't use $ either, but they EXPLICITLY did not use  
[xxx] markup


Sure looks nicer too. Still I'm one of the weirdos who likes the [obj  
msg] syntax because to me it makes it clear that I'm sending messages  
(as opposed to, say, "calling" a method).


* $xxx is the standard inline markup of just about every template  
language, which, for one, also makes it consistent with the  
velocity templates that we use other places inside of WOLips


Which makes also most templating languages consistently ugly :-)...

And you can set the WebObjects 5.4 inline bindings to use the $  
style too. So this is currently the one working on both systems.



Yep, I noticed that, that's why I thought that maybe woognl offered  
the same functionality. I guess that would past the compatibility path  
ugly as it is :-)


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

This email sent to [EMAIL PROTECTED]


Re: [Wonder-disc] Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Guido Neitzer

On 27.03.2008, at 15:47, Mike Schrag wrote:


My bullet points on the subject :)


* [xxx] guarantees you an extra character to type on every binding  
-- completion can never fill it in for you because it never knows  
when you're done
* even Apple doesn't use [xxx] syntax for cocoa bindings OR ObjC 2.0  
properties (which were designed to look like bindings), though  
admittedly they don't use $ either, but they EXPLICITLY did not use  
[xxx] markup
* $xxx is the standard inline markup of just about every template  
language, which, for one, also makes it consistent with the velocity  
templates that we use other places inside of WOLips


And you can set the WebObjects 5.4 inline bindings to use the $ style  
too. So this is currently the one working on both systems.


cug

--
http://www.event-s.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 [EMAIL PROTECTED]


Re: [Wonder-disc] Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Mike Schrag

used to denote non-litteral expressions in ognl bindings (e.g
use the WO 5.4.x "[...] " marker)? And if it is, how to do it?

Not currently, though it may be coming.  I still say $xxx is a better
syntax than [xxx].


It may be better but I don't like special prefix characters à la  
perl (just a personal taste). Though truth be told "$" being  
(almost) the only special character makes it bearable). Also being a  
ObjC programmer I already have the [xxx] in my finger memory (and I  
do like that syntax in ObjC contrary to some).


I really dig WOOGNL but the syntax is pretty ugly :-)


My bullet points on the subject :)

* [xxx] guarantees you an extra character to type on every binding --  
completion can never fill it in for you because it never knows when  
you're done
* even Apple doesn't use [xxx] syntax for cocoa bindings OR ObjC 2.0  
properties (which were designed to look like bindings), though  
admittedly they don't use $ either, but they EXPLICITLY did not use  
[xxx] markup
* $xxx is the standard inline markup of just about every template  
language, which, for one, also makes it consistent with the velocity  
templates that we use other places inside of WOLips


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

This email sent to [EMAIL PROTECTED]

Re: [Wonder-disc] Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Archibald Singleton


On 27 Mar 2008, at 18:06, Mike Schrag wrote:

I assume you mean WOOGNL inline bindings?  Yes, the syntax is ?


Yep.


key="value" ... Pretty easy, huh :)


Of course, thanks! I *almost* tried it but'?' not being a valid XML  
name character, I though it wouldn't work.



On a related note is it possible to change the market ( currently
"$")


Wow, pretty interesting lapse on my part... I meant to write  
"marker" (guess the "$" may have something to do with me writing  
market instead :-)



used to denote non-litteral expressions in ognl bindings (e.g
use the WO 5.4.x "[...] " marker)? And if it is, how to do it?

Not currently, though it may be coming.  I still say $xxx is a better
syntax than [xxx].


It may be better but I don't like special prefix characters à la perl  
(just a personal taste). Though truth be told "$" being (almost) the  
only special character makes it bearable). Also being a ObjC  
programmer I already have the [xxx] in my finger memory (and I do like  
that syntax in ObjC contrary to some).


I really dig WOOGNL but the syntax is pretty ugly :-)


 The problem is that configurable inline binding
syntaxes makes things a complete mess.  It means you can't mix
frameworks because each framework may choose its own syntax.  So I'm
sort of hesitant to add a configurable option provide a custom prefix/
suffix (like 5.4 does) because it seems like it's a long term
disaster, and I can't wholesale switch to "[xxx]" in Wonder (one
because I hate the syntax, two because we have backwards compatibility
to consider).  It would have been nice for 5.4 to have adopted the $
syntax that we had been using, but things didn't turn out that way.
The only way to properly deal with it is by setting the syntax you use
in the framework Info.plist or something, but that seems like super
overkill.


Agreed.

= tmk =

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

This email sent to [EMAIL PROTECTED]


Re: Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Mike Schrag
I assume you mean WOOGNL inline bindings?  Yes, the syntax is ? 
key="value" ... Pretty easy, huh :)


On a related note is it possible to change the market ( currently  
"$") used to denote non-litteral expressions in ognl bindings (e.g  
use the WO 5.4.x "[...] " marker)? And if it is, how to do it?
Not currently, though it may be coming.  I still say $xxx is a better  
syntax than [xxx].  The problem is that configurable inline binding  
syntaxes makes things a complete mess.  It means you can't mix  
frameworks because each framework may choose its own syntax.  So I'm  
sort of hesitant to add a configurable option provide a custom prefix/ 
suffix (like 5.4 does) because it seems like it's a long term  
disaster, and I can't wholesale switch to "[xxx]" in Wonder (one  
because I hate the syntax, two because we have backwards compatibility  
to consider).  It would have been nice for 5.4 to have adopted the $  
syntax that we had been using, but things didn't turn out that way.   
The only way to properly deal with it is by setting the syntax you use  
in the framework Info.plist or something, but that seems like super  
overkill.


ms

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

This email sent to [EMAIL PROTECTED]


Is there an equivalent for the ?key="value" syntax but for ognl inline bindings

2008-03-27 Thread Archibald Singleton

Hello,

Subject line says it all.

Btw I'm using WO 5.3.x NOT WO 5.4.x for which apparently such syntax  
exists.


On a related note is it possible to change the market ( currently "$")  
used to denote non-litteral expressions in ognl bindings (e.g use the  
WO 5.4.x "[...] " marker)? And if it is, how to do it?


TIA

= tmk =


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

This email sent to [EMAIL PROTECTED]


Re: how to thread a really computationally intensive page ?

2008-03-27 Thread Gavin Eadie

On Mar 27, 2008, at 3:57 PM, Mike Schrag wrote:


Are you sure it is not firing faults, one by one by one...

Yeah, 10:1 this is horrible faulting behavior ...


I just talked to my buddy and he notes that there is some db access in  
this component after all.


Six years ago, our team were all WONovices, and one of our colleagues  
thought he'd 'improve' EOF by adding a smart layer over it.  EOF is  
more than plenty smart all by itself and I expect this other stuff and  
EOF are operating at cross-purposes [for example, as you suggest, it  
may be defeating EOF's faulting strategy and slowing everything  
down].  The db has grown over time (university phone records) and any  
db inefficiency is probably going up faster than linearly.  I've been  
trying to eliminate his code, but it got knotted around a lot of stuff  
in a rather non object oriented manner.


I must admit it wasn't till I saw just how fast the parser was ripping  
through my time-wasting HTML that I started to realize there had to be  
more going on than just rendering effort.  A million  per  
second caught my attention!

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

This email sent to [EMAIL PROTECTED]


Re: how to thread a really computationally intensive page ?

2008-03-27 Thread Mike Schrag

Are you sure it is not firing faults, one by one by one...

Yeah, 10:1 this is horrible faulting behavior ...

ms

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

This email sent to [EMAIL PROTECTED]


Re: how to thread a really computationally intensive page ?

2008-03-27 Thread Chuck Hill


On Mar 27, 2008, at 12:39 PM, Gavin Eadie wrote:

On Mar 27, 2008, at 3:30 PM, Mike Schrag wrote:
YourPage backgroundPage =  
ERXApplication.instantiatePage( YourPage.class.getName() );
You MAY want to go the context clone route, or you will lose the  
original context's headers, which might break links if you need  
virtual hosting info or whether or not the current request is HTTPS  
or not.


... actually, even a clone didn't help -- it had to be a new  
context, note new WOContext(null) below.  Since I'm eventually  
dropping a string into a page with its own original context and not  
actually making a response any browser will see, I assume a 'null'  
context works fine since it doesn't get used anyway.



On Mar 27, 2008, at 2:20 PM, Mike Schrag wrote:
We're looking at various options -- improve the Java code,  
generate the reports off-line as static HTML, etc.
I would recommend probably computing the report in a long response,  
pushing the results into an intermediate model (not necessarily EO- 
based, maybe just POJO's) and then render that in your page.  I've  
never tried actually RENDERING a page in a long response, but I  
suspect it's going to be sort of nasty to get it behaving  
properly.  You should not be using your long response's context if  
you are -- you should make a new one (or clone your current  
context).  This should be roughly equivalent to the docs for  
ERJavaMail where it talks about sending component-based emails.


ms


Many thanks, Mike.  Your pointer to the notes in the ERJavaMail  
application was the perfect one -- the answer was there, I needed to  
provide a new context.  Now the code is, in part (all the rest is  
the same as before):


   @Override
   public Object performAction() {
  logger.info("--> performAction");

  WOContext   calcCntx = new WOContext(null);
  CalccalcPage = (Calc) WOApplication.application().
 
pageWithName(Calc.class.getName(), calcCntx);

  return calcPage.generateResponse().contentString();
   }

Other things to note, now I have my sample working.

You CAN render in a long response (at least with the simple HTML  
below).


The WebObjects parser is really fast!  In order to get a page that  
took about 5 seconds to render, I used:


  

   

and generated 1000 random numbers each time I satisfied the "[x]"  
binding!  That makes me wonder just how awful the code must be in  
the real application .. as best I know it really can consume over 30  
seconds mostly rendering its report.


Are you sure it is not firing faults, one by one by one...


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





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

This email sent to [EMAIL PROTECTED]


Re: how to thread a really computationally intensive page ?

2008-03-27 Thread Gavin Eadie

On Mar 27, 2008, at 3:30 PM, Mike Schrag wrote:
YourPage backgroundPage =  
ERXApplication.instantiatePage( YourPage.class.getName() );
You MAY want to go the context clone route, or you will lose the  
original context's headers, which might break links if you need  
virtual hosting info or whether or not the current request is HTTPS  
or not.


... actually, even a clone didn't help -- it had to be a new context,  
note new WOContext(null) below.  Since I'm eventually dropping a  
string into a page with its own original context and not actually  
making a response any browser will see, I assume a 'null' context  
works fine since it doesn't get used anyway.



On Mar 27, 2008, at 2:20 PM, Mike Schrag wrote:

We're looking at various options -- improve the Java code, generate  
the reports off-line as static HTML, etc.
I would recommend probably computing the report in a long response,  
pushing the results into an intermediate model (not necessarily EO- 
based, maybe just POJO's) and then render that in your page.  I've  
never tried actually RENDERING a page in a long response, but I  
suspect it's going to be sort of nasty to get it behaving properly.   
You should not be using your long response's context if you are --  
you should make a new one (or clone your current context).  This  
should be roughly equivalent to the docs for ERJavaMail where it  
talks about sending component-based emails.


ms


Many thanks, Mike.  Your pointer to the notes in the ERJavaMail  
application was the perfect one -- the answer was there, I needed to  
provide a new context.  Now the code is, in part (all the rest is the  
same as before):


   @Override
   public Object performAction() {
  logger.info("--> performAction");

  WOContext   calcCntx = new WOContext(null);
  CalccalcPage = (Calc) WOApplication.application().
 
pageWithName(Calc.class.getName(), calcCntx);

  return calcPage.generateResponse().contentString();
   }

Other things to note, now I have my sample working.

You CAN render in a long response (at least with the simple HTML below).

The WebObjects parser is really fast!  In order to get a page that  
took about 5 seconds to render, I used:


  

   

and generated 1000 random numbers each time I satisfied the "[x]"  
binding!  That makes me wonder just how awful the code must be in the  
real application .. as best I know it really can consume over 30  
seconds mostly rendering its report. ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: how to thread a really computationally intensive page ?

2008-03-27 Thread Mike Schrag
YourPage backgroundPage =  
ERXApplication.instantiatePage( YourPage.class.getName() );
You MAY want to go the context clone route, or you will lose the  
original context's headers, which might break links if you need  
virtual hosting info or whether or not the current request is HTTPS or  
not.


ms

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

This email sent to [EMAIL PROTECTED]


Re: how to thread a really computationally intensive page ?

2008-03-27 Thread Lachlan Deck

On 28/03/2008, at 5:20 AM, Mike Schrag wrote:
We're looking at various options -- improve the Java code, generate  
the reports off-line as static HTML, etc.
I would recommend probably computing the report in a long response,  
pushing the results into an intermediate model (not necessarily EO- 
based, maybe just POJO's) and then render that in your page.  I've  
never tried actually RENDERING a page in a long response, but I  
suspect it's going to be sort of nasty to get it behaving properly.   
You should not be using your long response's context if you are --  
you should make a new one (or clone your current context).  This  
should be roughly equivalent to the docs for ERJavaMail where it  
talks about sending component-based emails.


Example:

YourPage backgroundPage =  
ERXApplication.instantiatePage( YourPage.class.getName() );

...
WOResponse backgroundResponse = backgroundPage.generateResponse();
String result = response.contentString();

with regards,
--

Lachlan Deck



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

This email sent to [EMAIL PROTECTED]


Re: how to thread a really computationally intensive page ?

2008-03-27 Thread Mike Schrag
We're looking at various options -- improve the Java code, generate  
the reports off-line as static HTML, etc.
I would recommend probably computing the report in a long response,  
pushing the results into an intermediate model (not necessarily EO- 
based, maybe just POJO's) and then render that in your page.  I've  
never tried actually RENDERING a page in a long response, but I  
suspect it's going to be sort of nasty to get it behaving properly.   
You should not be using your long response's context if you are -- you  
should make a new one (or clone your current context).  This should be  
roughly equivalent to the docs for ERJavaMail where it talks about  
sending component-based emails.


ms

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

This email sent to [EMAIL PROTECTED]


Re: SQL Query from EOFetchspecification

2008-03-27 Thread Art Isbell

On Mar 27, 2008, at 12:15 AM, [EMAIL PROTECTED] wrote:


Could some one assist me in generating the sql query from the
EOFetchSpecification object?



	You should be able to get there by creating an EOSQLExpressionFactory  
object, sending it a selectStatementForAttributes() message, and  
sending the returned EOSQLExpression object a statement() message.   
You'll have to reach down to the EOAccess level to deal with EOAdaptor  
and EOEntity objects, but it shouldn't be a big deal, but not a one- 
liner by any means.


Aloha,
Art

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

This email sent to [EMAIL PROTECTED]


how to thread a really computationally intensive page ?

2008-03-27 Thread Gavin Eadie
My colleague has an application [a rather old application written as  
we learned WebObjects with much that is embarrassing in the cruel  
light of our current skills] which occasionally is called on to  
display a report that can take considerable computation as it grinds  
through various nested WORepetitions -- in a worst case, about 45  
seconds of elapsed time.  The data for the report is already in memory  
so no EO operations are happening during this, just lots of rattling  
round and round in WOComponents.


We're looking at various options -- improve the Java code, generate  
the reports off-line as static HTML, etc.


The option I'm looking at is to render this report under the operation  
of a WOLongResponse.  I've not used this class before, so I looked at  
Apple's example and wrote a trivial example of my own to get a sense  
of how it operates.  What I'm stuck on though is whether it is  
possible to generate a web page during a WOLongResponse with something  
like:



public class Slow extends WOLongResponsePage {

   public Slow(WOContext context) {
  super(context);
   }

   @Override
   public Object performAction() {
  WOComponentcalcPage = pageWithName(Calc.class.getName());
  WOContext  calcCntx = calcPage.context();
  return calcPage.generateResponse().contentString();   // may  
take a long time

   }

   @Override
   public WOComponent refreshPageForStatus(Object o) {
  return this;
   }

   @Override
   public WOComponent pageForResult(Object result) {
  WOComponent   donePage = pageWithName(Done.class.getName());
  donePage.takeValueForKey(result, "result");
  return donePage;
   }

   @Override
   public void appendToResponse(WOResponse aResponse, WOContext  
aContext) {

  setRefreshInterval(3);
  super.appendToResponse(aResponse, aContext);
   }
}


I'm clearly confused because this doesn't work -- the  
generateResponse() method call fails with a null pointer exception.


The Calc component is simply:

   x 

I'd appreciate some help.  I have this horrible suspicion that I'm  
making this more complicated than is required .. Thanks, Gavin ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: Multiple EOModels

2008-03-27 Thread Chuck Hill


On Mar 27, 2008, at 1:57 AM, David Griffith wrote:


Hi all,

I have two apps that have two distinct EOModels.  I now need to link  
these two apps so that they have access to each other's data, so I  
was going to add both models to each app and recompile.


Frameworks.  You want frameworks.  Frameworks are WebObjects (and,  
well, OS X's) way of sharing things between applications.  Put the  
models and the related code in a framework and use the framework in  
the application.  I _never_ _ever_ put a model in an application.



However, it transpires that both models have a couple of entity  
names in common.


Are they the same entity (same database, same table)?  If so, create a  
framework and model to hold the common entities.  Use this framework  
in the frameworks holding the models with the other entities.  Include  
all three frameworks in your application.


If they are not the same entity but just happen to have the same name,  
then you need to rename one of them.



 I can understand why this would cause a problem, what I need to  
know is if there is a way around this without having to completely  
rename the entities in one of the models.


The other strange thing is that it tells me there is a name conflict  
between the EOPrototypes entity in each model, but I don't think  
there is any other way to name this entity, correct?



You probably guessed this already, but "framework".  The prototypes go  
into a model by themselves and this framework is included in  
(referenced in) the frameworks that have models and in the application.


Thus
Application
-> Prototypes framework
-> Common entities framework
-> Other EO framework 1
-> Other EO framework 2

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





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

This email sent to [EMAIL PROTECTED]


Re: Multiple EOModels

2008-03-27 Thread Tonny Staunsbrink
>
>
> I have two apps that have two distinct EOModels.  I now need to link
> these two apps so that they have access to each other's data, so I was
> going to add both models to each app and recompile.
>
> However, it transpires that both models have a couple of entity names
> in common.  I can understand why this would cause a problem, what I
> need to know is if there is a way around this without having to
> completely rename the entities in one of the models.
>
I think you have to use a prefix or similar mechanism. Like DDUser,
DDGroups, FFUser, etc... This should only be needed on the entity names, we
usually organize the java classes in packages instead of using prefixes in
java names.

>
> The other strange thing is that it tells me there is a name conflict
> between the EOPrototypes entity in each model, but I don't think there
> is any other way to name this entity, correct?
>

The prototypes should probably be factored in to a 3rd model.
Cheers
Tonny

>
> Kind regards,
> David.
>
>  ___
> 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/mezz.dk%40gmail.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 [EMAIL PROTECTED]

Re: Multiple EOModels

2008-03-27 Thread Simon McLean

from the EOModelGroup docs:

The default model group contains all models for an application, as  
well as any frameworks the application references. It is automatically  
created on demand. The entity name space among all of these models is  
global; consequently, the same entity name shouldn't appear in any two  
of the models. All cross-model information is represented in the  
models by entity name only. Binding the entity name to an actual  
entity is done at run-time within the EOModelGroup.


so rather than using the default group you could programatically  
create a model group for each model. i believe you can then access  
each model from within your app, but you can't create relationships  
between the models because they are in different groups. this of  
course presumes you have the common entities in different packages. if  
you are using the default package, well, you shouldn't be :-)


Note i'm no expert on this - i've little experience with multiple  
models in one app - but i'm sure someone will correct me if i'm  
talking rubbish :-)


Simon

On 27 Mar 2008, at 08:57, David Griffith wrote:

However, it transpires that both models have a couple of entity  
names in common.  I can understand why this would cause a problem,  
what I need to know is if there is a way around this without having  
to completely rename the entities in one of the models.


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

This email sent to [EMAIL PROTECTED]

Any way to "know" a "No instance available" has been answered to client?

2008-03-27 Thread Fabrice Pipart

Hi all !

I have a Cocoa application calling a WO web service method.
If the server is over loaded, it answers "No instance available" to  
the Cocoa app after (by default) 30s.
I want to know if the method has been actually executed on the server,  
therefore my web service returns true or false.

If I receive the no instance message, I consider the call failed.
But actually the web service call gets executed even after the no  
instance message.


Is there any way to "know" that "No instance available" has been  
answered to the client?



Best regards

Fabrice Pipart

www.easyshadow.com
EasyMediaOnline
Digital Signage Software

Easyshadow
Palais de la Scala
1 avenue Henri Dunant
Suite 1155
MC - 98000 Monaco

Skype: fabrice.pipart
Tel.  +377 97 98 21 04 (direct)
Fax. +377 97 70 88 07


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

This email sent to [EMAIL PROTECTED]

Re: SQL Query from EOFetchspecification

2008-03-27 Thread John Huss
See ERXSQLHelper in Wonder I believe


   EOFetchSpecification spec = new EOFetchSpecification("Address",
> qual, sort);
>
> Here I want the SQL query of the "spec"
>
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: WebObjects 5.4(.1) and https

2008-03-27 Thread Mr. Pierre Frisch
With WO 5.4.x WOContext has gained a few method to correctly manage  
the secure transport.


/**
 * Return true if the context is in secure mode.
 *
 * @return true if in secure mode
 * @since 5.4
 */
public boolean secureMode()

/**
 * Puts the context in secure mode.
 *
 * @param value
 */
public void setSecureMode(boolean value)

WOContext should also correctly manage the complete URLs. If the  
secure mode is turned on and the request was not made on secure  
transport then the URL will be complete.


Cheers

Pierre
--
Pierre Frisch
[EMAIL PROTECTED]


On Mar 27, 2008, at 2:26, Serge Cohen wrote:

Oups ... just realised that I send this mail to the "wrong" (not  
totally) mailing list ... It's most likelly not a Wonder issue but  
rather a WebObjects 5.4 one...


Someone has the same experience than I when using redirection to  
change from http to https ?

Here is the message I've sent yesterday to the Project Wonder list ...

In the application I'm currently working on, I sometimes have to  
turn to HTTPS (decision made at runtime) using the following code in  
Session.appendToResponse :


public void appendToResponse(WOResponse aResponse, WOContext  
aContext) {

// Shall we ask for HTTPS or HTTP (or leave the transport as it is).
boolean tmpRequestIsSecure =  
RequestAdditions.isSecure(aContext.request());

super.appendToResponse(aResponse, aContext);
if ((requireSecure && !tmpRequestIsSecure) || (requireNotSecure  
&& tmpRequestIsSecure)) {

// We have to redirect towards the same page, but different schema
String schema = (requireSecure) ? "https" : "http";
	String redirectToURL = schema + "://" +  
RequestAdditions.hostName(aContext.request()) +  
aContext.componentActionURL();


aResponse.setStatus(302);
aResponse.setHeader(redirectToURL, "Location");
	NSLog.debug.appendln("Switching schema to : " + schema + ".  
Redirecting to the URL '" + redirectToURL + "'.");

}
}

Till now I was developing using WebObjects 5.3.? (+ Wonder), and  
this was all working nicely. In particular, whatever this redirect  
would do the URL generated by WebObjects in the html sources would  
be absolute but would NOT contain the schema and host name (in other  
words they'd start like '/cgi-bin/WebObjects/Incident.woa/')


I have just upgraded to Leopard, and hence WebObjects 5.4.1 (+  
Wonder).
Now the redirect still works (when enforcing 'https' usage), but  
upon such a redirection all the URL generated in the page are now  
'complete' URL, that is they contain the schema, the hostname and  
then the rest (eg. 'http://foo.local/cgi-bin/WebObjects/Incident.woa/') 
. In particular, when turning to 'https' all the generated URLs are  
now EXPLICITLY NON secured http ('http'). Still if there is no- 
redirection the generated URLs are the same as before (like the one  
generated by WO 5.3, non-complete URL, eg. '/cgi-bin/WebObjects/ 
Incident.woa/').


I have tried to check the value of  
aContext.doesGenerateCompleteURLs() (which in all cases is FALSE,  
which to me means that all generated URL should be absolute path  
without schema and hostname).


I realise that the former https bug of WebObjects 5.3 is now fixed  
and it might be normal that my code is not working anymore, but I  
could not find how I should change my code to conform to the new WO  
version?


Any help or hint is very welcome !



Serge.

___
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%40apple.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 [EMAIL PROTECTED]

Re: SQL Query from EOFetchspecification

2008-03-27 Thread Alexander Spohr

Hey Rohit,

1. Don't use qualifierWithQualifierFormat, build the EOKey- and  
EOAndQualifier yourself.

2. Do you want the SQL as a String? Sorry, never need that, so no idea.
3. Do you want to execute the Query? Use EOEditingContexts  
objectsForFetchSpecification()


atze


Am 27.03.2008 um 11:15 schrieb <[EMAIL PROTECTED]> <[EMAIL PROTECTED] 
>:

Hello All,

Could some one assist me in generating the sql query from the
EOFetchSpecification object?

For Example:


   NSArray arrTemp;
   NSMutableArray args = new NSMutableArray();
   args.addObject("USA");
   args.addObject("New york");
   EOQualifier qual =
EOQualifier.qualifierWithQualifierFormat("country = %@ and city = %@",
args);

   NSMutableArray sort = new NSMutableArray();
   EOSortOrdering ordering1 = new EOSortOrdering ("name",
EOSortOrdering.CompareAscending);
   sort.addObject(ordering1);
   EOFetchSpecification spec = new EOFetchSpecification("Address",
qual, sort);


Here I want the SQL query of the "spec"


Regards,
Rohit Goel

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

This email sent to [EMAIL PROTECTED]


SQL Query from EOFetchspecification

2008-03-27 Thread Rohit.Goel
Hello All,

Could some one assist me in generating the sql query from the
EOFetchSpecification object? 

For Example:

 
NSArray arrTemp;
NSMutableArray args = new NSMutableArray();
args.addObject("USA");
args.addObject("New york");
EOQualifier qual =
EOQualifier.qualifierWithQualifierFormat("country = %@ and city = %@",
args);

NSMutableArray sort = new NSMutableArray();
EOSortOrdering ordering1 = new EOSortOrdering ("name",
EOSortOrdering.CompareAscending);
sort.addObject(ordering1);
EOFetchSpecification spec = new EOFetchSpecification("Address",
qual, sort);


Here I want the SQL query of the "spec"


Regards,
Rohit Goel 

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

This email sent to [EMAIL PROTECTED]


Fwd: WebObjects 5.4(.1) and https

2008-03-27 Thread Serge Cohen
Oups ... just realised that I send this mail to the "wrong" (not  
totally) mailing list ... It's most likelly not a Wonder issue but  
rather a WebObjects 5.4 one...


Someone has the same experience than I when using redirection to  
change from http to https ?

Here is the message I've sent yesterday to the Project Wonder list ...

In the application I'm currently working on, I sometimes have to turn  
to HTTPS (decision made at runtime) using the following code in  
Session.appendToResponse :


public void appendToResponse(WOResponse aResponse, WOContext aContext) {
// Shall we ask for HTTPS or HTTP (or leave the transport as it is).
boolean tmpRequestIsSecure =  
RequestAdditions.isSecure(aContext.request());

super.appendToResponse(aResponse, aContext);
if ((requireSecure && !tmpRequestIsSecure) || (requireNotSecure  
&& tmpRequestIsSecure)) {

// We have to redirect towards the same page, but different schema
String schema = (requireSecure) ? "https" : "http";
	String redirectToURL = schema + "://" +  
RequestAdditions.hostName(aContext.request()) +  
aContext.componentActionURL();


aResponse.setStatus(302);
aResponse.setHeader(redirectToURL, "Location");
	NSLog.debug.appendln("Switching schema to : " + schema + ".  
Redirecting to the URL '" + redirectToURL + "'.");

}
}

Till now I was developing using WebObjects 5.3.? (+ Wonder), and this  
was all working nicely. In particular, whatever this redirect would do  
the URL generated by WebObjects in the html sources would be absolute  
but would NOT contain the schema and host name (in other words they'd  
start like '/cgi-bin/WebObjects/Incident.woa/')


I have just upgraded to Leopard, and hence WebObjects 5.4.1 (+ Wonder).
Now the redirect still works (when enforcing 'https' usage), but upon  
such a redirection all the URL generated in the page are now  
'complete' URL, that is they contain the schema, the hostname and then  
the rest (eg. 'http://foo.local/cgi-bin/WebObjects/ 
Incident.woa/'). In particular, when turning to 'https' all the  
generated URLs are now EXPLICITLY NON secured http ('http'). Still if  
there is no-redirection the generated URLs are the same as before  
(like the one generated by WO 5.3, non-complete URL, eg. '/cgi-bin/ 
WebObjects/Incident.woa/').


I have tried to check the value of aContext.doesGenerateCompleteURLs()  
(which in all cases is FALSE, which to me means that all generated URL  
should be absolute path without schema and hostname).


I realise that the former https bug of WebObjects 5.3 is now fixed and  
it might be normal that my code is not working anymore, but I could  
not find how I should change my code to conform to the new WO version?


Any help or hint is very welcome !



Serge.



PGP.sig
Description: This is a digitally signed message part
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: FW: Model wierdness

2008-03-27 Thread Stefan Klein

Hi,

is there any flattend attribute in project? In that case you will get 
'duplicates' through the toMany relationships.

If not, try spec.setUsesDistinct(true).

To trace in the generated SQL statements, go to Open Run Diolag in 
Eclipse, select your application and activate 
NSLog.DebugGroupDatabaseAccess and NSLog.DebugGroupEnterpriseObject. Now 
you can follow the statement send to the database.


Stefan

Yury Peskin schrieb:


List,

I have a weird model issue.

When I load the database in my application some entities show up double.

For example, I load a projectDisplayGroup and I only want to see 
projects that are not complete.


In my (oh so appropriately named) viewProjects class constructor, I do 
the following:


 


Integer status = new Integer(2);

NSMutableArray args = new NSMutableArray();

args.addObject(status);

EOEditingContext ec= session().defaultEditingContext();

EOQualifier qual = EOQualifier.qualifierWithQualifierFormat(“status != 
[EMAIL PROTECTED], args);


EOFetchSpecification spec = new EOFetchSpecification(“Project”, qual, 
null);


spec.setRefreshesRefetchedObjects(true);

EODatabaseDataSource ds = 
(EODatabaseDataSource)projectDisplayGroup.dataSource();


ds.setFetchSpecification(spec);

projectDisplayGroup.fetch();

 

My database does not have any duplicates in it, but my viewProjects 
page shows a duplicate entries as can be seen by the screen shots I’ve 
attached.


Anybody have any ideas on what could be causing the problem?

Thank you in advance,

Yury Peskin

 




 ___
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 [EMAIL PROTECTED]
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Multiple EOModels

2008-03-27 Thread David Griffith

Hi all,

I have two apps that have two distinct EOModels.  I now need to link  
these two apps so that they have access to each other's data, so I was  
going to add both models to each app and recompile.


However, it transpires that both models have a couple of entity names  
in common.  I can understand why this would cause a problem, what I  
need to know is if there is a way around this without having to  
completely rename the entities in one of the models.


The other strange thing is that it tells me there is a name conflict  
between the EOPrototypes entity in each model, but I don't think there  
is any other way to name this entity, correct?


Kind regards,
David.

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

This email sent to [EMAIL PROTECTED]