ADG Tree - Linked Checkbox Item Renderers

Hi Everyone,
I've put together an AdvancedDataGrid that displays nodes from an XML (generated from a MySQL DB) in a tree format with two columns.
The first column is the actual tree and the second column utilizes a checkbox item renderer.
What I need to do, however, is to have it so that when a user clicks on the checkbox of a parent node, it selects all child nodes as well.  If the parent node is deselected, all child nodes should also be deselected.  Furthermore, if a child node is checked off, the parent node should also be checked automatically.
I did find a sample that utilizes a 3-state checkbox for ADG's, but my issues is that the checkbox's are in a different column and not beside the tree nodes.
Any assistance in this would be really appreciated.
Thanks!
Dan

I think you could simulate column-like display using itemRenderers in Tree component.
I wanted to use ADG so much and was happy to finally work it out in my app, I thought.
Then I noticed the issue with responsiveness and what a struggle it was to get the items to always render, that's a whole other topic.
But I found the Runtime Error that basically crashed my app when my client data required the use of scrollbars to view
the end of the list. Basically it has trouble with the itemRenderer getMeasurement () method I believe.
I don't remember the exact error message - once I found out it was RTE I abandoned it completely
in favor of Tree - nice and stable and does the job for me....
There is a bug report in bugs.adobe.com/jira about this, others have reported it too.

