Skip to content

Instantly share code, notes, and snippets.

@fezu54
Last active March 14, 2020 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fezu54/b97c352728fbeab58d3df3fa50f96f53 to your computer and use it in GitHub Desktop.
Save fezu54/b97c352728fbeab58d3df3fa50f96f53 to your computer and use it in GitHub Desktop.
VaadinVueButton.kt
val taktMonitorButton = Button().apply {
icon = MaterialIcons.ALARM
caption = Messages.getString("EditMasterDataLayout.taktMonitorButton.caption")
id = EQUIPMENT_GROUP_TAKT_MONITOR_BUTTON_ID
this.addStyleName(XeticsLeanStyles.OUTLINE_ICON_BUTTON)
this.addClickListener { openTaktMonitor(equipmentGroupVM.equipmentGroup) }
}
private fun openTaktMonitor(equipmentGroup: EquipmentGroup) {
val language = Messages.getLocale()
val taktMonitorUrl = "$taktUrl/?group-id=${equipmentGroup.id}&group-name=${equipmentGroup.name}&language=$language#/"
UI.getCurrent().page.open(taktMonitorUrl, "_blank")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment