Re: Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread Anjo Krank

Am 02.10.2008 um 02:22 schrieb Chuck Hill:


IIRC, _wr_ is valid, it is a Wonderism.


_wr_ is the built-in static resource request handler. We just made it  
usable (supporting relative URLs like the normal RR handler).


Cheers, Anjo

___
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: Relationships

2008-10-01 Thread Awbrey Hughlett

I am studying up. Thanks a bunch.

Awbrey
On Oct 1, 2008, at 11:46 PM, Chuck Hill wrote:


Some generic advice on "thinking in WebObjects".

On Oct 1, 2008, at 7:19 PM, Awbrey Hughlett wrote:

I have a component with an editing context linked to an entity  
named Listing.


It is better to think of the EOEnterpriseObjects (usually just  
called EOs), not entities, as being "in" the editing context.   
Think of it like a sandbox.  EOs in one sandbox can be related to  
EOs in an other sandbox.  They playground referee says so.




I have a WOPopUpButton that is populated from a entity named  
Basic. The Basic entity has two attributes: basicID (primary key),  
and basicType. basicID has a 'to many' relationship to the basicID  
attribute of the entity Listing. When I save the changes to the  
editing context, I want the basicID attribute in the selected  
value from the WOPopUpButton to populate the basicID attribute of  
the Listing entity.


As pretty much a hard and fast rule: "If you are thinking about  
primary or foreign keys, you are doing it wrong".  Those are  
artifacts of the implementation.  EOF manages those.  Think about  
objects and relationships between objects:


I have a WOPopUpButton that is populated from a entity named Basic.  
The Basic entity has a name, basicType, that I shown in the  
WOPopUpButton.   A Listing object can have one Basic, and a Basic  
can be used on many Listing objects.  When I save the changes to  
the editing context, I want the selected Basic object to become the  
object in the basic() relationship of the Listing entity.




I can make it work if I make the basicID of both entities a class  
property, but I know there has to be a better way using the  
relationship I set up (given that I even did that correctly). Does  
the method 'addObjectToBothSidesOfRelationship()' have anything to  
do with that or am I just way off?


I think Guido pointed you in the right direction.

--
Chuck Hill Senior Consultant / VP Development

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

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








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

This email sent to [EMAIL PROTECTED]


Re: Relationships

2008-10-01 Thread Chuck Hill

Some generic advice on "thinking in WebObjects".

On Oct 1, 2008, at 7:19 PM, Awbrey Hughlett wrote:

I have a component with an editing context linked to an entity named  
Listing.


It is better to think of the EOEnterpriseObjects (usually just called  
EOs), not entities, as being "in" the editing context.  Think of it  
like a sandbox.  EOs in one sandbox can be related to EOs in an other  
sandbox.  They playground referee says so.




I have a WOPopUpButton that is populated from a entity named Basic.  
The Basic entity has two attributes: basicID (primary key), and  
basicType. basicID has a 'to many' relationship to the basicID  
attribute of the entity Listing. When I save the changes to the  
editing context, I want the basicID attribute in the selected value  
from the WOPopUpButton to populate the basicID attribute of the  
Listing entity.


As pretty much a hard and fast rule: "If you are thinking about  
primary or foreign keys, you are doing it wrong".  Those are artifacts  
of the implementation.  EOF manages those.  Think about objects and  
relationships between objects:


I have a WOPopUpButton that is populated from a entity named Basic.  
The Basic entity has a name, basicType, that I shown in the  
WOPopUpButton.   A Listing object can have one Basic, and a Basic can  
be used on many Listing objects.  When I save the changes to the  
editing context, I want the selected Basic object to become the object  
in the basic() relationship of the Listing entity.




I can make it work if I make the basicID of both entities a class  
property, but I know there has to be a better way using the  
relationship I set up (given that I even did that correctly). Does  
the method 'addObjectToBothSidesOfRelationship()' have anything to  
do with that or am I just way off?


I think Guido pointed you in the right direction.

--
Chuck Hill Senior Consultant / VP Development

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

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






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

This email sent to [EMAIL PROTECTED]


Re: Relationships

2008-10-01 Thread Guido Neitzer

On 1-Oct-08, at 8:19 PM, Awbrey Hughlett wrote:

I have a component with an editing context linked to an entity named  
Listing. I have a WOPopUpButton that is populated from a entity  
named Basic. The Basic entity has two attributes: basicID (primary  
key), and basicType. basicID has a 'to many' relationship to the  
basicID attribute of the entity Listing. When I save the changes to  
the editing context, I want the basicID attribute in the selected  
value from the WOPopUpButton to populate the basicID attribute of  
the Listing entity. I can make it work if I make the basicID of both  
entities a class property, but I know there has to be a better way  
using the relationship I set up (given that I even did that  
correctly). Does the method 'addObjectToBothSidesOfRelationship()'  
have anything to do with that or am I just way off?


