Mark as deleted in a ERD2W app

2011-08-18 Thread Markus Ruggiero
Hi,

I have a requirement that when the user deletes an object in a ERD2W app the 
object is not deleted from the database but rather marked for deletion. There 
is an external cleanup job running twice a day. This job no only removes the 
data from the database but also does some related cleanup on a remote file 
system. My App has neither access nor knowledge of that related data kept 
remotely.

How would I do this? In EditMyThing and ListMyThing page configurations I have 
the entity MyThing set to entityIsDeletable and thus the delete button/icon is 
shown. The triggered delete action does the correct thing but in my case this 
is not what I want.

Any ideas?

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

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


Re: Simple JSON example

2011-08-18 Thread George Domurot
Hi Calven,

If you have a hook to pull down a JSON object, use a package to process this 
data into the appropriate object/array:

http://json.org/

Then, you can easily parse the data and push it into your database.

-G


On Aug 18, 2011, at 1:06 PM, Calven Eggert wrote:

> Hi, All
> 
> I'm to write a java app to read data from a url that is JSON encoded.  I'll 
> then parse the data and create records in an Oracle database using WO.
> 
> I've read that there are two ways of doing this, using either the AJAX or 
> ERREST framework.
> 
> I've managed to get this call working via AJAX but I don't know what to do 
> next:
>   String baseURL = 
> "http://allanl-dev.uhnres.utoronto.ca/capcr/capcr/public/service.php/greenlight_list/";;
>   Client client = JavaJSONClient.create(baseURL, false);
> 
> Is this the best approach?  Does someone have an example I can take a look 
> at?  (The JSON example in AJAX doesn't seem to help me out)
> 
> 
> Calven
> ___
> 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/george%40boxofficetickets.com
> 
> This email sent to geo...@boxofficetickets.com

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

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


Re: Bundle Name Problem

2011-08-18 Thread Jeff Schmitz
Looks like it didn't like where my wonder source code projects were.  When I 
re-created them with the new github repository in a new place, and then 
re-imported them into my project, the problem cleared up.  One of the 
directories in the path did have a space in it which I eliminated when I moved 
them.  Weird thing is that it had been working fine for months where it was, 
then all the sudden it wouldn't work anymore.

As always, thanks to all for the help!

Jeff

On Aug 17, 2011, at 10:00 PM, Chuck Hill wrote:

> I'll guess that you have some sort of recursive soft links in your project.  
> ls -al will show you what files really are.
> 
> 
> 
> 
> On 2011-08-17, at 7:01 PM, Jeff Schmitz wrote:
> 
>> OK, that got me past the bundle error.  But now I'm back to a java heap 
>> space error.  Other projects work fine in the workspace.  I even tried 
>> creating a new Wonder project and manually moving source code, wod files, 
>> libraries and property and build files from the old project into this new 
>> one, and I'm still seeing the problem.
>> 
>> [2011-8-17 20:28:28 CDT]  Initialized : er.extensions.ERXExtensions
>> [2011-8-17 20:28:28 CDT]  Couldn't load properties file: 
>> /Users/netBrackets/WebObjects.properties at path: /Users/netBrackets
>> You are referencing er.extensions.ERXPatternLayout but should use 
>> er.extensions.logging.ERXPatternLayout instead
>> Aug 17 20:28:29 N/A[N/A] (ERXLogger.java:211) INFO  org.apache.log4j.Logger  
>> - Updated the logging configuration with the current system properties.
>> You are referencing er.extensions.ERXPatternLayout but should use 
>> er.extensions.logging.ERXPatternLayout instead
>> Aug 17 20:28:29 N/A[N/A] (ERXLogger.java:211) INFO  org.apache.log4j.Logger  
>> - Updated the logging configuration with the current system properties.
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:43) WARN  NSLog  - 
>> Couldn't load properties file: /Users/netBrackets/WebObjects.properties at 
>> path: /Users/netBrackets
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOMaxIOBufferSize=8196
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOWorkerThreadCountMin=16
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOSocketMonitorSleepTime=50
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WODirectConnectEnabled=true
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOIncludeCommentsInResponse=false
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOWorkerThreadCount=8
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOAdaptorURL=http://127.0.0.1/cgi-bin/WebObjects
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOLaunchdEnabled=false
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOIDE=WOLips
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WODebuggingEnabled=true
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOListenQueueSize=128
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOMissingResourceSearchEnabled=true
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOApplicationClassName=com.netbrackets.app.Application
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOSessionStoreClassName=WOServerSessionStore
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOContextClassName=WOContext
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOCachingEnabled=false
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOAcceptMalformedCookies=false
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> NSProjectSearchPath=("..")
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOMonitorEnabled=false
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOAllowRapidTurnaround=true
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOGenerateWSDL=true
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOWorkerThreadCountMax=256
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOAllowsConcurrentRequestHandling=false
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOAdaptor=WODefaultAdaptor
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOSessionTimeOut=3600
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOMaxSocketIdleTime=18
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WODefaultUndoStackLimit=10
>> Aug 17 20:28:29 N/A[N/A] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  - 
>> WOAutoOpenClientApplication=true
>> Aug 17 20:28:29 N/A[N/A] (

Re: Qualifier With Primary Key

2011-08-18 Thread Paul Hoadley
Just to clarify slightly, I happen to agree with Dave and Jesse, but that's 
almost incidental to your original post.  When I wrote this:

On 19/08/2011, at 9:37 AM, Paul Hoadley wrote:

> On 18/08/2011, at 11:05 PM, Kevin Hinkson wrote:
> 
>> Since the best practice is to not make primary keys class properties, how do 
>> I then create a qualifier that is based on the primary key of an EO?
> 
> My suggestion would be that you don't.

What I meant was: if you _have_ to create a qualifier based on the primary key, 
make the primary key a class property.  I just can't see a good argument for 
hiding it from the class if you've decided the primary key _is_ business data 
in some particular case.


-- 
Paul.

http://logicsquad.net/


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

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


Re: Conditional relation

2011-08-18 Thread David Avendasora
Hi Frank,

Sometimes doing what your doing is the only way to do meet the requirements...

BUT

What Jesse said is right 99% of the time. This sounds more appropriate for the 
Controller level of MVC, not the Model classes.

What if you have an application that uses the same Model but it doesn't have 
authentication, or even users? You are making your ability to read and write, 
or at the very least the way you read and write, to the DB dependent upon an 
implementation of a UI.

Sometimes it's okay, but it's always painting yourself into a corner. Sometimes 
it's okay to be stuck in a nice, safe, protected, Easily-Defended Corner Where 
THe PHantoms THAT haunt yOU CAN'T SNEAK UP ON YOU!

... er... um.. 

Where was I... 

Oh, yeah. But not often.

Dave

On Aug 16, 2011, at 11:15 PM, Frank Stock wrote:

> Thank you all and thank Kieran
> 
> ERXThreadStorage will do what I want to do!!
> 
> 
> regards,
> Frank
> Op 16-aug-2011, om 17:02 heeft Kieran Kelleher het volgende geschreven:
> 
>> Frank,
>> 
>> In your session awake, you can stuff the current session user's EOGlobalID 
>> (not the EO itself) into ERXThreadStorage. Then you can access that global 
>> id from anywhere, hydrate a user EO in whatever EC you are working and use 
>> it for qualifier's or whatever.
>> 
>> Regards, Kieran
>> 
>> 
>> On Aug 16, 2011, at 10:26 AM, Frank Stock wrote:
>> 
>>> I have never used it but is this something I can put in the 
>>> ERXTreadStorage? So I can get it from ERXGenericRecord?
>>> Op 16-aug-2011, om 15:43 heeft Jesse Tayler het volgende geschreven:
>>> 
 maybe just create a session variable for your authenticatedUser and set 
 that with a login method.
 
 in another method for accessing the data, check if the 
 session.authenticatedUser exists, and whatever you want before retuning 
 data from table B.
 
 
 
 On Aug 16, 2011, at 9:39 AM, Frank Stock wrote:
 
> Hi all,
> 
> 
> How can I solve this:
> 
> I have a table A and a table B. If I fetch an object from A, I want an 
> object from B depending on the user that has logged in.
> So I want to add an method in de Class A that is fetching the object from 
> B, but where can I get the user-information?
> 
> It is like the use of ERXLocalizer where you get the column in the 
> language you want, but I want the get a relation B, depending on the user 
> information.
> 
> Or where can I find more info about the working of 'user info' in the 
> modeler.
> 
> Thanks in advance,
> Frank Stock
> Belgium ___
> 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/jtayler%40oeinc.com
> 
> This email sent to jtay...@oeinc.com
> 
 
>>> 
>>> ___
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
>>> 
>>> This email sent to kelleh...@gmail.com
>> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
> 
> This email sent to webobje...@avendasora.com
> 
> 

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

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


Re: Qualifier With Primary Key

2011-08-18 Thread Jesse Tayler

Plus 1.

If your business logic does not require using keys as logic then you likely 
want a generated unique id alongside your key.

There's a lot of reasons but some are that relational database keys have 
complicated, even obtuse logic that can vary between database and even 
versions. 

As time goes by databases get merged, they suffer repairs or require 
import/export and unexpected relational alterations which can alter the logical 
handling of keys. So, leave that sort of thing to the database.

What is often substituted is a generated key - even if the generation is based 
on the primary key, you can alter the logic later to ensure uniqueness even in 
unexpected or even bizarre situations.




On Aug 18, 2011, at 9:09 PM, David Avendasora wrote:

> Paul is right, as far as I'm concerned.
> 
> But, be really, really, really, really, really (really, really) sure you 
> Need™ to expose it. Do everything you can to avoid it. If you only 
> occasionally (in code) need to get an object by it's PK, then use the
> 
> EOUtilities.faultWithPrimaryKey
> EOUtilities.faultWithPrimaryKeyValue
> EOUtilities.objectWithPrimaryKey
> EOUtilities.faultWithPrimaryKeyValue
> 
> methods. Be warned that the "faultWith" ones aren't safe if you don't already 
> know that the PK exists in the DB, as those methods don't actually go to the 
> DB and fetch the EO, they just create a fault for it. This means that if the 
> PK doesn't actually exist in the DB, you'll get an exception at a later point 
> when EOF tries to fully load the EO. The "objectWith" methods will throw an 
> exception immediately, which is handy.
> 
> If loading from a URL parameter, I'd _absolutely_ use the 
> objectWithPrimaryKeyValue method.
> 
> But I digress...
> 
> If you are in control of the DB schema, create a second unique column (even 
> populate it with the PK if you want). Every time I start depending upon PK 
> values in code I end up regretting it. Most recently because we have several 
> customers with their own instances of our App & DB. Now we want to merge the 
> DBs and we've got a huge headache of conflicting PKs. Uhg.
> 
> As Chuck once said (paraphrased), PKs (and therefore FKs) are not business 
> data, They are an artifact of how a Relational DB implements relationships. 
> Your application doesn't want some arbitrary row number from the table, it 
> wants a specific row that has specific business meaning. Equating the two is 
> a fallacy.
> 
> Now, if you are working with a DB that someone else setup with meaningful 
> PKs, well... you'll probably be okay.
> 
> Maybe. :-)
> 
> Dave
> 
> On Aug 19, 2011, at 8:07 AM, Paul Hoadley wrote:
> 
>> On 18/08/2011, at 11:05 PM, Kevin Hinkson wrote:
>> 
>>> Since the best practice is to not make primary keys class properties, how 
>>> do I then create a qualifier that is based on the primary key of an EO?
>> 
>> My suggestion would be that you don't.  Calling it a best practice isn't an 
>> arbitrary designation—there's an argument behind it.  And if you buy that 
>> argument (whatever it is) for not making primary keys class properties, then 
>> the same argument applies to creating qualifiers based on the primary key.  
>> What does "not making a primary key a class property" mean if it doesn't 
>> mean "making the primary key inaccessible to the class"?
>> 
>> So if you've got a business or technical case for exposing the primary key, 
>> just do it.  It's only a best practice if you accept the argument behind 
>> it—maybe you have a genuine exception.
>> 
>> 
>> -- 
>> Paul.
>> 
>> http://logicsquad.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/webobjects%40avendasora.com
>> 
>> This email sent to webobje...@avendasora.com
>> 
>> 
> 
> ___
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
> 
> This email sent to jtay...@oeinc.com
> 

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

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


