Docs
ServoyCloudSupportSamplesOpen SourceCommunity
  • Home
  • GUIDES
    • Platform Overview
    • Get Servoy
    • Get Started
      • Chapter 0
      • Chapter 1
      • Chapter 2
      • Chapter 3
      • Chapter 4
      • Chapter 5
    • Get Help
      • SuLA Instructions
      • SuLA Terms
    • Develop
      • Application Design
        • Forms
          • Layout Management
            • Simple Layout
            • Fully Responsive
              • Bootstrap 12-Grid
              • Flexbox
              • Custom Div
              • Collapsible Container
              • Simple Collapsible
              • Center Container
              • Inline Group Container
            • Abstract Form
          • Form Containers
            • Form Container
            • Tab Panel
            • Split Pane
            • Collapse
            • Accordion Panel
            • Form Component
            • List Form Component
          • Form Inheritance
          • Form Components
        • UI Components
          • Buttons and Text
            • Badge
            • Button
            • Data Label
            • Dropdown
            • Image
            • Label
          • Grids
            • Data Grid
            • Power Grid
            • Table
          • Input Controls
            • Calendar
            • Calendar Inline
            • Checkbox
            • Choice Group
            • Combobox
            • Group Buttons
            • Html Area
            • Input Group
            • Rating
            • Slider
            • Switch
            • Spinner
            • TextArea
            • Textbox
            • TextBoxGroup
            • Type Ahead
            • select2tokenizer
          • Media
            • Carousel
            • Embedded YouTube
            • File upload
            • Image label
            • Lightbox Gallery
            • MultiFile Upload
            • PDF JS Viewer
            • PDF Viewer
          • Mobile
            • Native Data List
            • Native Select
          • Navigation
            • Breadcrumbs
            • Navbar
            • sidenav
          • Visualization
            • DBTreeview
            • Progress Bar
            • Treeview
            • ChartJS
              • Data Labels Plugin
              • Funnel Chart
              • OutLabels Plugin
              • TreeMap
          • Specialized Components
            • Smart Document Editor
            • Servoy PDF Viewer
            • Fullcalendar Component
              • Fullcalendar
              • Fullcalendar Events
              • Migrating calendar from Smart and Web client to NG client
            • Fullcalendar Component 2
            • Canvas
            • Google Charts
            • Google Maps
            • svySignature
            • svywebcam
        • Styling and Themes
          • Default Theme Properties
          • CSS / LESS
          • Component Variants
          • Font Icons
        • Data Modeling
          • Databases
            • Tables
              • Columns
              • Calculations
              • Aggregations
              • Methods
              • Events / Triggers
              • Table security
            • Views
            • Procedures
          • Relations
          • Value Lists
          • Menus
          • In-Memory Databases
          • View Datasource
        • Modular Design
      • Programming Guide
        • Scripting the UI
          • Scripting Forms
          • Interacting with Components
          • Navigation
          • Windows, Dialogs and Popups
          • Events Manager
        • Working with Data
          • Concepts
          • Loading
          • Sorting
          • Iterating
          • Searching
            • Find mode
            • Query Builder
            • SQL String
          • Filtering
          • Editing
          • Validation
        • Automation and Scheduling
          • Batch Processor
          • Headless API
          • Scheduler API
        • Creating REST APIs
        • Consuming Webservices
        • Working with Files
          • File Plugin Basics
          • Images
          • Excel
          • PDF
          • JSON
        • Browser Utilities
          • Notifications
            • Web Notifications (Toastr)
            • Web Notifications (Native)
            • Block UI
          • Session Management
          • Keyboard Utilities
          • NG Utils
        • Sending and Receiving Email
        • Servoy Jasper Reports
          • Input Type
          • Display Mode
          • Output format
          • Jaspe Reports Viewer
        • Extensions
          • Modules
            • svyPhonegap
              • First Use Guide
              • Barcode Scanner
              • Browser
              • Camera
              • File
              • Fingerprint
              • Location
              • Network Interface
              • Phonegap
              • Printer
              • Push Notifications
            • svyAPI
              • Getting Started
            • svyLookup
              • Custom Templates
              • API Documentation
              • svyLookup v1
                • API Documentation v1.0.0
                • Base Form svyLookupTable v1.0.0
                • Base Form AbstractLookup v1.0.0
            • svyNavigation
              • API Documentation
                • API svyNavigation
                • API svyNavigationHistory
                • API svyNavigationUX
            • svyPopupFilter
              • Simple Filter Pickers
              • Custom Templates
              • API Documentation
                • API svyToolbarFilter
                • API svyPopupFilter
              • API Documentation v1
                • API svyToolbarFilter v1
                • API svyPopupFilter v1
            • svySearch
            • svySecurity
              • Overview
              • Token-based Auth and SSO (NEW!)
              • API Documentation
              • Getting Started
              • Tenant replication
              • Security Management Console
                • Classic Security Management Console
              • svySecurityUX
              • svyProperties
              • API Doc svyProperties
            • svyUtils
              • Log Manager
              • Log Manager Appenders
              • Smart Doc Editor Utils
              • Custom Dialogs
              • Excel Utils
                • Full API Reference
              • Crypto Utils
      • Security
        • Authentication
        • Permissions
          • UI Permissions
          • Data Permissions
          • Runtime Permissions
        • Audit Logging
        • OAuth
        • JWT
      • Multi-Language Support
      • Mobile Development
        • Getting Started
        • Mobile Design
        • Native Mobile Integrations
        • Building a Native Binary for the App Store
      • Native Desktop Development
        • NGDesktop UI plugin
        • NGDesktop Utils
        • NGDesktop File Plugin
    • Deploy
      • WAR Deployment
      • Docker Deployment
      • Server Configuration
        • Server Settings
        • Server Plugins
        • Database Servers
          • Locks
          • Transactions
          • Oracle
          • SQLServer
        • Client Sessions
        • Batch Processors
        • License Management
        • Monitoring
          • Server Log
          • Browser Console Log
          • Websocket Log
          • Query Performance
          • Client Performance
          • Client Event Tracing
          • Monitoring Servoy with JMX
      • NGClient deployment
      • Troubleshooting
      • Other Topics
        • Security: Cross-site Scripting
        • Running in an iFrame
    • Extend
    • Contribute
  • Reference
    • Servoy Core
      • Object Model
        • Database Server
          • Table
            • Column
            • Calculation
            • Method
            • Aggregation
          • View
          • Procedure
        • Solution
          • Form
          • Form Component
          • Relation
          • Relation Item
          • Table Node
          • Value List
          • Menu
          • Menu item
          • In-Memory Data Source
          • View Foundset Data Source
          • Variable
          • Column Info
          • Media
          • Layout Container
          • Method
        • i18n Message Key
      • Developer API
        • Globals
        • Forms
          • RuntimeForm
            • controller
            • containers
              • RuntimeContainer
            • elements
              • Component
              • RuntimeAccordionPanel
              • RuntimeBean
              • RuntimeButton
              • RuntimeCalendar
              • RuntimeCheck
              • RuntimeCombobox
              • RuntimeComponent
              • RuntimeDataButton
              • RuntimeDataLabel
              • RuntimeGroup
              • RuntimeHtmlArea
              • RuntimeImageMedia
              • RuntimeInsetList
              • RuntimeLabel
              • RuntimeListBox
              • RuntimePassword
              • RuntimePortal
              • RuntimeRadio
              • RuntimeChecks
              • RuntimeRadios
              • RuntimeRectangle
              • RuntimeRtfArea
              • RuntimeSpinner
              • RuntimeSplitPane
              • RuntimeTabPanel
              • RuntimeTextArea
              • RuntimeTextField
              • RuntimeWebComponent
        • JS Lib
          • Array
          • BigInt
          • Boolean
          • Date
          • Function
          • IterableValue
          • Iterator
          • JSON
          • Map
          • Set
          • Math
          • Namespace
          • Number
          • Object
          • Promise
          • QName
          • RegExp
          • Special Operators
          • Statements
          • String
          • XML
          • XMLList
        • Application
          • APPLICATION_TYPES
          • CLIENTDESIGN
          • DRAGNDROP
          • ELEMENT_TYPES
          • LOGGINGLEVEL
          • NGCONSTANTS
          • UICONSTANTS
          • CSSPosition
          • JSDimension
          • JSDNDEvent
          • JSEvent
          • JSLogger
          • JSLogBuilder
          • JSPoint
          • JSUpload
          • JSWindow
          • JSBounds
          • Renderable
          • UUID
        • SolutionModel
          • ALIGNMENT
          • ANCHOR
          • BEVELTYPE
          • CURSOR
          • DEFAULTS
          • FONTSTYLE
          • MEDIAOPTION
          • PAGEORIENTATION
          • PRINTSLIDING
          • SCROLLBAR
          • TITLEJUSTIFICATION
          • TITLEPOSITION
          • UNITS
          • JSBean
          • JSButton
          • JSCalculation
          • JSComponent
          • JSDataSourceNode
          • JSField
          • JSForm
          • JSLabel
          • JSMedia
          • JSMethod
          • JSPart
          • JSPortal
          • JSRelation
          • JSRelationItem
          • JSStyle
          • JSTab
          • JSTabPanel
          • JSValueList
          • JSVariable
          • JSTitle
          • JSChecks
          • JSCombobox
          • JSHeader
          • JSInsetList
          • JSList
          • JSPassword
          • JSRadios
          • JSText
          • JSTextArea
          • JSWebComponent
          • JSLayoutContainer
        • Database Manager
          • QUERY_COLUMN_TYPES
          • SQL_ACTION_TYPES
          • JSColumn
          • JSDataSet
          • JSBaseRecord
          • JSBaseSqlRecord
          • JSBaseFoundset
          • JSBaseSQLFoundset
          • JSFoundSet
          • JSFoundSetUpdater
          • JSRecord
          • JSRecordMarker
          • JSRecordMarkers
          • JSTable
          • JSTableFilter
          • MenuFoundSet
          • MenuItemRecord
          • QBAggregate
          • QBAggregates
          • QBCase
          • QBCaseWhen
          • QBColumn
          • QBColumns
          • QBCondition
          • QBFunction
          • QBFunctions
          • QBGroupBy
          • QBJoin
          • QBJoins
          • QBLogicalCondition
          • QBParameter
          • QBParameters
          • QBPart
          • QBResult
          • QBSearchedCaseExpression
          • QBSelect
          • QBSort
          • QBSorts
          • QBTableClause
          • QBWhereCondition
          • ViewFoundSet
          • ViewRecord
        • Events Manager
          • EVENTS_AGGREGATION_TYPES
          • EventType
        • Menus
          • JSMenu
          • JSMenuItem
        • JSMenuDatasource
        • Utils
        • Client Utils
          • JSBlobLoaderBuilder
        • History
        • Security
        • i18n
        • ServoyException
          • DataException
        • JSUnit
        • Datasources
          • DBDataSource
          • DBDataSourceServer
          • JSConnectionDefinition
          • JSDataSource
          • MemDataSource
          • MenuDataSource
          • SPDataSource
          • SPDataSourceServer
          • ViewDataSource
        • JSViewDatasource
        • servoyDeveloper
        • enum
    • Extensions
      • UI Components
        • Buttons and Text
          • Badge
          • Button
          • Data Label
          • Drop Down
          • Image
          • Label
        • Form Containers
          • Accordion Panel
          • Collapse
          • Form Container
          • Form Component Container
          • List Form Component
          • Default Loading Indicator
          • Error Bean
          • Portal
          • Responsive Container
          • Servoy Default Navigator
          • Slider
          • Split Pane
          • TabPanel
        • Grids
          • Data Grid
          • Power Grid
          • Table
        • Input Controls
          • Calendar
          • Calendar Inline
          • Checkbox
          • Choice Group
          • Combobox
          • Floatinglabel Calendar
          • Floatinglabel Combobox
          • Floatinglabel Textarea
          • Floatinglabel Textbox
          • Floatinglabel Type Ahead
          • Group Buttons
          • Html Area
          • Input Group
          • Rating
          • Select2tokenizer
          • Slider
          • Spinner
          • Switch
          • TextArea
          • TextBox
          • TextBox Group
          • Type Ahead
        • Media
          • Carousel
          • Embedded YouTube
          • File upload
          • Image label
          • Lightbox Gallery
          • MultiFile Upload
          • PDF JS Viewer
          • PDF Viewer
        • Mobile
          • Native Data List
          • Native Select
        • Navigation
          • Breadcrumbs
          • Navbar
          • sidenav
        • SmartDocEditor
          • Smart Document Editor
        • Visualization
          • Canvas
          • Chart
          • Custom List
          • DBTreeview
          • Foundset List
          • Fullcalendar
          • Gauge
          • Google Maps
          • Kanban
          • Progress Bar
          • Treeview
      • Server Plugins
        • amortization
          • AmortizationCalculation
          • Polynomial
        • clientmanager
          • Broadcaster
          • JSClientInformation (cm)
        • excelxport
        • file
          • JSFile
          • JSProgressMonitor
        • headlessclient
          • JSClient
        • http
          • HTTP_STATUS
          • Cookie
          • DeleteRequest
          • GetRequest
          • HeadRequest
          • HttpClient
          • HttpClientConfig
          • OptionsRequest
          • PostRequest
          • PutRequest
          • Response
          • TraceRequest
          • PatchRequest
          • JSFileUpload
        • images
          • JSImage
        • jwt
          • Algorithm
          • Builder
          • JWTClaims
        • mail
          • Attachment
          • MailMessage
        • maintenance
          • JSClientInformation
          • JSColumnObject
          • JSServer
          • JSTableObject
        • mobileservice
          • OfflineDataDescription
        • oauth
          • ClientAuthentication
          • CustomApiBuilder
          • OAuthProviders
          • OAuthRequest
          • OAuthResponse
          • OAuthResponseBinary
          • OAuthResponseJSON
          • OAuthResponseText
          • OAuthService
          • OAuthServiceBuilder
          • OAuthTokenExtractors
          • RequestType
        • pdf_output
        • rawSQL
        • RestWs plugin
        • rest_ws
          • WsContents
          • WsCookie
          • WsRequest
          • WsResponse
        • scheduler
        • serialize
        • textxport
          • DataProviderExport
          • TabExporter
        • udp
          • JSPacket
        • XmlReader
          • XmlNode
      • Browser Plugins
        • Block UI
        • Block UI (ref)
        • Dialogs Plugin
        • Idle
        • Idle (ref)
        • Key Listener
        • Key Listener (ref)
        • NGDesktop File
        • NGDesktop File (ref)
        • NGDesktop UI (ref)
        • NGDesktop Utils (ref)
        • NG Utils (ref)
        • Office Javascript API for Servoy
        • Phonegap
        • Web Notifications (Native)
        • Web Notifications (Toastr)
        • Window Plugin
        • Font Awesome
      • Modules
        • Smart Doc Editor Utils
        • svyAPI
          • Getting Started
        • svyLookup
          • Custom Templates
          • API Documentation
          • svyLookup v1
            • API Documentation v1.0.0
            • Base Form svyLookupTable v1.0.0
            • Base Form AbstractLookup v1.0.0
        • svyLookupExample
        • svyNavigation
          • API Documentation
            • API svyNavigation
            • API svyNavigationHistory
            • API svyNavigationUX
        • svyNavigationUX
        • svyNavigationUXSample
        • svyPopupFilter
          • Simple Filter Pickers
          • Custom Templates
          • API Documentation
            • API svyToolbarFilter
            • API svyPopupFilter
          • API Documentation v1
            • API svyToolbarFilter v1
            • API svyPopupFilter v1
        • svyProperties
        • svySearch
        • svySecurity
          • Overview
          • Token-based Auth and SSO (NEW!)
          • API Documentation
          • Getting Started
          • Tenant replication
          • Security Management Console
            • Classic Security Management Console
          • svySecurityUX
          • svyProperties
          • API Doc svyProperties
        • svySecurityConsole
        • svySecurityUX
        • svyUtils
          • Log Manager
          • Log Manager Appenders
          • Smart Doc Editor Utils
          • Custom Dialogs
          • Excel Utils
          • Full API Reference
          • Crypto Utils
        • svyUtils$Excel
        • svyUtils$NGClient
        • svyUtils$customDialogs
        • svyUtils$logManagerAppenders
        • svyUtils$tableGrid
      • Layout
        • Boostrap 12grid layout
          • Collapsible Container
          • Simple Collapsible
          • Center Container
          • Inline Group Container
          • Flexbox Layout
      • Solutions
        • Sample Application
          • Tutorial Part 1
          • Tutorial Part 2
      • Packages
        • UI Component Packages
          • Advanced Renderers
          • Bootstrap Components
          • Bootstrap Extra Components
          • Canvas
          • Chart JS
          • Fullcalendar Component
          • googlemaps
          • kanban
          • Servoy Core
          • Servoy Extra Components
          • Servoy NG-Grids
          • Servoy PDF Viewer
          • smartDocumentEditor
        • Browser Plugin Packages
          • Block UI
          • Core NG only Services
          • Key Listener
          • NGDesktop File
          • NGDesktop UI
          • NGDesktop Utils
          • Web Notifications
          • Idle Web Service
    • Servoy Developer
      • Menu
        • File
        • Edit
        • Source
        • Refactor
        • Navigate
        • Search
        • Project
        • Actions
        • Run
        • Window
        • Help
      • Toolbar
      • Solution Explorer
        • Resources
          • Database Servers
            • Database Server
              • Procedures
              • Tables
              • Views
          • Security
          • i18n
        • All Solutions
          • Solution
          • Active Solution
            • Scopes
              • Scope
                • Variables
            • Forms
              • Working Set
              • Form
                • Controller
                • Variables
                • Elements
                • Relations
            • Form Components
              • Form Component
            • Relations
              • Relation
            • ValueLists
              • ValueList
            • Menus
              • Menu
                • MenuItem
            • Media
              • Folder
              • File
            • DataSources
              • In Memory DataSources
                • In Memory DataSource
              • View Foundsets DataSources
                • View Foundset DataSources
            • Servoy Packages
              • Package
            • Modules
              • Module
        • Solution Explorer Contextual List
      • Views
        • Command Console
        • Console
        • Problems
        • Tasks
        • Bookmarks
        • Search
        • Form Hierarchy
        • Help
        • JUnit
        • Outline
        • Profiler
        • Properties
        • Project Explorer
        • Call Hierarchy
      • Editors and Wizards
        • Property configurator for columns
        • Relation Editor
        • Text Format Editor
        • Date Format Editor
        • Number Format Editor
        • Database Synchronization Wizard
        • Security Editor
        • SQL Editor
        • i18n Editor
        • File Import Wizard
        • File Export Wizard
        • WAR Export Wizard
        • NGDesktop Export Wizard
        • Table Editor
        • Metadata Synchronization Wizard
        • Database Server Connection Editor
        • Text Property Editor
        • Valuelist Editor
        • Form Editor
          • Parts of the Form Editor
          • Designing a Form
          • Layout Tools
          • Using Containers
          • Creating and Using Forms
          • Using Servoy Beans
          • Using Shapes
          • Form Editor Subtabs
          • [Tips and Shortcuts][reference/servoy-developer/object-editors/form-editor-tips_and_shortcuts.md]
          • Editong a Responsive LayoutForm
          • CSS Positioning
        • Form Hierarchy
        • Component Properties Editor
        • Variable Editor
        • Method Selection Wizard
        • New Solution Wizard
        • Application Event Types Editor
        • New Form Wizard
        • Form Dataproviders Configurator
        • Servoy Resource Locator
        • Datasource Selection Wizard
        • Sorting Fields Wizard
        • Scripting Editor
          • Getting Started-Overview of Script Editor
          • Code Writing Features
          • Code Navigation
          • Code Rewriting Tools
          • Refactoring
          • Code Formatting
          • Script Editor Tips and Shortcuts
          • Unit Tests
        • Theme Editor
          • General Properties
          • Sidenav Properties
          • Navbar Properties
          • Tabs Properties
          • Windows Properties
          • Dialogs Properties
          • Tables Properties
          • Breadcrumb specific style Properties
          • Brand colors Properties
          • Validations Properties
          • Margins and Padding Properties
        • Editor Selection
        • Run Configurations
        • Debug Configurations
        • Externalize Strings Wizard
        • Font Chooser Wizard
        • Color Chooser Wizard
        • Project Properties Configurator
        • Move Wizard
        • External Tools Configurations
        • About Servoy Developer
        • Servoy Developer Installation Details
        • Eclipse Marketplace Wizard
        • Install Available Software Wizard
        • Cheat Sheet Selection Wizard
        • Servoy Developer Help Wizard
        • Switch to Editor Wizard
        • Find Actions Wizard
        • Customize Perspective Configurator
        • Quick Search Wizard
        • Search Wizard
        • Encoding Wizard
        • Task Wizard
        • Find - Replace Wizard
        • Properties Editor
        • New Project Wizard
        • New Method Wizard
        • New Menu Wizard
          • New MenuItem Wizard
        • Menu Editor
        • ServoyMenu Selection Wizard
        • JSMenu compatible component selector
        • Permissions Configuration Dialog
      • Project File Structure
        • Servoy Installation Directory
          • servoy.properties
        • Workspace Folder
          • Resources Directory
            • Database Information (.dbi) Files
          • Solution Folder
      • Package Manager
      • Preferences
      • Property Types for components / services
      • Debugger
        • Debug Explorer
        • Breakpoints
          • Breakpoint Properties
        • Variables
        • Expressions
        • Interactive Console
    • Application Server
    • Servoy Cloud
      • Cloud Control Center
        • Home
          • Setup Namespace
          • User profile
            • My Profile
            • Support
        • Download IDE
        • Application Overview
          • Applications
            • Pipelines
              • Jobs
                • Packages
                  • Commits
                  • Artifacts
                  • Configuration
                  • Quality reports
                  • Build markers
                • Job Configuration
                  • Build and Deploy or Build
                  • Mobile
                  • Desktop
            • Environments
              • Metrics
                • Users
                • Databases
                  • Metrics
                • System Health
                • Log Activity
                • App performance
                • Query performance
              • Cloud reporting
            • Security
              • Permissions
              • Tenants
            • Reports
            • Security Login Designer
              • Single Sign-On
                • Sign in with Google
                • Sign in with Microsoft
          • Code Repositories
        • Project Management
          • Tickets
          • Backlog
          • Active Sprints
        • User Management
          • Users
          • Roles
        • Administration
          • Security
            • ServoyCloud Roles
          • Credentials
          • Settings
        • Add-Ons
      • Database Backup
      • E2E Cypress Testing
        • Using Cypress
      • On-Premise Deployment
      • Privacy policy (ServoyAI)
      • FAQ
      • Migrate to Servoy Cloud
    • Extensions Developement
      • Component and Services
        • Component Development
        • Service Development
        • Tools and Dev Tips to use for Component/Service developement
        • Manifest (.mf file)
        • Specification (.spec file)
          • Property Types
            • Array property types
            • Custom object property types
            • Findmode property type
            • Foundset property type
            • Tags
        • Directives And Filters
          • Sablotabsequence
        • Console (serverside)
        • ServoyApi (serverside)
      • Serverside Plugins
        • Data Convertors and Validators
        • UI Convertors
  • Release notes
    • Release notes
      • 2025.03
      • 2024.03 (LTS)
      • 2023.03 (LTS)
      • 2025.03 (Servoy Cloud)
      • 2024.12
      • 2024.12 (Servoy Cloud)
      • 2024.09
      • 2024.09 (Servoy Cloud)
      • 2024.06
      • 2024.06 (Servoy Cloud)
      • 2024.03 (Servoy Cloud)
      • 2023.12
      • 2023.12 (Servoy Cloud)
      • 2023.09
      • 2023.09 (Servoy Cloud)
      • 2023.06
      • 2022.03 (LTS)
      • 2022.12 What's new
      • 2022.12
      • 2022.09 What's new
      • 2022.09
      • 2022.06 What's new
      • 2022.06
      • 2021.03.3 (LTS)
