ADF 11 g Menu Bar creation with labels coming from database.

Hi Team,
I am new to Web Center and ADF 11g along with jdeveloper11g. I have a requirement where I need to create a Menu bar using ADF's menu bar component.The labels displayed in the menu bar would be coming from the database.Menu and sub menu would be a tree structure. Meaning a sub menu may again have a list of menu's.I tried searching the forum but could find examples which created menu bar using task flows so they did not helped me much.
Any tutorial link, code snippet or guidance would be deeply welcomed.
Regards
[email protected]

Hi,
I am not sure how to implement this in a menu bar, but you can mimic the behaviour with an af:tree
<af:tree value="#{bindings.Departments.treeModel}" var="node"
                     selectionListener="#{bindings.Departments.treeModel.makeCurrent}"
                     rowSelection="single" id="t1">
              <f:facet name="nodeStamp">
                 <af:goLink text="#{node}" id="ot1">
                </af:goLink>
              </f:facet>
            </af:tree>If you have a two level hierarchy master-detail you will get an initial expanded list the first level nodes that expand to show the second level.
If you want to initially show the master collapsed then you can add a dummy master to the master view object with one row only,
creating with this way a pseudo three level hierarchy.
To create the binding automatically just DnD from datasources the master as a tree and then add the detail level to the created binding
If you figured out a better way please tell!
Hope I helped :)
Gabriel