Re: Qualifier With Primary Key

2011-08-18 Thread David Avendasora
Paul is right, as far as I'm concerned.

But, be really, really, really, really, really (really, really) sure you Need™ 
to expose it. Do everything you can to avoid it. If you only occasionally (in 
code) need to get an object by it's PK, then use the

 EOUtilities.faultWithPrimaryKey
 EOUtilities.faultWithPrimaryKeyValue
 EOUtilities.objectWithPrimaryKey
 EOUtilities.faultWithPrimaryKeyValue

methods. Be warned that the "faultWith" ones aren't safe if you don't already 
know that the PK exists in the DB, as those methods don't actually go to the DB 
and fetch the EO, they just create a fault for it. This means that if the PK 
doesn't actually exist in the DB, you'll get an exception at a later point when 
EOF tries to fully load the EO. The "objectWith" methods will throw an 
exception immediately, which is handy.

If loading from a URL parameter, I'd _absolutely_ use the 
objectWithPrimaryKeyValue method.

But I digress...

If you are in control of the DB schema, create a second unique column (even 
populate it with the PK if you want). Every time I start depending upon PK 
values in code I end up regretting it. Most recently because we have several 
customers with their own instances of our App & DB. Now we want to merge the 
DBs and we've got a huge headache of conflicting PKs. Uhg.