Powered by GitBook
On this page
  • Overview
  • Benefits of Using the Menu Feature
  • Get Started
  • Create a Menu
  • Using Solution Explorer:
  • Using "servoyMenu" property of a component:
  • Components List
  • Menu Item
  • Overview
  • Create a Menu Item
  • Design-Time Menu Properties
  • Comment
  • Encapsulation
  • Name
  • StyleClass
  • Design-Time Menu Item Properties
  • Global Properties
  • DataGrid Properties
  • Navbar Properties
  • Sidenav Properties
  • How to apply security to a Menu Item
  • Setting a Custom Property of a Menu Item
  • Scripting a Menu
  • Create a New Menu
  • Retrieve an Existing Menu
  • Retrieve All Menus
  • Add a Menu Item
  • Retrieve a Menu Item by ID
  • Find a Menu Item (Including Nested Ones)
  • Retrieve a Menu Item by Index
  • Retrieve All Menu Items
  • Remove a Menu Item
  • Select a Menu Item
  • Get the Selected Menu Item
  • Retrieve Menu Items with Security Considerations
  • Scripting a Menu Item

Was this helpful?

  1. GUIDES
  2. Develop
  3. Application Design
  4. Data Modeling

Menus

PreviousValue ListsNextIn-Memory Databases

Last updated 1 month ago

