Look, a displaygroup!
I remember that in the old days it was possible to drag an entitiy into a component and TADA, you had a working displaygroup. What is the current tada way of doing that? Johan Henselmans jo...@netsense.nl ___ 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: Look, a displaygroup!
Hi Johan, there's a somehow tada way in Wolips : in the component editor, there's a Display Groups tab where you can add and edit properties of a display group. I've never used it though, Cheers Alex Le 19 août 2011 à 09:53, Johan Henselmans a écrit : > I remember that in the old days it was possible to drag an entitiy into a > component and TADA, you had a working displaygroup. > > What is the current tada way of doing that? > > > > Johan Henselmans > jo...@netsense.nl > > > > ___ > 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/alexis.tual%40gmail.com > > This email sent to alexis.t...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Look, a displaygroup!
Hi Johan Yeah, there is the Builder For Dummies way. The current way quite the same except the drap-and-drop tada way. Cheers Cheong Hee - Original Message - From: "Johan Henselmans" To: "WebObjects Development" Sent: Friday, August 19, 2011 3:53 PM Subject: Look, a displaygroup! I remember that in the old days it was possible to drag an entitiy into a component and TADA, you had a working displaygroup. What is the current tada way of doing that? Johan Henselmans jo...@netsense.nl ___ 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/chng34%40gmail.com This email sent to chn...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Qualifier With Primary Key
Hi Everyone, Thanks for all of your suggestions. The general consensus seems to be don't use primary keys in the way I described, use another unique identifier/slug etc. But if one really, really has to; then the following are available: EOUtilities.faultWithPrimaryKey EOUtilities.faultWithPrimaryKeyValue EOUtilities.objectWithPrimaryKey EOUtilities.faultWithPrimaryKeyValue This should be a common issue then. So I'm surprised there isn't some kind of slug generator that handles ensuring uniqueness in Wonder. (or is there?) On 18 Aug 2011, at 21:52, Paul Hoadley wrote: > 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/ > > — 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
Unless you're generating a true guid that's impractical to do in a general way at the app level. tb On Aug 19, 2011, at 8:03 AM, Kevin Hinkson wrote: > This should be a common issue then. So I'm surprised there isn't some kind of > slug generator that handles ensuring uniqueness in Wonder. (or is there?) ___ 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
There are lots of packages on this web site which package(s) would you recommend? On 2011-08-19, at 12:29 AM, George Domurot wrote: > 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: Simple JSON example
Check a thread in the Wonder mailing list on July 28, Ted Archibald posted this solution to consume REST services: public static Job fetchJob(String jobNumber){ Job job = null; DefaultHttpClient httpclient = new DefaultHttpClient(); try { HttpHost target = new HttpHost("server.com", 443, "https"); HttpGet req = new HttpGet("/jobs/" + jobNumber + ".json?key=12345"); HttpResponse rsp = httpclient.execute(target, req); HttpEntity entity = rsp.getEntity(); String resultString = EntityUtils.toString(entity); ERXJSONRestParser parser = new ERXJSONRestParser(); ERXStringRestRequest request = new ERXStringRestRequest(resultString); ERXRestRequestNode requestNode = parser.parseRestRequest(request, null, null); NSDictionary dict = (NSDictionary) requestNode.toNSCollection(null); job = new Job(dict); job.setJob(jobNumber); } catch (IOException e1) { e1.printStackTrace(); } finally { httpclient.getConnectionManager().shutdown(); } return job; } I'm using something similar (for GET and POST requests) in another app. You can also look at the RestRouteExample in Wonder, it have a RestClient in there. > There are lots of packages on this web site which package(s) would you > recommend? > > > On 2011-08-19, at 12:29 AM, George Domurot wrote: > >> 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/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: Simple JSON example
FYI, I added a page on the wiki with possible way to consume REST services: http://wiki.objectstyle.org/confluence/display/WONDER/Consuming+REST+services > Check a thread in the Wonder mailing list on July 28, Ted Archibald posted > this solution to consume REST services: > > public static Job fetchJob(String jobNumber){ > Job job = null; > DefaultHttpClient httpclient = new DefaultHttpClient(); > try { > HttpHost target = new HttpHost("server.com", 443, "https"); > HttpGet req = new HttpGet("/jobs/" + jobNumber + ".json?key=12345"); > HttpResponse rsp = httpclient.execute(target, req); > HttpEntity entity = rsp.getEntity(); > String resultString = EntityUtils.toString(entity); > > ERXJSONRestParser parser = new ERXJSONRestParser(); > > ERXStringRestRequest request = new ERXStringRestRequest(resultString); > > ERXRestRequestNode requestNode = parser.parseRestRequest(request, > null, null); > > NSDictionary dict = (NSDictionary) requestNode.toNSCollection(null); > job = new Job(dict); > job.setJob(jobNumber); > > } > catch (IOException e1) { > e1.printStackTrace(); > } > finally { > httpclient.getConnectionManager().shutdown(); > } > return job; > } > > I'm using something similar (for GET and POST requests) in another app. You > can also look at the RestRouteExample in Wonder, it have a RestClient in > there. > >> There are lots of packages on this web site which package(s) would you >> recommend? >> >> >> On 2011-08-19, at 12:29 AM, George Domurot wrote: >> >>> 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/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: Mark as deleted in a ERD2W app
Sounds like you need a boolean value that your clean up routine checks against. Delete means delete in D2W :-) d On 2011-08-18, at 11:08 PM, Markus Ruggiero wrote: > 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/programmingosx%40mac.com > > This email sent to programming...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Qualifier With Primary Key
Hi Travis- Is it impractical? I've used a simple date+rand constructor and ran it through an encoding to HEX to get a 'random' object id and had no troubles with that. I suppose it has limits to uniqueness in theory but it was quick to generate. I was also about to start looking for something more short, like bit.ly urls ? More like a mod-counter with a nice set of case-sensitive characters. I was just about to ask if someone know's of a good slice of code or method to do just that so I could adopt something more modern? I figured for certain WO URLs it might be clean and won't expose id ordering in a URL so I'd write an apache rule or two and use an object-id like the die above? Not smart? On Aug 19, 2011, at 8:15 AM, Travis Britt wrote: > Unless you're generating a true guid that's impractical to do in a general > way at the app level. > > tb > > On Aug 19, 2011, at 8:03 AM, Kevin Hinkson wrote: >> This should be a common issue then. So I'm surprised there isn't some kind >> of slug generator that handles ensuring uniqueness in Wonder. (or is there?) > > ___ > 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
You're close to a real uuid at that point. The common problem is multiple instance coordination, can be a lot easier just to have the DB assign a unique value since you're probably coordinating there anyway. But it all depends on your app, your db, your scaling characteristics, how many potential collisions you're willing to risk…. http://download.oracle.com/javase/1.5.0/docs/api/java/util/UUID.html tb On Aug 19, 2011, at 12:14 PM, Jesse Tayler wrote: > Hi Travis- > > Is it impractical? > > I've used a simple date+rand constructor and ran it through an encoding to > HEX to get a 'random' object id and had no troubles with that. I suppose it > has limits to uniqueness in theory but it was quick to generate. > > I was also about to start looking for something more short, like bit.ly urls > ? More like a mod-counter with a nice set of case-sensitive characters. > > I was just about to ask if someone know's of a good slice of code or method > to do just that so I could adopt something more modern? > > I figured for certain WO URLs it might be clean and won't expose id ordering > in a URL so I'd write an apache rule or two and use an object-id like the die > above? Not smart? > > On Aug 19, 2011, at 8:15 AM, Travis Britt wrote: > >> Unless you're generating a true guid that's impractical to do in a general >> way at the app level. >> >> tb >> >> On Aug 19, 2011, at 8:03 AM, Kevin Hinkson wrote: >>> This should be a common issue then. So I'm surprised there isn't some kind >>> of slug generator that handles ensuring uniqueness in Wonder. (or is there?) >> >> ___ >> 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: Mark as deleted in a ERD2W app
Hi Markus, David is right. If you don't want to delete, don't set isEntityDeletable to true. I'd set up a custom delete action using either a branch delegate or a subclass of ERDActionButton. Then you use your custom delete action to set the delete flag rather than actually deleting the object. You'd also need to add an additional qualifier to your display groups to prevent the 'deleted' objects from showing up in the interface. Ramsey On Aug 19, 2011, at 9:05 AM, David Holt wrote: > Sounds like you need a boolean value that your clean up routine checks > against. Delete means delete in D2W :-) > > d > > On 2011-08-18, at 11:08 PM, Markus Ruggiero wrote: > >> 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: Qualifier With Primary Key
oh, ya, I hadn't seen that class but the idea is similar. I guess because I was using the app not database, I put in an instance number or something about the host/port or something. this brings me to my next question -- how about those modern looking bit.ly type id's ? seems like you can take the key or counter value and mod your way through a set of characters and build up a super-short id - no? I have ERRest doing my work right now, but I'll be wanting to email URLs to the web app and figured I'd prefer not to show id's but rather could use a counter like bit.ly urls and I haven't yet looked into that. Thoughts? Ideas? Suggestions? On Aug 19, 2011, at 1:04 PM, Travis Britt wrote: > You're close to a real uuid at that point. The common problem is multiple > instance coordination, can be a lot easier just to have the DB assign a > unique value since you're probably coordinating there anyway. But it all > depends on your app, your db, your scaling characteristics, how many > potential collisions you're willing to risk…. > > http://download.oracle.com/javase/1.5.0/docs/api/java/util/UUID.html > > tb > > On Aug 19, 2011, at 12:14 PM, Jesse Tayler wrote: > >> Hi Travis- >> >> Is it impractical? >> >> I've used a simple date+rand constructor and ran it through an encoding to >> HEX to get a 'random' object id and had no troubles with that. I suppose it >> has limits to uniqueness in theory but it was quick to generate. >> >> I was also about to start looking for something more short, like bit.ly urls >> ? More like a mod-counter with a nice set of case-sensitive characters. >> >> I was just about to ask if someone know's of a good slice of code or method >> to do just that so I could adopt something more modern? >> >> I figured for certain WO URLs it might be clean and won't expose id ordering >> in a URL so I'd write an apache rule or two and use an object-id like the >> die above? Not smart? >> >> On Aug 19, 2011, at 8:15 AM, Travis Britt wrote: >> >>> Unless you're generating a true guid that's impractical to do in a general >>> way at the app level. >>> >>> tb >>> >>> On Aug 19, 2011, at 8:03 AM, Kevin Hinkson wrote: This should be a common issue then. So I'm surprised there isn't some kind of slug generator that handles ensuring uniqueness in Wonder. (or is there?) >>> >>> ___ >>> 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/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
Yep, all depends on the number of potential collisions you care about. In semi-controlled environments you can make do with fewer bits of uniqueness. tb On Aug 19, 2011, at 1:13 PM, Jesse Tayler wrote: > how about those modern looking bit.ly type id's ? > > seems like you can take the key or counter value and mod your way through a > set of characters and build up a super-short id - no? > > I have ERRest doing my work right now, but I'll be wanting to email URLs to > the web app and figured I'd prefer not to show id's but rather could use a > counter like bit.ly urls and I haven't yet looked into that. > > Thoughts? Ideas? Suggestions? > > > > On Aug 19, 2011, at 1:04 PM, Travis Britt wrote: > >> You're close to a real uuid at that point. The common problem is multiple >> instance coordination, can be a lot easier just to have the DB assign a >> unique value since you're probably coordinating there anyway. But it all >> depends on your app, your db, your scaling characteristics, how many >> potential collisions you're willing to risk…. >> >> http://download.oracle.com/javase/1.5.0/docs/api/java/util/UUID.html >> >> tb >> >> On Aug 19, 2011, at 12:14 PM, Jesse Tayler wrote: >> >>> Hi Travis- >>> >>> Is it impractical? >>> >>> I've used a simple date+rand constructor and ran it through an encoding to >>> HEX to get a 'random' object id and had no troubles with that. I suppose it >>> has limits to uniqueness in theory but it was quick to generate. >>> >>> I was also about to start looking for something more short, like bit.ly >>> urls ? More like a mod-counter with a nice set of case-sensitive characters. >>> >>> I was just about to ask if someone know's of a good slice of code or method >>> to do just that so I could adopt something more modern? >>> >>> I figured for certain WO URLs it might be clean and won't expose id >>> ordering in a URL so I'd write an apache rule or two and use an object-id >>> like the die above? Not smart? >>> >>> On Aug 19, 2011, at 8:15 AM, Travis Britt wrote: >>> Unless you're generating a true guid that's impractical to do in a general way at the app level. tb On Aug 19, 2011, at 8:03 AM, Kevin Hinkson wrote: > This should be a common issue then. So I'm surprised there isn't some > kind of slug generator that handles ensuring uniqueness in Wonder. (or is > there?) ___ 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
anyone got a hint on a slice of code to do that short url magic? if I were to start now, I guess I'd wait for the object to store in the DB, get the primary key integer and modular arithmetically pick a character from a set and add that to a character lineup which should reflect a unique choice of characters that is very, very short even with large integer keys. On Aug 19, 2011, at 1:27 PM, Travis Britt wrote: > Yep, all depends on the number of potential collisions you care about. In > semi-controlled environments you can make do with fewer bits of uniqueness. > > tb > > On Aug 19, 2011, at 1:13 PM, Jesse Tayler wrote: > >> how about those modern looking bit.ly type id's ? >> >> seems like you can take the key or counter value and mod your way through a >> set of characters and build up a super-short id - no? >> >> I have ERRest doing my work right now, but I'll be wanting to email URLs to >> the web app and figured I'd prefer not to show id's but rather could use a >> counter like bit.ly urls and I haven't yet looked into that. >> >> Thoughts? Ideas? Suggestions? >> >> >> >> On Aug 19, 2011, at 1:04 PM, Travis Britt wrote: >> >>> You're close to a real uuid at that point. The common problem is multiple >>> instance coordination, can be a lot easier just to have the DB assign a >>> unique value since you're probably coordinating there anyway. But it all >>> depends on your app, your db, your scaling characteristics, how many >>> potential collisions you're willing to risk…. >>> >>> http://download.oracle.com/javase/1.5.0/docs/api/java/util/UUID.html >>> >>> tb >>> >>> On Aug 19, 2011, at 12:14 PM, Jesse Tayler wrote: >>> Hi Travis- Is it impractical? I've used a simple date+rand constructor and ran it through an encoding to HEX to get a 'random' object id and had no troubles with that. I suppose it has limits to uniqueness in theory but it was quick to generate. I was also about to start looking for something more short, like bit.ly urls ? More like a mod-counter with a nice set of case-sensitive characters. I was just about to ask if someone know's of a good slice of code or method to do just that so I could adopt something more modern? I figured for certain WO URLs it might be clean and won't expose id ordering in a URL so I'd write an apache rule or two and use an object-id like the die above? Not smart? On Aug 19, 2011, at 8:15 AM, Travis Britt wrote: > Unless you're generating a true guid that's impractical to do in a > general way at the app level. > > tb > > On Aug 19, 2011, at 8:03 AM, Kevin Hinkson wrote: >> This should be a common issue then. So I'm surprised there isn't some >> kind of slug generator that handles ensuring uniqueness in Wonder. (or >> is there?) > > ___ > 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/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: Does the ERXStaticResourceRequestHandler work with those compressed jarred resources?
Hi Henrique, I've made a couple of minor alternations [1], but this handler would be good to contribute to Wonder or to some published jar so we can refer to it in the default project archetypes. Lachlan Deck lachlan.d...@gmail.com [1] https://gist.github.com/1156957 On 07/07/2011, at 8:49 AM, Henrique Prange wrote: > Hi Lars, > > And I've missed the link. > > [1]https://gist.github.com/1068523 > > Cheers, > > Henrique > > On 06/07/2011, at 19:48, Henrique Prange wrote: > >> Hi Lars, >> >> The JarResourceRequestHandler [1] is very experimental, but I hope it can >> help you. >> >> Add the following code to you application initialization to enable this >> handler: >> >> if (isDirectConnectEnabled()) { >> registerRequestHandler(new JarResourceRequestHandler(), "_wr_"); >> >> if (ERXApplication.isWO54()) { >> registerRequestHandler(new JarResourceRequestHandler(), "wr"); >> } >> } >> >> Cheers, >> >> Henrique >> >> On 06/07/2011, at 15:06, Lars Sonchocky-Helldorf wrote: >> >>> >>> Am 23.07.2010 um 15:08 schrieb Anjo Krank: >>> Hm. Then again, IIRC we use strings for paths... so you probably *could* give these methods a "jar:xxx" string and handle that in the method. Not the cleanest way, but what the heck. I'm not sure if not using the default props is that good a thing. Sometimes these change or get added to and you would want to get the additions. Cheers, Anjo >>> >>> Are there any new on that situation? >>> >>> I am currently running into something similar when trying to use the >>> Ajax-Functionality of Wonder: >>> >>> Jul 06 17:48:51 Portal[] INFO >>> er.extensions.appserver.ERXStaticResourceRequestHandler - Unable to get >>> contents of file >>> 'jar:file:/Volumes/Daten/lars.sonchocky-helldorf/.m2/repository/wonder/ajax/Ajax/5.0.0-r11323/Ajax-5.0.0-r11323-wo54.jar!/WebServerResources/wonder.js' >>> for uri: >>> jar:file:///Volumes/Daten/lars.sonchocky-helldorf/.m2/repository/wonder/ajax/Ajax/5.0.0-r11323/Ajax-5.0.0-r11323-wo54.jar!/WebServerResources/wonder.js >>> >>> and so on. >>> >>> I saw the workaround described in this thread and here: >>> http://issues.objectstyle.org/jira/browse/WONDER-86. I added >>> registerRequestHandler(requestHandlerForKey("wr"), "_wr_"); to the >>> woapplication and it works for the above. However, I've also got several >>> webserver-resources (images, css, js) in >>> /Library/WebServer/Documents/IntranetImages/ and referred by f.i. >>> http://10.11.3.152:/IntranetImages/ to be served by Apache. After >>> adding the workaround to the app those resources are no longer found, they >>> just 404. Removing the workaround gives me those resources back, but then >>> again the "jar:file:…" stuff no longer works. >>> >>> What to do about this? Any ideas? >>> >>> >>> cheers, >>> >>> Lars >>> >>> P.S.: WONDER-86 was closed with the comment: "We only accept 5.4 fixes now, >>> not issues.". Is this still the case? >>> Am 23.07.2010 um 14:56 schrieb gsbr...@umich.edu: > >> The reason we don't do it ourself is that a lot of that stuff calls into >> erxfileutils and that uses path names. Fixing it would be a lot of work >> and make code more complicated without a lot of real gain (at least from >> when I last looked at it). >> >> So unless any of the committers actually need to use this themselves, I >> wouldn't hold my breath waiting for it. >> >> Cheers, Anjo > > WARN er.extensions.foundation.ERXFileUtilities - Can't get path when > run as jar: ERNeutralLook - Properties > > Actually, having only Properties come from and set by my program--is a > feature--not a bug! This "feature" has not caused me any pain--yet. > > I generally would look at the properties included in the framework, but > would set the ones I want in my program's properties file. I am not sure > what all I am missing by having to work this way. > > NSBundle jars have additional features that regular frameworks do not! > (Sometimes.) > -- > > gsbr...@umich.edu > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/anjo%40krank.net > > This email sent to a...@krank.net ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/lars.sonchocky-helldorf%40hamburg.de This email sent to lars.sonchocky-helld...@hamburg.de >>> >>> ___
faulting relationship problem
Hi all, I have cascading popup buttons that are narrowing down to a particular instance of an entity and one of the popups is populated with the field from a relationship on that entity. So, the fetch spec. has a qualifier consisting of the values of all the previous choices and it retrieves the narrowed set of objects. Next, I iterate through the results adding the object from the relationship to a NSMutableArray for display. It is at this point that, periodically, the relationship returns null instead of the object. This is a test system so there is only one entity in the database and this relationship should definitely return an item. If I do this in reverse... I preform the fetch on the relationship's entity and use key paths in the qualifier back to the master entity it seems to go away (this is hideous). So, to sum it up... even though the fetch returns the correct results, it seems the proxy load of the relationship slave entity sometimes fails. This is on a PostgreSQL DB, btw. Has anyone ever seen issues when faulting objects from a relationship? Is it not guaranteed to return an object even if the inner join is definitely valid? Thanks. -Mike ___ 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: faulting relationship problem
Sounds like you forgot to call super someplace in your EOs. On 2011-08-19, at 12:27 PM, Michael Gargano wrote: > Hi all, > > I have cascading popup buttons that are narrowing down to a particular > instance of an entity and one of the popups is populated with the field from > a relationship on that entity. > So, the fetch spec. has a qualifier consisting of the values of all the > previous choices and it retrieves the narrowed set of objects. Next, I > iterate through the results adding the object from the relationship to a > NSMutableArray for display. It is at this point that, periodically, the > relationship returns null instead of the object. This is a test system so > there is only one entity in the database and this relationship should > definitely return an item. If I do this in reverse... I preform the fetch on > the relationship's entity and use key paths in the qualifier back to the > master entity it seems to go away (this is hideous). > > > So, to sum it up... even though the fetch returns the correct results, it > seems the proxy load of the relationship slave entity sometimes fails. > This is on a PostgreSQL DB, btw. > > Has anyone ever seen issues when faulting objects from a relationship? Is it > not guaranteed to return an object even if the inner join is definitely valid? > > > Thanks. > -Mike > > ___ > 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 ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Vertical Inheritance qualifier based on to many relationship
My idea:I have an entity contact, that gets vertically inherited into actor, employee, visitor, nicepersontoalwayinviteforfreetoanyshow, whatever, based on the role somebody/thing plays. A contact can have different roles, which makes this contact playing actor, employee, visitor, nicepersontoalwayinviteforfreetoanyshow or whatever. So there is a m-n relation roles in a contact. I assumed that I should be able to create and get a visitor if I could describe in the EOModel qualifier something like roles.ROLE.name = 'visitor'Something like this:And I would create the relation to the role in the awakeFromInsertion phase of the Visitor. Of course this is not working, (nothing ever works where I live) as I am getting takeValueForKey(): attempt to assign value to unknown key: 'roles.ROLE.name'. This class does not have an instance variable of the name roles.ROLE.nameWhat is the proper incantation to do this? Johan Henselmansjo...@netsense.nl ___ 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: Vertical Inheritance qualifier based on to many relationship
On 2011-08-19, at 2:46 PM, Johan Henselmans wrote: > My idea: > > I have an entity contact, that gets vertically inherited into actor, > employee, visitor, nicepersontoalwayinviteforfreetoanyshow, whatever, based > on the role somebody/thing plays. > > A contact can have different roles, which makes this contact playing actor, > employee, visitor, nicepersontoalwayinviteforfreetoanyshow or whatever. So > there is a m-n relation roles in a contact. Where is Kieran? This is his favourite question. It sounds like you should be using the Role pattern and not inheritance. http://objectdiscovery.com/solutions/publications/roles/index.html > I assumed that I should be able to create and get a visitor if I could > describe in the EOModel qualifier something like roles.ROLE.name = 'visitor' > > Something like this: > > And I would create the relation to the role in the awakeFromInsertion phase > of the Visitor. > > Of course this is not working, (nothing ever works where I live) as I am > getting > > takeValueForKey(): attempt to assign value to unknown key: > 'roles.ROLE.name'. This class does not have an instance variable of the name > roles.ROLE.name > > > What is the proper incantation to do this? I think that is not possible. The restricting qualifier has to be evaluated on that single entity only. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Qualifier With Primary Key
Hi Kevin, On 19/08/2011, at 9:33 PM, Kevin Hinkson wrote: > The general consensus seems to be don't use primary keys in the way I > described, use another unique identifier/slug etc. But if one really, really > has to; then the following are available: Actually, my advice was subtly different. The "best practice" which advises you not to expose primary keys doesn't exist in a vacuum—there's an argument behind it. If you think you've found a counter-argument, then why beat yourself up by (a) not exposing the primary key as a class property and then (b) using workarounds to subvert (a)? Just expose the primary key and move on. Whether or not you've really found a decent counter-argument is a separate question. -- 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: Vertical Inheritance qualifier based on to many relationship
On 20/08/2011, at 9:26 AM, Chuck Hill wrote: > On 2011-08-19, at 2:46 PM, Johan Henselmans wrote: > >> My idea: >> >> I have an entity contact, that gets vertically inherited into actor, >> employee, visitor, nicepersontoalwayinviteforfreetoanyshow, whatever, based >> on the role somebody/thing plays. >> >> A contact can have different roles, which makes this contact playing actor, >> employee, visitor, nicepersontoalwayinviteforfreetoanyshow or whatever. So >> there is a m-n relation roles in a contact. > > Where is Kieran? This is his favourite question. It sounds like you should > be using the Role pattern and not inheritance. > http://objectdiscovery.com/solutions/publications/roles/index.html Absolutely. Lachlan Deck lachlan.d...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com