Dynamically changing the functions in a menu based on the user (in SSHR)

Dear All,
I have a requirement to change the functions in a menu dynamically.
For Ex: An employee is allowed to apply Advance only in the first one month of his/her joining. I created it as an EIT and attached the function, to the menu. Now, i want to remove it automatically from the menu if his/her term in the company crossed one month.
Can any one tell me how to automatically disable it after one month.
Thanks and Regards
Raj
Edited by: SuperStar_Krishna on Jul 5, 2010 12:22 AM

The following code should do it. In this example, MyCellRenderer is the renderer class implementing TableCellRenderer, used for displaying combo box.
TableCellRenderer renderer= new MyCellRenderer();
(JComboBox)renderer.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e) {
        //Your event handling goes here
});

Similar Messages

  • Using javascript to populate one menu based on the choice in another menu

    I have several menus which are dynamically populated (with PHP and MYSQL). The information is category based. How do I dynamically populate the second menu based on the choice the user makes in the first menu (without having to submit and refresh the page-- i.e. I need to use javascript instead of the server-side PHP).
    Example:
    Main Categories: 1) Numbers     2) Letters
    Sub Categories:        1                      a
                                   2                      b 
                                   3                      c
                                  etc.                  etc.
    the first menu contains the two main categories. I want the second list to be populated with only the sub categories of the main category the user chooses in the first menu (i.e. 1,2,3 etc. if he chose the main category 'Numbers' and a,b,c, etc. if he chose the main category 'Letters')
    Is there an easy way to do this in Dreamweaver?
    Thanks,
    YWSW

    How many items do you have in each dropdown? If it's a small number, you can download all of the options for the second dropdown and use client side javascript to filter based on the choice of the first dropdown. If the number is large, you'll need to use AJAX to dynamically pull the related items from the database.
    Search the web for "dependent dropdown" or "cascading dropdown" for some technical details.

  • Changing the color of the column in a JTable based on the selection (mouse)

    Hi,
    I want to change the color of all the cells in a column based on the mouse clicked event.
    I have managed to select the entire column. And, even, I have found a working example in the internet. But I don't understand why in my case it doesn't work.
    This is the code (an inner class for a TableCellRenderer):
    class MCTableCellRenderer extends JLabel implements TableCellRenderer {
              private static final long serialVersionUID = 1L;
              @Override
              public Component getTableCellRendererComponent(JTable table,
                        Object value, boolean isSelected, boolean hasFocus, int row,
                        int column) {
                   setFont(table.getFont());
                   if(value instanceof Double){
                        setHorizontalAlignment(SwingConstants.RIGHT);
                        DecimalFormat numberFormat = (DecimalFormat) NumberFormat.getInstance();
                        numberFormat.applyPattern("#######.#");
                        String val = numberFormat.format(value);
                        setText(val);
                   if(isSelected){
                        setBackground(Color.RED);
                        System.out.println("is selected");
                   else{
                        setBackground(Color.BLACK);
                        System.out.println("is not selected");
                   return this;
        }I have set opacity to true for the contentPane, but without any result.
    Any advice will be very apreciated.

    Problem solved.
    My Renderer should have extended the abstract class DefaultTableCellRenderer.
    class MCTableCellRenderer extends DefaultTableCellRenderer {

  • How to execute the query for a block based on the parameter

    Hi All,
    Good evening.
    i have requirement where i need to display the data in one block based on the selected items.
    the scenario is like this...there are 2 LOV's and one apply button and one external region on the form.
    so when u select the lov values and click on apply button the query should execute based on this 2 lov values.
    i am not getting how to achieve this..i am very new to oracle forms..
    Please Help..
    Thanks
    Bharat
    please help..it is urgent..
    thanks
    bharat
    Edited by: Bharat on Jan 31, 2012 5:19 AM

    Bharat wrote:
    Hi All,
    Good evening.
    i have requirement where i need to display the data in one block based on the selected items.
    the scenario is like this...there are 2 LOV's and one apply button and one external region on the form.
    so when u select the lov values and click on apply button the query should execute based on this 2 lov values.
    i am not getting how to achieve this..i am very new to oracle forms..Another way you can do this. Create a lov and don't assign it to any column just one return item (should be id).
    Now create a button may be your "apply button" write two trigger when-button-press and when-mouse-click.
    at When -Button-Press trigger, change the block state to 'ENTER-QUERY' and at when-mouse-click show the LOV and then write execute_query.
    Hope this will help you.
    If someone's response is helpful or correct, please mark it accordingly.

  • Is there a way to turn off the function in Lion that re-opens the last project you worked on in a given program?

    Is there a way to turn off the function in Lion that re-opens the last project you worked on in a given program?

    Dealing With The Resume Feature of Lion
    Managing Mac OS X Lion's application resume feature.
    If you shutdown your computer you should get a dialog asking if you want applications to resume on the next startup. Simply uncheck the box to prevent that from occurring. Open General preferences and uncheck the option to Restore windows when quitting and re-opening apps. You can also install a third-party utility to control resume features on individual applications: RestoreMeNot or Application State Cleaner.
    It is possible to completely stop the Resume feature although I'm unconvinced that it is that annoying. Nevertheless see the following:
    If you have not yet done so you must first make your /Home/Library/ folder visible. Open the Terminal application in the Utilities folder. At the prompt paste the following command line:
    chflags nohidden ~/Library
    Press RETURN. Quit the Terminal application.
    In the Finder navigate to the /Home/Library/Saved Application State/ folder. Delete the contents of the folder. Back up to the /Home/Library/ folder. Select the Saved Application State folder. Press COMMAND-I to open the Get Info window. In the Sharing and Permissions panel at the bottom click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window.
    Quit all open programs except the Finder (this is very important.) Next, navigate to the /Home/Library/Preferences/ByHost/ folder. Look for a .plist file with "com.apple.loginwindow." in the file name followed by some numbers in hexadecimal. Select the file. Press COMMAND-I to open the Get Info window and in the Sharing and Permissions panel click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window. If you also find a file with the same filename but with a last extension of ".lockfile," then you should delete it.
    The above should eliminate the Resume feature system-wide. Note that any future system updates or upgrades will likely undo these changes. You will then need to repeat this procedure assuming there are no major changes in OS X related to it.

  • Command is not showing in to the list on pressing menu button on the device

    Hi Everyone,
    I have developed a midlet in which I have designed buttons or links using Custom Items. Command associated with the custom item is not showing in to the list on pressing menu button on the device 8300 Curve.
    For example - My login screen have SUBMIT and RESET custom items. I have designed them to be appear like links [no matter how I design them]. I have also added a command and listener to it like as below:
    CMD_SUBMIT = new Command(text, Command.ITEM, 1);
    setDefaultCommand(CMD_SUBMIT);
    setItemCommandListener(this);
    On running the midlet, my login screen appears. But when I travarse to the SUBMIT item, and press the menu button, my command doesnt appear in the list of commands. It shows only the Close command. I am not getting why this is happening.
    Please do me a favour and help me to sort out this. On other phones like 8520 curve the command is appearing in to the list when I press the menu button.
    Regards

    Is there any way to sort out this issue? I am not getting the cause
    behind this, and I am observing this only on 8300 Curve. On most of
    there phones [though not tested on every one] it is working as expected.
    Please guide me to proceed further. I am desperately waiting for the
    response. Regards.

  • In the tracing drop down menu, how come the custom is greyed out and can't be selected? It looks like its disabled!!

    in the tracing drop down menu, how come the custom is greyed out and can't be selected? It looks like its disabled!!

    cc2014,
    Have you selected an image?
    Unless a good explanation appears, you may start onthe list below.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • I have 10.6.8 and have installed two new printers HP 8610 and an Epson 7880 and can not find the Page Set-up menu anywhere in the applications I a trying to print from. There are no page sizes, paper types, appearsto be locked on a 13x19 size but It.

    Hi to the Mac Folks,
    I have 10.6.8 and have installed two new printers HP 8610 and an Epson 7880 and can not find the Page Set-up menu anywhere in the applications I a trying to print from. This is regardless of either printer selected.
    I primarily print photos from Photoshop CS5.  The term Page Set-up has gone missing in the file pull down menu. Can't make any choices  There are no page sizes, paper types, appearsto be locked on a 13x19 size paper format. Either being too large or too small.
    Saw a 2008 locked issue about this however none of the help fit my situation, options discussed are not available to me.
    Preview has no "Page Setup" - or does it?
    Does the constant struggle with computer compatability weirdness issues ever end or is it a enslavement scheme?
    Woody

    Hey,
    if you know the name(s) of the root folder(s) you want to access (eg. by making a note on the Windows side) then you can make them appear by just doing Shift-Command-G in Finder ("Go to Folder…"), and entering the full path to the required folders.  You can then navigate all the contents as normal.
    HTH,
    S.

  • How to debug the function separately which is added in the package

    Hi Friends, I want to know how to debug the function separately, by taking it from package,. and i dont no where to add begin and end. and dont no how to give input to the function. ANd how to find the error which is detected from production, so i want to find from which statement its failing. So please guide me to proceed further. thanks in advance.

    { FUNCTION fn_get_trail_id (p_incr PLS_INTEGER DEFAULT 1) RETURN PLS_INTEGER IS
    p_trail_id tb_xop_orders_trail.trail_id%TYPE;
    BEGIN
    IF p_incr >= 1 THEN
    SELECT sq_xop_trail_id.NEXTVAL INTO p_trail_id FROM DUAL;
    RETURN p_trail_id;
    ELSIF p_incr = 0 THEN
    SELECT sq_xop_trail_id.CURRVAL INTO p_trail_id FROM DUAL;
    RETURN p_trail_id;
    END IF;
    END;
    -- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    BEGIN
    ppr_openlog('AQ');
    ppr_request_lock(v_cb_handle, v_cb_lock);
    pr_xop_log_errors('AQ: ==== cb started ('||descr.msg_id||') ====');
    my function is like this, how i can i in clude it in declare statement, and how to assign values for that.. and where i have to include "begin".plz help me

  • How can I show a pop up menu based on the selection in a previous pop up menu?

    For example, if "Company" is selected in a pop up menu in C6, then show another pop up menu in C7. if "Bob" is selected in a pop up menu C7, show another pop up menu that contains the talks "Bob" has in C8.
    I am trying to create a talk scheduling spreadsheet with different talk outlines for different speakers. I'm not sure if there are any functions or formulas that can accomplish this. Can anyone help?

    Pop-up menus contain fixed values in Numbers. You might be able to do this using Steppers or sliders. These produce a numerical result, which could be used to direct a second slider or stepper's output to a specific column or table.
    If you can provide a map of the structure of your list(s), there may be someone here able to take on the task of constructing the tools to do the job.
    Regards,
    Barry

  • In CVI !!!! How to dynamic change BaudRate of RS232 Serial COM Without closing the Port !!!

    Dear all:
    I want to change the buadrate of serial com without closing the serial com, but it failed when I use the function "SetCommConfig(m_hCom, &Com_cfg, Com_cfg_S) " to reset the buadrate ,baudrate is no change when use GetCommConfig to read back the value. 
    Appreciated all of your advice . TKS!
    Code with WINAPI as beloow:
    CreateFile(..) ;
    GetCommState(..);
    dcb.BaudRate= 1000000 ;
    SetCommState(..);
    //......do other things
    //change baudrate to normal without closing port .
    GetCommConfig(m_hCom, &Com_cfg, &Com_cfg_S);
    Com_cfg.wVersion = 0X100;
    Com_cfg.dwProviderSubType = 1;
    Com_cfg.dcb.BaudRate =9600  ;
    Com_cfg.dcb.StopBits =1 ;
    SetCommConfig(m_hCom, &Com_cfg, Com_cfg_S);
    GetCommConfig(m_hCom, &Com_cfg, &Com_cfg_S);   
    Solved!
    Go to Solution.

    This topic has been discussed some years ago: see here. Please note that even if I made that sample program which changes the baud rate without closing the port, I never used it in a real situation: you'll need to made your tests and check if this solution can satisfy your needs in the short and long term.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Differentiate the Function code of Menu Item

    Hi Experts,
    I have some function code of the Menu's created ,and some funtion created at the tool bar level.
    How can i know that the Function code if triggered from the Menu.
    Regards.

    Hi,
    Try maintain different function codes.
    Example in your menu if you have menuitem has function code is '+FCO1'.
    Then in the program write:
    Case sy-ucomm.
    when '+FCO1'
    write your logic.
    endcase.
    Regards and Best wishes.

  • Does SSRS dynamically set the alignment of table cells based on the majority of cell types in the column???

    This is the first time I've run into this, but it appears that SSRS is setting the text-align based on the other cells in the column.  I have cells being set with either a dataset item of type System.Double or to "--" when Is Nothing evaluates
    to true.  I never noticed before that if the majority of the cells in the column are Nothing, then the few that aren't Nothing get aligned to the left along with all of the "--" text items.  And now I also see columns where the opposite
    is also happening, where if the majority of the cells in the column are numeric values, then everything is aligned right, even the few "--" items there.  I'm only using Default TextAlign and VerticalAlign, and no Indent, SpaceAfter or SpaceBefore,
    nor any concatenated text or embedded preserved spaces.
    Has anyone else in the SSRS universe seen this, and does anyone know why or have a good workaround for it?
    Thanks in advance : )

    Are you viewing the report in html format or are you looking in some other format like Excel,CSV etc?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Dynamically rename the root node of XML based on the child elements

    Hi Gurus,
    Is there any way to rename the root node of the resultant XML after a mapping based on the child elements.
    For ex:
    consider the following resultant XML after mapping
    <result>
    <element1> </element1>
    <result>
    if the element1 is <type> then the output should be
    <category>
    <type> </type>
    </category>
    elseif the element1 is <character> then the output should be
    <property>
    <character> </character>
    </property>
    Let me know how to do this, either in XSLT or in Graphical mapping.
    Thanks,
    Prabu

    Hi, Prabu:
    In this case, I am suggest you have Src and Tar Message.
    I am suggesting you create another type of message using key / value pair as I suggested, e.g. called Mid Message.
    My solution for you is to have two message mappings:
    1. Src -> Mid
    2. Mid -> Tar.
    In first mapping, you have no control of the structure, but you can map it to Mid structure:
    e.g.
      if Type node Exist, then map 'Type' to Key, as Key/Value can be creatd under a parent node with 0:1 Occurrence.
      saying item.
       in this case, a new item created.
    If you think of this way, any xml file can be represted in this way:
       <Employee>
          <Fname>David</Fname>
          <Lname>Miller</Lname>
       </Employee>  
       <Employee>
          <Fname>Steve</Fname>
          <Lname>Mai</Lname>
       </Employee>   
    Can be interpretd as this way:
       <Employee>
          <Element>
             <key>Fname</Key>
             <value>David</Value>
          </Element>
          <Element>
             <key>Lname</Key>
             <value>Miller</Value>
          </Element>
       </Employee>  
       <Employee>
          <Element>
             <key>Fname</Key>
             <value>Steve</Value>
          </Element>
          <Element>
             <key>Lname</Key>
             <value>Mai</Value>
          </Element>
       </Employee> 
    Now you should understand what I mean.
    In your case target structure have to desgined as following way:
    You need to put Category and Property together with their sub-structure in parallel, make occurence to 0:1
    In your second mapping, you can check the key value is "Type" or "Character", based on which one is true,
    you create corresponding structure: either Categary or Property.
    Regards
    Liang
    Edited by: Liang Ji on Oct 22, 2010 8:31 PM
    Edited by: Liang Ji on Oct 22, 2010 8:35 PM

  • Dynamically displaying a new region (row?) based on immediate user input

    Whew, figuring out a title was almost as hard as trying to explain what I want to do!
    Okay, a little background first.
    My app has 178 main data fields, spread across about 35 tables. The users want to be able to search any and all data fields. So, I wrote a PL/SQL package that for each master record, loops through all of the child tables and creates (more or less) an XML file for each master record (which I store in a CLOB field). When any data in any table is changed, a trigger fires to re-update that CLOB field as well. I then used Oracle Text to create an index on the CLOB field, and now the users can search across all of the available information for each master record and get a list of which records contained what they were looking for.
    So here's the first part of the problem. The app is a Mineral Occurence database for all mineral information world-wide. Say they enter "Brazil" as what they want to search for, they not only retreive all of the mineral sites in Brazil, but also all of the sites where one of the mining companies may be based in Brazil, or Brazil is one of the comments, etc. While this is the expected behaviour, it's still not quite what they expected (but they also don't want to get rid of this behaviour either).
    So, since the CLOB field is already formatted with XML-type tags, what I want to do is to have an Advanced Search page, where the user can specify the table name to search, or the field name, or both. What I'd like to do is at the end of each line, have a select list with an "AND" or "OR' box, and if that gets a value, then dynamically create another 'row' underneath the first row, with the same three 'boxes' (actually select lists), and continue on until the user has specified exactly what they want to search for.
    I would rather not have to create a whole bunch of regions or rows, and then determine at runtime whether or not to display them.
    So i would have (using underscores as the boxes/fields):
    Table to Search        Field to Search          And/Or
    ______________          _____________          _______Each of the above would be a select list.
    Anybody have ideas on how I can accomplish this? Any Javascript or AJAX-type solutions that a dummy like me can easily implement? I've seen something almost similar on Carl's example pages to Hide/Show a region(?), but understanding the underlying code and then modifying it for what I want to do is extremely complicated (for me) at best.
    Thanks.
    Bill Ferguson

    Well, after searching through the QBE results (even some of mine), the only thing that comes close is Earl's (http://htmldb.oracle.com/pls/otn/f?p=36337:14). Actually his layout is almost perfect and pretty identical to what I want/need. Vikas' example seems like what I've toyed with on some other pages in my app, using a simple UNION ALL with nulled fields in the select statement, which won't work for what I need, at least I can't seem to visualize how I could incorporate that same code logic.
    However, unlike Earl's, when/if the last column (which I'd have as the 'AND/OR' select list) is populated, I'd like to dynamically display another new row.
    Now I know I could do it by making the last column a 'Select List With Submit', but that would neccessitate my creating about 25 regions (to hopefully cover the max any of the users would ever need), and then conditionally display the region based on whether or not the previous 'AND/OR' condition field was populated. It would also require a whole slew of page refreshes, which is clunky.
    It seems like there should probably be a way with AJAX to accomplish something similar. I think I remember seeing something along these lines in the last year or so on here, but I can't find it.
    Something like a cross-breed of Earl's example page above mixed with Carl's example at http://htmldb.oracle.com/pls/otn/f?p=11933:39:4740898821262791902::NO:RP:: which would automatically fire on the poplulation of the last select list is probably the best I can accomplish, unless somebody has some better ideas on how to do this. Using Carl's htmldb_remix code, I can avoid all the submits and the resulting page refreshes, but the code itself will take an old dummy like me a while to figure out.
    Thanks for the ideas though.
    Bill Ferguson

Maybe you are looking for

  • How to find table name(s) in a dynamic query

    In one of our (9iAS PORTAL)applications, any user can able to run their query statment and get output. All queries will be executed as dynamic SQL thru' a common shema/user who has 'SELECT' privilege on all tables but all users don't have this privil

  • Tried to insert a small (3") CD in MacBook Pro. It wouldn't mount and can't eject it. Solutions?

    Tried to insert a small (3") CD in MacBook Pro. It wouldn't mount and can't eject it. Solutions?

  • Office key code lost But need to run restore

    2008 HP G60-120US 32 Bit Vista Laptop Need to run full restore, but don't have the key code/disk for Microsof Office 2007 that I had Office Depot      install at the time of purchase. Can it be found? What can be done, don't want to lose it. Thanks T

  • Final cut pro 10.1 events

    I have FCP 10.1.1 but have a project that was left on an external hard drive and not upgraded to 10.1 library system.  I've read about migrating, but haven't found a solution to bringing this event and the source files to this version of FCP.  Help! 

  • Code for restarting Nokia 7610

    Can you tell me what is the code that i can enter in my Nokia 7610 to re-start it, without doing the same by turning off and then turning on