Was this helpful?

Overview

The Menu feature in Servoy is a reusable design-time entity designed to simplify and centralize menu management within applications. By defining a menu once, developers can use it consistently across multiple components that rely on structured navigation. This approach streamlines application development, enhances maintainability, and ensures a uniform user experience.

Menus in Servoy are versatile and promote modular design, making it easy to share or restrict their use across different parts of an application. With its flexible design, the Menu feature integrates seamlessly into the application’s user interface, enabling developers to focus on functionality while maintaining consistent navigation across their solutions.

Benefits of Using the Menu Feature

  • Consistency: Defining the menu structure once and applying it across multiple components ensures a uniform navigation experience for users.

  • Efficiency: Reduces the need for repetitive manual configuration, saving development time and minimizing errors.

  • Maintainability: Centralized menu management simplifies updates and modifications, as changes to the menu structure are automatically reflected across all linked components.

Get Started

The Servoy Menu feature simplifies navigation by enabling developers to create structured, reusable menus. This guide provides step-by-step instructions to help you efficiently implement and manage menus for a consistent user experience.

Create a Menu

Using Solution Explorer:

  1. Assign the Menu to a component.

Using "servoyMenu" property of a component:

  1. Click the name of the desired Servoy Menu

  2. Click OK (to dismiss the Servoy Menu Chooser). This will assign the selected Servoy Menu to the component