As Chuck once said (paraphrased), PKs (and therefore FKs) are not business 
data, They are an artifact of how a Relational DB implements relationships. 
Your application doesn't want some arbitrary row number from the table, it 
wants a specific row that has specific business meaning. Equating the two is a 
fallacy.

Now, if you are working with a DB that someone else setup with meaningful PKs, 
well... you'll probably be okay.

Maybe. :-)

Dave

On Aug 19, 2011, at 8:07 AM, Paul Hoadley wrote:

> On 18/08/2011, at 11:05 PM, Kevin Hinkson wrote:
> 
>> Since the best practice is to not make primary keys class properties, how do 
>> I then create a qualifier that is based on the primary key of an EO?
> 
> My suggestion would be that you don't.  Calling it a best practice isn't an 
> arbitrary designation—there's an argument behind it.  And if you buy that 
> argument (whatever it is) for not making primary keys class properties, then 
> the same argument applies to creating qualifiers based on the primary key.  
> What does "not making a primary key a class property" mean if it doesn't mean 
> "making the primary key inaccessible to the class"?
> 
> So if you've got a business or technical case for exposing the primary key, 
> just do it.  It's only a best practice if you accept the argument behind 
> it—maybe you have a genuine exception.
> 
> 
> -- 
> Paul.
> 
> http://logicsquad.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/webobjects%40avendasora.com
> 
> This email sent to webobje...@avendasora.com
> 
> 

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

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


