https://github.com/duesenklipper/wicket-safemodel

As I wrote earlier on this list, SafeModel lets you turn the fragile
strings of this:

IModel<String> childNameModel = new PropertyModel<String>(
    myBean, "child.name");

...into this, gaining refactor-safety:

IModel<String> childNameModel =
model(from(myBean).getChild().getName());

I have just built SafeModel version 1.2, with the following
improvements:

- fixed an oversight in the initial version: You can now use a model as
  your root object for the from() method.

- Based on an idea from Matt Brictson, you can now quickly build
  LoadableDetachableModels using fromService instead of from:

  IModel<User> userModel = model(fromService(userEJB.loadUser(42)));

  This is experimental. fromService may be refactored later to end up
  in a different class (but that would at worst force you to change
  imports, so no big deal really).

As always, feedback is greatly appreciated!

Carl-Eric
www.wicketbuch.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to