How do I create data-driven linkbuttons whose visibility is controlled from the front end?

I've made a component based on a mx:TitleWindow that contains linkbuttons that I'm using as a context-menu.
The TitleWindow component contains link buttons like this:
[Bindable]
private var _showEmailThis:Boolean = false;
[Bindable]
private var _showApproveThis:Boolean = false;
[Bindable]
private var _showReviewThis:Boolean = false;
<mx:LinkButton id="lnkEmailThis" 
               visible="{_showEmailThis}" 
               includeInLayout="{_showEmailThis}" 
               click="lnkEmailThis_click()" 
               label="Email this!" />
<mx:LinkButton id="lnkApproveThis" 
               visible="{_showApproveThis}" 
               includeInLayout="{_showApproveThis}" 
               click="lnkApproveThis_click()" 
               label="Approve this!" />
<mx:LinkButton id="lnkReviewThis" 
               visible="{_showReviewThis}" 
               includeInLayout="{_showReviewThis}" 
               click="lnkReviewThis_click()" 
               label="Review this!" />
This component contains a large number of links and is re-used by multiple modules in the same application.
Within each module, this component is used when a user clicks on a row in a datagrid.
The code looks like this:
In "Requests" module:
private function dgRequests_click(event:MouseEvent):void
    menu.showApproveThis = true;
    menu.showReviewThis = true;
In "Performance" module:
private function dgPerformance_click(event:MouseEvent):void
    menu.showEmailThis = true;
    menu.showReviewThis = true;
As you can see, the visibility of individual linkbuttons is controlled within each module by setting boolean properties.
If I alter this component to use a renderer, how can I control the visibility of the linkbuttons from the code in each module (there are over a hundred links with different functionality - not every link will be used in each module)? Note: it is not known from the back-end which grid within which module uses which link. This is set in the front end within each module's actionscript file.
e.g., if the XML looks like this:
<links>
   <link>
      <label>Email This</label>
      <visible>_showEmailThis</visible>
   </link>
   <link>
      <label>Approve This</label>
      <visible>_showApproveThis</visible>
   </link>
   <link>
      <label>Review This</label>
      <visible>_showReviewThis</visible>
   </link>
</links>
and I set the Email link to show in the module like this:
private function dgPerformance_click(event:MouseEvent):void
    menu.showEmailThis = true;
How do I make it take effect? Is there a way to control the visibility of a linkbutton within an item renderer in a component from the module that uses that component? Is there something like reflection in the Flex framework?

