It's been a pretty busy week (and this is a lame effort to summarize 163 commit messages):
Ray Kiddy updated the movie example to 2008. New features include auto-populating DB and Apache Derby support.
Used by BugTracker and ERMovies and now supported by ERPrototypes, it provides preliminary EOF support for Apache Derby. Most things seem to work, there are some issues with BLOBs, though.
If you ever have pages which *might* take a bit too long, but don't warrant a long response page, then this is for you. When you install this response handler (and use ERXApp) then a request that is taking too long is detached and the user is presented a "Uh, this might take a while, get some coffee" page - without you needing to do anything at all. And it has a "Stop now" button in case you don't actually want to finish the action.
This is also very useful when you are running in development and are dropped into a breakpoint. Normally, you'd get the adaptor error page but now it loops merrily until you continue.
loc:foo and negate:foo prefixes
These are the first implementations for the new prefix registration in the WOOgnl parser. They now also support carret bindings like ^title.
loc:value = bar
first asks the current localizer to handle the value of bar. This is way more powerful and readable than before, where you would either need to use
value = session.localizer.bar
or write an accessor method.
Ever had an accessor that was just the opposite of what you needed?
not:disabled = bar
There is no easy way in Java to stop one thread from another. Actually, it's not possible at all unless the thread is waiting in the exact moment you try to stop it. We added a few crucial points where the current thread checks it it should quit: whe fetching a row from the DB and when the context sets a current component.
You just call
ERXRuntimeUtilities.checkThreadInterrupt() at regular intervals and the thread that wants to stop calls
ERXRuntimeUtilities.addThreadInterrupt(Thread thread, String message).
The REST framework is getting quite a bit of work done on it (with more coming soon).
The entity delegates resolver will now guess names that aren't registered (for instance, if you request /Manufacturer, it will look for a ManufacturerRestEntityDelegate), and you can now specify delegate names in Properties (ERXRest.Manufacturer.delegate=ERXUnsafeReadOnlyRestEntityDelegate).
The beginnings of the JSON input/output for ERXRest was committed, though not on by default (still experimental).
There are several new convenience methods for registering ERXRest. The simplest is to add:
ERXRestRequestHandler.register(new YourRestAuthenticationDelegate(), true, true);
to your Application constructor and add Properties entries for registering delegates.
ERXRest now supports non-integer keys. If a key in the URL isn't the property of an entity, it is treated as a key. You can now also specify a custom attribute on your EO's to act as the "id" value by setting:
, which allows your EO's to expose non-PK attributes as the lookup value. For instance, you could have a UUID "external ID" that can be used for syncing EO's across multiple applications.
[MS: This is a repost from of the announcement the wonder-disc list]
This is the largest change to Ajax framework in a while, and because it introduces some breaking API changes, I wanted to explain what it's all about.
So about breaking API changes and behavior changes:
Most of the ERXWOContext response rewriting methods have been moved to ERXResponseRewriter. They never really made a lot of sense on ERXWOContext, but especially now that these methods actually potentially consider information that crosses contexts, it made sense to reorganize them. Additionally, several of the API's have been changed -- most just to take a WOContext where they didn't before. The most notable API change is that previously the insertion behavior was controlled with two booleans which have now been replaced by an enumerated type that more clearly defines what the behavior of the insertion methods will be when the head tag is not present (either because it's just missing or because you're in an Ajax update). For most people, the only change you may need to make is to add the missing WOContext parameter if it's needed (the other variant of the method probably was not used very much).
If for some reason you want to turn off load-on-demand, you can 1) just keep doing things the way you were -- declare your scripts at the top level so they have all been loaded by the time the Ajax components render, or 2) set er.extensions.loadOnDemand=false.
While the actually lines of code of these changes is relatively small, it's conceptually sort of significant, so please try out your Ajax apps and let me know if you see any oddities. Hopefully this will make the components much more encapsulated and far easier to use for everyone ... Apologies for any backwards compatibility issues this introduces in the short term.
AjaxObserveField has a new onBeforeSubmit binding that allows you to return false to deny the submit.
ERD2WDirectAction now supports
ErrorFoo?__message=barcalls which is an easy way to put up a error page.
We moved the work-in-progress stuff from ERXFetchSpecification to ERXGroupingFetchSpecification.
ERXObjectStoreCoordinatorSynchronizer: The synchronizer now exposes the ability for fine-grained sync controls between stacks. For instance, if you application is a write-mostly app, it may be undesirable to have inserts synced between EOF stacks. You can now setDefaultSettings on the synchronizer (or set the settings per-object store) to control exactly which types of operations will be synced across stacks, including turning syncing off entirely for particular stacks.