Results 1 to 9 of 9

Thread: Set Menu and Serach Panel by code

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893

    Set Menu and Serach Panel by code

    Is this two section's property exposed?
    Name:  Screenshot - 19_02_2015 , 19_21_17.jpg
Views: 93
Size:  109.1 KB
    can I do something like:
    oSection = Lianja.get("mySection")
    oMenu = oSection.menu
    oMenu.visible(true)
    oMenu.CustomMenu="Edit,Set Order,..."

    thanks

    Fabio

  2. #2
    Senior Member
    Join Date
    Jul 2013
    Location
    Ontario, Canada
    Posts
    658
    Hi Fabio,

    To set the search panel to visible or not, use:
    Code:
    Lianja.showDocument("section:mySection?action=togglesearchpanel")
    To edit menu items, use:
    Code:
    Lianja.Get("page.section").menu = "Menu1,Menu2,Menu3"
    Cory
    Last edited by CGibson; 2015-02-19 at 13:09.

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Wow, thanks Cory.
    And for "specify" the "Custom action" and the "Custom search panel"? Is possible?

    Fabio

  4. #4
    Senior Member
    Join Date
    Jul 2013
    Location
    Ontario, Canada
    Posts
    658
    Hi Fabio,

    I was looking through my app to see it I use them.
    I'm not sure how to set the menu to visible or how to set the other custom section although I'm sure it is possible.

    Cory
    Last edited by CGibson; 2015-02-19 at 13:22.

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Ok, thanks Cory.
    Fabio

  6. #6
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Hi Cory, the menu items, work, even if the display is not good.. all the menu item are overlapping.. since I manual edit.. boh?

    So, but Search panel is every ON or OFF.. this code seems not to work..

    Quote Originally Posted by CGibson View Post
    Hi Fabio,

    To set the search panel to visible or not, use:
    Code:
    Lianja.showDocument("section:mySection?action=togglesearchpanel")
    Cory

  7. #7
    Senior Member
    Join Date
    Jul 2013
    Location
    Ontario, Canada
    Posts
    658
    Hi Fabio,

    I'm not sure why the menu items are overlapping, unless the menu description is too long.

    That code works fine for me although I may have had to revise my code to determine when and how I toggled the search panel.
    It acts like a switch each time it's called.
    If the search panel is visible, it will be hidden.
    If the search panel is hidden, it will be visible.

    When I first started using the search panel, I was advised to keep the panel visible (to make things easier); however that solution didn't work for me because of the way I was setting things up.

    That was originally introduced by Barry in
    http://www.lianja.com/community/show...glesearchpanel

    Cory

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    In v1.3.1 the following properties are exposed on a section.

    Code:
    m_section1 = Lianja.get("section1")
    m_section1.menuVisible = 1
    m_section1.footerVisible = 1
    m_section1.searchPanelVisible = 1
    In versons prior to 1.3.1 menuVisible was not exposed.
    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

  9. #9
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Thanks, I wait the new point versione.

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