Save last selected and state for Tree Component?

I have a Tree component that refreshes its data everytime I
open the Tab containing it (doing a SQL call to return an index of
models). The problem is that everytime the dataProvider changes (a
new one overwrites the old one) with databinding, even if the data
is exactly the same, it loses its old state and selected node. Is
there any way to save this state/selected node when the
dataProvider updates?

good article on all aspects of trees including your issue.
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/

Similar Messages

  • One pricing condition for BOM and other for individual component

    Hello SAP gurus,
    We have two pricing condition types created and assigned in the pricing procedure which has been created with reference to PR00 and condition records are maintained for both the condition types.
    But, we want only one pricing condition type to be triggered in the sales order depending on the usage of material in the sales order. As we are selling the same material individually and as well as a component in a bundle ( BOM).
    i.e, when one pricing condition for BOM component and other for individual component
    What are the configuration steps to be taken care to get this scenario?
    Thanks in advance.
    Regards,
    KB
    Edited by: K.byla on Jan 21, 2010 1:20 PM

    Hi Sagar,
    Thanks for your response.
    Yes, we are maintaining only one material. The same material is used to sell individually and also in a BOM.
    As i have mentioned earlier, whenever the material is sold individually it should pick condition type say 'YR00' and when the same material is sold as a bundle ( BOM) , it should pick condition type " YR01" in same the pricing procedure.
    For both the condition types, the condition records are maintained.
    To give the scenario details,
    A material "X" is sold individually as a single component and the same material is also used for selling bundled with other material "Y" and the bundled material as "Z"
    means, Z=X+Y
    Pricing procedure used is say ZRA000 which contains currently the price cond type YR00.
    Now for the bundle (BOM) involvement i want to use the same pricing pricing proc. and add the new cond YR01 in it so that the system will pick the cond.type YR00 when the material is sold individually and YR01 is taken as the price when the material is sold as a bundle against the item X.
    Need to know the steps for this scenario and do i need to maintain a specific requirement ? please suggest.
    BR,
    KB

  • I want to save a username and Password for an app on my i phone

    How can I save my username and password for an app on my  i phone so as I dont have to type it in everytime I want to open my app

    This has to be an option in the app.
    You cannot set it elsewhere.

  • Garbage Collection Issue for Tree Component

    Dear:
    When I created a new Tree instance dynamically by following code, and clicked any tree node randomly and then I removed it via another button, but I found this instance couldn’t be removed by GC, if I just created this tree without mouse action, it can be removed by GC.
    Tree Component:
    -- TreeView
    <mx:canvas>
    <mx:Tree dataProvider="{data}"  />   // data is a XML staments
    </mx:canvas>
    Create Tree:
               public function createView(event:Event):void{
                  var view:TreeView = new TreeView ();
                  view.name="myTree";
                  addChild(view);
                  view=null;
    Remove Tree:
               public function deleteView(event:Event):void{
                  var view:TreeView= TreeView( _con.getChildByName("myTree"));
                  removeChild(view);
    Could someone give me some suggestion?
    Thanks a lot

    Hi ajmcfarlane,
    This is my first post here. I'm fairly new to AS3 still and
    have been getting my education from a number of places. The best
    education i have found is from the book located at
    http://www.learningactionscript3.com/
    Rich Shupe address this problem of removing the child from
    memory. I Downloaded your file and found 2 problems and resolved
    one of them. By now you might have already solved this anyway.
    To remove the child from the Display List use -->
    removeChild(myChildObject);
    To remove the object from memory use --> myChildObject =
    null;
    You did these two steps but in the incorrect order, just by
    moving the 'myChildObject = null' under the removeChild code makes
    it work.
    I found running a few trace statements after fixing the first
    problem, i found the second problem. The error of trying to remove
    a child when it is no longer there.
    You just need to rework the design so that the order of
    events fires as you want. Below is the traces i used and the output
    that is received.
    function Click1(e:MouseEvent){
    trace("four ", loadedcontent);
    modLoader.unload();
    modLoader = null;
    function unloadCompleteHandler(event:Event):void{
    trace("one ", loadedcontent);
    removeChild(loadedcontent);
    trace("two ", loadedcontent);
    loadedcontent = null;
    trace("three ", loadedcontent);
    output
    Loaded mem: 20668 KB
    four [object MainTimeline]
    one [object MainTimeline]
    two [object MainTimeline]
    three null
    unLoaded mem: 23352 KB
    So you can see the click event is firing of the unload first,
    when i think you want that last.
    I hope this has been of some help :)

  • Horizontal scroll for Tree component scrolls too far right

    I've enabled the horizontal scroll bar for the Tree component.
    But the scroll bar allows the user to scroll very far to the right into blank space.
    The maximum width of my components measures 124px, as calculated by measureWidthOfItems(0,0), and I've verified this by measuring pixels of a screen shot.
    I have tried adding an event to set the Tree.maxHorizontalScrollPosition, and I traced the value that I'm setting it to, and I also traced the value that it actually assumed after I set it. Both are 124px.
    So I can't understand the behavior. I can scroll something more like ~400px to the right with lots of blank space.
    Any ideas why?
    Thanks,
    David

    Hmm, I'm not sure why this works, but it works, so for completeness here's what I did (in case anyone else runs across this same thread):
    var measWidth:Number = myTree.measureWidthOfItems(0,0);
    filesTree.maxHorizontalScrollPosition = measWidth - myTree.width;
    I call the above code whenever the window is resized (in my app there are 2 places that can cause a resize of the window, I manually added calls to a function with the above code). There is also an example out there that resizes any time the window is resized, but if you do this then you really can't have liveDragging=true in a DividedBox (which I have) because the cost of resizing is very high and overtaxes the cpu when called many times consecutively. I just call it when the dragging is finished (that way I have live dragging enabled, but it only updates the scroll bars when the user stops dragging, which is visually acceptable).

  • 2 Line Text for Tree Component

    Hi
    I am trying to use a tree component for a Course navigation ,
    and I have a Node names Getting clipped and I wanted to have
    mulitple lines in the tree node, I would appreciate if anyone could
    help me in how the tree component can be extended to accomodate
    this requirement.
    Thanks
    Sembian

    Hi Begum,
    There are few default attributes you need to fill in your data structure,
    PARENT_KEY - Parent (in your ex : header1, header2)
    ROW_KEY -  Children (col1, col2, col3, col4...)
    EXPANDED
    IS_LEAF -
    TEXT
    CHILDREN_LOADED
    IMAGE_SRC
    Include these fields with same name in your structure(structure of the table filling CT_DATA in GET_DATA method)  and fill the relevant data, output will be displayed.
    Cheers,
    Vemula.

  • Selecting (and resizing, for example) a layer under the top layer via the Program Monitor

    Hello all.
    Using CS5
    I am in the timeline and have selected layer 1 which is a video layer
    Layer 2 is a title layer.
    I want to manually resize layer 1, via the Program Monitor.
    But when I go to the Program Monitor and select it Layer 2 (the title layer) becomes selected, preventing me from selecting and manually resizing/repositioning Layer 1.
    The above example is a simplified version of what I usually find myself doing.  Usually I have many layers above a layer that I want to resize or reposition (or do something else) but when I try to resize or repositon via the program monitor I am only able to manipulate the top layer.
    Any suggestions, other than locking every layer other than what I want to resize etc .?
    Thanks
    Rowby

    Hi Bill,
    No they are separate orginal tracks. 
    Is there a way to "select" a layer below the top layer via the Progam Monitor -- and perform modifications on that lower level -- such a manually resizing on the Program Monitor.  I find if I want to do it via the Program  Monitor I have to temporarily lock the top layer.
    And if I have lots of layers above the layer I want to manually resize, I have to lock all of the layers above that layer so I don't start moving around (for example a title layer which might be the top layer of the sequence) in order to manually resize via the Program Monitor.
    I know (for example) in the case of scaling or repositioning a layer I could do it via the effects control panel, but I often want to do it via the Program Monitor.
    Rowby

  • Code for Tree component(tomahawk )

    I am new to JSF,I want a tree component in my page and i want to construct the tree by retriving data from database.I searched most of materials but could'nt find any good one.

    How would it match the trees? What have you done so far?
    /Kaj

  • SPSS and Stata for MAC

    I am thinking of buying a MAC and it will be my first time using a MAC. Its important for me to know if statistical software like SPSS and Stata can be used on a MAC and can they be installed from the CDs normally or is there something else I need to do. Also would all my Mircosoft office files open in a MAC.
    Thank you.

    I am actually waiting for my SPSS 16 Mac to arrive to test that very thing.
    This is what I have heard.
    1) SPSS 16 will work on Leopard, albeit a little sluggish. However a full testing has not been completed.
    2) SPSS 16.01 which will be FULLY compatible with Leopard will be released in Dec.

  • I purchased Adobe Acrobat X Pro two days ago and cannot receive my serial number; your form will not allow me to select my State for address-I have spent four hours of frustration

    Acrobat X Pro has a flawed serial number application form at the point where it asks for your State, the first time. I will not allow me
    to complete the form and receive my Serial Number.@

    I purchased it from my University bookstore and the attending clerk was no better informed than was I.
    The form is required to be infilled in order to receive the serial number necessary for installation of the software
    After five hours of trying, I was able to overcome the flaw in the form, as it appeared on the Acrobat website, and
    complete the two pull-down menus indicating the State in which I live.
    I called Adobe Customer Care for assistance and had to wait two hours for a return call, and by the time the
    call came though I had found that the website form allowed me to pull-down for the State of location.
    Adobe is an uncaring vendor, once it has your money in hand.

  • How to calculate the last selected item in a tree node where we can customize the list to the node.

    Hi,
    I'm new to the Flex field. I got a task where i have a tree (TREE is the id) with X and Y as nodes. In X i have got a list of pages(dataprovider is array collection) added dynamically(means User can configure the pages).On selecting last item(last page) in the list of X node, the  view will be presented with a component say Xlast on the right side which is in view stack. In that component , there is button called NEXT which has to be greyed out for the last page. I tried by calling the below code on viewChange event
    if(viewstack.selectedchild == XlastpageId)
    Nextbtn.enabled = false;
    but this will work only when we know XlastpageId is the lastpage for the tree. but how to implement this when we dont know which is the last page of the X node in a Tree.
    I also tried by calculating the children of the tree on tree click event which is
    if (Tree.selectedItem == TREE.numChildren - 1)
    Nextbtn.enabled = false;
    i know this is wrong because we have 2 children for the tree( X and Y) so it is showing 2-1 and the button is greyed out for the first click.
    Please help me out.
    Thanks in Advance,
    Sw

    Hi,
    According to your post, my understanding is that you want to monitor the last login user’s details.
    There is no out of the box way to achieve it in SharePoint.
    We can use cookie to be a flag for checking whether there is an user just log in. After the page loaded, if the cookie is null, it suggests that there is an user just log in our site, then we
    can get this user’s information using JavaScript Object Model and add the information into a custom list. With this list, we can monitor user’s login details.
    Refer to the following link:
    https://social.technet.microsoft.com/Forums/en-US/0cd4d531-cb61-4d90-aa70-413267f4a735/how-to-know-login-and-logout-details-of-a-user-in-sharepoint-online-2013?forum=sharepointdevelopment
    Besides, here are two similar posts for your reference:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/1a35283e-0f2a-49b8-b330-801a3cfcd890/programatically-get-all-current-logged-in-users-list-for-a-sharepoint-site?forum=sharepointdevelopmentprevious
    https://social.technet.microsoft.com/Forums/en-US/10953be3-cb1c-40c7-9454-545c8338b551/how-to-know-login-users-count-and-their-details-in-sharepoint-2010-web-application?forum=sharepointgeneralprevious
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • Data Binding for Tree Component

    Hi ,
    I have to make a tree structure and bind it to a column in a table,
    which when expanded should list the rows of the table for the selected column as individual sub nodes of the tree.
    So far I am not able to get that done.
    Any suggestions how to do it?

    If find what I need among ADF Faces Core component, ... the ADF TreeTable (http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/core/imageIndex.html).
    Unfortunetly It seems quite dificult to integrate ADF or any other 3rd part component with JSC2.

  • Save filter selection and apply after log out and log in of the user

    Hi, I have a requirement where the user wants to see the last filter that was set on the page prompt even if he logs out.

    ragewater wrote:
    Saved Filter Selection in the Dashboard for the users. They can save and apply the filter in the dashboard or page prompts. But other than Saved Filter Selection, is there another way?As i understand which you want do,this is not related with oracle database.So if you have any problem with related database then post there and explain little more.

  • Drag and Drop for Tree in a Table

    I have placed a tree in a table using the example provided in an article "Creating TreeTables in Swing" in java.sun.com. But , instead of using the FileSystem data with which the example was explained , i have passed my own data...Then i created a panel wherein i placed two of these tables with buttons in between.
    The buttons are meant for data transfer....The problem is if i implement Drag and Drop support for the TreeTable the Tree embedded in the Table doesn't expand and collapsing properly....
    Can there be any reason that if a tree is placed in a Jtable and the drag and drop is enabled using setDragEnabled(true) will it effect the normal behaviour

    You can implement DropTargetListener, DragSourceListener, DragGestureListener like the following:
    public class MyTree extends JTree
                implements DropTargetListener, DragSourceListener, DragGestureListener {
        public void dragEnter (DropTargetDragEvent event) {
            event.acceptDrag (DnDConstants.ACTION_MOVE);
        public void dragExit (DropTargetEvent event) {
            //System.out.println( "dragExit");
        public void dragOver (DropTargetDragEvent event) {
        public void drop (DropTargetDropEvent event) {
            // place your code for action after drop
        public void dropActionChanged ( DropTargetDragEvent event ) {
        public void dragGestureRecognized( DragGestureEvent event) {
        public void dragDropEnd (DragSourceDropEvent event) {  
        public void dragEnter (DragSourceDragEvent event) {
            //System.out.println( " dragEnter");
        public void dragExit (DragSourceEvent event) {
            //System.out.println( "dragExit");
        public void dragOver (DragSourceDragEvent event) {
            //System.out.println( "dragExit");
        public void dropActionChanged ( DragSourceDragEvent event) {
            //System.out.println( "dropActionChanged");
    }Hope this can help.

  • CFDebug says, "widget: Firing selection change event for tree id: t1"

    How do I capture this event and code against it.  Previously used this code to trap click event:
    YAHOO.example.onTreeViewAvailble = function() {
      var curTree=ColdFusion.Tree.getTreeObject('t1');
      curTree.subscribe("labelClick", function(node) {  
       TreeItemClick(1,node.data.id)
      When the tree becomes available (ie. after the page loads),
      this code will run the code above this.
      "t1"- tree name in the cftree tag
    YAHOO.util.Event.onAvailable("t1", YAHOO.example.onTreeViewAvailble); 
    I am obviously not an expert with the Yahoo widgets, but I'm learning.
    This stopped working for some reason.  However the CFDebug consistently shows the subject event happening on every mouse click.  I'd rather just use that.  Any ideas?

    Roy, have you tried to reduce the complexity of your user case?
    Try your use case with a simple page without a region in it first and see if you get the eating them. If yes add a region to your page and verify you get the result you expect. Only then add the portal stuff.
    This will help to narrow down the error.
    Timo

Maybe you are looking for

  • Report to Report

    Hi, I have a report in which I have inserted 3 more reports using report to report interface.I have the following doubts. When I run the first report and select GOTO option it shows me all the remaining 3 reports. If I execute the second one, after t

  • How to Use Office 365 api in Provider Hosted App

    Hi, I want to use outlook api in SharePoint Provider Hosted App. when I use :-  $.ajax({             url: 'https://outlook.office365.com/api/v1.0/me/contacts',             type: 'GET',             beforeSend: function (xhr) {                 xhr.setR

  • Cannot change frame resolution

    I am unable to render out a different frame size than the original media. The original media is ProRes HQ 1920x1080, but I need to render an NTSC version of the final colored project. All project settings are set correctly and appropriate changes in

  • After replace a new WD 7200rpm 750GB harddisk, there are "click" noise

    after replace a new WD harddisk WD7500BPKT in my Macbook Pro 990, I always heard the "Click, Click" noise. Can anyone advise me how to avoid this noise? thanks!

  • Dashed line between pages

    Is it possible to avoid the dashed line between pages when "Show Gaps Between Pages" is unchecked? In other words is it possible to have the 2 pages join seamlessly, no gaps, no dashed lines? Thanx, Guido