How to enable a button only when a tilelist item is selected

Simple question but it seems quite awkward to me. How do I enable a button only when an item within a tilelist is currently selected?
For example lets say if I have a button called button1 that is disabled by default and a tilelist called tilelist1 what would I have to add into the brackets of the following code (enabled property of the button) to ensure that the button is only enabled when an item in the tilelist is currently selected but disabled when no items are selected:-
enabled="{}"

enabled="{tilelist1.selectedItem}"
that should do it, it's making an implicit comparision with null (tilelist1.selectedItem == null) which will result in a boolean.
SelectedItem is null when nothing is selected , not null when something is.

Similar Messages

  • Enabling a button only when a tilelist contains items

    In my app I have a button that empties a tilelist however I want it to only be 'enabled' when that tilelist actually contains items and disabled when it doesn't.
    What code would I need to apply to the following enabled property of the button to make it only be enabled when a tilelist (simply called tilelist1 in this example) contains at least 1 item?:-
    enabled="{tilelist1.}"

    Thanks. I've already tried ".dataProvider>0" and that worked but I suppose that'd work too. Thanks for helping out though.

  • How to execute custom code only when a specific node is selected in infoset

    Hi,
    We have written a piece of custom code under a node (P1045). Not all users will have access to this Infotype as it is related to Appraisals. So, when users (w/no access to 1045) try to run a Query for other info types data, they are getting error message 'Can not access 1045'. Custom code is getting generated whenever user runs a query. Tried to control custom code with simple IF condition by giving user name. Still generating 1045 code.
    All users use same infoset, where a group of users has access to 1045 and another group does not have access to 1045.
    Appreciate your inputs to get this resolved.
    Thanks,
    Swapna.

    Why don't you try another aproach, instead of adding the infotype to the infoset, create a new table as an alias (with the fields you want to show in regards to infotype 1045) and fill it in the node depending on the authorization check for that infotype in the code ?
    I think that adding the infotype as a node will always get the data from the infotype regardless, that is why it's showing the error.

  • How to make menu to auto close when a menu item is selected?

    hi ...my question is described above..
    to make things clearer i have written a mini code to demonstrate my problem
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    /* just a frame with a JMenuBar with a JMenu with two RadioButtons
    public class myFrame2 extends JFrame implements ActionListener{
         JMenuBar mb ;
         JMenu mi;
         JRadioButton rb1;
         JRadioButton rb2;
         public myFrame2(){
              super();
              mb = new JMenuBar();
              mi = new JMenu("New");
              rb1 = new JRadioButton("Button 1");
              rb1.addActionListener(this);
              rb1.setActionCommand("action1");
              rb2 = new JRadioButton("Button 2");
              rb2.addActionListener(this);
              rb2.setActionCommand("action2");
              mi.add(rb1);
              mi.add(rb2);
              mb.add(mi);
              setJMenuBar(mb);
              pack();
              setVisible(true);
         @Override
         public void actionPerformed(ActionEvent e) {
              // Do something......
         public static void main(String args[]){
              new myFrame2();
    }If you run this program you will see that when you select a RadioButton the menu doesn't hide ...
    How can i make it hide when a menu item (JradioButton) is selected?
    thanks in advance
    Edited by: Pitelk on Jun 10, 2008 7:42 AM

    On a menu use JRadioButtonMenuItem.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class JRadioButtonMenuItemExample {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    launch();
        static void launch() {
            JMenuBar mb = new JMenuBar();
            JMenu menu = new JMenu("menu");
            mb.add(menu);
            ButtonGroup bg = new ButtonGroup();
            JRadioButtonMenuItem item1 = new JRadioButtonMenuItem("alpha");
            bg.add(item1);
            menu.add(item1);
            JRadioButtonMenuItem item2 = new JRadioButtonMenuItem("beta");
            bg.add(item2);
            menu.add(item2);
            JRadioButtonMenuItem item3 = new JRadioButtonMenuItem("gamma");
            bg.add(item3);
            menu.add(item3);
            JFrame f = new JFrame();
            f.setJMenuBar(mb);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(400, 300);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • How do you specifically let the Itemlistener know which Item was selected..

    How do you specifically let the Itemlistener know which Item was selected in a JComboBox? Anyone has any idea? What should the coding look like?

    getSelectedItem()

  • How do you specifically let an Itemlistener know which Item was selected?

    How do you specifically let the Itemlistener know which Item was selected in a JComboBox? Anyone has any idea? What should the coding look like?

    Hi,
    Try this method
    String[] petStrings = { "Bird", "Cat", "Dog", "Rabbit", "Pig" };
    JComboBox petList = new JComboBox(petStrings);
    if ( petStrings[0]==(String)petList.getSelectedItem() )
    System.out.println("I'm a bird");
    }else{

  • How to enable a button on click of an adjoining list box

    Hi,
    I have a requirement that :
    the button "Add to the list" should be enabled only when the user clicks on the list box "product list". This is to ensure that the user is looking at the list before adding a new product.
    I tried that the button is disabled by default and then wrote the following line in the list box
    onChange="document.forms(0).ADD_TO_LIST.disabled=false;"
    But it is not working.
    Please guide me
    Appreciate your help.
    Thanks,
    Gary

    gary1234 wrote:
    Dear Cotton,
    I tried searching for a Java Script forum. Could not find it.Dear Gary,
    I question either your competence or the veracity of this claim. A Google search for JavaScript forum returns 19,000,000+ results.
    Please reply if you can help.
    Thanks for enlightening me that Java script is different than Java.This is the third time now you have been so enlightened.
    I am not sure how is it harming you if I post the Java script question here.Please don't be a wank. It is inappropiate for anyone, including you, to ask off topic questions on this, or any other forum. This forum is NOT for JavaScript questions and that is all there is to it.
    So now go to Google. Type JavaScript Forum into the search box and find yourself a JavaScript forum and ask your JavaScript question there.
    This isn't rocket science and your excuse as to why you haven't done so is at best flimsy but more likely just a lie.

  • How to Enable a Button

    Hello,
    I have a little problem to Enable a Button.
    I have a Text-Item and a Button in my Form-Modul. I want to write a Code which checks if the Text-Item is Null. If it is then the Button must be enabled.
    But which Form-Trigger must I use to do this.

    This question is definitely more clear then Sven's;-)
    I would use the when-validate-item-trigger on your text field,
    and in addition the post-query-trigger if you want to set the
    property already when retrieving records from the database.
    IF :MY_BLOCK.EINGABE IS NULL THEN
      SET_ITEM_INSTANCE_PROPERTY('MY_BLOCK.MY_BUTTON', :SYSTEM.TRIGGER_RECORD, ENABLED, PROPERTY_FALSE);
    ELSE
      SET_ITEM_INSTANCE_PROPERTY('MY_BLOCK.MY_BUTTON', :SYSTEM.TRIGGER_RECORD, ENABLED, PROPERTY_TRUE);
    END IF;

  • How to enable SSL optimization only for a single remote WAE and specific website?

    Hi guys.
    I have to enable SSL optimization for a specifc HTTPS website only and for a specific remote site only (branch office).
    The scenario is as follows:
    Multiple sites connected via a MPLS cloud. Each site has its own WAE device (module or appliance).
    There is a central manager and core WAE in the main site (central site).
    There is a website accessed via HTTPS by all the remote sites. This specific website is hosted within the main site.
    For only a specific branch office (remote site) we want to enable SSL optimization for this specific website.
    I saw this great and useful doc, but I still have some concerns.
    https://supportforums.cisco.com/docs/DOC-16452
    Basically, according to I see, I should do the following if I want to enable SSL optimization with the entire environment:
    - export the certificate and keys;
    - enable secure store in the central manager;
    - In the remote and core WAE, Check "initialize CMS secure store" and "Open CMS Secure Store";
    - In the core WAE, import the CA certificate (upload PEM file);
    - In the core WAE, create the SSL Accelerated Service by:
        --importing the client certificate and the key;
        -- Match interesting traffic;
        -- Put the SSL Acc Service in service;
    - Finally, make sure SSL acceleration is enabled in both remote and core WAE.
    The concerns:
    I only need to enable SSL optimization for a specific location accessing a specific website.
    Should the steps above work fine If I enable the SSL service for this specific website in the core WAE and enabling secure store only in a single remote site (brach office)?
    how will the other remote locations behave?
    Will they access the website normally with no SSL optimization even passing thru the core WAE?
    What about the other SSL sites which have no certificate? They will be treated as normal HTTPS with no optimization, right?
    If the site uses proxy, will any flow be impacted?
    If the steps above do not fit my case, how can I configure SSL optimization for only one remote WAE?
    Thanks in advance.
    importing  the client certificate and key (client.crt and client.key exported from  the Web server - See more at:  https://supportforums.cisco.com/docs/DOC-16452#sthash.3BKz05zU.dpu

    Hi guys.
    I have to enable SSL optimization for a specifc HTTPS website only and for a specific remote site only (branch office).
    The scenario is as follows:
    Multiple sites connected via a MPLS cloud. Each site has its own WAE device (module or appliance).
    There is a central manager and core WAE in the main site (central site).
    There is a website accessed via HTTPS by all the remote sites. This specific website is hosted within the main site.
    For only a specific branch office (remote site) we want to enable SSL optimization for this specific website.
    I saw this great and useful doc, but I still have some concerns.
    https://supportforums.cisco.com/docs/DOC-16452
    Basically, according to I see, I should do the following if I want to enable SSL optimization with the entire environment:
    - export the certificate and keys;
    - enable secure store in the central manager;
    - In the remote and core WAE, Check "initialize CMS secure store" and "Open CMS Secure Store";
    - In the core WAE, import the CA certificate (upload PEM file);
    - In the core WAE, create the SSL Accelerated Service by:
        --importing the client certificate and the key;
        -- Match interesting traffic;
        -- Put the SSL Acc Service in service;
    - Finally, make sure SSL acceleration is enabled in both remote and core WAE.
    The concerns:
    I only need to enable SSL optimization for a specific location accessing a specific website.
    Should the steps above work fine If I enable the SSL service for this specific website in the core WAE and enabling secure store only in a single remote site (brach office)?
    how will the other remote locations behave?
    Will they access the website normally with no SSL optimization even passing thru the core WAE?
    What about the other SSL sites which have no certificate? They will be treated as normal HTTPS with no optimization, right?
    If the site uses proxy, will any flow be impacted?
    If the steps above do not fit my case, how can I configure SSL optimization for only one remote WAE?
    Thanks in advance.
    importing  the client certificate and key (client.crt and client.key exported from  the Web server - See more at:  https://supportforums.cisco.com/docs/DOC-16452#sthash.3BKz05zU.dpu

  • Does anyone know how to enable an Apple ID when it shows to be disabled?

    Does anyone know how to enable an applied when it shows to be disabled?  It shows this when I try to download an app.  Either on iPhone or iPad.

    This tells you how to proceed:
    http://support.apple.com/kb/TS2446

  • How to enable/disable button

    Hi,
    i m new to pcui, i got how to hide the button in toolbar group. but could you please guide be how to enable r disable the button which is in toolbar group.
    thanks in advance

    Hi venkat,
    Follow the step, it's example of Lead CRMD_BUS2000108 & View is *ZMSR_RE5 *
    1)     Go to CRMC_PCUITOOLS.
    2)     Go to Analysis Tools -> Determine the Correct Model Access Class.
    3)     Give Application - CRMD_BUS2000108 & View – ZMSR_RE5 & execute.
    4)     Click on New -> MFT Sales (Transaction type)
    5)     Note Toolbar Group - > LEA_SR_50.
    6)     Go to CRMC_BLUEPRINT_C.
    7)     Go to Toolbar Group -> Toolbar Group Structure.
    8)     Give Toolbar Group - LEA_SR_50.
    9)     Search for ZMSR_RE5 Toolbar elements.
    10)     Click on Details.
    11)     Check whether FLAG is Not Set in Exp. Display. Choose Flag set Event has Occurred to Hide the Button.
    it will help u
    On.........................

  • How to refresh JSFF page only when page loaded using ADF 11g

    Hi
    I am facing an issue with prepreModel() usage in the .jsff page fragment. I want to invoke executables only when the specific jsff page get's loaded. I tried using 'prepareModel' as a refresh condition, but I can see always executables are getting executed. Does 'prepareModel' behaves differently for .jsff when compared to .jspx ?
    Thanks in Advance

    Hi,
    ADF Regions have a slightly modified lifecycle. However, prepareModel behaves the same. Its marking a specific time in the ADF request lifecycle when the iterators are refreshed. Try prepareModelIfNeeded
    Frank

  • How to automate and action only when a specifi event takes place ?

    E.g. I want to have a workflow that launches specific applications only when Network manager detects a conection to the internet. Is that possible

    Never mind

  • Launchd: How to Run a Job Only When Waking?

    I want to run a script when the computer wakes from sleep. I've read everything I can find about launchd and cannot find a solution.
    I tried RunAtLoad, but it did not run the script when the computer woke from sleep.
    Is there a parameter for launchd that will run a job only when the computer wakes from sleep?
    I know other parameters like StartInterval will run any "queued" jobs when the computer wakes up, but I'm looking for a parameter that runs the job only when the computer wakes up.
    Any help is appreciated.
    Thanks
    Brett

    Sorry, but there is no capacity for that built into launchd.  You might be able to hack something together (I've tried before, with some limited success), but it will be easier and more stable to use sleepwatcher. 

  • How to enable print button appear on 'application toolbar'

    hi guys,
    may i know to enable print button appear on 'application toolbar' by using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'?
    thanks.

    Hi,
    Create a PF status in SE41 with all the status which you required.
    Like save, exit, cancel and print.
    Then you include this staus in  the importing parameter
    ( I_CALLBACK_PF_STATUS_SET ) of Function module REUSE_ALV_GRID_DISPLAY.
    If you doesnt give any status also, by default you can seen the print option in status.
    Try with this and let me know

Maybe you are looking for

  • Can not view music listed on ipod in itunes

    I use to be able to view what music I had on my Ipod Touch in itunes now that does not seem to be the case.  I ipod says i have about 200 songs but when i connect to itunes an click music under devices or under ipod itself no music is shown.  Is ther

  • Setting for the ethernet internet connection

    I was using airport extreme. I don't think it is working and wanted to use the blue cable(ethernet, I think) How do I change the settings to connect to the internet directly?

  • Question about domain name/JSP, servlets

    I have a web host which publishes my pages, say www.zzz.com. I want to use JSP/Servlets on my machine which is using Apache Tomcat. Here's the problem, if I link a JSP/Servlet from www.zzz.com, the user will see my IP, i.e. 37.28.18.102/servlets/Calc

  • New Tab on Project Summary Page in PPM

    Hi, We have a requirement to add a new tab adjacent to Project Summary tab and this tab should be visible to specfic users. Is it possible to do this through JSP customization or is there any other way to achieve this? Regards, Swati

  • How to run report from context menu using XML Extensions?

    I have found an example how to run SQL command from context menu: <items> <folder type="TABLE"> <name>UserDefined ContextMenus</name> <item TYPE="TABLE" reloadparent="true"> <title>Create SYNONYM</title> <prompt type="check"> <label>PUBLIC</label> <v