How to apply hot key in menubar / submenu using primefaces - jsf

I would like apply for hot key on Menu Bar/ Sub Menu Bar Using Prime Faces.
When i applied Hot key (like ctrl+f) then menu would be appearing like this
When i click in File Menu then its working fine but using the hot key its not appear.
So, Any buddy can tell me what i have to do.

From theory you could use <p:hotkey> as shown in the Primefaces showcase.
However, you need to bind it to a client side widget action. So you need to find out which is the widgetVar of your menu and the javascript action method to open the menu.

Related

ExtJS 4: Prevent Ext.grid.Panel header menu from closing after clicking "Columns" sub menu

The Sencha ExtJS framework Ext.grid.Panel component is great for representing result set data. However, it gets rather annoying for end-users when they try to enable and disable the columns in the grid. When you click the right side of a column header, a down arrow appears indicating there's a menu. When you click that arrow, a menu drops down. In any other HTML application based menu (or desktop app menu), you can either hover over a [sub] menu option or click the [sub] menu option and the next sub menu pops out. In the case of the Ext.grid.Panel, when you click a menu option on the main header menu hoping to expand the nested sub-menu, the entire root (column header) menu disappears. This would be represented as an enhancement by Sencha since there is a workaround--that being don't click on the menu option "Columns". It still works if you don't click, but it's just not intuitive. Who is bright enough to fix this in the extjs 4 framework code?
According to source files in the documentation this behavior is fixed in 4.1.2 (which is not available yet for public).
But!
Ext.define('MenuFix', {
override: 'Ext.menu.Item',
onClick: function () {
return this.menu ? null : this.callParent(arguments);
}
});

How to disable or apply custom menu to GTK (PyGTK) Notebook pages?

I am trying to apply custom menu to tab pages on my notebook control. I need to be able to select certain specific action for the entire page and i figured the tab label would be the best place to start.
So, i created a EventBox, applied Label as its child, and bound event callbacks to button-pressed-event and it... works.. kindof.
What i get is two menus: one is the one I create, and on top of it - the one created by GTK Notebook. to select something from my custom menu i need to escape the notebook menu first, and i certainly don't like it.
so the question is: how do I disable gtk notebook menus? or how can i set my own, custom menu, with my own, custom callbacks? I don't want to list all the available tab pages in the menu - it's introducing too much noise, so adding menu labels to the existing menu is not really the way to go.
thanks bunches
GtkNotebook should only show the tab selector if enable-popup is true. It defaults to false, so you've probably enabled it by mistake.

How to add custimized context menu item on right click in browser window?

Here I want to add my custom menu option i.e. ColorZilla, Aptana Studio on web browser right click
You can only do this with a browser plugin. Each browser will have its own syntax for plugins and specifically adding context menu items.
Aleks G. is right you cannot do that directly within the browser.
I don't know if it can help you or if it is what you are looking for but, within the browser you can handle the right click interaction in order to display your own custom menu ( not a particular menu item but the full menu ) ... meaning the default browser menu won't get displayed at all.
In case you are interested, you can have a small sample here

How to remove left side panel on component page?

I am using Joomla 1.6.5 with default theme "Beez2 - Default". I have created a top menu item with type as external link which has link 'index.php?option=com_sample'. When i click on this menu item i can see the output of the component 'sample'.
But on the left side there are few menus like User Menu, About Joomla, This Site. I want to remove that whole vertical panel so that i can use more space for my sample component.
I tried to search in administrator panel and on google but cant find anything to remove left panel.
How can i remove that panel? what code should i write in sample component file to make it not display the left panel..
Please guide me.... thanks in advance.!!
You need to set the menu not to appear when your component is the one used. Remove the show in all pages setting in the menu module.

left and right command menus in LWUIT form

Using LWUIT framework to develop mobile application.
In LWUIT by default first command is placed in the left and subsequent commands will be placed in the right menu of the form including the command which is already placed in form left.I need to add two menus to form.Left menu contains general application specific commands such as "Minimize","Back" and "Exit". Right Menu contains screen specific commands such as "Play Audio","Play Video" etc... Initially left softbutton of the form contains the text "Options" and the right softbutton of the form contains the text "Menu". When user selects "Options", a menu will be displayed with the following commands:
Minimize
Back
Exit
When user selects right soft button "Menu", a menu will be displayed with screen specific commands:
Play Audio
Play Video etc...
Commands of the right menu keeps changing from one form to another form, whereas the commands of left menu remains the same for all screens(forms). I know command menu can be customized by overriding "Form.createCommandList(Vector)" which returns a list. But here in my case I need two lists(menus). One at the left of the form and the other one at the right of the form.Please do help me in resolving this issue.
A LWUIT menu is just a dialog containing a List (or buttons for touch menu or pretty much anything you want), so to implement this just create a Command called options and place it in the left soft button. When options is pressed just show the dialog with your "additional commands". Since a List can accept a command array or vector doing something like this can be really easy.
You can look at the code for MenuBar which is pretty simple, you can also replace the menu bar component in the latest version LWUIT (SVN at the moment) but that seems redundant for this particular use case.

Resources