It does what you think it does. This method should be used to connect  
two objects with a relationship. You have to have both objects in the  
same editing context for this to work.


The next exercise is using the "selection" binding of the popup button  
to bind to the Listing's "basic".


Check this:




cug


--
Real World WebObjects Bootcamp at the Big Nerd Ranch:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml

___
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]


Relationships

2008-10-01 Thread Awbrey Hughlett
I have a component with an editing context linked to an entity named  
Listing. I have a WOPopUpButton that is populated from a entity named  
Basic. The Basic entity has two attributes: basicID (primary key),  
and basicType. basicID has a 'to many' relationship to the basicID  
attribute of the entity Listing. When I save the changes to the  
editing context, I want the basicID attribute in the selected value  
from the WOPopUpButton to populate the basicID attribute of the  
Listing entity. I can make it work if I make the basicID of both  
entities a class property, but I know there has to be a better way  
using the relationship I set up (given that I even did that  
correctly). Does the method 'addObjectToBothSidesOfRelationship()'  
have anything to do with that or am I just way off?

___
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: Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread Guido Neitzer

On 1-Oct-08, at 6:50 PM, William Hatch wrote:

I thought that happened automatically when deploying? Is there  
something different we have to do as a servlet? The URL above is an  
internal URL through our VPN on the test box, in case you're  
thinking that's in direct connect.


Thanks Guido and Chuck.


No, I know that this thing is only created when direct connect is  
enabled as I checked the Wonder source.


I have this in my start parameters for my apps:

-DWODirectConnectEnabled=false

I have no idea about the servlet thing.

cug


--
Real World WebObjects Bootcamp at the Big Nerd Ranch:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml

 ___
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: Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread William Hatch


On Oct 1, 2008, at 7:30 PM, Guido Neitzer wrote:


On 1-Oct-08, at 5:03 PM, William Hatch wrote:


Other interesting facts:

Here's the path it's looking for with 5.4, notice the underscores  
surrounding wr, this isn't valid and the file isn't found, so  
nothing actually works. Not that it matters, as most people bail  
long before the page loads anyway;-)

http://w2.int.ourserver.com:8000/ourapp/WebObjects/ourapp.woa/_wr_/wodata=/var/lib/tomcat5/webapps/ourapp/WEB-INF/Library/Frameworks/Ajax.framework/WebServerResources/prototype.js

In 5.3 wonder, it's the same path except without the _ surrounding  
wr, and the page loads super fast. What the heck?


Disable direct connect.


I thought that happened automatically when deploying? Is there  
something different we have to do as a servlet? The URL above is an  
internal URL through our VPN on the test box, in case you're thinking  
that's in direct connect.


Thanks Guido and Chuck.



cug


--
Real World WebObjects Bootcamp at the Big Nerd Ranch:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml



___
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: Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread William Hatch



On Oct 1, 2008, at 8:22 PM, Chuck Hill wrote:

IIRC, _wr_ is valid, it is a Wonderism.  This is only for  
Development mode which you seem to have enabled.


Uhh, so how do we explicitly disable development mode? This is what's  
in Properties:


er.extensions.ERXApplication.developmentMode=false

Has that changed?



Chuck


On Oct 1, 2008, at 4:03 PM, William Hatch wrote:


Other interesting facts:

Here's the path it's looking for with 5.4, notice the underscores  
surrounding wr, this isn't valid and the file isn't found, so  
nothing actually works. Not that it matters, as most people bail  
long before the page loads anyway;-)

http://w2.int.ourserver.com:8000/ourapp/WebObjects/ourapp.woa/_wr_/wodata=/var/lib/tomcat5/webapps/ourapp/WEB-INF/Library/Frameworks/Ajax.framework/WebServerResources/prototype.js

In 5.3 wonder, it's the same path except without the _ surrounding  
wr, and the page loads super fast. What the heck?





On Oct 1, 2008, at 6:44 PM, William Hatch wrote:


Sorry for the cross post; the Wonder list seems to be down.

5.4.3 and latest wonder for 5.4, tomcat 6

Just upgraded a project from 5.3 to latest, and now we're  
observing extreme slowdowns in page load with any component that  
relies on wonder ajax. running ySLow under firefox indicates that  
each required resource is taking about ten seconds to load, so the  
over all page loads in about 30 seconds; ~10 for prototype and  
another ~20 for ibox, which appears to have to load twice.  What's  
the change we need to make in order to bring this back inline? One  
of the reasons we're keen on upgrading is having more control over  
loading these resources, and IIRC MIke mentioned something about  
this recently here or on the blog. Ideally, we'd like to move  
these to a static includes.  This doesn't happen at all in 5.3  
with the correct Wonder frameworks.


Thanks

Bill