Put a single frame sequence structure around your stop button and then wire from the error cluster going into the error handler to the edge of the sequence structure. Now your code will stop at the end of the current iteration. To see why this works, watch you code execute with execution highlighting turned on and review the section of the manual talking about "Dataflow".
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • How to Edit the xml node value using flex from the front end UI

    Hi All,
    I am having a use case with flex 4.6
    1> To read the external xml file
    2> Display the tree structure in the front end UI
    3> Edit the node values of the xml file from the front end UI and save it back
    How to go about the above use case, any blogs or links on the above case will be help
    Thanks,
    Alok

    Check this is example:
    http://blog.flexexamples.com/2009/07/23/deleting-nodes-from-an-xml-object-in-flex/

  • How do I create a start-up disk image without restarting from the Install DVD?

    (I know this is not MacBook Pro question per se, but I can't find a software discussion this applies to.)
    Situation:
    My MBP is running, but it's acting up and Onyx tells me that the start-up volume needs repair and directs me to use Disk Utility.
    But to repair a volume using Disk Utility, you must restart from the original Install DVD (or some other start-up volume).
    But although the MBP will read my old Leopard Install DVD and the Install DVD that came with my MBP, it refuses to restart from either of them. (Trying to do so gets as far as the Apple logo on a gray screen and then hangs there; all disk activity ceases.)
    Question:
    How can I (is it even possible to) create a start-up volume on my external FW drive without starting my MBP from a DVD?
    In other words, is there a way to either:
    a) create a disk image from the Install DVD on my external FW drive and then designate that disk image as my start-up drive?
    OR
    b) create a disk image on my MBP's internal drive that I can then use to run a System Install on my external drive?
    (BTW, I know I can create disk images using Disk Utility, but it offers many options for type, compression, etc., that are beyond me. )
    Any advice would be greatly appreciated!

    OS X Lion includes a new feature called Lion Recovery that includes all of the tools you need to reinstall Lion, repair your disk, and even restore from a Time Machine backup without the need for optical discs.
    Restart your Mac holding down the Command-R to enter the Recovery HD.
    From there you can use Disk Utilty.
    http://support.apple.com/kb/HT4718
    Stefan

  • How can i create a gradient with four colours that graduate from the four corners of a rectangle?

    I've been trying various ways of doing this and nothing's worked so far; I've tried blending two gradients, tried blending four different colours but no luck with that either.
    What I'm looking to do is exactly what is displayed when you double click on the colour picker and you select R, G or B. Any help will be much appreciated.

    I'd tried using two linear gradients but it didn't give the results i wanted, but i've sorted it out using gradient mesh. Thanks!

  • How can we run reports from the front enf of iProcurement...

    Hi Guys,
    I need to create a link to run reports from the front end in iProcurement webpage instead of using apps SRS to run the report...
    help needed...
    thanks
    aman

    Hi Tapashray,
    That was a great help. Thank you so much. A few more clarifications needed sir..
    I refered to a previous link and came to know about a prcedure he followed for a report. So is it the same way that is to be done... I pasted a descr what he said in the thread. In ur solution, you said, have a link bean. what do u mean by that. After i go thru all the steps what this guy told.
    It would be of gr8 help if you kindly look in to this for one more minute sir..
    thanks
    Creating a new report in 11.5.9
    Re: Creating a new report in 11.5.9
    Posted: Mar 11, 2005 7:12 PM in response to: dhergert Reply
    Ok, I was able to figure out the functions that were confusing me. For my own record and for those that do not know, I will list how to create the objects necessary to add a new report to a menu.
    1-Write JSP (should be written just how Oracle writes theirs)
    2-Creat function for the new JSP page as System Administrator responsibility
    3-Use Sys Admin to add the function to a menu somewhere
    4-Using AK Developer responsibility, create an attribute with the label of the attribute being the name of your function you created. Oracle's convention is the name of the attribute has FS in it.
    5-Using AK Developer, lookup the ASF_FUNC_SEC_REG region
    6-Drill down into that regions attributes
    7-Add a your newly created attribute to this region

  • [Forum FAQ] How to configure a Data Driven Subscription which get multi-value parameters from one column of a database table?

    Introduction
    In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
    For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
    EmailAddress                             Parameter                      
    Comment
    [email protected]              2012,2013,2014               NULL
    In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
    Workaround
    Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
    The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
    on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
    Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
    This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
    EmailAddress                        Parameter             Comment
    [email protected]         2012                     NULL
    [email protected]         2013                     NULL
    [email protected]         2014                     NULL
    In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
    Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
    On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
    From
    Expression:[ParameterName]
    Operator   :In
    Value         :[@ParameterName]
    To
    Expression:[ParameterName]
    Operator   :In
    Value         :Split(Parameters!ParameterName.Value,",")
    In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    For every Auftrag, there are multiple Position entries.
    Rest of the blocks don't seems to have any relation.
    So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
    Try out this snippet.
    DATA lt_data TYPE TABLE OF string.
    DATA lv_data TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = 'C:\temp\test.txt'
      CHANGING
        data_tab = lt_data
      EXCEPTIONS
        OTHERS   = 19.
    CHECK sy-subrc EQ 0.
    TYPES:
    BEGIN OF ty_str,
      a1 TYPE string,
      a2 TYPE string,
      a3 TYPE string,
      p1 TYPE string,
      p2 TYPE string,
      p3 TYPE string,
    END OF ty_str.
    DATA: lt_str TYPE TABLE OF ty_str,
          ls_str TYPE ty_str,
          lv_block TYPE string,
          lv_flag TYPE boolean.
    LOOP AT lt_data INTO lv_data.
      CASE lv_data.
        WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
             OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
          lv_block = lv_data.
          lv_flag = abap_false.
        WHEN OTHERS.
          lv_flag = abap_true.
      ENDCASE.
      CHECK lv_flag EQ abap_true.
      CASE lv_block.
        WHEN '[Auftrag]'.
          SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
        WHEN '[Position]'.
          SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
          APPEND ls_str TO lt_str.
      ENDCASE.
    ENDLOOP.

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • How do you create data base documents in Pages '09?

    Can you create Data Base documents with Pages, or any of the iWork Apps?

    If you want to create and use true databases, you must use an other app dedicated to this feature.
    There is a powerful database tool in LibreOffice but it requires a serious learn curve.
    There are numerous available apps starting from Bentoy to FileMaker or 4th Dimension.
    Matter of needs and finances.
    Yvan KOENIG (VALLAURIS, France)  dimanche 11 décembre 2011 10:54:27
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • I have an iCloud email address on my iMac. How can I create an icloud email address for my wife on the same computer?

    I have an iCloud email address on my iMac. How can I create an icloud email address for my wife on the same computer?

    If all you want is an additional email address you can create up to three 'email aliases'  - these are additional addresses (not accounts) which deliver into the same inbox as the main account.
    You should be aware before you start that once you've created an alias you cannot turn that address into a full iCloud account, move it to another account, or reactivate it if you delete it.
    More information on aliases here:
    http://help.apple.com/icloud/#mm6b1a490a
    If you want to keep her email separate from yours she will need to create a new Apple ID, and use it to create a new iCloud account either on a separate computer or on a separate User Account on your Mac.

  • Each time I create a new album in IPhoto, photos from another album or from photo stream are automatically dumped into the new album..  how do I create a blank album and then import photos from a flash drive into the new album?

    each time I create a new album in IPhoto, photos from another album or from photo stream are automatically dumped into the new album..  how do I create a blank album and then import photos from a flash drive into the new album?

    just import the iPhoto
    Surely you meant "just import the photo"?  The Spell checker is dangerously creative !

  • How do I transfer data files (word, Quickbooks, pdf, etc.) to the ipad?

    How do I transfer data files (word, Quickbooks, pdf, etc.) to the ipad for safe store and possible reading and manipulation of some key files (word and Pdf)?

    You first need an app, or apps, that are capable of reading/storing, and possibly editting them - without the app(s) there is nowhere to copy them to. As to how you then get the files onto the iPad depends upon the app(s) that you are using : iBooks (free app which can store/read PDFs) is via iTunes and the Books section of your computer's iTunes library. Other apps can use the file sharing section at the bottom of the device's apps tab on your computer's iTunes, some apps have wifi capability so that you can copy to/from them via your wifi network, and you may also be able to transfer email attachments into the app.

  • How do you create aligned interactive text boxs in a PDF with the same width and height?

    how do you create aligned interactive text boxs in a PDF with the same width and height?
    Without free hand creating the sizing?

    Assuming by "interactive text boxes" you mean form fields; in Acrobat, make a form field, then copy it and paste. (GIve the pasted copy a different name so they don't genetate the same field feedback.) Now you have two fields of the exact same size. Shift-click or marquee-drag to select both, then right-click and choose a command from the Align, Distribute or Center menu.

  • How do I create and move photos to a new folder on the iphone4?

    How do I create and move photos to a new folder on the iphone4?

    The way I do it is through iTunes.  First you have to have to import or already have the photos in your computer where you have iTunes and sync your phone.  When you have your phone connected and iTunes open click on the iphone under "devices" in the left sidebar list - then over to the right select Photos then Sync Photos and probably best to check selected folders unless you want them all, then choose the photo folders you want.  You have to have your photos in folders for multiple folders to be created in your phone, the names will be the same as the folders in your computer.  Alternately you can sync from one of your photo programs if they are listed as options and they will go to the phone in the structure you have your photos in in that program. 
    Hope this helps... There may be other ways and other third-party programs for doing this but I haven't looked...

  • How do i create a pdf file? I no longer have the pdf button.

    how do i create a pdf file? I no longer have the pdf button.

    Are you referring to the CreatePDF online service?

  • How to place an image in database and how to retrieve and display it in the front end

    how to place an image in database and how to retrieve and display it in the front end
    and to place an image in database and retrieve the image from database using xml
    please,help me out.

    Create a table with a Long RAW Datatype column for storing the Image Column Data.
    Create the form based on the table , which by defaults the column with LONG RAW atatype to a Image Item.
    You can use Forms Built in function READ_IMAGE_FILE to read a Image file stored on the file system in to the image item.
    A save on the form saves the image in the Image item in the long raw column.

Maybe you are looking for

  • ACS 5.3 Dashboard - Any way to create Dashboard for all users?

    I'm at the point of setting up admin access for engineers needing to have insight into the operations and status of our ACS 5.3 systems. I'm curious if there's any way to create a Dashboard that can be applied to all admin user accounts? (perhaps a c

  • Mini display port to HDMI problem...still happening, apple needs to help!

    i read a lot about this topic and the question was marked answered, but there was no answer, sooo... this is just a heads up to apple that this problem still exists and many people are still having it! Please do something... you put this mini display

  • Sales Employee......master

    Dear FNds, I tried with all thread ,seems need some more clarityu2026gurus We are not going to implement any HR module, but we need Sales employee masteru2026 In Partner determination..I tried to add this partner function in Sales Headeru2026 I am ge

  • Basic questation about MBAM

    HI all , sorry for basic questation . I try set with gpo mbam client in the windows 7 . I set requerid encrypt os drive and fixed drivers .and questtaion : in the error log is write : detect OS volume encryption policies conflict . check bitlocker

  • Access XML files from HTTP

    Hi, I need access XML file from HTTP. Server need parameters in the URL to generate XML files. For example, http://fileserver/xmlfile?orderid=123&custid=321. I created a XML Data Server in ODI 11g. The JDBC Url should be jdbc:snps:xml?f=<filename>&s=