Results 1 to 8 of 8

Thread: Section .save() message

  1. #1
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,940

    Section .save() message

    I am doing a manual save in a web app, canvas section:

    Code:
    Lianja.get("mypage.mysection").save();
    On success, it flashes a message that the record was successfully saved.

    Two questions:

    1) can that message be turned off?

    2) should the save return a value? Using

    Code:
    var lu = Lianja.get(.....).save();
    lu is undefined, per:

    Code:
    Lianja.showMessage(typeof(lu));

    thanks,

    Hank
    Last edited by HankFay; 2018-01-15 at 00:08.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,768
    Hi Hank,

    No the message cannot currently be turned off.

    No save() does not return a result. Any failure is reported as an error notification message and the changed data is not committed.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,768
    Hi Hank,

    See my post regarding "Text translator".

    You can translate the messages and the titles to display what you want now.

    With respect to save() this can be overridden with your own custom save action.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #4
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,940
    Hi Barry,

    the translator is great!

    When you say "overridden" -- I can see creating my own "Save" using .getCursor(). But I don't think that's what you meant. How would one go about overriding the Save method: attach a function (without the parens) to the section .save? If that works, I'm home free, come to think of it.

    thanks,

    Hank

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,768
    Quote Originally Posted by HankFay View Post
    Hi Barry,

    the translator is great!

    When you say "overridden" -- I can see creating my own "Save" using .getCursor(). But I don't think that's what you meant. How would one go about overriding the Save method: attach a function (without the parens) to the section .save? If that works, I'm home free, come to think of it.

    thanks,

    Hank
    Custom actions. Everything can be overridden.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  6. #6
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,940
    I see custom actions on the Page, but not the section.

    I've searched for documentation on custom actions, but haven't found it. This is a great feature (especially if it were made available in Sections, but I can live with Page, assuming it's possible to simply pass through to the default action, and if the section triggering the save is able to be discerned).

    thanks,

    Hank

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,768
    Custom actions are described here.
    https://www.lianja.com/doc/index.php/Custom_Delegates

    And here.
    https://www.lianja.com/doc/index.php/Page_Attributes

    If the action returns false the standard action is executed.
    Last edited by barrymavin; 2018-01-15 at 23:15.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,768
    Thatís because custom actions correspond with the navigation bar actions.

    Section actions are handled by these.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us