Components List

The following components have a servoyMenu property:


Menu Item

Overview

The MenuItem is a versatile design-time entity used to define individual items within a menu structure. It supports hierarchical organization, allowing each item to be linked to either a parent menu or another menu item, enabling the creation of nested menus.

With its flexible design, MenuItem ensures seamless integration into menu structures, supporting rich customization and adaptability for various application needs. This makes it an essential component for building intuitive and consistent navigation systems.

Create a Menu Item

Using the Menu Editor:

Using the Menu Context Menu:

  1. Enter the name for the Menu item and click on the OK button. This will add the new Menu item inside the specified Menu.

Submenu items To create submenu items, simply follow the same process as creating a regular menu item. The only difference is that, instead of linking the item to the menu itself, you set another menu item as its parent. This allows you to build nested menu structures effortlessly, enhancing the organization and depth of your navigation.

Hint You can change the order of the menu items by right-clicking the specific menu-item and selecting Move Up or Move Down.

Design-Time Menu Properties

Comment

  • Description: Allows developers to add notes or descriptive information about the purpose of the menu. These comments can serve as helpful reminders or context for future development and maintenance.

  • Use Case: Use this property to document the intended use or special considerations for the menu, ensuring clarity for other developers or when revisiting the project later.

Encapsulation

  • Description: Defines the visibility scope of the menu. The available options include:

    • Public: The menu is accessible across all modules, both in scripting and in the designer.

    • Module Scope: The menu is restricted to the same module, both in scripting and in the designer.

  • Use Case: Choose the appropriate encapsulation mode based on whether the menu needs to be shared across multiple modules or kept specific to a single module for better modularity and access control.