Re: Qualifier With Primary Key

2011-08-18 Thread Paul Hoadley
On 18/08/2011, at 11:05 PM, Kevin Hinkson wrote:

> Since the best practice is to not make primary keys class properties, how do 
> I then create a qualifier that is based on the primary key of an EO?

My suggestion would be that you don't.  Calling it a best practice isn't an 
arbitrary designation—there's an argument behind it.  And if you buy that 
argument (whatever it is) for not making primary keys class properties, then 
the same argument applies to creating qualifiers based on the primary key.  
What does "not making a primary key a class property" mean if it doesn't mean 
"making the primary key inaccessible to the class"?

So if you've got a business or technical case for exposing the primary key, 
just do it.  It's only a best practice if you accept the argument behind 
it—maybe you have a genuine exception.


-- 
Paul.

http://logicsquad.net/


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

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


Simple JSON example

2011-08-18 Thread Calven Eggert
Hi, All

I'm to write a java app to read data from a url that is JSON encoded.  I'll 
then parse the data and create records in an Oracle database using WO.

I've read that there are two ways of doing this, using either the AJAX or 
ERREST framework.

I've managed to get this call working via AJAX but I don't know what to do next:
String baseURL = 
"http://allanl-dev.uhnres.utoronto.ca/capcr/capcr/public/service.php/greenlight_list/";;
Client client = JavaJSONClient.create(baseURL, false);