___
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/wkhatch%40me.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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--
Chuck Hill Senior Consultant / VP Development

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

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








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

This email sent to [EMAIL PROTECTED]


Re: Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread Chuck Hill
IIRC, _wr_ is valid, it is a Wonderism.  This is only for Development  
mode which you seem to have enabled.


Chuck


On Oct 1, 2008, at 4:03 PM, William Hatch wrote:


Other interesting facts:

Here's the path it's looking for with 5.4, notice the underscores  
surrounding wr, this isn't valid and the file isn't found, so  
nothing actually works. Not that it matters, as most people bail  
long before the page loads anyway;-)

http://w2.int.ourserver.com:8000/ourapp/WebObjects/ourapp.woa/_wr_/wodata=/var/lib/tomcat5/webapps/ourapp/WEB-INF/Library/Frameworks/Ajax.framework/WebServerResources/prototype.js

In 5.3 wonder, it's the same path except without the _ surrounding  
wr, and the page loads super fast. What the heck?





On Oct 1, 2008, at 6:44 PM, William Hatch wrote:


Sorry for the cross post; the Wonder list seems to be down.

5.4.3 and latest wonder for 5.4, tomcat 6

Just upgraded a project from 5.3 to latest, and now we're observing  
extreme slowdowns in page load with any component that relies on  
wonder ajax. running ySLow under firefox indicates that each  
required resource is taking about ten seconds to load, so the over  
all page loads in about 30 seconds; ~10 for prototype and another  
~20 for ibox, which appears to have to load twice.  What's the  
change we need to make in order to bring this back inline? One of  
the reasons we're keen on upgrading is having more control over  
loading these resources, and IIRC MIke mentioned something about  
this recently here or on the blog. Ideally, we'd like to move these  
to a static includes.  This doesn't happen at all in 5.3 with the  
correct Wonder frameworks.


Thanks

Bill




___
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/wkhatch 
%40me.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/chill%40global-village.net

This email sent to [EMAIL PROTECTED]



--
Chuck Hill Senior Consultant / VP Development

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

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






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

This email sent to [EMAIL PROTECTED]


Re: Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread Guido Neitzer

On 1-Oct-08, at 5:03 PM, William Hatch wrote:


Other interesting facts:

Here's the path it's looking for with 5.4, notice the underscores  
surrounding wr, this isn't valid and the file isn't found, so  
nothing actually works. Not that it matters, as most people bail  
long before the page loads anyway;-)

http://w2.int.ourserver.com:8000/ourapp/WebObjects/ourapp.woa/_wr_/wodata=/var/lib/tomcat5/webapps/ourapp/WEB-INF/Library/Frameworks/Ajax.framework/WebServerResources/prototype.js

In 5.3 wonder, it's the same path except without the _ surrounding  
wr, and the page loads super fast. What the heck?


Disable direct connect.

cug


--
Real World WebObjects Bootcamp at the Big Nerd Ranch:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml

___
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: Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread William Hatch

Other interesting facts:

Here's the path it's looking for with 5.4, notice the underscores  
surrounding wr, this isn't valid and the file isn't found, so nothing  
actually works. Not that it matters, as most people bail long before  
the page loads anyway;-)

http://w2.int.ourserver.com:8000/ourapp/WebObjects/ourapp.woa/_wr_/wodata=/var/lib/tomcat5/webapps/ourapp/WEB-INF/Library/Frameworks/Ajax.framework/WebServerResources/prototype.js

In 5.3 wonder, it's the same path except without the _ surrounding wr,  
and the page loads super fast. What the heck?





On Oct 1, 2008, at 6:44 PM, William Hatch wrote:


Sorry for the cross post; the Wonder list seems to be down.

5.4.3 and latest wonder for 5.4, tomcat 6

Just upgraded a project from 5.3 to latest, and now we're observing  
extreme slowdowns in page load with any component that relies on  
wonder ajax. running ySLow under firefox indicates that each  
required resource is taking about ten seconds to load, so the over  
all page loads in about 30 seconds; ~10 for prototype and another  
~20 for ibox, which appears to have to load twice.  What's the  
change we need to make in order to bring this back inline? One of  
the reasons we're keen on upgrading is having more control over  
loading these resources, and IIRC MIke mentioned something about  
this recently here or on the blog. Ideally, we'd like to move these  
to a static includes.  This doesn't happen at all in 5.3 with the  
correct Wonder frameworks.


Thanks

Bill




___
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/wkhatch%40me.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]


Latest wonder ajax resources causes severe slowdown under tomcat REPOST from Wonder list

2008-10-01 Thread William Hatch

Sorry for the cross post; the Wonder list seems to be down.

5.4.3 and latest wonder for 5.4, tomcat 6