Name

  • Description: Serves as the unique identifier for the menu. This name is used to reference the menu in scripting or other configurations.

  • Use Case: Assign a meaningful and intuitive name that reflects the menu's purpose or function to ensure clarity and ease of identification during development.

StyleClass

  • Description: Enables the association of CSS classes for styling the menu. This property allows for customization of the menu's appearance to match the application's design.

  • Use Case: Apply custom styles by specifying a CSS class that defines the menu's visual properties, such as color, fonts, or layout, ensuring it aligns with the application's overall theme.

Design-Time Menu Item Properties

Menu items in Servoy are highly configurable and can include properties tailored for specific components like Navbar or Sidenav, or for both. These properties allow developers to customize menu items' behavior, appearance, and functionality based on the target component. To ensure seamless integration, the servoyMenu property should be used in the appropriate component (e.g., Navbar or Sidenav), aligning the menu item’s configuration with the component’s requirements.

Here is a list of the Menu Item properties:

Global Properties

Enabled

  • Description: Determines whether the menu item is interactive or disabled.

  • Use Case: Use this property to control the availability of menu items based on application state or user permissions.

IconStyleClass

  • Description: Specifies a CSS class to style the icon associated with the menu item.

  • Use Case: Use this to add visual context to menu items by styling their icons to match the application's theme.

