shale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan (JIRA)" <>
Subject [jira] Commented: (SHALE-338) Provide preupdate() method for viewcontroller
Date Wed, 22 Nov 2006 22:18:57 GMT
    [ ] 
Craig McClanahan commented on SHALE-338:

I think the use case described here is definitely a valid one ... typically, a Cancel button
will be coded with immediate=true (precisely because it *does* bypass the Process Model Updates
phase, among others), so there is no point in doing setup during the preprocess() callback
that is not going to be used.

That being said, I'm always cautious about backwards incompatible API changes, even though
we haven't done a GA release yet.  In this scenario, it will only affect people who implement
ViewController directly, instead of extending AbstractViewController where we can provide
a default empty implementation like we do all the rest.  Given that, I'm cautiously OK with

In terms of implementation, here are my thoughts:

* I like preupdate() as the method name -- it is stylistically consistent
  with the other view controller callbacks, and correctly denotes that
  it is called *before* the update model values phase occurs.

* Implementation in shale-view should mimic the other "prexxx" callbacks
  in terms of exception handling, and extensibility via shale-tiger.  That
  probably means modifying ViewControllerCallbacks as well, but that's
  an internal API not intended for app developers, and therefore of
  less concern for breakage.

* We should also add a @Preupdate annotation in shale-tiger that lets
  you do this sort of thing via annotations, 

* Did I mention we should also add corresponding unit and system
  integration test cases?  :-)

> Provide preupdate() method for viewcontroller
> ---------------------------------------------
>                 Key: SHALE-338
>                 URL:
>             Project: Shale
>          Issue Type: New Feature
>          Components: View
>            Reporter: Matthias Wessendorf
>         Assigned To: Matthias Wessendorf
> Stefan Meyer requested preupdate
> The preprocess method is called even if the immediate flag is set to
> true because it is called after the restore view phase and not before
> the model update. I want setup code to only be executed if necessary -
> the model is updated or the view is rendered. Therefore I need a
> prerender and a preModelUpdate method.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message