Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1244

RequestFactory must provide clients with a general find() mechanism, parallel to create(Class)

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Blocker
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.1.0.RC1
    • Component/s: GWT
    • Labels:
      None

      Description

      Without this it is basically impossible to generalize a mechanism for keeping a bit of UI up to date in response to RecordChangeEvents.

      An Editor wants to be notified when the value that it is editing has changed (it might be a read-only or in-place editor). So that the Editor widget doesn't have to be tightly coupled to the RequestFactory, it calls EditorDelegate.subscribe(myValue).

      This will cause the EditorDelegate to subscribe to the right kind of record change event on the RequestFactory's event bus. Since the event received by the EditorDelegate no longer includes any useful data, how does the delegate get updated data to send back into the Editor?

      In order to provide this server, the EditorDelegate will need to issue its own findFoo() request when the update is seen. The event includes all the info it needs to make that request.

      How do I know what to call?

      There's no requirement that find() is available to the client. How do I use the TypeOracle to actually locate the right thing to call? Look at all service locator methods on the RF interface and then see if any one of them contains a method named findX that accepts a single long and returns the desired type?

      Clearly not a livable situation. Now, given that our service object helper class will require the implementation of a find(id, type) method, it seems reasonable to expose the same kind of method client side on RequestFactory itself. This may even hint at the shape our caching should take.

        Attachments

          Activity

            People

            Assignee:
            amitmanjhi@google.com Amit Manjhi
            Reporter:
            rjrjr@google.com Ray Ryan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 1d
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified