Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    HowTo question: Own CallBack for FormSaves to many Forms

    Hi Isomorphic,

    I have following use-case which I want to solve on my own (although it most likely could be solved with a ValuesManager).
    • Modal Window with TabSet and OK/Apply/Cancel IButtons below
    • TabSet with 3 Tabs
    • Each Tab with a DynamicForm to a different DataSource


    On OK click I want to save all three DynamicForms, react to errors (Tab icon change) and close the window if all three saves are successful.

    So on each tab I'll have a self-written save()-method calling the tab's DynamicForm.save(...) and setting the icon in save's CallBack.
    In the OK-Button I need to collect the results of all three save-actions and close the Window if all were successful.

    This means that my own save-method needs a CallBack. Most likely this is simple, but as I never programmed GWT before and only used SmartGWT-built-in CallBacks, I appreciate any advice (code or pseudocode).

    I looked at the LGPL source in order to get an howTo-idea, but did not succeed.

    Thank you & Best regards,
    Blama

    #2
    I did something similar to this in my app. The solutions I used was to do a RPCManager.startQueue().. do all your self-written save()-methods and put the callback in RPCManager.sendQueue(new RPCQueueCallback...). You may want to make a validation method on each tab before saving to select the Tab with the error for the user if possible.

    Comment

    Working...
    X