Just upgraded a project from 5.3 to latest, and now we're observing  
extreme slowdowns in page load with any component that relies on  
wonder ajax. running ySLow under firefox indicates that each required  
resource is taking about ten seconds to load, so the over all page  
loads in about 30 seconds; ~10 for prototype and another ~20 for ibox,  
which appears to have to load twice.  What's the change we need to  
make in order to bring this back inline? One of the reasons we're keen  
on upgrading is having more control over loading these resources, and  
IIRC MIke mentioned something about this recently here or on the blog.  
Ideally, we'd like to move these to a static includes.  This doesn't  
happen at all in 5.3 with the correct Wonder frameworks.


Thanks

Bill




___
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: Problem with App starting through JavaMonitor

2008-10-01 Thread Lon Varscsak
Ah, I figured it out 5 minutes after I sent the email..I hate that! :)
Turns out it was a permissions issue.  The application was installed as one
user, but monitor and wotaskd are running as "appserver".

Thanks,

Lon

On Wed, Oct 1, 2008 at 3:18 PM, Lon Varscsak <[EMAIL PROTECTED]>wrote:

> I'm trying to get an 5.4.3 app running on a Leopard workstation and Monitor
> just won't start the application.  I get no error messages.  wotaskd is
> running, JavaMonitor is running, everything *seems* to be in place.
> If I run the application from the command line, it works fine.  So I don't
> think it's a problem with the application itself.
>
> Any ideas?
>
> Thanks,
>
> Lon
>
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Problem with App starting through JavaMonitor

2008-10-01 Thread Lon Varscsak
I'm trying to get an 5.4.3 app running on a Leopard workstation and Monitor
just won't start the application.  I get no error messages.  wotaskd is
running, JavaMonitor is running, everything *seems* to be in place.
If I run the application from the command line, it works fine.  So I don't
think it's a problem with the application itself.

Any ideas?

Thanks,

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

This email sent to [EMAIL PROTECTED]

Re: NullPointerException

2008-10-01 Thread Mike Schrag
Nothing about that looks familiar to me.  You appear to be using  
Wonder which should fix any bug.

__!!!

Oh come on now.  A little humility, please.  :-)

Steve


Well, I did say "should" not "does".  :-P
For the record, I actually DID fix this bug about 2 years ago, but  
removed the patch because it had another side-effect that was arguably  
more confusing :)


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: NullPointerException

2008-10-01 Thread Chuck Hill


On Oct 1, 2008, at 2:23 PM, Steve Quirk wrote:


On Wed, 1 Oct 2008, Chuck Hill wrote:

Nothing about that looks familiar to me.  You appear to be using  
Wonder which should fix any bug.

 __!!!

Oh come on now.  A little humility, please.  :-)

Steve


Well, I did say "should" not "does".  :-P







Anyone have an idea on this?

Chuck

On Oct 1, 2008, at 7:40 AM, Awbrey Hughlett wrote:

I am using Wonder 5.3 and I have found a few things saying there  
was a bug with WOForm in that version. Is this the case here?





Form : WOForm {
}
SpecificType : WOTextField {
value = specific.specificType;
}
SaveChanges : WOSubmitButton {
action = saveChanges;
value = "Save";
}
Awbrey
On Oct 1, 2008, at 1:01 AM, Chuck Hill wrote:

Please keep messages on the list.

^ now I understand what you are saying :( oops sorry

That error seems very odd.  What is in the HTML and WOD?
Chuck
On Sep 30, 2008, at 9:46 PM, Awbrey Hughlett wrote:

File
Line#
Method
Package
WOForm.java
58
_enterFormInContext
com.webobjects.appserver._private
WOForm.java
69
takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java
914
takeValuesFromRequest
com.webobjects.appserver
WOSession.java
1139
takeValuesFromRequest
com.webobjects.appserver
ERXSession.java
525
takeValuesFromRequest
er.extensions.appserver
WOApplication.java
1350
takeValuesFromRequest
com.webobjects.appserver
WOComponentRequestHandler.java
189
_dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java
287
_dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java
322
_dispatchWithPreparedApplication
com.webobjects.appserver._private
WOComponentRequestHandler.java
358
_handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java
432
handleRequest
com.webobjects.appserver._private
WOApplication.java
1306
dispatchRequest
com.webobjects.appserver
WOWorkerThread.java
173
runOnce
com.webobjects.appserver._private
WOWorkerThread.java
254
run
com.webobjects.appserver._private
Thread.java
613
run
java.lang
NA : Non applicable, JIT activated
On Sep 30, 2008, at 11:22 PM, Chuck Hill wrote:

On Sep 30, 2008, at 8:07 PM, Awbrey Hughlett wrote:
I have an entity named "Specific" and an attribute named  
"specificType". I have a WOTextField bound to  
specific.specificType and a WOSubmitButton bound to  
saveChanges() all wrapped in a WOForm. When I run the  
component and click to save changes to the database, I get a  
NullPointerException. Have I instantiated the Specific entity  
and inserted it into an editing context correctly? Or do I  
have other problems?
You have other problems, some of which you probably don't know  
about.

public class SpecificEntry extends WOComponent {
private Specific specific;
private EOEditingContext ec = new EOEditingContext();
Noo.  :-)  You are using an unlocked editing context.   
Doom awaits you.  You have three choices here:

1. Start using Wonder and ERXEC
2. Use session().defaultEditingContext() - though this has  
issues of its own
3. Use MultiECLockManager and add the infrastructure to your  
apps to handle EC management.




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

  public Specific specific() {
if (specific == null) {
editingContext().revert();

  		specific =  
(Specific 
)EOUtilities.createAndInsertInstance(editingContext(),  
"Specific");

}

return specific;
  }

  public WOComponent saveChanges() {

editingContext().saveChanges();

setSpecific(null);

return context().page();

Post the stack track for for NPE.  Guessing is too hard.
Chuck


  }

  public EOEditingContext editingContext() {
return ec;
  }

  public void setSpecific(Specific newSpecific) {
specific = newSpecific;
  }
}
Thanks,
Awbrey




--
Chuck Hill Senior Consultant / VP Development

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

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






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

This email sent to [EMAIL PROTECTED]


Re: NullPointerException

2008-10-01 Thread Steve Quirk




On Wed, 1 Oct 2008, Chuck Hill wrote:

Nothing about that looks familiar to me.  You appear to be using Wonder which 
should fix any bug.

  __!!!

Oh come on now.  A little humility, please.  :-)

Steve



Anyone have an idea on this?

Chuck

On Oct 1, 2008, at 7:40 AM, Awbrey Hughlett wrote:

I am using Wonder 5.3 and I have found a few things saying there was a bug 
with WOForm in that version. Is this the case here?







Form : WOForm {
}

SpecificType : WOTextField {
value = specific.specificType;
}

SaveChanges : WOSubmitButton {
action = saveChanges;
value = "Save";
}

Awbrey

On Oct 1, 2008, at 1:01 AM, Chuck Hill wrote:


Please keep messages on the list.

^ now I understand what you are saying :( oops sorry


That error seems very odd.  What is in the HTML and WOD?

Chuck


On Sep 30, 2008, at 9:46 PM, Awbrey Hughlett wrote:


File
Line#
Method
Package


WOForm.java
58
_enterFormInContext
com.webobjects.appserver._private
WOForm.java
69
takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java
914
takeValuesFromRequest
com.webobjects.appserver
WOSession.java
1139
takeValuesFromRequest
com.webobjects.appserver
ERXSession.java
525
takeValuesFromRequest
er.extensions.appserver
WOApplication.java
1350
takeValuesFromRequest
com.webobjects.appserver
WOComponentRequestHandler.java
189
_dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java
287
_dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java
322
_dispatchWithPreparedApplication
com.webobjects.appserver._private
WOComponentRequestHandler.java
358
_handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java
432
handleRequest
com.webobjects.appserver._private
WOApplication.java
1306
dispatchRequest
com.webobjects.appserver
WOWorkerThread.java
173
runOnce
com.webobjects.appserver._private
WOWorkerThread.java
254
run
com.webobjects.appserver._private
Thread.java
613
run
java.lang


NA : Non applicable, JIT activated
On Sep 30, 2008, at 11:22 PM, Chuck Hill wrote:



On Sep 30, 2008, at 8:07 PM, Awbrey Hughlett wrote:

I have an entity named "Specific" and an attribute named 
"specificType". I have a WOTextField bound to specific.specificType and 
a WOSubmitButton bound to saveChanges() all wrapped in a WOForm. When I 
run the component and click to save changes to the database, I get a 
NullPointerException. Have I instantiated the Specific entity and 
inserted it into an editing context correctly? Or do I have other 
problems?


You have other problems, some of which you probably don't know about.





public class SpecificEntry extends WOComponent {
private Specific specific;
private EOEditingContext ec = new EOEditingContext();


Noo.  :-)  You are using an unlocked editing context.  Doom 
awaits you.  You have three choices here:


1. Start using Wonder and ERXEC
2. Use session().defaultEditingContext() - though this has issues of its 
own
3. Use MultiECLockManager and add the infrastructure to your apps to 
handle EC management.





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

   public Specific specific() {
if (specific == null) {
editingContext().revert();

   		specific = 
(Specific)EOUtilities.createAndInsertInstance(editingContext(), 
"Specific");

}

return specific;
   }

   public WOComponent saveChanges() {

editingContext().saveChanges();

setSpecific(null);

return context().page();


Post the stack track for for NPE.  Guessing is too hard.


Chuck



   }

   public EOEditingContext editingContext() {
return ec;
   }

   public void setSpecific(Specific newSpecific) {
specific = newSpecific;
   }
}

