WebObjects Tips
 
Wednesday, May 24, 2006
Single-Object Pages
 
90% of your pages could be built with a URL of just the page name and the primary key of a root object. That is:
/cgi-bin/WebObjects/MyApp.woa/wa/MyPage?pkey=12
Write code to grab a single object out of the editing context using objectWithPrimaryKeyValueEntityNamed() and setup the page’s object via a direct action and you can add new pages with minimal coding.