Name

  • Description: Uniquely identifies the menu item.

  • Use Case: Assign a meaningful name to easily reference the menu item in scripting or configurations.

Permissions

  • Description: Configures visibility and interactivity of the menu item based on user roles and permissions.

  • Use Case: Use this to restrict access to certain menu items for unauthorized users, enhancing security.

StyleClass

  • Description: Specifies a CSS class for styling the menu item’s appearance.

  • Use Case: Apply this to customize the overall look and feel of the menu item.

Text

  • Description: Displays the content of the menu item. Supports HTML and localized text for dynamic customization.

  • Use Case: Use this to present descriptive text or HTML-formatted content for better clarity.

ToolTipText

  • Description: Displays rich, formatted text when hovering over the menu item.

  • Use Case: Add helpful descriptions or instructions for menu items using HTML-formatted tooltips.


DataGrid Properties

hideForColIds

  • Description: Specifies a comma-separated list of DataGrid's column IDs where the menu item should be hidden.

  • Use Case: Use this to exclude the menu item from specific columns in the DataGrid's context menu.

isSeparator

  • Description: Indicates that this menu item acts as a visual separator in the column menu.

  • Use Case: Use this to group related options visually within the DataGrid's context menu.

showForColIds

  • Description: Specifies a comma-separated list of DataGrid's column IDs where the menu item should be shown.

  • Use Case: Use this to restrict the menu item to only appear for certain columns.

Note If a menu item should be displayed for all DataGrid's columns, then both hideForColIds and showForColIds properties should be left empty.

Note hideForColIds and showForColIds properties are exclusive. In case a column ID is set in both properties, that specific item will not appear for that column ID.


Navbar Properties

Attributes

  • Description: Defines additional custom HTML attributes for the menu item.

  • Use Case: Use this property to add advanced configurations, such as data-* attributes or accessibility tags.

DataProviderValue

  • Description: Links a data provider value to a text field, applicable only for menu items with the display types INPUT or INPUT_GROUP.

  • Use Case: Use this to dynamically bind input fields to a data source, enabling real-time updates and interactions.

DisplayType

  • Description: Controls the appearance of the menu item. Options include:

    • MENU_ITEM: Default menu item appearance.

    • TEXT: Displays plain text.

    • BUTTON: Renders the item as a button.

    • INPUT: Adds an input field.

    • INPUT_GROUP: Combines an input field with an optional button.

  • Use Case: Adjust this property to define how a menu item should look and behave.

  • Default Value: MENU_ITEM

InputButtonStyleClass

  • Description: Specifies a CSS style class for the button shown with INPUT or INPUT_GROUP types. Typically used with Bootstrap button classes, such as btn-primary, btn-success, etc.

  • Use Case: Apply this to style the button according to the application’s theme or functionality.

InputButtonText

  • Description: Sets the text for the optional button shown with INPUT or INPUT_GROUP.

  • Use Case: Use this to label the button with a relevant action or instruction.

IsActive

  • Description: Indicates whether a MENU_ITEM item is shown as active.

  • Use Case: Set this to true to highlight the current or selected menu item, improving navigation context for users.

  • Default Value: False

Position

  • Description: Determines whether the menu item appears on the left or right side of the Navbar.

  • Use Case: Use this to organize menu items based on their placement within the navigation bar.

  • Default Value: LEFT

TabIndex

  • Description: Sets the tab order for the menu item in the navigation sequence.

  • Use Case: Use this to improve keyboard navigation and accessibility for users.

UserData

  • Description: Stores custom data associated with the menu item for reference purposes.

  • Use Case: Use this to pass metadata or additional context for the menu item.

ValueList

  • Description: Displays a typeahead list for INPUT or INPUT_GROUP menu items when set.

  • Use Case: Use this to enhance user input fields with dynamic suggestions or predefined values.


Sidenav Properties

BadgeStyleClass

  • Description: Specifies a CSS class for styling badges displayed alongside the menu item.

  • Use Case: Use this to customize the appearance of notification badges.