Thanks,
Awbrey

___
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: NullPointerException

2008-10-01 Thread Awbrey Hughlett

That worked.

Thanks,
Awbrey
On Oct 1, 2008, at 3:03 PM, Mike Schrag wrote:

I am using a WOHyperlink from main to the component with pageName  
bound to the component.
Is SpecificEntry component the actual page you're going to?   
Meaning  is the first tag on the page and there's no ,  
etc?  I seem to recall there's an obscure bug where if you start a  
page level component with a form, it breaks  might be what  
you're seeing.


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/athughlett% 
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: NullPointerException

2008-10-01 Thread Mike Schrag
I am using a WOHyperlink from main to the component with pageName  
bound to the component.
Is SpecificEntry component the actual page you're going to?  Meaning  
 is the first tag on the page and there's no , etc?  I  
seem to recall there's an obscure bug where if you start a page level  
component with a form, it breaks  might be what you're seeing.


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: NullPointerException

2008-10-01 Thread Awbrey Hughlett
I am using a WOHyperlink from main to the component with pageName  
bound to the component.


Awbrey
On Oct 1, 2008, at 2:26 PM, Mike Schrag wrote:

Nothing about that looks familiar to me.  You appear to be using  
Wonder which should fix any bug.
How are you creating this page?  By any chance did you not create  
it with pageWithName?


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/athughlett% 
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: NullPointerException

2008-10-01 Thread Mike Schrag
Nothing about that looks familiar to me.  You appear to be using  
Wonder which should fix any bug.
How are you creating this page?  By any chance did you not create it  
with pageWithName?


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: two d2wmodels

2008-10-01 Thread Guido Neitzer

On 1-Oct-08, at 10:58 AM, David Avendasora wrote:


Multiple model files are a built-in capability of WO.


Yeah, but only in the form, that you can have one rule file per  
framework / application as far as I know.


I'm not sure how you apply the concept to context-sensitive rule  
files, but the normal way of getting one rule in a d2w.d2wmodel file  
to override an identical rule in the user.d2wmodel file is to create  
the rule with a _lower_ priority value - like "50".


??

Higher priorities override rules with lower priorities if the left  
hand side is the same (or at least of the same relevance).


At least this is how it works for normal D2W and D2JC. How this fits  
with WOnder's D2W implementation, I don't know.


Guido?


I normally have a d2w.d2wmodel in any framework that will be picked  
automatically and one user.d2wmodel in the app. Additional files are  
supported by Wonder as I explained in my last mail. You can name them  
whatever you like, just specify the name of the file in the property.


In the end, all rules will get merged and the one with the best  
specific left hand side and the highest priority will win.


cug


--
Real World WebObjects Bootcamp at the Big Nerd Ranch:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml

___
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: NullPointerException

2008-10-01 Thread Chuck Hill
Nothing about that looks familiar to me.  You appear to be using  
Wonder which should fix any bug.


Anyone have an idea on this?

Chuck

On Oct 1, 2008, at 7:40 AM, Awbrey Hughlett wrote:

I am using Wonder 5.3 and I have found a few things saying there was  
a bug with WOForm in that version. Is this the case here?







Form : WOForm {
}

SpecificType : WOTextField {
value = specific.specificType;
}

SaveChanges : WOSubmitButton {
action = saveChanges;
value = "Save";
}

Awbrey

On Oct 1, 2008, at 1:01 AM, Chuck Hill wrote:


Please keep messages on the list.

^ now I understand what you are saying :( oops sorry


That error seems very odd.  What is in the HTML and WOD?

Chuck


On Sep 30, 2008, at 9:46 PM, Awbrey Hughlett wrote:


File
Line#
Method
Package


WOForm.java
58
_enterFormInContext
com.webobjects.appserver._private
WOForm.java
69
takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java
914
takeValuesFromRequest
com.webobjects.appserver
WOSession.java
1139
takeValuesFromRequest
com.webobjects.appserver
ERXSession.java
525
takeValuesFromRequest
er.extensions.appserver
WOApplication.java
1350
takeValuesFromRequest
com.webobjects.appserver
WOComponentRequestHandler.java
189
_dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java
287
_dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java
322
_dispatchWithPreparedApplication
com.webobjects.appserver._private
WOComponentRequestHandler.java
358
_handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java
432
handleRequest
com.webobjects.appserver._private
WOApplication.java
1306
dispatchRequest
com.webobjects.appserver
WOWorkerThread.java
173
runOnce
com.webobjects.appserver._private
WOWorkerThread.java
254
run
com.webobjects.appserver._private
Thread.java
613
run
java.lang


NA : Non applicable, JIT activated
On Sep 30, 2008, at 11:22 PM, Chuck Hill wrote:



On Sep 30, 2008, at 8:07 PM, Awbrey Hughlett wrote:

I have an entity named "Specific" and an attribute named  
"specificType". I have a WOTextField bound to  
specific.specificType and a WOSubmitButton bound to  
saveChanges() all wrapped in a WOForm. When I run the component  
and click to save changes to the database, I get a  
NullPointerException. Have I instantiated the Specific entity  
and inserted it into an editing context correctly? Or do I have  
other problems?


You have other problems, some of which you probably don't know  
about.






public class SpecificEntry extends WOComponent {
private Specific specific;
private EOEditingContext ec = new EOEditingContext();


Noo.  :-)  You are using an unlocked editing context.   
Doom awaits you.  You have three choices here:


1. Start using Wonder and ERXEC
2. Use session().defaultEditingContext() - though this has issues  
of its own
3. Use MultiECLockManager and add the infrastructure to your apps  
to handle EC management.





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

public Specific specific() {
if (specific == null) {
editingContext().revert();

		specific =  
(Specific)EOUtilities.createAndInsertInstance(editingContext(),  
"Specific");

}

return specific;
}

public WOComponent saveChanges() {

editingContext().saveChanges();

setSpecific(null);

return context().page();


Post the stack track for for NPE.  Guessing is too hard.


Chuck



}

public EOEditingContext editingContext() {
return ec;
}

public void setSpecific(Specific newSpecific) {
specific = newSpecific;
}
}