Similar Messages

  • When to use Drop In Item renderer and InLine Item Renderers ??

    Hi ,
    I am getting confused in where to use Inline ItemRenderer and DropIn Item Renderer .
    What i feel is that DROP in Item Renderer are easy to use , and those can satisfy any requirements .
    What i read from tutorilas that we cant use Drop In because they say ,  The only drawback to using  drop in is that them is that you cannot configure them
    Please help me .

    Hi Kiran,
    Here is the detailed explanation you needed:
    You can also refer the link below:
    http://blog.flexdevelopers.com/2009/02/flex-basics-item-renderers.html
    Drop-In Item Renderers
    Drop-In Item Renderers are generic in nature and don't rely on specific data fields to render data. This allows them to be used with a wide range of data sets, hence, the term “drop-in”. Drop-In Item Renderers can be “dropped-in” to any list-based control regardless of the dataprovider’s data properties.
    In our previous example, the employee photo property requires use of a custom Item Renderer to render properly in the UI. In this scenario the Image component satisfies our rendering needs out of the box. Implemented as a Drop-In Item Renderer, the Image component takes any data property regardless of name and uses it as the Image component's source property value. Assuming our employee photo property contains a valid image path, the Image Drop-In Item Renderer will work perfectly and resolve the image path as an image in the UI.
    <!-- Drop-in Item Renderer: Image control -->
    <mx:DataGridColumn dataField="photo"
                       headerText="Employee Photo"
                       itemRenderer="mx.controls.Image"/>
    Drop-In Item Renderers are simple and easy to use and satisfy specific use cases nicely. However, they provide no flexibility whatsoever. If your needs are not satisfied by a Drop-In Item Renderer, you must create your own Item Renderer as an inline component or an external component.
    Inline Item Renderers
    Generally used for simple item rendering requiring minimal customization, inline Item Renderers are defined as a component nested within the MXML of your list-based control.
    It is important to note that Item Renderers nested within the itemrender property of a list-based control occupy a different scope than the list-based control. Any attempt to reference members (properties or methods) of the parent component from the nested Item Renderer component will result in a compile-time error. However, references to the members of the parent component can be achieved by utilizing the outerDocument object.
    <mx:DataGrid id="myGrid" dataProvider="{gridData}">
       <mx:columns>
          <mx:DataGridColumn headerText="Show Relevance">
             <mx:itemRenderer>
                <mx:Component>
                   <mx:Image source="{'assets/images/indicator_' + data.showRelevance + '.png'}"
                             toolTip="{(data.showRelevance == 1) ? 'On' : 'Off'}"
                             click="outerDocument.toggle()" />
                </mx:Component>
             </mx:itemRenderer>
          </mx:DataGridColumn>
       </mx:columns>
    </mx:DataGrid>
    Remember, rules of encapsulation still apply. Mark all properties or methods public if you want them accessible by your inline Item Renderer. In the previous example, the toggle() method must have a public access modifier to expose itself to the inline Item Renderer.
    public function toggle():void
    Inline Item Renderers can also be reusable by creating a named component instance outside of the list-based control. This component must have an id property and contain the rendering logic of the Item Renderer. Using data bindings, the component is assigned to the itemrenderer property of one or more data properties of a list-based control.
    <!-- Reusable inline Item Renderer -->
    <mx:Component id="ImageRenderer">
       <mx:VBox width="100%" height="140"
                horizontalAlign="center" verticalAlign="middle">
          <mx:Image source="{'assets/'+data.image}"/>
          <mx:Label text="{data.image}" />
       </mx:VBox>
    </mx:Component>
    <!-- Used within a list-based control-->
    <mx:DataGridColumn headerText="Image"
                       dataField="image" width="150"
                       itemRenderer="{ImageRenderer}"/>
    In the previous example, note that the Item Renderer component contains 2 UI controls – Image and Label. When using multiple controls within an Item Renderer, a layout container is required. In this example, a VBox was used.
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari
    Message was edited by: BhaskerChari

  • [svn:fx-trunk] 11933: Addressing an edge case for TileList where at times the listItems array doesn 't accurately reflect a fully realized set of item renderers.

    Revision: 11933
    Revision: 11933
    Author:   [email protected]
    Date:     2009-11-18 06:55:18 -0800 (Wed, 18 Nov 2009)
    Log Message:
    Addressing an edge case for TileList where at times the listItems array doesn't accurately reflect a fully realized set of item renderers.  This can occur when the TileList row/col creation routine bails out early when it believes it has no further need to create renderers due to current height of the list itself.
    QE notes:  None
    Doc notes: None
    Bugs: SDK-24169
    Reviewer: Alex
    Tests run: List, TileList, HorizontalList, DataGrid
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24169
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as

    Due to a copy/paste glitch, some necessary spaces have inadvertently been removed.  If I could fix this, I would.

  • [svn] 4005: Change in the way item renderers lay them selves out.

    Revision: 4005
    Author: [email protected]
    Date: 2008-11-03 17:07:38 -0800 (Mon, 03 Nov 2008)
    Log Message:
    Change in the way item renderers lay them selves out. Before we were using 100% width and 100% height. Now, we're using horizontalAlign and verticalAlign to accomplish this, which are properties added to VerticalLayout and HorizontalLayout, respectively. horizontalAlign takes values "left", "center", "right", "justify", and "contentJustify". "justify" sizes all elements to the width of the component. "contentJustify" sizes all elements to the size of the largest child (with a minimum of the width of the parent component). Similar, verticalAlign takes "top", "middle", "bottom", "justify", and "contentJustify".
    The default List skin sets the VerticalLayout's horizontalAlign to "contentJustify." Most lists should use "contentJustify" or "justify" if you don't want scrollbars. If you want to change your list to a horizontal list, you change the layout to a horizontal layout. However, you must set the verticalAlign property on the horizontal layout correctly--otherwise it'll default to "top" and probably won't do what you want.
    Ran checkintests and the following mustella tests: layout, list, Group, DataGroup, FxDataContainer, and FxContainer. Some DataGroup tests were failing but should be because of an unrelated, local change. All other tests are passing.
    QE Notes: Failing tests are excluded. Please update them (I think all just need to add verticalAlign="contentJustify" in the horizontal layout case) and re-include them. Also, please write tests for this new functionality.
    Doc Notes: None
    Bugs: SDK-17198
    Reviewer: Evtim
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17198
    Modified Paths:
    flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalLayout.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDataContainerSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxListSkin.mxml
    Added Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/HorizontalAlign.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalAlign.as

    Hi! The only way I know of is changing the screen resolution. Tom

  • [svn:fx-trunk] 12552: DataGroup now tracks the indices of the active virtual item renderers with a list , rather than the min/max values.

    Revision: 12552
    Revision: 12552
    Author:   [email protected]
    Date:     2009-12-04 13:45:12 -0800 (Fri, 04 Dec 2009)
    Log Message:
    DataGroup now tracks the indices of the active virtual item renderers with a list, rather than the min/max values. 
    DataGroup/addItemRendererToDisplayList() now respects the overlay.
    QE notes:
    Doc notes:
    Bugs: sdk-24052
    Reviewer:
    Tests run: DataGroup, List
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/sdk-24052
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as

    Hello Martin:
    Thanks for your input.  However I am not certain we have resolved this issue adequately, or understand the principles governing the css as regards this spry menu framework 2.0 (1.0).
    For example, the menu only works in IE 6.0 if the css remains in the head.  I agree with your original post that it shouldn't make any difference whether the css is posted in the head or in a separate style sheet (so long as specificity issues are addressed).  Both should work -- and yet it doesn't.
    If the CSS is placed in the separate style sheet governing the total site, it doesn't work for 6.0.  If placed at the top of the style sheet, conflicts of specificity prevent the menu from rendering properly in any of the browsers causing the rules for general links to govern the menu.   This has been verified using a cross browser testing.  If the styles are placed at the bottom of the style sheet to help them take precedence, they work in all the browsers except for IE 6.
    The website I am building needs to support IE 6 for a variety of reasons, and because it is catering to the non-profit community and to low income persons, I am mindful of even small differences in page weight.
    So for me, at least, the issue remains baffling.
    I appreciate your input, but also would appreciate the input from others, and especially Adobe Community Professionals and employees.  The spry framework in this regard is not well documented.  I am not certain if this is exclusively a CSS problem, if it might also be complicated by the architecture of the spry framework, or if indeed other variables are at play.
    I would be my hope that in resolving the problem, other users of the this particular spry framework might also benefit.
    Thanks,
    Steve.

  • Checkbox item: How to get all values checked?

    See http://htmldb.oracle.com/pls/otn/f?p=24317:46
    The report query is simply
    select
    'One' one,
    'Two' two,
    'Three' three,
    'Four' four
    from dualThe checkbox item is a named static LOV with STATIC2:ONE,TWO,THREE,FOUR and a Source value of ONE:TWO:THREE:FOUR so that all boxes appear checked when the page is first rendered.
    All the 4 columns have a column condition like
    instr(':'||:P46_COLS||':',':ONE:') > 0to ensure that column is rendered only if the corresponding checkbox is checked.
    The report has Dynamic column headings with the following PL/SQL function body
    return 'ONE:TWO:THREE:FOUR';To my (pleasant) surprise, this works very nicely. When column TWO is conditionally not rendered, its corresponding column heading is also skipped with no effort on my part. Nice.
    Question:
    Instead of "hard-coding" that string ONE:TWO:THREE:FOUR in the 2 places I mentioned above (checkbox item source and report heading), is there a way to access the "all values checked" version of that LOV item so that it will dynamically pick up the latest LOV changes? The way I have done it currently, if I change the named LOV, I need to also change those 2 places where I have hardcoded the values.
    Any ideas? Thanks

    Scott:
    I thought about that but the LOV has dozens of values, each with a verbose display value and a return value of the column name (upto 30 characters) and the display values are still being "worked on" by the users.
    So, the "all columns" string would be a big, unweildy string that would be hard to edit.
    It is much easier to edit, resequence and generally work with a Shared Component LOV defined as a Static LOV because you get that nice page (4000:4111) where you can read everything nicely formatted instead of a STATIC2:<big long string>!
    Can I have my cake and eat it too?!
    Thanks

  • Link between Item and delivery

    Hi ,
    I want to know the link between item and deliveyr. Like for example, an sales order item ( no. 10) containing 10 quantities can be delviered 5 times( each containing 2 quantities) and line item ( no. 20) can contain one single delivery. I am working on a report where i have to link all the line item to its delivery number. I am trying to achieve this through GENIl but i am not able to indetify as to how to differentiate the different deliveyr numbers. In other words, can some one help me as to how to link the delivery number to its corresponding items?

    Document flow is stored in the table VBFA in ECC.
    VBELV fied is the sales order number and in POSNV specify the line item number and speicfy VBTYP_N = J (Delivery).
    Regards,
    Bhanu

  • Creating a report for linked work items...

    We are using TFS 2012 and need to create a report (either excel or SSRS) that shows all the user stories under the current sprint and any linked child items across two projects. I can do this easily per project in VS and open it in excel but excel won't
    let me copy/paste two projects work items in one spreadsheet. I tried searching and found a few suggestions but they don't seem to work.
    TIA,
    Vik

    Hi Vik,  
    Thanks for your post.
    We suggest you create a such report using TFS API. Please refer to below code snippet:
                TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri("UrI"));
                tfs.EnsureAuthenticated();
                WorkItemStore workitemstore = tfs.GetService<WorkItemStore>();
                string wiql ="SELECT * FROM WorkItems WHERE [System.TeamProject] = 'TeamProject' ORDER BY [System.Id] ";
                WorkItemCollection wic = workitemstore.Query(wiql);
                foreach(WorkItem workitem in wic)
                if(workitem.Links.Count!=0)
                    foreach (Link link in workitem.Links)
                        RelatedLink relatedLink = link as RelatedLink;
                        if (relatedLink != null)
                            Console.WriteLine(relatedLink.RelatedWorkItemId);
    You can create your custom work item query to return all the parent work items, then save this query as a .wiq file in local path, then open this .wiq file and you will find the wiql string in it.
    For more information about work item query TFS API, please refer to:
    https://msdn.microsoft.com/en-us/library/bb130306.aspx.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Restrict all the text in a datagrid input without having to create custom item renderers

    Is there a way to restrict all the text in a datagrid input
    without having to create custom item renderers for each
    column?

    How are you trying to restrict it? If you're trying to
    restrict it uniformly, for example, to entirely numerical inputs,
    then the easiest way I know of to do so is with an itemEditor. You
    can just add the same itemEditor to each column that way.
    This only saves work over custom renderers if you're trying
    to restrict multiple columns in the same manner, but for numeric
    only tables, it's pretty short.
    You could probably also do it with itemEdit and
    itemEditBeginning events, but that would likely be more work then
    simply declaring a single global itemEditor and using it in all
    your columns.

  • Checkbox Item: character string buffer too small (APEX 4.0. - 4.2.)

    Hi all,
    I'm currently running the Oracle Application Express 4.0.2 on the Oracle DB 11g and thinking about the APEX upgrading to current 4.2. version. We have there quite big application used by the inernal employees so prior I need to test, if the migration will work.
    I installed the new server with database and the APEX 4.2. and import the current application. Everything seems to working good except few checkboxes, which returns me the error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small."
    LOV (Source) Code of Checkbox Item:
    SELECT email as display_value, id as return_value
    FROM users
    WHERE <some conditions>;
    In the current version 4.0.2. I get the checkbox item (total count of the rows approx. 650), but in the 4.2. I get this "string buffer too small" error and the page could not be rendered (if I add to the same query limitation: "rownum<242" it will display the item).
    Could you please help me with this issue? Any idea, what I should set up in the new APEX to get the same results or you see there any limitation, why it does not work in the new version, but in the old version the same SQL works fine?
    Thank you all in advance.
    Regards,
    Tomas.

    1007462 wrote:
    Hi all,Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your forum profile with a real handle instead of "1007462".
    I'm currently running the Oracle Application Express 4.0.2 on the Oracle DB 11g and thinking about the APEX upgrading to current 4.2. version. We have there quite big application used by the inernal employees so prior I need to test, if the migration will work.
    I installed the new server with database and the APEX 4.2. and import the current application. Everything seems to working good except few checkboxes, which returns me the error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small."
    LOV (Source) Code of Checkbox Item:
    SELECT email as display_value, id as return_value
    FROM users
    WHERE <some conditions>;
    In the current version 4.0.2. I get the checkbox item (total count of the rows approx. 650), but in the 4.2. I get this "string buffer too small" error and the page could not be rendered (if I add to the same query limitation: "rownum<242" it will display the item).
    Could you please help me with this issue? Any idea, what I should set up in the new APEX to get the same results or you see there any limitation, why it does not work in the new version, but in the old version the same SQL works fine?The total size of the HTML generated for an LOV-based item in APEX is restricted to 32K (this limit applies to every version). Why you are hitting this limit in the new instance may be due to differences in data or the database configuration (e.g. character set) rather than changes introduced in APEX.
    Is the data exactly the same? Is the database configuration the same? When you limit the number of rows so the checkboxes are displayed and view the page source, is there any difference in the HTML used to render the checkbox form elements between the two versions?
    That said, from a usability perspective 650 LOV options is rather a lot, and your application may very well outgrow this limit naturally in any version of APEX as more users as added. It is probably worthwhile thinking about other ways to display these options.

  • Accessing S:List Checkbox Item Renderer Outside the Renderer

    Hi All,
    I have an S:List, with a checkbox item renderer.  I was to be able to access the selected portion of the renderer to create a new function that at the press of a button this will delect all the current selected items in the list.
    Doco states that i should be able to do this just by setting the selectedIndex to -1.  But not sure if this is specific to 4.5??  But it is not working for me.
    Below is my current list.  Outside of this list flashbuilder does not know about chkList, or even selected.  How can i get access to this to deslect all?
    <s:List
    id="ltattributes">
    <s:itemRenderer>
    <fx:Component>
    <s:ItemRenderer>
    <fx:Script>
    <![CDATA[
    import mx.events.ItemClickEvent;
    protected function chkList_changeHandler(event:Event):void
    var e:ItemClickEvent = new ItemClickEvent(ItemClickEvent.ITEM_CLICK, true);
    data.selected = event.currentTarget.selected;
    e.item = data;
    e.index = itemIndex;
    dispatchEvent(e);
    ]]>
    </fx:Script>
    <s:CheckBox id="chkList" selected="false" label="{data.displayname}" change="chkList_changeHandler(event)"/>
    </s:ItemRenderer>
    </fx:Component>
    </s:itemRenderer>
    Thanks

    Try: dataGroup.getElementAt(). 
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • How do you get to display checkbox items  in list or detail layouts?

    Hi,
    I have searched everyhwere for what I felt would be standard stuff in web apps, now lost a day to it!
    None of the online videos/knowledge base articles or this forum seem to cover it but I can't believe you wouldn't be able to do it.
    If I have created checkbox fields in my web apps how do I get them to display in the main templates (details and list) as list items, ul, ol or dl or anything else other than raw output?
    How do I wrap the nessersary html around the values? Jquery for now I guess or is there some hidden liquid layout or tag parameter/value I don't know of?
    And whilst I'm on it is my only option to not show or show content based on a boolean true/false value to do it through jquery/css?
    Help appreciated, so desperate now!
    Regards
    Bangers

    Hi Mary,
    Thanks for the help. I saw that somewhere though Adobe's making this forum nice and tricky to find anything! Relied on google caching for most useful stuff I've found to bybass the redirect to the first forum page.
    I needed it to wrap around the items so came up with this:
    <script type="text/javascript">
         $(document).ready(function () {
         // Populate a dl with checkbox items or choose any other html to wrap around items
             var checkItems="{tag_checkboxItems}";
             $('#dlID').html('<dt>Items List Title</dt><dd>'+checkItems.split(",").join("</dd><dd>")+'</dd>');
              // #dlID can be anything but identifys the html element that you setup to contain your list of items in my case it was a dl with id #dlID
    </script>
    If there is a better SEO method to do this please let me know.
    Frankly I've been  amazed that web apps don't really support conditional statments and there is little to no information on achieving it through jquery (my first projects have been fairly basic)...roll on fluild layouts I guess.
    Failing that maybe Adobe could produce something in the knowledge base or videos which really do cover more advanced implementaion of web apps. I doubt anyone using web apps or having had experience of other CMS would really consider showing or hiding content based on boolean results or looping to create lists all that advanced, it's more a fundemental function of a CMS.
    P.S Thanks again to both of you.
    Bangers x

  • Open Sharepoint Link List items in new tab?

    I have a sharepoint list which is Link List.Actually When I click on item in that link list it should be open in the new tab/window

    Hi,
    According to your description, you might want to open Link list items in a new tab/windows.
    If it is not a must behavior to use the “URL” column to hold the hyperlink, I would suggest you use “Hyperlink with formatting and constraints for publishing” column
    instead which can let users decide to open the hyperlink in a new tab or not.
    It is required to activate the “SharePoint Server Publishing Infrastructure” in the “site collection features”, create a column of this type in “Site Settings ->
    Web Designer Galleries -> Site Columns”, then you can add it into your list.
    Here is a link about how to add publishing columns to content types, lists, or libraries, you could use it as a reference:
    https://support.office.com/en-ie/article/Add-publishing-columns-to-content-types-lists-or-libraries-4e268d2e-4822-4bc6-a992-88287119a052#__toc337727282
    Best regards
    Patrick Liang
    TechNet Community Support

  • Display Employee Name linked in Item Master in Order Recommendation Report

    Dear Experts,
          My requirement is that the "Employee Name" linked in Item master have to be displayed next to the item in MRP Order Recommendation Report.
    I have created a header level UDF "Employee Name" in Item master and have selected an employee in this field. I have also created another UDF in Order Recommendation Report as "Internal Buyer" as a column. But the employee linked to the Item is not getting displayed in the Order Recommendation Report.
    FMS query used in "Internal Buyer" is
    SELECT T0.U_Employee FROM OITM T0 where T0.ItemCode=$[oitm.Itemcode]
    Regards,
    G.Shankar Ganesh

    Hi Shankar,
    Could you try with this query
    SELECT T1.[U_Employee ] FROM [dbo].[OITM]  T1 WHERE T1.[ItemCode] =$ ORCM.ItemCode
    Regards,
    Vijay kumar

  • Link Line Items AUAS with ANEP

    Greeting,
    How to link line items of table AUAS with ANEP if there is more than one line for a document number in both tables with different amounts. The scenario is that I am reading lines of table AUAS and need to get the transaction type from table ANEKPV. Using only the document number may return transaction type of the other line item.
    I would highly appreciate your help.
    Regards,
    Mohammed Al-Saad

    Hi All,
    Got the solution.
    The Field POSNR of the table ACCTIT contains the line item number of the FI document and the field URZEILE contains the corresponding line item number of the material document. Hence we can make use of this table to relate the FI doc and mat doc line items.
    Thanks
    Sreeraj

Maybe you are looking for