BadgeText

  • Description: Displays text within the badge associated with the menu item.

  • Use Case: Use this to show, for example, counts or statuses, such as the number of notifications.

Data

  • Description: Stores additional data specific to the menu item.

  • Use Case: Use this to hold custom values or context for the menu item.

FormName

  • Description: Links the menu item to a specific form.

  • Use Case: Use this to define the form that should be opened when the menu item is clicked.

IsDivider

  • Description: Indicates whether the menu item acts as a visual divider.

  • Use Case: Use this to separate groups of menu items within the Sidenav for better organization.

RelationName

  • Description: Defines a relation for dynamically populating the menu item.

  • Use Case: Use this to create menu items based on related data.

How to apply security to a Menu Item

  1. Open the Properties Panel

    • Open the Properties panel to view the menu item’s attributes.

  2. Configure Security Settings

    • The permissions dialog allows you to define which roles can view or enable the menu item.

    • Add or modify roles by selecting them from the available list.

  3. Set Visibility and Access

    • Visible: Determines whether the menu item is displayed for a given user role.

    • Enabled: Controls whether the menu item is interactive or disabled for specific roles.

  4. Apply and Save Changes

    • Click OK to confirm the security settings.

    • Save your changes to ensure that the menu item follows the configured access restrictions.

Security Options:

  • Visible: If a menu item is not visible, users assigned to the restricted role will not see it in the application.

  • Enabled: If a menu item is disabled, users with restricted permissions will see the menu item, but it will be inactive (grayed out or unclickable).

This method ensures that menu items are accessible only to authorized users, improving security and user experience.

Setting a Custom Property of a Menu Item

Menu Items in Servoy support custom properties, allowing developers to extend their functionality with additional configuration or metadata.

How to Set a Custom Property:

  1. Locate the Custom Properties section.

  2. Click the Add Custom Property button.

  3. Enter the property name and value.

  4. Save the changes.

Scripting a Menu

Here are some examples:

Creating and Managing Menus:

Create a New Menu

Example: Creating a menu named mainMenu:

var myMenu = menus.createMenu('mainMenu');

This menu can now be modified by adding items and configuring properties.

Retrieve an Existing Menu

Example: Retrieving a menu named mainMenu:

var existingMenu = menus.getMenu('mainMenu');
if (existingMenu) {
    application.output('Menu found!');
} else {
    application.output('Menu not found.');
}

If the menu exists, it can be modified; otherwise, a new menu may need to be created.

Retrieve All Menus

  • Use Case: When listing or managing all available menus in an application.

Example: Listing all available menus:

var allMenus = menus.getMenus();
for (var i = 0; i < allMenus.length; i++) {
    application.output(allMenus[i].name);
}

This is useful for dynamically managing different menus based on application state.


Working with Menu Items:

Add a Menu Item

  • Use Case: When adding new menu items dynamically at the end of the menu or at a specific position.

Example: Adding a new item dashboard at the end of the menu:

var myMenu = menus.getMenu('mainMenu');
var menuItem = myMenu.addMenuItem('dashboard');
menuItem.menuText = "Dashboard";

Adding an item reports at a specific position:

var myMenu = menus.getMenu('mainMenu');
var menuItem = myMenu.addMenuItem('reports', 1);
menuItem.menuText = "Reports";

This allows menu structures to be dynamically modified at runtime.

Retrieve a Menu Item by ID

  • Use Case: When modifying properties of an existing menu item.

Example: Finding and modifying the dashboard menu item:

var myMenu = menus.getMenu('mainMenu');
var item = myMenu.getMenuItem('dashboard');
if (item) {
    item.menuText = "Dashboard Home";
}

This is useful for dynamically changing menu item labels.

Find a Menu Item (Including Nested Ones)

  • Use Case: When searching for a menu item that may be deeply nested.

Example: Finding the settings menu item in a multi-level menu:

var myMenu = menus.getMenu('mainMenu');
var nestedItem = myMenu.findMenuItem('settings');
if (nestedItem) {
    application.output('Found settings menu!');
}

This helps when working with hierarchical menus.

Retrieve a Menu Item by Index

  • Use Case: When looping through menu items sequentially.

Example: Getting the first menu item:

var myMenu = menus.getMenu('mainMenu');
var firstItem = myMenu.getMenuItemAt(0);
application.output(firstItem.text);

This can be useful when processing menu items dynamically.

Retrieve All Menu Items

  • Use Case: When iterating over all menu items to apply changes or log data.

Example: Listing all menu items:

var myMenu = menus.getMenu('mainMenu');
var menuItems = myMenu.getMenuItems();
for (var i = 0; i < menuItems.length; i++) {
    application.output(menuItems[i].text);
}

This is helpful for bulk operations on menu items.


Removing and Selecting Menu Items:

Remove a Menu Item

  • Use Case: When dynamically updating menus based on conditions such as user permissions.

Example: Removing a menu item by reference:

var myMenu = menus.getMenu('mainMenu');
var menuItem = myMenu.getMenuItem('dashboard');
if (menuItem) {
    var success = myMenu.removeMenuItem(menuItem);
    application.output(success ? 'Item removed' : 'Failed to remove');
}

Removing a menu item by ID:

var myMenu = menus.getMenu('mainMenu');
var success = myMenu.removeMenuItem('reports');
application.output(success ? 'Reports removed' : 'Reports not found');

This helps keep menus relevant to user roles.

Select a Menu Item

  • Use Case: When highlighting a specific menu item based on user navigation.

Example: Selecting the dashboard item:

var myMenu = menus.getMenu('mainMenu');
var menuItem = myMenu.getMenuItem('dashboard');
if (menuItem) {
    myMenu.selectMenuItem(menuItem);
}