Is this the best approach?  Does someone have an example I can take a look at?  
(The JSON example in AJAX doesn't seem to help me out)


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

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


Re: Qualifier With Primary Key

2011-08-18 Thread Johnny Miller
EOUtilities.objectWithPrimaryKey

http://www.webobjects.me/API/wo542/com/webobjects/eoaccess/EOUtilities.html#objectWithPrimaryKey(com.webobjects.eocontrol.EOEditingContext,%20java.lang.String,%20com.webobjects.foundation.NSDictionary)

re: title.  If you really want to trick out Google add an attribute called slug 
and load that up with a key word phrase and use that as your qualifier.

best,

Johnny Miller
jlmil...@kahalawai.com
www.kahalawai.com

On Aug 18, 2011, at 3:58 AM, Kevin Hinkson wrote:

> 
> On 18 Aug 2011, at 09:54, Pascal Robert wrote:
> 
>> 
>> Le 2011-08-18 à 09:47, Kevin Hinkson a écrit :
>> 
>>> 
 
 I'm not answering your question, but your URL should be 
 /blog/title-of-post instead of using primary keys, to have even nicer URLs 
 and better rank on Google. Are you using DirectActions or ERRest's HTML 
 routing?
 
>>> 
>>> Direct Actions. The example is just really an example though. There are 
>>> other cases where I might want to use primary key as an identifier in the 
>>> URL.
>> 
>> If you go the ERRest's HTML routing, you can easily use primary keys (and 
>> get a lot of the job done automatically). It's just a suggestion :-)
>> 
> 
> Ah. That makes sense. Thanks. 
> 
> Also, thinking more about what you said about using title-of-post I think 
> that could apply to most if not all situations I can think of.
> 
>> 
>> 
>> 
>> 
> 
> 
> — K.R.H.
> 
> ___
> 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/jlmiller%40kahalawai.com
> 
> This email sent to jlmil...@kahalawai.com

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

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


Re: Qualifier With Primary Key

2011-08-18 Thread Kevin Hinkson

On 18 Aug 2011, at 09:54, Pascal Robert wrote:

> 
> Le 2011-08-18 à 09:47, Kevin Hinkson a écrit :
> 
>> 
>>> 
>>> I'm not answering your question, but your URL should be /blog/title-of-post 
>>> instead of using primary keys, to have even nicer URLs and better rank on 
>>> Google. Are you using DirectActions or ERRest's HTML routing?
>>> 
>> 
>> Direct Actions. The example is just really an example though. There are 
>> other cases where I might want to use primary key as an identifier in the 
>> URL.
> 
> If you go the ERRest's HTML routing, you can easily use primary keys (and get 
> a lot of the job done automatically). It's just a suggestion :-)
> 

Ah. That makes sense. Thanks. 

Also, thinking more about what you said about using title-of-post I think that 
could apply to most if not all situations I can think of.

> 
> 
> 
> 


— K.R.H.

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

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


Re: Qualifier With Primary Key

2011-08-18 Thread Pascal Robert