Thanks,
Awbrey
___
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]


--
Chuck Hill Senior Consultant / VP Development

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

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










--
Chuck Hill Senior Consultant / VP Development

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

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








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

This email sent to

Re: two d2wmodels

2008-10-01 Thread David Avendasora
Multiple model files are a built-in capability of WO. I'm not sure how  
you apply the concept to context-sensitive rule files, but the normal  
way of getting one rule in a d2w.d2wmodel file to override an  
identical rule in the user.d2wmodel file is to create the rule with a  
_lower_ priority value - like "50".


At least this is how it works for normal D2W and D2JC. How this fits  
with WOnder's D2W implementation, I don't know.


Guido?

Dave

On Oct 1, 2008, at 1:34 PM, Ash Mishra wrote:


Hi,

Has anyone tried to use two d2wmodels in the same application.  i.e.  
the default user.d2wmodel and say mysecond.d2wmodel?


The reason I ask is that we want to return different List and Query  
pages for the same Entity (that is, have two different rulesets  
depending on context).  I see in Project Wonder there is a custom  
ERD2WFactory, but it's unclear to me if this allows multiple model  
files - as it appears to also just use the application wide  
defaultModel.


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

This email sent to [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: two d2wmodels

2008-10-01 Thread Ash Mishra
Thanks guys. Clearly need to read up more on D2W and the default  
d2w.d2wmodel.



On 1-Oct-08, at 11:14 AM, Guido Neitzer wrote:


On 1-Oct-08, at 10:34 AM, Ash Mishra wrote:

Has anyone tried to use two d2wmodels in the same application.   
i.e. the default user.d2wmodel and say mysecond.d2wmodel?


Sure. Everybody does. You get d2w rule files from all the frameworks.

The reason I ask is that we want to return different List and Query  
pages for the same Entity (that is, have two different rulesets  
depending on context).  I see in Project Wonder there is a custom  
ERD2WFactory, but it's unclear to me if this allows multiple model  
files - as it appears to also just use the application wide  
defaultModel.


Why don't you just use a rule in your application's rule file with  
something like:


pageConfiguration = 'ListMyEntity' => pageName =  
'MySuperListPage' [100]


You super list page should implement the necessary API then.

I split my rules in to separate rule files for the different  
sections of my up and use a property to tell Wonder to load them:


er.directtoweb.ERD2WModel.additionalModelNames =  
("events 
.d2wmodel","datasets.d2wmodel","clinical.d2wmodel","blog.d2wmodel")


These files normally consist of a couple dozen rules. The biggest  
has aroud 200 rules in it.


Btw: you should try to use the rules as generic as possible by using  
smartAttribute and smartRelationship (check in ERDirectToWeb how  
these rules look like). That can safe you a lot of rules.


cug

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

This email sent to [EMAIL PROTECTED]


Re: two d2wmodels

2008-10-01 Thread Guido Neitzer

On 1-Oct-08, at 10:34 AM, Ash Mishra wrote:

Has anyone tried to use two d2wmodels in the same application.  i.e.  
the default user.d2wmodel and say mysecond.d2wmodel?


Sure. Everybody does. You get d2w rule files from all the frameworks.

The reason I ask is that we want to return different List and Query  
pages for the same Entity (that is, have two different rulesets  
depending on context).  I see in Project Wonder there is a custom  
ERD2WFactory, but it's unclear to me if this allows multiple model  
files - as it appears to also just use the application wide  
defaultModel.


Why don't you just use a rule in your application's rule file with  
something like:


pageConfiguration = 'ListMyEntity' => pageName = 'MySuperListPage' [100]

You super list page should implement the necessary API then.

I split my rules in to separate rule files for the different sections  
of my up and use a property to tell Wonder to load them:


er.directtoweb.ERD2WModel.additionalModelNames =  
("events 
.d2wmodel","datasets.d2wmodel","clinical.d2wmodel","blog.d2wmodel")


These files normally consist of a couple dozen rules. The biggest has  
aroud 200 rules in it.


Btw: you should try to use the rules as generic as possible by using  
smartAttribute and smartRelationship (check in ERDirectToWeb how these  
rules look like). That can safe you a lot of rules.


cug


--
Real World WebObjects Bootcamp at the Big Nerd Ranch:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml

___
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]


two d2wmodels

2008-10-01 Thread Ash Mishra

Hi,

Has anyone tried to use two d2wmodels in the same application.  i.e.  
the default user.d2wmodel and say mysecond.d2wmodel?


The reason I ask is that we want to return different List and Query  
pages for the same Entity (that is, have two different rulesets  
depending on context).  I see in Project Wonder there is a custom  
ERD2WFactory, but it's unclear to me if this allows multiple model  
files - as it appears to also just use the application wide  
defaultModel.


thanks
Ash
___
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: NullPointerException

2008-10-01 Thread Awbrey Hughlett
I am using Wonder 5.3 and I have found a few things saying there was  
a bug with WOForm in that version. Is this the case here?







Form : WOForm {
}

SpecificType : WOTextField {
value = specific.specificType;
}

SaveChanges : WOSubmitButton {
action = saveChanges;
value = "Save";
}

Awbrey

On Oct 1, 2008, at 1:01 AM, Chuck Hill wrote:


Please keep messages on the list.

^ now I understand what you are saying :( oops sorry


That error seems very odd.  What is in the HTML and WOD?

Chuck


On Sep 30, 2008, at 9:46 PM, Awbrey Hughlett wrote:


File
Line#
Method
Package


WOForm.java
58
_enterFormInContext
com.webobjects.appserver._private
WOForm.java
69
takeValuesFromRequest
com.webobjects.appserver._private
WOComponent.java
914
takeValuesFromRequest
com.webobjects.appserver
WOSession.java
1139
takeValuesFromRequest
com.webobjects.appserver
ERXSession.java
525
takeValuesFromRequest
er.extensions.appserver
WOApplication.java
1350
takeValuesFromRequest
com.webobjects.appserver
WOComponentRequestHandler.java
189
_dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java
287
_dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java
322
_dispatchWithPreparedApplication
com.webobjects.appserver._private
WOComponentRequestHandler.java
358
_handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java
432
handleRequest
com.webobjects.appserver._private
WOApplication.java
1306
dispatchRequest
com.webobjects.appserver
WOWorkerThread.java
173
runOnce
com.webobjects.appserver._private
WOWorkerThread.java
254
run
com.webobjects.appserver._private
Thread.java
613
run
java.lang


NA : Non applicable, JIT activated
On Sep 30, 2008, at 11:22 PM, Chuck Hill wrote:



On Sep 30, 2008, at 8:07 PM, Awbrey Hughlett wrote:

I have an entity named "Specific" and an attribute named  
"specificType". I have a WOTextField bound to  
specific.specificType and a WOSubmitButton bound to saveChanges 
() all wrapped in a WOForm. When I run the component and click  
to save changes to the database, I get a NullPointerException.  
Have I instantiated the Specific entity and inserted it into an  
editing context correctly? Or do I have other problems?


You have other problems, some of which you probably don't know  
about.






public class SpecificEntry extends WOComponent {
private Specific specific;
private EOEditingContext ec = new EOEditingContext();


Noo.  :-)  You are using an unlocked editing context.   
Doom awaits you.  You have three choices here:


1. Start using Wonder and ERXEC
2. Use session().defaultEditingContext() - though this has issues  
of its own
3. Use MultiECLockManager and add the infrastructure to your apps  
to handle EC management.





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

public Specific specific() {
if (specific == null) {
editingContext().revert();

		specific = (Specific)EOUtilities.createAndInsertInstance 
(editingContext(), "Specific");

}

return specific;
}

public WOComponent saveChanges() {

editingContext().saveChanges();

setSpecific(null);

return context().page();


Post the stack track for for NPE.  Guessing is too hard.


Chuck



}

public EOEditingContext editingContext() {
return ec;
}

public void setSpecific(Specific newSpecific) {
specific = newSpecific;
}
}

Thanks,
Awbrey
___
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]


--
Chuck Hill Senior Consultant / VP Development

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

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










--
Chuck Hill Senior Consultant / VP Development

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

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








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

This email sent to [EMAIL PROTECTED]