You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2022/01/28 17:51:05 UTC
[isis] branch master updated: ISIS-2949 [kroviz] Execute All MenuBar Actions at Once
This is an automated email from the ASF dual-hosted git repository.
joergrade pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 21090ea ISIS-2949 [kroviz] Execute All MenuBar Actions at Once
21090ea is described below
commit 21090eab3884f278a03c862cf08644b692f865c6
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Fri Jan 28 18:37:35 2022 +0100
ISIS-2949 [kroviz] Execute All MenuBar Actions at Once
---
.../apache/isis/client/kroviz/ui/core/RoMenuBar.kt | 37 ++++++++++++++++------
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoMenuBar.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoMenuBar.kt
index bddecef..278f03e 100644
--- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoMenuBar.kt
+++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/core/RoMenuBar.kt
@@ -31,6 +31,7 @@ import io.kvision.panel.SimplePanel
import io.kvision.panel.vPanel
import io.kvision.utils.px
import org.apache.isis.client.kroviz.core.Session
+import org.apache.isis.client.kroviz.core.event.ResourceProxy
import org.apache.isis.client.kroviz.to.mb.Menubars
import org.apache.isis.client.kroviz.ui.chart.SampleChartModel
import org.apache.isis.client.kroviz.ui.dialog.About
@@ -189,19 +190,24 @@ class RoMenuBar : SimplePanel() {
buildMenuEntry(aboutTitle, "About", { ViewManager.add(aboutTitle, About().dialog) })
)
- /*
- val testTitle = "Test"
- mainMenu.add(
- buildMenuEntry(testTitle, "Test", { this.testFirstSession() })
- )
-
+ val testTitle = "Execute All MenuBar Actions"
mainMenu.add(
- buildMenuEntry("Browser in IFrame", "Wikipedia", { BrowserWindow("https://isis.apache.org/").open() })
+ buildMenuEntry(testTitle, "Test", { this.executeAllMenuBarActions() })
)
- mainMenu.add(
- buildMenuEntry("SSH", "Terminal", { ShellWindow("localhost:8080").open() })
- )*/
+ /*
+ val testTitle = "Test"
+ mainMenu.add(
+ buildMenuEntry(testTitle, "Test", { this.testFirstSession() })
+ )
+
+ mainMenu.add(
+ buildMenuEntry("Browser in IFrame", "Wikipedia", { BrowserWindow("https://isis.apache.org/").open() })
+ )
+
+ mainMenu.add(
+ buildMenuEntry("SSH", "Terminal", { ShellWindow("localhost:8080").open() })
+ )*/
return mainMenu
}
@@ -226,4 +232,15 @@ class RoMenuBar : SimplePanel() {
nav.add(mainMenu)
}
+ fun executeAllMenuBarActions() {
+ val menuBars = SessionManager.getEventStore().findMenuBars()!!.obj as Menubars
+ menuBars.primary.menu.forEach { m ->
+ m.section.forEachIndexed { index, section ->
+ section.serviceAction.forEach { sa ->
+ ResourceProxy().fetch(sa.link!!)
+ }
+ }
+ }
+ }
+
}