Menubar in JSF

Hello together!
I am looking for something like a menubar in Swing.
Something like a toolbar.
Is there a way to build that with JSF??
I would appreciate any hint. (Links, ...)
Thanks.

http://myfaces.apache.org/tomahawk/index.html
Implemented with javascript
Have a look to JSCook Menu
My warnings:
- you will have to fight to implement it!
- There are some defaults, you can find some in this forum.
- Main default is that it overrules JSF navigation principle because
for what I know of you cannot activate a backing bean to check
criteria and choose another jsp page
Good luck
:-)

Similar Messages

  • MenuBar using JSF V2

    I am learning JSF V2 .How to code the following menubar using JSF V2 stardard components:
    http://www.chinajava.net/images/questions/menuBar.JPG

    I am learning JSF V2 .How to code the following menubar using JSF V2 stardard components:
    http://www.chinajava.net/images/questions/menuBar.JPG

  • JSF - Duplicate items in menuBar

    This is the original post:
    Re: JSF - Duplicate items in menuBar
    I was wondering if anyone ever figured out why the menu item beans being loaded onto the menuBar twice?
    I have the same problem. And I also have another problem where the submenu items disappearing when I navigate to certain pages, which I could not figure out why?, even though I have the menu2 facet in every page.
    Thanks in advance.

    Hi,
    did you have a look at SRDemo, which also uses managed beans to build the menu bar ? I think that using the code provided in this sample is a good way to start
    If this doesn't help then you will need to provide more information about your implementation so people can point you to the area that causes the issue
    Frank

  • Menubar disappears over a ui:dropdown (jsf component)

    Hi,
    Iam working with jsf(NetBeans Visualwebpack 5.5).I have to create menus in my proj.So i downloaded js menu and included in my projec.Its working fine only for html components.If i try to include jsf
    <ui:dropdown > component..Iam getting tomcat error.
    Can u give me a solution.

    that is a very tough nut to crack you have there. The one thing that immediately prevents me from giving suggestions is this major heach ache: how do you control which components will get a certain state under the circumstances you give?
    My initial advice is to just use JSF as it is intended; yes you'll get pages littered with rendered and required attributes. This removes one major flaw in the requirement you propose; it keeps everything visible in stead of things happening automatically and invisibly in the background. This will make it so much easier to debug your authentication logic.
    The one thing you should centralize is the business logic behind the decisions when a component is required/rendered - you should prevent that pages are littered with EL expressions like "not user.admin and state.page='x'". Me personally I would create visible access rules that are tightly coupled to an application function, like 'auth.userCanEditUserDetails'.

  • Can one create a floating window using JSF?

    I was recently shown the interface for GMail. I don't have a GMail account, but one of the things I was asked to investigate was whether or not we can create the sort of floating window that appears on the GMail interface when one positions the mouse pointer over a cell on the grid showing the email messgaes. We have a grid on our JSF page, that shows specific data for items we're supporting, and it would be useful if we could have something like a mouseover event handler for each table row, and in that event handler show a window with a graphic specific to the data in that row, and the chart would move with the mouse pointer, perhaps changing the graphic if the mouse pointer is moved over a different row in the data table.
    Can we do this using JSF? If not, what alternative can you suggest that would provide a reasonable facsimile to this kind of user friendly feature?
    Thanks
    Ted

    "Core JavaServer Faces" Second Edition, by David Geary and Cay Horstmann, copyr 2007 - ISBN: 0-13-173886-0 - (it put me back USD $50, but well worth it). Page 644 gives two examples of how to generate a pop-up window. They give two examples because of problems that can arise when you transfer data between the main window and the pop-up. I do not want to violate copyright and there are ten pages of text devoted to this topic, so I'll just present some tickler code - if you cannot afford the book, maybe you can google on some terms. Sorry, I feel this is as far as I can go on this, I hope this helps some!
    The first example uses a JavaScript call:
    popup = window.open(url, name, features);
    popup.focus();
    where 'features' is a string like "height=300,width=200,toolbar=no,menubar=no"
    The second example creates the pop-up form using a hidden field like this:
    <h:form id="hidden" target="popup">
    <h:inputHidden id="country" value="#{bb.country}"/>
    <h:commandlink id="go" action="showStates"/>
    </h:form>

  • Navigation Problem in JSF - Urgent, pls help

    hi,
    I have a problem while navigating into a popup using a custom commandLink which opens the popup.The problem is that when i close the popup and return to the parent JSF and click any button or link in the parent, the page navigates to the page that was shown in the popup. This is my custom component:
    <hl:helplink id="alternateIdHelpLink" rendered="true" actionListener="#{helpBean.handleEvent}" value="Help" action="helpNeeded" target="NewWin" onclick="javascript:openPopup();"></hl:helplink>I have specified the navigation 'helpNeeded' inside the faces-config file which navigates to the page that is shown in the popup. So the problem is that i am unable to navigate to any other page after i open the popup(even after closing it).Can anyone pls find a solution for this problem.
    thanks and regards
    soorejkumar

    Thanks Sergey.Smirnov for the code..but its not working :-(...
    This is my javascript for opening the popup in my help.js file:
    function openPopup() {
        var windowDefn = "width=800, height=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes";
        win=window.open('',"NewWin", windowDefn);
    }On clicking the Custom Command Link the popup is opened. But then when i return back to the parent and click any other link or button the contents inside the popup is being displayed.
    <hl:helplink id="alternateIdHelpLink" rendered="true"  value="Help"  onclick="openPopup()" action="#{helpBean.execute}" target="NewWin" actionListener="#{helpBean.handleEvent}" ></hl:helplink>I tried to hard code the path of the jsf file into the popup but that gave an error that 'Page Cannot be Displayed'.
    I tried to get the path of the JSF using the contectPath as follows:
    var path= <%= renderResponse.encodeURL(renderRequest.getContextPath() + "/pages/epsHelp.jsp" %>;
    window.open('"+path+"','helpPopup','height=200,width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes');",null);When i viewed the source of the parent page the javascript was showing the correct context path ie "/help/pages/myjsf.jsp". What might be the issue.Can you please help..
    Thanks
    soorejkumar

  • How to refresh components of one jsf from another jsf (partialTriggers)

    This thread begins here:
    How to refresh components of one jsf from another jsf (partialTriggers)
    My apologies for post in other forum and thanks Frank for reply.
    I found a solution before read your post. I'm newbie and I ignore the use of colons. So, for do the problem that I explain in my post I must to change this code:
    public backing_home () {
    content = new RichPanelGroupLayout();
    content.setRendered (true);
    String[] partialTriggers = {"menu:menuItem1", "menu:menuItem2", "menu:menuItem3", "menu:menuItem4"}; //All id's of menuItems of the menuBar in menu.jsp
    this.content.setPartialTriggers(partialTriggers);
    Note that now I don't pass the item ID only. I add "menu:" before the ID. This allows to acces to name container ('menu' is de ID of subview). And that's all. This works!!
    Anyway, I test your propuse Frank. Thank you!
    Westh

    Westh,
    Yes this code appears to be correct. Was that your question?
    --Ric                                                                                                                                                                                   

  • Jspx template migration to jsf 2 problematic

    Hello experts,
    I have a ADF web application developed with JDeveloper 11.1.1.4 using JSF 1.2 deployed on WebLogic server 10.3.4.
    When I migrate to the new version jsf 2: Build JDEVADF_11.1.2.2.0_GENERIC_120418.2212.6183.1 and WebLogic server 10.3.5, the jspx template below misbehaves.
    The menu is brought from the left to the right hand side, though it expands and navigates well, the page contents, but the menu and logo, are not displayed.
    In other words, I can only see the logo, the moved but working menu but nothing else.
    Is there any way of correcting that kind of behaviour and migrate the app?
    Thank you in advance!
    NA
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <af:pageTemplateDef var="attrs">
    <af:panelStretchLayout id="pt_psl1" topHeight="113px">
    <f:facet name="center">
    <af:panelSplitter id="pt_ps1" orientation="vertical"
    splitterPosition="792">
    <f:facet name="first">
    <af:decorativeBox id="pt_db2" topHeight="26px">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pt_pgl7">
    <f:verbatim>
    <div align="center">
    <af:facetRef facetName="content"/>
    </div>
    </f:verbatim>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="top">
    <af:menuBar id="pt_mb1">
    <af:group id="pt_g1">
    <af:popup id="aboutPopup">
    <af:dialog id="pt_d1" type="ok"
    title="About Auction Bazaar">
    <af:panelGroupLayout id="pt_pgl3" halign="center"
    layout="vertical">
    <af:outputText value="Developed by Nick Aiva. Version #{initParam.ActionBazaarApplicationVersion } Copyright
    2012 #{requestContext.timeZone.displayName} "
    id="outputText1"/>
    <af:outputText value="Language and locale settings follow:
    #{facesContext.application.defaultLocale.displayLanguage}
    #{facesContext.application.defaultLocale.language}
    #{facesContext.application.defaultLocale.displayCountry}
    #{facesContext.application.defaultLocale.ISO3Country}
    #{facesContext.application.defaultLocale.ISO3Language}" id="pt_ot3"/>
    <af:spacer width="20" height="10" id="spacer1"/>
    <af:outputText value="For newer versions please visit:" id="pt_ot2"/>
    <af:spacer width="20" height="10" id="spacer3"/>
    <af:goLink id="goLink1" targetFrame="_blank"
    destination="http://nickaiva.blogspot.com"
    inlineStyle="font-size:medium;"
    text="http://nickaiva.blogspot.com"/>
    <af:spacer width="20" height="10" id="spacer2"/>
    </af:panelGroupLayout>
    </af:dialog>
    </af:popup>
    <af:menuBar id="menuBar1">
    <af:menu text="User" id="menu2">
    <af:commandMenuItem text="Add new user"
    id="commandMenuItem3"
    action="createUser"/>
    <af:commandMenuItem text="Query users"
    id="commandMenuItem4"
    action="queryUsers"
    rendered="#{securityContext.userInRole['ADMINISTRATOR']}"/>
    <af:commandMenuItem text="Change bidder status"
    id="pt_cmi3"
    action="changeBidderStatus"
    rendered="#{securityContext.userInRole['ADMINISTRATOR']}"/>
    <af:commandMenuItem text="My personal details"
    id="commandMenuItem12"
    action="home"/>
    <af:commandMenuItem text="Log out" id="pt_cmi4"
    rendered="#{securityContext.authenticated}"
    action="#{login.performLogout}"/>
    </af:menu>
    <af:menu text="Bid" id="menu3"
    textAndAccessKey="&amp;Bid">
    <af:commandMenuItem text="Add new bid"
    id="commandMenuItem5"
    action="addBid"
    rendered="#{securityContext.userInRole['BIDDER , ADMINISTRATOR']}"/>
    <af:commandMenuItem text="Query bids"
    id="commandMenuItem6"
    action="queryBids"/>
    <af:commandMenuItem text="Withdraw a bid"
    id="commandMenuItem11"
    action="withdraw"
    rendered="#{securityContext.userInRole['BIDDER , ADMINISTRATOR']}"/>
    </af:menu>
    <af:menu text="Item" id="pt_m2"
    textAndAccessKey="&amp;Sell">
    <af:commandMenuItem text="Add new item" id="pt_cmi2"
    action="addItem"
    rendered="#{securityContext.userInRole['SELLER, ADMINISTRATOR']}"/>
    <af:commandMenuItem text="Query items"
    id="commandMenuItem1"
    action="queryItems"/>
    <af:commandMenuItem text="Update item"
    id="commandMenuItem14"
    action="updateItem"
    rendered="#{securityContext.userInRole['SELLER, ADMINISTRATOR']}"/>
    <af:commandMenuItem text="Place item in category"
    id="commandMenuItem16"
    action="placeItemInCategory"
    rendered="#{securityContext.userInRole['SELLER, ADMINISTRATOR']}"/>
    </af:menu>
    <af:menu text="Category" id="menu4"
    textAndAccessKey="&amp;Bid">
    <af:commandMenuItem text="Add new category"
    id="commandMenuItem7"
    action="addCategory"
    rendered="#{securityContext.userInRole['ADMINISTRATOR']}"/>
    <af:commandMenuItem text="Query categories"
    id="commandMenuItem8"
    action="queryCategories"/>
    <af:commandMenuItem text="Update category"
    id="commandMenuItem15"
    action="updateCategory"
    rendered="#{securityContext.userInRole['ADMINISTRATOR']}"/>
    </af:menu>
    <af:menu text="Order" id="menu5"
    rendered="#{securityContext.userInRole['BIDDER,ADMINISTRATOR ']}">
    <af:commandMenuItem text="Create Shipping Info"
    id="pt_cmi1"
    action="createShippingInfo"/>
    <af:commandMenuItem text="Add new order"
    id="commandMenuItem9"
    action="addOrder"/>
    <af:commandMenuItem text="Query orders"
    id="commandMenuItem10"
    action="queryOrders"/>
    </af:menu>
    <af:menu text="Help" id="menu1"
    textAndAccessKey="&amp;Help">
    <af:commandMenuItem id="commandMenuItem2"
    textAndAccessKey="&amp;About"
    text="About">
    <af:showPopupBehavior popupId="aboutPopup"
    triggerType="action"/>
    </af:commandMenuItem>
    <af:goMenuItem text="Diagnostics" id="goMenuItem1"
    destination="/servlet/SuperSnoop"/>
    <af:commandMenuItem id="commandMenuItem13"
    action="resetLog4j"
    text="ResetLog4j"/>
    </af:menu>
    </af:menuBar>
    </af:group>
    </af:menuBar>
    </f:facet>
    </af:decorativeBox>
    </f:facet>
    </af:panelSplitter>
    </f:facet>
    <f:facet name="top">
    <af:decorativeBox id="pt_db1" topHeight="50px">
    <f:facet name="center">
    <af:panelGroupLayout id="pt_pgl1" layout="horizontal"
    valign="middle">
    <af:goLink id="pt_gl1"
    targetFrame="_blank"
    destination="http://nickaiva.blogspot.com"
    inlineStyle="font-size:medium;">
    <af:image id="pt_i1" shortDesc="http://nickaiva.blogspot.com"
    inlineStyle="height:auto; width:auto;"
    source="/images/cropped-small-sea-wave .jpg"/>
    <af:spacer width="20" height="10" id="pt_s1"/>
    </af:goLink>
    <af:outputText value="#{attrs.pageTitle}" id="pt_ot1"
    inlineStyle="color:Navy; font-size:large;"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:decorativeBox>
    </f:facet>
    <f:facet name="bottom">
    <af:panelStretchLayout id="pt_psl3" startWidth="200px">
    <f:facet name="center">
    <af:panelGroupLayout id="pt_pgl2" halign="end" layout="horizontal">
    <af:panelGroupLayout id="pt_pgl4" layout="vertical">
    <af:spacer width="230" height="8" id="pt_s2"/>
    <af:outputFormatted value="Copyright &amp;copy; 2012 http://nickaiva.blogspot.com. All rights reserved."
    id="pt_of1" styleUsage="pageStamp"
    inlineStyle="text-align:right;"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="start">
    <af:panelGroupLayout id="pt_pgl5" layout="vertical">
    <af:spacer width="200" height="8" id="pt_s3"/>
    <af:panelGroupLayout id="pt_pgl6" layout="horizontal">
    <af:spacer width="4" height="10" id="pt_s4"/>
    <af:switcher id="pt_s5"
    facetName="#{securityContext.authenticated?'loggedon':'loggedoff'}"
    defaultFacet="loggedoff">
    <f:facet name="loggedoff">
    <af:outputFormatted value="[Not Connected]" id="pt_of5"
    styleUsage="pageStamp"/>
    </f:facet>
    <f:facet name="loggedon">
    <af:outputFormatted value="[Connected as  #{securityContext.userName}]"
    id="pt_of6" styleUsage="pageStamp"/>
    </f:facet>
    </af:switcher>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelStretchLayout>
    </f:facet>
    </af:panelStretchLayout>
    <af:xmlContent>
    <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>templateABDef</display-name>
    <facet>
    <facet-name>content</facet-name>
    </facet>
    <attribute>
    <attribute-name>
    pageTitle
    </attribute-name>
    <attribute-class>
    java.lang.String
    </attribute-class>
    <default-value>
    Auction Bazaar
    </default-value>
    </attribute>
    </component>
    </af:xmlContent>
    </af:pageTemplateDef>
    </jsp:root>
    Edited by: NickAiva on Aug 1, 2012 4:01 PM

    Submitted bug at http://java.net/jira/browse/ADFEMG-43
    under the title:
    Problematic jspx template migration to jsf 2
    Edited by: NickAiva on Aug 2, 2012 8:52 AM
    Removing some jdev visual editor libraries solved the issue
    Edited by: NickAiva on Aug 7, 2012 9:25 AM

  • Popup window in JSF

    Hi All,
    In Java EE Application i have created two JSF pages. When i click a button in first JSF, the second JSF page should appear in a pop up window. Is that possible.
    Let me also know how to add a pop up in JSF.
    Regards,
    Manickka.

    In your case, If you really need a popup window I think that an option that will work is use a h:commandLink:
    - Use the onclick method of the h:commandLink to open a blank new page, with the name for example "blankPopUp".
    - Use a h:commandLink to navigate to the second page. The action method can be used to run a JSF navigation.
    - Use the target method of the command link to point to your window opened via javascript in the onclick event. In this case the target will be "blankPopUp". Then your content returned by the JSF navigation will be rendered in the already opened popup window. Then you will work with two windows, it will be like two tabs in your browser, but in this sample, only one will be a tab and another will be a popup window.
    Sample code:
                <h:commandLink id="openPopUp" value="OPEN POPUP" target="blankPopUp" onclick="window.open('','blankPopUp','status=no,toolbar=no,location=no,menubar=no,resizable,width=1008,height=690,scrollbars,left=100,top=50');" action="#{yourBean.navigateToSecondPage}" />Regards.
    Edited by: kerule on 29-abr-2012 15:07

  • Unterminated String Constant error generated by JSF

    I'm getting the error in javascript and not being able to figure it out. It is caused by <h:outputLink> tag trying to load HTML page in IE6 browser.
    I'm attaching this page and hopefully someone would come up with a solution. Thanks a lot in advance.
    <head>
    <script type="text/javascript">
    function doPopup(value){
    popup = window.open("mqClientSetting.faces?applid="
    + value,"popup","height=605,width=620,toolbar=no,menubar=no,"
    + "scrollbars=yes");
    popup.focus();
    </script>
    <link href="styles.css" rel="stylesheet" type="text/css"/>
    <title>MQ Browser</title>
    </head>
    <table class="mqHeader">
    <tbody>
    <tr>
    <td><img src="/MqBrowser/IBM_logo.gif" /></td>
    <td><img src="/MqBrowser/shakehands.jpg" /></td>
    <td><img src="/MqBrowser/ABN_logo.gif" /></td>
    </tr>
    </tbody>
    </table>
    <hr>
    <body>
    <form id="j_id_id17" name="j_id_id17" method="post" action="/MqBrowser/mqClientApplications.faces" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_id_id17" value="j_id_id17" />
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id35:j_id36" />
    <div style="overflow:auto; width:100%; height:400px;" align="center">
    <table class="borders">
    <caption class="mqchanCaption">ABN AMRO business MQ applications</caption><thead>
    <tr>
    <th class="mqchanHeader" scope="col">Application</th>
    <th class="mqchanHeader" scope="col">Description</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td><a href="# onclick="doPopup('
    CRIS');return false;">
    CRIS</a></td>
    <td>cris
    </td>
    </tr>
    <tr>
    <td><a href="#" onclick="doPopup('
    GLOBAL NETTING');return false;">
    GLOBAL NETTING</a></td>
    <td>TF
    </td>
    </tr>
    </tbody>
    </table>
    </div>
    </form>
    </body>

    <a href="#" onclick="doPopup('
    CRIS');return false;">
    <a href="#" onclick="doPopup('
    GLOBAL NETTING');return false;">Remove those linebreaks.
    This is likely just custom code and not generated by JSF (at least, I never heard of a Javascript doPopup() function in JSF). If it is actually generated by JSF, then rise a bugreport at the site of the component manfacturer.

  • JSF Page Sizing

    Hi, Can anyone tell me how to set the page size and attributes for a web page.
    I am using Netbeans with VWP and am new to web applications, I am trying to create a Login page which is say 400x300 in size and without the usual buttons, toolbars etc on the browser.
    I have looked at various tutorials and have no problems with the functionality - just the presentation.
    Your help would really be appreciated.

    AFAIK the only way to control the size and whether the menu bar and toolbar (aka chrome) are shown or not is controllable using the the window.open() java script function:
    See:
    http://www.w3schools.com/htmldom/met_win_open.asp
    Use properties such as:
    width, height, menubar, toolbar.
    use the logn pages URL as the value of URL parameter in the open call.
    For how to use such popup windows in JSF this blog entry may be helpful:
    http://blogs.sun.com/divas/entry/adding_a_popup_window_to
    Hope this helps (somewhat?),
    Sandip

  • I don't know how to use  MenuBar

    hi
    i use jdevelopper 11g , and i have created a jsf page where i use a MenuBar composed of ( File {New , Open , reopen , save , save as , import , export , exit } and edit , tools , help ... )
    and i have a source code of this menu in a java class
    i use action or actionListener to associate this java code to my menu ? and how ?

    this is my source code of menu , but how can i link the menu of my page jsf with this code ?
    public void createMenuBar() {
    final DiagramView diagramView = this.diagramEditingView.getDiagramView();
    final JFrame parent = this;
    this.saveActivity =new SaveConceptualSchemaActivity(this.conceptualSchema, this.eventBroker);
    if(this.saveAsFileAction == null) {
    this.saveAsFileAction = new SaveFileAction( this, this.saveActivity, KeyEvent.VK_A, KeyStroke.getKeyStroke( KeyEvent.VK_S, ActionEvent.CTRL_MASK | ActionEvent.SHIFT_MASK));
    this.saveAsFileAction.setPostSaveActivity(new SimpleActivity() {
    public boolean doActivity() throws Exception {
    setCurrentFile(Interface .this.saveAsFileAction.getLastFileUsed());
    Interface .this.conceptualSchema.dataSaved();
    return true;
    this.saveAsFileAction.setPreSaveActivity(new SimpleActivity() {
    public boolean doActivity() throws Exception {
    return databaseWellDefined();
    // --- menu bar ---
    this.menuBar = new JMenuBar();
    setJMenuBar(this.menuBar);
    // --- file menu ---
    this.fileMenu = new JMenu("File");
    this.fileMenu.setMnemonic(KeyEvent.VK_F);
    this.menuBar.add(this.fileMenu);
    SimpleActivity testSchemaSavedActivity = new SimpleActivity() {
    public boolean doActivity() throws Exception {
    return checkForMissingSave();
    NewConceptualSchemaActivity newSchemaActivity =
    new NewConceptualSchemaActivity(this.eventBroker);
    newSchemaActivity.setTestNewOkActivity(testSchemaSavedActivity);
    newSchemaActivity.setPostNewActivity(new SimpleActivity() {
    public boolean doActivity() throws Exception {
         Interface .this.currentFile = null;
    updateWindowTitle();
    DatabaseViewerManager.resetRegistry();
    return Interface .this.databaseConnection.isConnected();
    SimpleAction newAction = new SimpleAction(this, newSchemaActivity, "New", KeyEvent.VK_N, KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));
    JMenuItem newMenuItem = new JMenuItem("New");
    newMenuItem.setMnemonic(KeyEvent.VK_N);
    newMenuItem.addActionListener(newAction);
    this.fileMenu.add(newMenuItem);
    LoadConceptualSchemaActivity loadSchemaActivity =new LoadConceptualSchemaActivity(this.eventBroker);
    loadSchemaActivity.setTestOpenOkActivity(testSchemaSavedActivity);
    OpenFileAction openFileAction = new OpenFileAction( this, loadSchemaActivity, this.currentFile,
    KeyEvent.VK_O,KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
    openFileAction.addPostOpenActivity(new SimpleActivity() {
    public boolean doActivity() throws Exception {
    updateWindowTitle();
    if (Interface.this.conceptualSchema.getDatabaseInfo() != null) {
    return true;
    return Interface.this.databaseConnection.isConnected();
    JMenuItem openMenuItem = new JMenuItem("Open...");
    openMenuItem.setMnemonic(KeyEvent.VK_O);
    openMenuItem.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
    openMenuItem.addActionListener(openFileAction);
    this.fileMenu.add(openMenuItem);
    this.mruMenu = new JMenu("Reopen");
    this.mruMenu.setMnemonic(KeyEvent.VK_R);
    recreateMruMenu();
    this.fileMenu.add(this.mruMenu);
    this.fileMenu.addSeparator();
    JMenuItem saveMenuItem = new JMenuItem("Save");
    saveMenuItem.setMnemonic(KeyEvent.VK_S);
    saveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
    saveMenuItem.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    saveFile();
    this.fileMenu.add(saveMenuItem);
    JMenuItem saveAsMenuItem = new JMenuItem("Save As...");
    saveAsMenuItem.setMnemonic(KeyEvent.VK_A);
    saveAsMenuItem.addActionListener(this.saveAsFileAction);
    this.fileMenu.add(saveAsMenuItem);
    this.fileMenu.addSeparator();
    ........................................ ect
    my menu containe : File ( new , open , reopen , save , saveas ,..)
    Edit (Defaire , refaire )
    View , tools help
    please how can i associate each one to the source code ?

  • LaunchDialog window property to display menubar

    Hi,
    I am launching a dialog box from a jspx page through the action listener of the command link.
    The dialog box that opens up does not show the menubar that I want to be shown so that a user may save the results (an excel file).
    I am aware that we can pass the window properties in a Map object, as a parameter to AdfContext's launchDialog method.
    Which property will enable me to display the menubar?
    Sample code that I am using is given below for reference, and also the link that I followed.
    Thanks,
    Rommel.
    public void generateExcel(ActionEvent actionEvent)
    //do some processing as needed
    String destination = "valid destination";
    FacesContext context = FacesContext.getCurrentInstance();
    UIViewRoot dialog = context.getApplication().getViewHandler().createView(context, destination);
    HashMap properties = new HashMap();
    properties.put("width", new Integer(600));
    properties.put("height", new Integer(600));
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    AdfFacesContext.getCurrentInstance().launchDialog(dialog,null, null,true,properties);
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/dialogs.html#Manually%20Launching%20A%20Dialog

    Hi,
    height and width are the only supported properties in the dialog window
    Frank

  • Problem opening popup from jsf page....

    Hi to all....i have a problem, i'm trying to open a popup window using "outputLink".
    My code is:
    <h:outputLink value="#" onclick="window.open('#{appManager.basePath}/admin/selectCollection.jsf','','width=600, height=400, resizable=yes, fullscreen=no, menubar=no, toolbar=no, status=no, scrollbars=no, location=no')">
         <h:outputText value="#{bundle.selCollection}"> </h:outputText>
    </h:outputLink>
    The "window.open" works perfectly, but the parent window shows the page "Directory Listing For /" with the list of directories of my root project...
    What is the problem?

    try to use the popupFrame component of jenia4faces library (http://www.jenia.org).
    Is a good solution for popups problem

  • How to get ALL values as default for  a drop down box in JSF

    Hi,
    I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
    By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
    Could any body help me? Any help must be appreciated.
    Thanks,
    Aseet

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

Maybe you are looking for

  • Substract 3 monts to a date in oracle bi publisher 11g

    Hey forum I need to create a sql query data set that groups my info by fiscal year. what I'm having on my data set sql query editor right now is something like select YEAR ("Credit Memo"."Cm Fecha Creacion") as yearGroup from ................. and I'

  • We are gettting this error consistently when trying to edit a pdf.

    Multiple PDF files are open at the time ((about 4 to 5) not counting word, excel and outlook is open and running as well) that we are getting the crash error.  Please see error below: Faulting application name: Acrobat.exe, version: 11.0.9.29, time s

  • IPhone 4S crashing

    Hello everyone, Got some problems with my iPhone 4S, it keeps crashing when i open a new app, the screen goes black, the phone locks and i have to open the app again. It does this with allmost all the apps, in some of em crashes in the middle of the

  • How to type Korean Characters in command prompt of Korean win2k3/XP

    We are not able to type the Korean multi-bytes in command prompt of Korean-Win2k3/XP. But we able to copy paste the Korean characters command prompt successfully. Here we are using "MS-IME2002" as keyboard type In case of Korean-Win2k8, able to type

  • Scheduler Not Work

    Hi all, i want some help with scheduler, the case is: the database installed first time when the database locale in normal calendar, the server is in hijri , when i create any job schedule dont work when next run comes, please help