menuitem

Dynamic p:menu works in PrimeFaces 3.5, not in >4.0

我的未来我决定 提交于 2021-02-11 12:10:00
问题 I'm updating a project from Primefaces 3.5 to 4.0 and I've got problem with menu. I can't understand how to create dynamically a simple menu like this: <p:menu> <p:submenu> <p:menuitem value="jump" action="myTransition" /> </p:submenu> </p:menu> I try to set the command of the item with the name of the transition, defined in my Spring web flow configuration, with no result. DefaultMenuItem itemNone = new DefaultMenuItem(); item.setCommand("myTransition"); The plain menu work fine, but if I

Dynamic and static MenuItems, both in MainMenu and ContextMenu

余生颓废 提交于 2021-02-08 10:20:23
问题 I whould like to have a menu like the following: ┌──────────────────────────┐ │ MenuItem always the same │ │ <Separator /> │ │ MenuItem read from XML 1 │ │ MenuItem read from XML 2 │ │ MenuItem read from XML n │ └──────────────────────────┘ And this should be reused in a MainMenu and as a submenu of a ContextMenu also. I currently have the following in the XAML: <Window.Resources> <XmlDataProvider x:Key="ItemTypes" Source="C:\Config.xml" XPath="Configuration/ItemTypes/ItemType" />

Dynamic and static MenuItems, both in MainMenu and ContextMenu

流过昼夜 提交于 2021-02-08 10:19:08
问题 I whould like to have a menu like the following: ┌──────────────────────────┐ │ MenuItem always the same │ │ <Separator /> │ │ MenuItem read from XML 1 │ │ MenuItem read from XML 2 │ │ MenuItem read from XML n │ └──────────────────────────┘ And this should be reused in a MainMenu and as a submenu of a ContextMenu also. I currently have the following in the XAML: <Window.Resources> <XmlDataProvider x:Key="ItemTypes" Source="C:\Config.xml" XPath="Configuration/ItemTypes/ItemType" />

How to increase the menuitem width in android while using Actionbar

核能气质少年 提交于 2021-02-07 21:37:18
问题 I have a problem to increase the width of MenuItem in Action bar, it take the fixed width. Below is screen shot, and want to achieve the below one, Below is the code: search_layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:background="@drawable/search_view_background" android:layout_width="match_parent" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android

Material-ui hoverColor for MenuItem component?

若如初见. 提交于 2021-02-07 18:04:19
问题 I've read up on: https://github.com/callemall/material-ui/blob/master/src/styles/getMuiTheme.js and http://www.material-ui.com/#/customization/themes But can't seem to find the answer to what I'm looking for. I'm simply trying to change the color of the hovered item. I believe by looking at those docs I should just reference menuItem and provide a hoverColor , although that isn't working. Any thoughts? (don't mind the inline css overriding, just experimenting with different ways of doing

recursive menu item with default template and itemTemplate

核能气质少年 提交于 2021-02-07 12:54:43
问题 I have a WPF Control template for the MenuItem type: <Style TargetType="{x:Type MenuItem}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Cursor" Value="Hand" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type MenuItem}"> <Border Background="{TemplateBinding Background}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions>

Creating menuitems from list with bindings results in blank items

南楼画角 提交于 2021-01-29 20:58:54
问题 I have a Menuitem which is supposed to show a list of quantities as children which show a list of the units defined for this quantity as children. The list of quantities is set in code-behind to the ItemsSource of the MenuItem. <MenuItem Header="common.unitsystem" Name="mnuItemUnits"> <MenuItem.Resources> <DataTemplate DataType="{x:Type guidev:Measurement}"> <StackPanel> <TextBlock Text="Measurement"/> <TextBlock Text="{Binding Name}"/> </StackPanel> </DataTemplate> <HierarchicalDataTemplate

Cannot get all the submenu items in winform in c#

末鹿安然 提交于 2021-01-28 07:06:34
问题 I have a winform with menu bar like this : File==>Add==>New Project File==>Add==>Existing Project File==>Open File==>Exit Edit==>Copy Edit==>Cut Help==>View Help Help==>About I want to get the text of all menu items and submenu items. I have tried this code : for (int i = 0; i < menuStrip1.Items.Count; i++) { foreach (ToolStripMenuItem item in ((ToolStripMenuItem)menuStrip1.Items[i]).DropDownItems) { textBox1.Text += item.OwnerItem.Text + @"==>" + item.Text + Environment.NewLine; } } and it

WPF - MenuItem with children not firing bound command

无人久伴 提交于 2021-01-28 05:09:26
问题 So I've been butting my head against the wall with this one all day. In my WPF application (using MVVM Light), I have a context menu which is bound to a collection of viewmodels, and it is not behaving quite correctly. I can create my menu, and everything works perfectly with my tree of MenuItems behaving, commands being executed, and the correct parameter coming through. I'm using this to make a context menu which allows a user to add items to folders. The problem that I've run into is that

react-router+antD/ How to highlight a menu item when press back/forward button?

北城以北 提交于 2021-01-20 23:54:53
问题 I create a menu and want to highlight the item which i choose,and i did it. But when i press back/forward button,the menu item don't highlight. What should i do? I have tried to use addEventListener but failed. Have someone could give some advice? class Sidebar extends React.Component { constructor(props) { super(props); this.state={ test: "home" } this.menuClickHandle = this.menuClickHandle.bind(this); } componentWillMount(){ hashHistory.listen((event)=>{ test1 = event.pathname.split("/"); }