How to set ID to a button inside a ToggleButtonBar?

There's a ToggleButtonBar element, populated from a ViewStack. I need to set IDs to individual buttons (this is needed for QA automation).
How do I do this?

Hi Ridcully,
Why do you require to set button ids for the ToggleButtonBar...?
If at all you want to get a reference to any button within the ToggleButtonBar you can get by using the getChildAt() method and you an perform the opertaions on it.
Say if your ToggleButtonBar id="selector" then you can get a reference to any button by using below kine of code...
var btn:Button = selector.getChildAt(index) as Button;
Check out the below example...In which I am getting a reference to the button clicked in ToggleButtonBar.
You can also see in the below example the name of button clicked coming in an Alert.
<?xml version="1.0"?>
<mx:Application 
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.controls.Alert; 
import mx.controls.Button; 
import mx.events.ItemClickEvent; 
// Event handler function to print a message
// describing the selected Button control.
private function clickHandler(event:ItemClickEvent):void {myTA.text=
"Selected button index: " + String(event.index) + 
"\n" + "Selected button label: " + event.label; 
var btn:Button = selector.getChildAt(event.index) as Button;Alert.show(selector.name);
]]>
</mx:Script>
<mx:Panel title="ToggleButtonBar Control Example" height="75%" width="75%"paddingTop="
10" paddingLeft="10" paddingRight="10" paddingBottom="10">
<mx:Label width="100%" color="blue"text="
Select a button in the ToggleButtonBar control."/>
<mx:TextArea id="myTA" width="100%" height="100%"/>
<mx:ToggleButtonBar id="selector" itemClick="clickHandler(event);">
<mx:dataProvider>
<mx:Array>
<mx:String>Flash</mx:String>
<mx:String>Director</mx:String>
<mx:String>Dreamweaver</mx:String>
<mx:String>ColdFusion</mx:String>
</mx:Array>
</mx:dataProvider>
</mx:ToggleButtonBar>
</mx:Panel></mx:Application>
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari

Similar Messages

  • How to set Shortcut keys for button in Apex

    Hi
    Could anyone help me on how to set shortcut keys for buttons in Apex.
    I need to use say ALT + S to submit the page.
    The following thread pertaining to HTML DB refered to use ACCESS key. but that couldnt work in my case.
    Re: operation of the app. with the keyboard
    Any pointers on achieving this would be helpful.
    Thanks
    Vijay

    Hi Vijay,
    I’m afraid you must do it using javascript key listener. You can’t use action() on template based buttons because they are actually not HTML buttons but images with hyperlink.
    Key listener checks which key has been pressed down and invoke some JS function. For example, write this code in page header:
    <script>
    document.onkeydown=keyCheck;
    function keyCheck(e){
         var KeyId = (window.event) ? event.keyCode : e.keyCode;
         switch(KeyId){         
              case 113:
                   doSubmit('SAVE');
                   break;                    
              case 118:
                   alert('Hello');
                   break;
    </script>
    This script will submit page with request 'SAVE' if you press F2 or will show alert message if you press F7. Modify it to your issue.
    Regards,
    Przemek

  • How  to set focus on an element inside a datatable on load

    How to set focus on an element inside a datatable on load

    Check out https://blogs.oracle.com/groundside/entry/ever_wondered_how_uncommitteddatawarning_works and
    Decompiling ADF Binaries: Checking for dirty data
    Timo

  • How to set value for radio button in sap crm survey suite

    Hi ,
    I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
    Thanks & Regards,
    Seshu

    Hi,
    I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
    Regards,
    Seshu

  • How to set View for Completed items inside Tasks?

    How to set button for 'View' and see Completed items or not completed inside Tasks?

    Hi,
    You want to set custom views for Tasks folder so that when we click a view button, it will show all Completed or incomplete tasks, am I correct?
    Which version of Outlook are you using? There are existing views for completed/incomplete tasks in Outlook. In Outlook 2010 and Outlook 2013, we can find the buttons under View tab > Change View. Click Completed button to view all completed
    tasks; Click Active button to view incomplete tasks.
    In Outlook 2007, just click View > Current View to switch between different views.
    If I've misunderstood something, please feel free to let me know.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to set target to Play button on begining DVD

    Man you dont use this program for a few months and you gotta take a course on it all over again.
    Ive completely forgotten how to set the PLAY button to activate at the beginning of the DVD. As in I was burning several DVDs and I tested them on my computer, and they worked fine. But the whole time I was using my mouse to navigate (I only put in one button "PLAY"). When at one point I happened to use the DVD navigator I realized I hadnt set it for a stand alone. So while if you watched it on a computer and were using your mouse you could hit the play button. But on a stand alone you cant get to it with a remote.
    I remember it being a simply thing, but for the life of me I cant figure it out. HELP!

    So are you talking about moving between the buttons on a menu screen (i.e. navigation in the menu) or are you saying you can't get the button to activate any video? Or both?
    The first issue is sorted out with the 'Settings' drop down box and choosing 'assign buttons now' or 'auto assign buttons' (but this slows down the menu creation and gets really frustrating at times). You should then be able to get to the menu (which will have the first button highlighted and ready by default) and then use the handset to move from button to button.
    The second bit is setting the target for the button - where it goes to once you select and activate it. Open up your menu in DVDSP and click on the buttons in turn. Look in the property inspector for the 'target' and make sure that each button is going where you intend.
    Alternatively, use the connections tab - this is far faster, IMO, but is slightly more abstract in concept...
    If you have done these things and you still cannot get to the button using the remote control then there is something else wrong - it could be that you simply forgot to create a button but have the text there ready... without the button rectangle being drawn out over the text (or next to it) there will be no button and no way to activate anything.

  • How can i create a filechooser button inside the plugin window?

    Hi
    i'd like to create a filechooser button to load/save but inside the plugin window. Is it possible ? if yes how can i do that ?
    and i need the algorithm to be Mac/Windows compatible if possible
    thanks a lot
    *best regards*
    Jeff

    If by the "plugin window" you mean the dialog an automation or a filter plugin from the SDK sample code opens for you, you have to write platform-specific code using either Cocoa on Mac or regular WinAPI on Windows (e.g. by hooking GetOpenFileName()/GetSaveFileName() functions to a button you will add to the resource file or create dynamically). Take a look at any plugin that has a GUI (e.g. the Dissolve plugin) and you'll see that the GUI code is entirely platform-specific as there is no platform-independed GUI framework bundled with Photoshop anymore.
    Another option is to use some third-party cross-platform library such as Qt, but if you just need a couple of buttons and file selection dialogs it's probably not worth the trouble,.

  • How to Set label of a button in arabic by writting code.

    Hi,
    I have created a button by writtin following code in controller.
    OAButtonBean oasb = (OAButtonBean)createWebBean(oapagecontext, OAWebBeanConstants.BUTTON_BEAN, null, "Add");
    if ( oapagecontext.getCurrentLanguage().equals("US"))
    oasb.setText("Add Previous Objectives");;
    else
    oasb.setText("إضافة أهداف المرحلة السابقة");
    Its creating a button with the given label. When i check from english login it shows label as "Add Previous Objectives" But when i check the same from arabic login it shows "???????????????"
    Please suggest me how can i set arabic text for the same button.
    Thanks in advance
    Murali

    Hi Murali,
    It seems that the problem is with your browser where you are running your page. Check that the Arabic font is installed on your web browser and your system.
    Regards,
    Amit Kr. Singh

  • How to SET Focus on 'CONFIRM' button on Account identification page, CIC role?

    Hello Expert,
    Business role is CIC Agent.
    Current Functionality-
    1. CIC Agent gets a call
    2. Search name of customer
    3. If correct customer name found, CIC agent manually CONFIRM the account by clicking on CONFIRM button.
    As per client requirement, AUTO_CONFIRM business partner is disabled from SPRO configuration.
    Expected functionality -
    1. CIC Agent get a call
    2. Search name of customer
    3. If correct customer name found, CIC agent manually press ENTER key to confirm the account.
    So to get this functionality on ENTRY key (not on mouse click), BSP page element focus should be on 'CONFIRM' button, the moment SAP CRM Web UI frame work loads searched account detail. so that CIC agent once check and verify valid account and then press ENTER key to confirm.
    Different Java script code already been tried on SingleObjectViewSet.htm and HiddenView.htm but couldn't achieve the Page focus on confirm button.
    Your expertise in resolving issue would be very helpful.
    Regards,
    Ghanshyam

    Hi,
    tabs have a "disclosed" property that you can set with a ExpressionLanguage reference to a managed bean method. If the managed bean is in session scope then whatever this method returns for a tab will define whether or not it is displayed
    Frank

  • How to set focus on a button that I created dynamically

    Hi everyone,
    Code :
      lc_view_ctrl = wd_this->wd_get_api( ).
      lc_window_ctlr = lc_view_ctrl->get_embedding_window_ctlr( ).
      l_window = lc_window_ctlr->get_window( ).
      l_window->set_button_kind( button_kind = if_wd_window=>co_buttons_okcancel   ).
    How do I focus on the OK button ?
    Thanks.
    Regards

    I  aswered my question :
    When you subscribe to the event, write :
        l_window->subscribe_to_button_event(
            button            = if_wd_window=>co_button_ok
            button_text       = lv_button_text
            tooltip           = lv_tooltip
            action_name       = 'CONFIRM_DATA'
            action_view       = lc_view_ctrl
            is_default_button = abap_true

  • How to set Save and Apply button to disabled

    Hi all
    i need to disable the save and apply buttons according to some action the user is doing, when the user changes some LOV value the save button should be disabled
    the following code i am using is not working to disable the button,
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {
    String val = "";
    String message = "";
    int statusVal = 0;
    try {
    super.processFormRequest(pageContext, webBean);
    if ("empPositionChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))) {
    OAMessageChoiceBean rGBean1 = (OAMessageChoiceBean)webBean.findIndexedChildRecursive("Status");
    if (rGBean1 != null) {
    val = (String)rGBean1.getValue(pageContext);
    statusVal = Integer.parseInt(val);
    if (statusVal == 1) {
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vo1 = (OAViewObject)am.findViewObject("WOCreateUpdateVO");
    vo1.reset();
    if (vo1 != null) {
    vo1.next();
    OARow row = (OARow)vo1.getCurrentRow();
    String ReasonCode = (String)row.getAttribute("Attribute1");
    //message = message + ReasonCode;
    if (ReasonCode == null) {
    OASubmitButtonBean savebBean = ((OASubmitButtonBean)webBean.findChildRecursive("Save"));
    if (savebBean != null){
    savebBean.setDisabled(true);
    OASubmitButtonBean applybBean = ((OASubmitButtonBean)webBean.findChildRecursive("Apply"));
    if (savebBean != null){
    applybBean.setDisabled(true);
    catch(Exception exception){
    throw new OAException("Error in Staffing Query: "+exception, OAException.ERROR);
    please any one had this issue.
    any help??
    Regards,

    i am using this code in the processRequest
    public void processRequest(OAPageContext pageContext, OAWebBean webBean){
    super.processRequest(pageContext, webBean);
    OAMessageChoiceBean mcb = (OAMessageChoiceBean)webBean.findIndexedChildRecursive("Status");
    FireAction firePartialAction = new FirePartialAction("empPositionChange");
    mcb.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
    as for tracking the error it is giving me nullpointerexecption on the OASubmitButtonBean savebBean = ((OASubmitButtonBean)webBean.findIndexedChildRecursive("Save"));

  • How to set column in radio button?

    hi
    HtmlSelectOneRadio radio = new HtmlSelectOneRadio();
    radio.setId("oneRadiolId");
    radio.setBorder(0);
    radio.setImmediate(immediate);
    radio.setReadonly(true);
    radio.setConverter(new IntegerConverter());
    UISelectItems items = new UISelectItems();
    ArrayList arr = new ArrayList();
    arr.add(new SelectItem("one"));
    arr.add(new SelectItem("two"));
    arr.add(new SelectItem("three"));
    items.setValue(arr);
    radio.getChildren().add(items);     
    i am tring to dispay in single column but it is diplaying in single row , how to display children in single column.please any one help me...

    radio.setLayout("pageDirection");Also see:
    HtmlSelectOneRadio API doc: http://java.sun.com/javaee/5/docs/api/javax/faces/component/html/HtmlSelectOneRadio.html
    h:selectOneRadio TLD doc: http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/h/selectOneRadio.html

  • How to set up an Ubuntu chroot inside Arch Linux [solved]

    I use Arch Linux (64 bits) as my desktop, but I'd like to have an Ubuntu chroot for development purposes. I installed schroot and debootstrap, created a directory for the jail, and executed:
    sudo debootstrap --arch amd64 lucid /var/chroot/ubuntu http://au.archive.ubuntu.com/ubuntu/
    Then I edited /etc/schroot/schroot.conf to include only one chroot:
    [ubuntu]
    description=Ubuntu
    type=directory
    directory=/var/chroot/ubuntu
    priority=1
    users=myusername
    root-users=myusername
    aliases=lucid,default
    "myusername" is a placeholder, I wrote my actual username.
    I should be able to "schroot -c ubuntu", but when I run the command I receive this error message:
    E: 20nssdatabases: /usr/bin/stat: cannot stat `/etc/networks': No such file or directory
    E: ubuntu-4df5c899-3603-4a37-ab0f-d81fc3855c8d: Preparação do chroot falhou: etapa=setup-start
    And then I'm back to the Arch Linux command line.
    What should I do to make my Amd64 Ubuntu chroot work?
    Thanks in advance.
    Last edited by leonardof (2010-07-24 19:30:31)

    Tip: touching /etc/networks in Arch Linux doesn't fix it. After creating the files schroot looks for in the host system, I can enter the jail but I have no networking.

  • How to set the HOME link from two frame jsp page to no frame main page?

    Hi all,
    i have one main jsp page named as main.jsp.
    From the main.jsp, i can click the button and link to the twoFrame.jsp.
    This twoFrame.jsp have another two different jsp inside the frame called Aframe.jsp and Bframe.jsp.
    i try to put HOME in the Aframe.jsp(one of the page inside twoFrame.jsp) but only the Aframe.jsp manage to link to main.jsp but the Bframe still there.
    My question is: How to set the HOME link button from this twoFrame.jsp to the main.jsp? what i want is from twoFrame.jsp(two frame) to main.jsp(no frame).
    rgds,
    Bryan523

    No offense, but this is basic HTML. You shuold look into learning HTML before getting too deep into JSP. Try this: http://www.w3schools.com/html/default.asp
    But as a more specific answer, you have to set a target for the link to the _parent of your frame:
    <a href="main.jsp" target="_parent">Home</a>

  • How to set the default button of an ALERT

    Can someone help me how to set the alert propety to change the default button from button1 to button2.Not from the prioperty palette, but inside the code using like set_alert_property.I am using the Oracle Forms 10g.
    Thanks in advance.
    Srini

    To the best of my knowledge, the default button cannot be set at runtime. This must be set at design time in the Builder.
    Refer to the Forms Builder online help for details:
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builts/setatpro.html

Maybe you are looking for

  • How to find out portal user from sso cookie ?

    Hi, I want to find out the portal user id from Portal30_sso cookie. It is required for security in my java servlet. Thanks Vikas

  • Can anyone help with a timestamp filter problem

    Hello I need to filter all times before 09:30 and all times after 15:30.  The filtering that takes place in the attached VI filters the dates properly up to 46 days but then 4:30 becomes 09:30 and 09:30 no longer appears  approx element 327 in the ri

  • Adobe Reader 9 administrator accounts desktop icon

    Does anyone know how to do the follow as it is quite Adobe 9 is quite annoying: 1 - take off the adobe reader 9 icon off the desktop -- it keeps recreating it after I delete it! NOW WHY WOULD adobe force this on us? 2 - under NON administrator accoun

  • I'm having trouble with the server2server scripts...

    I'm trying to call getRoomInfo from python but it throws an exception. My code looks something like: account = "%s/%s" % (lccsSettings.HOST, lccsSettings.ACCOUNT) am = accountmanager(account) am.login(lccsSettings.USER, lccsSettings.PASSWORD) am.getR

  • Installed Flash, still says I need to get newest update

    Using Windows XP with Opera and Windowx Vista with Firefox. Okay, I was trying to watch a video on Tumblr, but it promts to download the newest Flash. Do so on both firefox and opera. It still says it requires newest Flash. Java is enabled in both br