Similar Messages

  • May be slightly simple question from a new Mac user: Why can't I quit safari? I cannot quit it from top menu bar neither to do it from dock? All other apps are working normally.

    May be slightly simple question from a new Mac user: Why can't I quit safari? I cannot quit it from top menu bar neither to do it from dock? All other apps are working normally.

    Or you can actived the right button on your magic mouse and click on they icon in the dock. then you select "stop" and it's out of your dock.
    Greetings
    *update: Sorry, my mistake! I didn't read your message correct! Sorry for the inconvience!

  • When I use Firefox without menu bar I can see bookmarks. How ever when I activate menu bar the bookmark is missing from toolbar. I tried opening in safe mode and resetting toolbar but it didn't fix the issue. I am using version 7.0

    When I use Firefox without menu bar I can see bookmarks. How ever when I activate menu bar the bookmark is missing from toolbar. I tried opening in safe mode and resetting toolbar but it didn't fix the issue. I am using version 7.0

    Do you mean the Bookmarks Menu button on the Navigation Toolbar?
    You only see that button if the menu bar is hidden.

  • Help with Retrieve attributes from database

    Hi,
    I'm using filter "Retrieve from or write to database" with select query from database by selecting attributes as column names radio button.
    I'm unable to get these user attributes with column names.
    For eg : select tag from test_tag where rownum=1;
    I was trying so that result can be used using tag attribute (${tag}).
    Please help in this regard.
    Thanks,
    Vani

    Hi Vani,
    After the retrieve filter, add a Trace Filter and leave it as it is. Execute the policy once and in the trace data that now will be displayed there you should be able to read out the exact name and type of the parameter. This way of identifying data/parameters etc is a recommended way of working while developing! Copy paste the Trace Data from the Trace filter here if you need help!
    Cheers,
    Stefan

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Fill a table with data coming from an RFC

    Hello everyone:
    I've followed the Weblog "How many lines of java code did i write for a simple Web Dynpro?"
    /people/durairaj.athavanraja/blog/2004/10/17/how-many-lines-of-java-code-did-i-write-for-a-simple-web-dynpro
    I've called an RFC and created a table with data coming from it (which is also a table). My question is, if in this table there's a field named "UserType" there are two possible values for this field:
    "userA"
    "userB"
    How can I get the table only show me the "userA" registers? The RFC does return all of the users, but when filling the table, can I put an if-else somewhere on my code?
    Thanks a lot
    Alejandro

    Hi Alejandro,
    Referring to the link provided "The logic of the filter process is not implemented in Web Dynpro. The application developer must implement the action to be executed."
    We would have to implement the action onFilter in the controller implementation. Ideally, we fill the data retrieved from backend into a List (java.util.List) (this could be done on init of view) and then subset the list after meeting the criteria in the action handler(say
    onActionFilterData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent).
    Having done this, you may bind the output list back to the node (shown in table)
    Regards,
    Chaitanya

  • Trying to activate a menu bar icon with no luck :/

    Hello everyone, how great is it to assign hotkeys for your application menus.  Yet... for the more interesting users like me, we need to also activate menu bar icon settings, particularly the 'show ink window' in my case.  Respectively iv'e tried every corner in the world for another way of activating that besides the point and click method everyone is forced to use... and came up with no answer... so i figured, what about Terminal? maybe... just maybe there is a Terminal(OS X native command-line tool) command for this, if anyone knows please share!!

    Works fine,on  Toshiba a135...ASUS

  • Menu Bar Problem with picture.

    The right corner of my menu bar has vanished completely including spotlight, the date and time, and various system menu icons. Checking to add these icons in the preferences does not do anything. It is as if the menu bar is "extended" off the screen. I tried various things such as resetting the PRAM/NVRAM, SMC, deleting the com.apple.systemuiserver.plist, etc. I tried running disk utility and an archive install but I keep getting an error and can not continue. I even played around with the display settings. Here is a picture:
    http://myskitch.com/luminairelight/fullscreen-20070807-232532.jpg
    Thanks in advance for any assistance.

    It's not a theme problem by the way.

  • Menu bar 0% with new battery

    I'm going to repost this with some new information. ibook G4 - formerly using newertech battery, whose health was good. - purchased a NEW apple replacement which showed 2/3 charge on the battery lights- no help. The menu bar reads 0% after a PMU reset - then when the battery is left in, it eventually has the "X" across the battery icon showing no battery installed - the ibook runs fine with the power adapter plugged in. PMU resets still no help. Left the computer plugged in overnight and the new apple battery which was 2/3 charge is now 100% (by battery lights) which indicates to me it is charging. How can I get the computer to recognize the battery?
    thanks for any help....

    Did you restart the computer with the battery installed and the computer plugged in?

  • Wifi icon in menu bar dimmed with and "x" over icon

    Macbook Air 11-inch, mid 2013, OS X Yosemite, all software is up to date. My wifi icon appears as dimmed in the menu bar with an "x" over it. I have used network assisrant, diadnostics, fallowed all instructions properly as promted to do so. How do I enable wifi?

    I bet you have a Samsung laser printer, don't you?
    And if so, it looks like you were dumb enough to put in the included CD! Don't! Those CD's are for the Windows Users!
    Look what happened! It now installed the SmartPannel that is very un-fun to remove. Lucky for you, I re-looked up for you how to do it....as when I first got my mac, I too was dumb enough to put in that disk and got frustrated when I couldn't make the icon go away.
    so . . . in:
    ~library/printers/SmartPanel
    there is a script called iLaunchSP....Trash it!
    Reboot!
    It will be gone!

  • Mirroring doesn't display in menu bar even with option checked

    I have my late 2011 MacBookPro hooked up to an external monitor to extend my workspace at the office.  I can go into Displays in the System Preferences and choose to mirror displays.  When I check the option to "Show mirroring options in the menu bar when available", no menu bar option shows up.  Worked perfectly fine pre-Mavericks.
    How can I get the display menu bar options to display on this laptop?
    Thanks

    Have a look in:
    [Your HD]/System/Library/CoreServices/Menu Extras/
    for "Bluetooth.menu" and try double-clicking it.
    Jools

  • Turning menu bar on with title bar off

    I love how the title bar is gone from Firefox 4 and when I press ALT I can get the menu bar up next to the FIREFOX drop-down
    I want to turn the menu bar on permanently, but as soon as I do the title bar comes back and the Firefox drop-down goes away (taking up more real estate).
    How can I turn on the menu bar but keep the title bar off and the Firefox drop-down on?

    You can't. You can either see the menu bar or the orange Firefox button.<br />
    You can however customize the Firefox button or place extra items on the title bar.
    * New Old Menu: https://addons.mozilla.org/firefox/addon/new-old-menu/
    * Personal Titlebar: https://addons.mozilla.org/firefox/addon/personal-titlebar/
    * Personal Menu (Personal Firefox Button): https://addons.mozilla.org/firefox/addon/personal-menu/

  • How to log in with user credentials from database table

    Hello all.
    I have a table named users_1 in my database. This table has columns named username, password, email and userid. On userid, I have put a sequence.
    Now, I have manually made 1 row in this table, with in it the user credentials.
    How can I edit my application so that I can use these credentials to log onto the application?
    Please, a step-by-step text would make me rather happy, instead of getting a link with information that I should read. I've read most of it, and it just doesn't make any sense to me, so I prefer a guide-trough.
    Thanks..

    Hi Magali,
    You want only user from database can access your application.
    follow the steps given below.
    Step1  :  create function to authenticate users
    create or replace FUNCTION  "CUSTOM_AUTHENTICATE" (p_username in VARCHAR2, p_password in VARCHAR2)
    return BOOLEAN
    is
      l_password varchar2(4000);
      l_stored_password varchar2(4000);
      l_count number;
    begin
    select count(*) into l_count from users_1 where upper(username) = upper(p_username);
    if l_count > 0 then
       select upper(password) into l_stored_password from users_1 where upper(username) = upper(p_username);
       l_password :=  upper(p_password);
        if l_password = l_stored_password then
          return true;
        else
          return false;
        end if;
    else
      return false;
    end if;
    end;
    Step2  : create authentication scheme for your application
    Go to Application Builder->select your application->shared component->security->authentication scheme->create
    a) custom scheme : Based on a pre-configured scheme from the gallery
    b) give some name to your scheme like custom_scheme or something
    c)scheme type : database account
    d) verify function name = return CUSTOM_AUTHENTICATE
    e) go to = Login Page
    f) Logout url = f?p=&APP_ID.:101 // here 101 is login page no..so you can set your login page no.
    step3  : make this scheme as current scheme
    select your scheme and click make current
    now try to login into your application from your database users..
    Hope this will helps you,
    Thanks,
    Jitendra

  • Swing Applet in JSP: problem with fetching data from database

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page.
    // necessary import statements
    public class NewJApplet extends javax.swing.JApplet {
    private JLabel jlblNewTitle;
    private Vector vec;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    NewJApplet inst = new NewJApplet();
    frame.getContentPane().add(inst);
    ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
    frame.pack();
    frame.setVisible(true);
    public NewJApplet() {
    super();
    initGUI();
    private void initGUI() {
    try {
    this.setSize(542, 701);
    this.getContentPane().setLayout(null);
    jlblTitle = new JLabel();
    this.getContentPane().add(jlblTitle);
    jlblTitle.setText("TITLE");
    jlblTitle.setBounds(197, 16, 117, 30);
    jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
    jlblNewTitle = new JLabel();
    this.getContentPane().add(jlblNewTitle);
    Vector vecTemp = getDBDatum(); // data fetched fm DB r stored here.
    jlblNewTitle.setText(vecTemp.get(1).toString());
    jlblNewTitle.setBounds(350, 16, 117, 30);
    jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));
    } catch (Exception e) {
    e.printStackTrace();
    }//end of initGUI()
    private Vector getDBDatum() {
    // fetches datum from oracle database and stores it in a vector
    return lvecData;
    }//end of getDBDatum()
    }//end of class
    in index.jsp page i have included the following code for calling this applet:
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
    width="600" height="300">
    <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>
    if i view it in using AppletViewer it runs perfectly and display the data in JLabel. (ie, both jlblTitle and jlblNewTitle).(ie, DATA FETCHES FROM db AND DISPLAYS PROPERLY)
    BUT IF I CLICK ON INDEX.JSP, ONLY jlblTitle APPEARS. jlblnNewTitle WILL BE BLANK(this label name is supposed to fetch from database)
    EVERY THING IS DISPAYING PROPERLY EXCEPT DATA FROM DATABASE!!!
    i signed the applet as follows :
    grant {
    permission java.security.AllPermission;
    Can any body help me to figure out the problem?

    This is the Swing Applet java code
    import java.awt.Dimension;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.JScrollPane;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    public class HaiApplet extends javax.swing.JApplet {
         private JLabel     jlblTitle;
         private JLabel     jlblNewTitle;
         private Vector     vec;
         * main method to display this
         * JApplet inside a new JFrame.
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              NewJApplet inst = new NewJApplet();
              frame.getContentPane().add(inst);
              ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
              frame.pack();
              frame.setVisible(true);
         public HaiApplet() {
              super();
              initGUI();
         private void initGUI() {
              try {               
                   this.setSize(542, 701);
                   this.getContentPane().setLayout(null);
                        jlblTitle = new JLabel();
                        this.getContentPane().add(jlblTitle);
                        jlblTitle.setText("OMMS");
                        jlblTitle.setBounds(197, 16, 117, 30);
                        jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
                        jlblTitle.setHorizontalAlignment(SwingConstants.CENTER);
                        jlblTitle.setForeground(new java.awt.Color(0,128,192));
                        jlblNewTitle = new JLabel();
                        this.getContentPane().add(jlblNewTitle);
                        Vector vecTemp = getDBDatum();
                        jlblNewTitle.setText(vecTemp.get(1).toString());
                        jlblNewTitle.setBounds(350, 16, 117, 30);
                        jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));     
              } catch (Exception e) {
                   e.printStackTrace();
         }//end of initGUI()
         private Vector getDBDatum() {
              Vector lvecData = new Vector(10,5);
              Connection lcon = null;
              Statement lstmt = null;
              ResultSet lrsResults = null;
              String lstrSQL = null;
              String lstrOut = null;
              try {
                   OmmsDBConnect db = new OmmsDBConnect();
                   lcon = db.connectDb();
                   lstmt = lcon.createStatement(lrsResults.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   lstrSQL = "select DT_ID from P_DATATABLES";
                   lrsResults = lstmt.executeQuery(lstrSQL);        
                   int i = 0;
                   lrsResults.last();
                   int length = lrsResults.getRow();
                   System.out.println(length);
                   lrsResults.beforeFirst();
                   int recCount = 0;
                   while (lrsResults.next()) {
                        recCount++;
                        lvecData.addElement(new String(lrsResults.getString("DT_ID")));
                   //     System.out.println("ID :  " + lrsResults.getString(1));
                        i++;
                   }System.out.println("here 3 out fm while");
              catch(SQLException e) {
                   System.out.print("SQLException: ");
                   System.out.println(e.getMessage());
              catch(Exception ex) {
                   lstrOut = "Exception Occured " + ex.getMessage();
              finally {
                   try {
                        lrsResults.close();
                        lstmt.close();
                        lcon.close();
                        System.out.println("[DONE]");
                   catch(Exception e) {
                        System.out.println(e);
             }//end of finally
              return lvecData;
         }//end of getDBDatum()
    }//end of classOfcourse the above code compiles and runs well. in Applet Viewer
    I plugged the above Swing Applet in a JSP page index.jsp
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
                   width="600" height="300">
         <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>Every thing is working fine in AppletViewer...But if i view this in any browser, then only the jlblTitle is displaying. jlblNewTitle is not displaying(this label name is actually fetching from thedatabase)
    can any body help me regarding this matter.? Thx in Advance.

  • Menu Bar creation question

    I have designed a navigation menu in Photoshop (menu.psd), not much really, that I will be porting over to Fireworks for the creation of the Fireworks html.  As part of the PSD creation process I am adding a spot to include a drop down list.  This list will contain by year the volumes of the publication I have in collection.
    Should I go ahead and set aside the drop down list portion until I port everything over to Dreamweaver?  Or should I try to create the drop down in Fireworks?  I can only suspect that I will need to create the drop down in Dreamweaver within a DIV and then relatively place it where I need it.  To make matters worse I have no experice in creating forms or drop downs.
    Respectfullly.

    Lorraine,
    See, with that auburn hair everything is possible.
    I will check out the suggested CSS tutorials this weekend as I believe that is the way I will have to go.  Use css as the basis for the holder of the images and then use divs to place them where I need them on the page.
    As for Fireworks not being an HTML authoring tool I am slowly, real slowly, starting to come to the same conclusion.  It is trying to be a one-stop shopping experience and failing miserably.  The tools in it can not come close to reproducing a Photoshop image.  I've spent the last several hours creating within FW a similar looking menu.png totally from scratch.  It just cannot come up with the nuances or subtleties that are inherent in Photoshop.  This is more because you cannot select the blending modes within FW's Photoshop Live Filters.
    Neither can it create an html page.  I used to with Photoshop, ImageReady and GoLive do similar things all the time.  For a simple roll over as in my previous exercise, the infobutton.html routine, it works well.  But give it a more complicated exercise, my menu.html routine, and it comes to a loud, screeching halt.  It could at least give me the pleasure of telling me it can't do it.  Instead it goes blissfully on like it can.  Frustrating!
    A Photoshop to Dreamweaver workflow with the inclusion of css will be my approach.  Create my base menu.psd in Photoshop and save it as a menu.png for inclusion in DW.  Set it up as a background-image using a css placeholder.  Then in Photoshop create my over and down buttons and save each as a png.  In Dreamweaver use these over and down buttons to do what I need done using divs.  I think this will create less frustration on my part.  More work but at least I will get my results.  Bloated code though!
    Unless it is still proper to use frames.  With frames I could create one to contain a menu.html and then just change it as needed with variables.  At least I think that will work.  If not then I will just continue coding as I am doing and place my menu.html code in each page.  The nicety of doing it that way is that once the images are loaded into the users memory they in essence will not needed to be reloaded.  I really liked using frames in GoLive.  I could reference everything using css but compartmentalize the design process.  But such a workflow is frowned upon for up to date html coding.
    As for your idea for breaking the material down into decades I don't want to go that routine.  Even if I went with a pure css menu design as suggested by Tedd's work you would still want to utilize a single drop down containing the various years.  Having sub-menus for each decade would be cumbersome to the user.  That would also preclude have my server directory structure broken down into decades with sub directories for each year.  The directory and file structure could get hairy.  I already have enough managing five computers, two networked hard drives, and several thousand directories of my digital archives.
    And part of the reason I don't want to go that route is my limitations.  Not being a wizard at coding I would spend an inordinate number of hours learning a whole new language.  My strong points are my digital archive creation abilities, my historical knowledge of the group, enough html creation knowledge to be dangerous, a historical researcher of some skill and my willingness to do the work.  This rules out the Server Side Include routines—watch my backside as I run away screaming.
    So I think what I shall do is work the Photoshop to Dreamweaver routine.  Create a menu.html template and copy and paste it into each document as needed.  I would only need to change the references for the infobutton_down.png and the page navigation buttons.  Professionals would frown on this, wanting to do it with neat, cool code, but I need to remain within my limits.
    Thank you for your suggestions, they really are from a professional with more knowledge than I.
    Respectfully.

Maybe you are looking for

  • Retornar Valor de Campo de Usuário C#

    Olá a todos. Estou com um problema para receber um valor vindo de um campo de usuário, quando estou fazendo uma interface UI, em C#. O nome do meu campo é U_NCliente. Estou utilizando o seguinte codigo: valor = ((SAPbouiCOM.UserDataSource)oForm.Items

  • Must others register w/iMessage before I can send them text messages??

    Must others register w/iMessage befor I can send them text messages??

  • Import Time Q for AVCHD

    Hi, Thinking about purchasing an AVCHD camera. I realize AVCHD can take a long time to "import" because you must import the clip and then have the computer convert the clip to AIC. Thus the total import time can be longer than actually 1X (which you

  • Problem with reading objects through ObjectInputStream

    HI Actually i have a problem of reading the objects from ObjectInputStream and getting StreamCorruptedException when i try to read as there is no limit to find the end of file i think iam getting the exception any suggestions please to overcome this

  • Iphoto will no longer open. It's unreadable or in use by another application?

    At some point i accidentally imported these thumbnails that looked like flags into my iphoto. When i did that it erased my entire photo library and made it so i can no longer open iphoto all together. I folled the intrsuctions in the window that pops