Le 2011-08-18 à 09:47, Kevin Hinkson a écrit :

> 
>> 
>> I'm not answering your question, but your URL should be /blog/title-of-post 
>> instead of using primary keys, to have even nicer URLs and better rank on 
>> Google. Are you using DirectActions or ERRest's HTML routing?
>> 
> 
> Direct Actions. The example is just really an example though. There are other 
> cases where I might want to use primary key as an identifier in the URL.

If you go the ERRest's HTML routing, you can easily use primary keys (and get a 
lot of the job done automatically). It's just a suggestion :-)





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

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


Re: Qualifier With Primary Key

2011-08-18 Thread Kevin Hinkson

> 
> I'm not answering your question, but your URL should be /blog/title-of-post 
> instead of using primary keys, to have even nicer URLs and better rank on 
> Google. Are you using DirectActions or ERRest's HTML routing?
> 

Direct Actions. The example is just really an example though. There are other 
cases where I might want to use primary key as an identifier in the URL. 
___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Qualifier With Primary Key

2011-08-18 Thread Pascal Robert

Le 2011-08-18 à 09:35, Kevin Hinkson a écrit :

> Hi,
> Since the best practice is to not make primary keys class properties, how do 
> I then create a qualifier that is based on the primary key of an EO?
> 
> Simple Eg: A blog site has nice, short bookmark-able URLs like 
> http://website.com/blog?id=5 where 5 is the primary key. When the user hits 
> that page then I would need to lookup the blog entry by the primary key.

I'm not answering your question, but your URL should be /blog/title-of-post 
instead of using primary keys, to have even nicer URLs and better rank on 
Google. Are you using DirectActions or ERRest's HTML routing?

> I've looked at accessing primary keys via 
> (http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Primary+Keys)
>  but it only solves accessing the primary key for an EO you already have.
> 
> What's the best approach in this situation? 
> 
> 
> — K.R.H.
> 
> PS: I encountered WO/ERXDisplayGroup and ERXFlickrBatchNavigation for the 
> first time yesterday. I think I'm in love.
> 
> ___
> 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/probert%40macti.ca
> 
> This email sent to prob...@macti.ca

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

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


Re: Qualifier With Primary Key

2011-08-18 Thread Michael Kondratov
Use EOUtilities.faultWith. method.


Michael

Sent from my iPad

On Aug 18, 2011, at 9:35, Kevin Hinkson  wrote:

> Hi,
> Since the best practice is to not make primary keys class properties, how do 
> I then create a qualifier that is based on the primary key of an EO?
> 
> Simple Eg: A blog site has nice, short bookmark-able URLs like 
> http://website.com/blog?id=5 where 5 is the primary key. When the user hits 
> that page then I would need to lookup the blog entry by the primary key.
> 
> I've looked at accessing primary keys via 
> (http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Primary+Keys)
>  but it only solves accessing the primary key for an EO you already have.
> 
> What's the best approach in this situation? 
> 
> 
> — K.R.H.
> 
> PS: I encountered WO/ERXDisplayGroup and ERXFlickrBatchNavigation for the 
> first time yesterday. I think I'm in love.
> 
> ___
> 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/michael%40aspireauctions.com
> 
> This email sent to mich...@aspireauctions.com
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Qualifier With Primary Key

2011-08-18 Thread Kevin Hinkson
Hi,
Since the best practice is to not make primary keys class properties, how do I 
then create a qualifier that is based on the primary key of an EO?

Simple Eg: A blog site has nice, short bookmark-able URLs like 
http://website.com/blog?id=5 where 5 is the primary key. When the user hits 
that page then I would need to lookup the blog entry by the primary key.

I've looked at accessing primary keys via 
(http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-Primary+Keys) 
but it only solves accessing the primary key for an EO you already have.

What's the best approach in this situation? 


— K.R.H.

PS: I encountered WO/ERXDisplayGroup and ERXFlickrBatchNavigation for the first 
time yesterday. I think I'm in love.

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

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