This can be useful for guiding users through workflows.

Get the Selected Menu Item

  • Use Case: When tracking user selections to trigger events.

Example: Getting the currently selected menu item:

var myMenu = menus.getMenu('mainMenu');
var selectedItem = myMenu.getSelectedItem();
if (selectedItem) {
    application.output('Current selection: ' + selectedItem.text);
}

This is useful for building dynamic interfaces that respond to user actions.


Security and Menu Items

Retrieve Menu Items with Security Considerations

  • Use Case: When fetching only menu items that the user has permission to view.

Example: Getting all accessible menu items:

var myMenu = menus.getMenu('mainMenu');
var secureItems = myMenu.getMenuItemsWithSecurity();
for (var i = 0; i < secureItems.length; i++) {
    application.output('Accessible: ' + secureItems[i].menuText);
}

This method ensures that restricted items are not exposed to unauthorized users.

Scripting a Menu Item

In the , right-click the Menus node and select Create menu. This will open the .

Enter the name for the Menu, select the desired solution then click on the Finish button. This will open the . After clicking Save All the new Menu will be added to the menus' list.

Set up the

Set up

Click the Save All button (or ctrl+shift+s) to save all your editors

A complete list of Menu API methods can be found .

In the component Properties Editor, click the servoyMenu property to open the

Click the Save All button (or ctrl+shift+s) to save all your editors

appears right after creating a new menu or it can be accessed for an existing menu by right-clicking the menu name and selecting Edit menu option. This editor allows the users to add, remove and edit menu items and sub-menu items, including their properties.

In the , expand the Menus node, select the desired menu, right-click on it and select Create menu item. This will open the .

Set up the

Click the Save All button (or ctrl+shift+s) to save all your editors

A complete list of Menu Item API methods can be found .

Here is a list of the :

Global properties define the core attributes of a menu item, applicable regardless of where the item is used. These properties control fundamental aspects such as appearance, interactivity, and security. Developers can use them to configure essential elements like the menu item's text, styling, tooltip, and access permissions. Since these properties are universal, they apply to menu items used in both and , ensuring a consistent user experience across different navigation components.

These apply universally to all menu items, regardless of their placement or context:

DataGrid properties apply to menu items used in the property of the component. They allow developers to customize which columns specific menu items should appear for, or insert visual separators in the column menu.

These are specific to menu items used in the property of the component:

Navbar properties allow menu items to be adapted for horizontal navigation within the . These properties introduce advanced configurations like input fields, buttons, and position alignment within the Navbar. Menu items in a Navbar can function as standard clickable options, interactive text fields, or buttons, providing flexibility in designing a structured and user-friendly navigation bar. Some properties also enable dynamic content binding via data providers and value lists, making the Navbar highly customizable.

These are specific to menu items used in the :

Sidenav properties are tailored for menu items used in the , which provides a vertical navigation structure. These properties allow additional visual and functional customizations, such as adding badges for notifications, defining dividers for better organization, and linking menu items to forms. Sidenav menu items can also be structured hierarchically, allowing for expandable and collapsible submenus. Developers can leverage these properties to create structured, data-driven, and visually distinct navigation menus.

These are specific to menu items used in the :

To control access to menu items based on user roles and permissions, Servoy provides a property that enables security configurations. Follow the steps below to apply security settings to a menu item:

Select the Menu Item you want to secure in .

Locate the property

In the Properties panel, find the field under the section.

Click on the field to open the .

Open the of the desired menu.

For a full walkthrough on how to define and manage custom properties, see: in the Menu Editor.

The enables developers to create, modify, and manage menus dynamically through scripting. Using the object, you can define menu structures, add or remove menu items, retrieve existing menus, and control their behavior at runtime.

Method: Use Case: When dynamically creating a menu at runtime for different user roles or application states.

Method: Use Case: When needing to modify an existing menu that was created at design time or earlier in runtime.

Method:

Method: or

Method:

Method:

Method:

Method:

Method: or

Method:

Method:

Method:

The in Servoy allows developers to dynamically create, configure, and manage individual menu items. With its built-in methods, menu items can be customized with security settings, dynamically modified, or linked to specific application behaviors.

Menu Editor
Servoy Menu Selection Wizard
Menu Editor
Solution Explorer
New MenuItem Wizard
Menu Editor
Create Menu Items
permissions
permissions
permissions
Global Properties
New Menu Wizard
here
JSMenu.addMenuItem(id)
JSMenu.addMenuItem(id, index)
JSMenu.getMenuItem(id)
JSMenu.findMenuItem(id)
JSMenu.getMenuItemAt(index)
JSMenu.getMenuItems()
JSMenu.removeMenuItem(menuItem)
JSMenu.removeMenuItem(id)
JSMenu.selectMenuItem(menuItem)
JSMenu.getSelectedItem()
JSMenu.getMenuItemsWithSecurity()
JSMenu
Menu Items Properties
Menu Items Properties
DataGrid
DataGrid
DataGrid
Menu Properties
Menu properties
Menu properties
Sidenav
Sidenav component
Sidenav
Sidenav component
here
JSMenuItem API
Servoy Menu assigned to a Sidenav component
Create a Servoy Menu
Servoy Menu Properties
Example: assign a Servoy Menu to a Navbar component
Create a Servoy Menu Item
Servoy Menu Item Properties
Adding security to a Menu Item
Solution Explorer
Solution Explorer
Adding Custom Properties
customMainMenu
customMainMenu
permissions configuration dialog
Navbar
Navbar
Navbar component
properties
Navbar component
properties
properties
Servoy Menu API
menus.createMenu(name)
menus.getMenu(name)
menus.getMenus()