TreeView apex 5: set the selected node (or remember selection between page views)

The Apex 5, I have a treeview to a page region. The user develops some nodes and click on a value, get the value selected (via Javascript) and use it to display data or navigate to another page.

When the user navigates to the page containing the treeview control, it shows initially under the name collapsed and the selected node previously is not indicated visually.

There is a dynamic Action that can be used to expand the tree (full), but how can I visually indicate the selected node previously? Is there an API for this in the treeview widget, or can it be done through some other Javascript?

-Morten

Hi Pavel,

Sorry for the late reply... with your tip and some digging around, I managed to get this to work, and I wrote this in an article in blog for future reference:

ORA-00001: Unique constraint violated: working with treeview Apex 5

Thanks for your help! :-)

-Morten

Tags: Database

Similar Questions

  • Call a method before the following operation to set the selected values

    Use case: I display a VO as an ADF multiple checkbox select. This VO is the detail of a master/detail. I managed to store the selection state in a bean managed on autoSubmit. Then the user navigate to the record of the master, and then goes back to the previous record. The buttons next and previous were created using operations in data controls. I want to back up the State of the selection by clicking previous or next.

    There are a lot of tutorial on how to get the selected values, but none on how to set the selected values. How would you do it?

    11 GR 1 material JDev

    What I ended up doing:

    1 redefine listener action for the navigation buttons

    {} public void nextQuestion (ActionEvent event)

    saveSelectedState();

    navigateQuestion ("Next");

    restoreSelectedState();

    }

    {} private void navigateQuestion (string operation)

    OperationBinding operationBinding = ADFUtils.findOperation (operation);

    operationBinding.execute ();

    }

    2 Save and restore the selection state using bindings

    Guava Multimap

    Private ListMultimap selectedIndices.

    private void saveSelectedState() {}

    Get id question

    DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");

    Question of rank = questionBinding.getCurrentRow ();

    Number questionId = (Number) question.getAttribute ("Id");

    JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");

    int [] valueIndices = listBinding.getSelectedIndices ();

    selectedIndices.putAll (questionId, Ints.asList (valueIndices));

    }

    private void restoreSelectedState() {}

    Get id question

    DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");

    Question of rank = questionBinding.getCurrentRow ();

    Number questionId = (Number) question.getAttribute ("Id");

    int [] valueIndices = Ints.toArray (selectedIndices.get (questionId));

    JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");

    listBinding.setSelectedIndices (valueIndices);

    }

  • ComboBox - trying to set the selected item

    I call a remote object that calls the following function to the suite. The returned object is used to fill a form of TextInputs and a ComboBox control - this is a form of change. How can I set the selected item in the ComboBox? I could not get the selectedItem to work, and I do not know the value of the index that corresponds to selectedCompany.CompanyType in order to use selectedIndex.

    private void receiveSelectedCompany(event:ResultEvent):void {}
    selectedCompany = event.result as business;

    copy the record in the areas of publishing
    txtCompanyId.text = selectedCompany.CompanyID.toString ();
    cboCompanyTypeEdit.selectedItem.CompanyType = selectedCompany.CompanyType;
    txtCompanyName.text = selectedCompany.CompanyName;
    txtCompanyShortName.text = selectedCompany.CompanyShortName;
    txtTaxId.text = selectedCompany.TaxID;
    }

    Thanks in advance,
    France

    FranceC, here is a function allows you to do.

    simply call the selectComboValue function and pass it the name of the combobox and the search string as follows:

    selectComboValue (Mazonedelistederoulante, dataObj.fieldName.toUpperCase ());

    Here's the function:

    public void selectComboValue(select:_mx.controls.ComboBox,_optionToSelect:String):void {}
    for (var i: int = 0; i< select.dataprovider.length="" ;="" i++)="">
    If (select.dataProvider.getItemAt ( ) .label == optionToSelect) {}
    select.selectedIndex = i;
    break;
    }
    }
    }

    PS: If you are looking for the data rather than on the label simply change this line:
    If (select.dataProvider.getItemAt (
    ) .label ==)
    to do this:
    If (select.dataProvider.getItemAt ( ) .data == )

  • How to set the property node maximum xscale for several scale XY Chart

    Hello

    I use a graph XY with three X axis and three scales of axis Y to draw the three sets of data. This works well.

    What I do now is to set the Xscale.Maximum property node for one of the x-axis (the other two autoscale). If I click right in the (Create Blockdiagram; Node property; X scale; Maximum) I can not choose what x-axis I want to put the Maximum for.

    So my question: how to select a specific axis allows you to set the XScale.Maximum property node when having several axes?

    Thank you for your help, any suggestions are appreciated!

    Hello

    After some more research and experimentation, I found that using the scale property X Active I can determine/set for which the XScale.Maximum Xscale is used.

    This solved my problem.

    I hope someone else can save themselves a few hours with this thread!

    Thank you

  • setting the selection list values in the tabular presentation

    Hi all

    I have a form of a table with a column that contains lists of selection I need to set the values for all rows in the form of tables.
    I'm trying to set the values on the click of a button, but apparently not enough to work.

    Is there another way to do it, perhaps with javascript?

    Any help would be appreciated.

    Kind regards
    Cleo

    Cleo,

    He's working now, sorry I missed the fundamental thing that you try on a selection list and not entry, as says my above entry script...

    Just use this code

    $('select[name="f10"]').val('Y');
    
    //OR this if you need to loop through them
    
    function approveAll(){
       jQuery.each($('select[name="f10"]'), function(i) {
        this.value ='Y';
      });
    }
    

    It was me!

    Published by: VC on July 13, 2012 15:57

  • Failed to set the selected index of a ToggleButtonBar to "0".

    Hello:

    I have a problem with ToggleButtonBar.

    I put my toggleButtonBar with a viewStack with list of the VBoxes containing formItems. When the page loads for the firsttime, all right. The first button in the toggleButtonBar is selected with the correct formItem in the viewstack. I fill out the forms on each article and click on the submit button. It will take me to the homepage again. Next time when I click on a button to take me to the toggleButtonBar, the last selected button is selected with the form associated with that. I need to reset the togglebuttonBar to the first selection. I tried to set the selectedIndex property of toggleButtonBar and the viewStack to '0', but doesnot work.

    Someone at - it immediate help would be highly appreciated.

    Happy to help you. Maybe my post being the answer does not appear yet, but if you forgot to mark my poist as the answer, that would be appreciated.

  • How to set the doctype node using dbms_xmldom?

    Hi all

    IM using oracle 10g. I generated an xml file using dbms_xmldom.

    I need set the version xml and doctype to my xml file.

    XML version I've defined using dbms_xmldom.writeTofile.

    But not able to set the doctype... tried with dbms_xmldom.makedocumenttype... But no result...

    How to set the doctype using dbms_xmldom?

    Concerning
    Sankar MN

    Published by: SankaraNarayanan.M.N on October 17, 2011 05:40

    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_xmldom.htm#i1121082

  • Authentication only the selected app pages

    Hello

    I have a request that I have about 20-25 pages, all are mainly reports.
    In this request that page is there for any changes to the data.

    I want other pages to be PUBLIC, but when the end user go to edit this page, I want to check for authentication.

    So basically I want authentication for this single page only, not to any other page.

    Please suggest me how I can do this.

    Kind regards
    Smith

    Hello

    Go change the definition of the page and change the authentication "Page is Public" for public pages

    BR, Jari

    Published by: jarola on November 18, 2009 12:08

  • Select which type of list APEX 4 replaces the selection with redirection list in APEX3.1

    I have 3 selection lists. The first select list is filled with elements by default, independent of the other element values. The second list depends on the value chosen in the list of the first and the third list depends on the values selected in the list of the first and second.

    APEX 3.1 I did the first and the second list "Select list with redirection", because I don't want the page to be submitted, but I want only the values to set. This solution works very well.

    Now, I want to apply this solution in an APEX 4.0 page. The elements are all defined in a select list. I tried different settings-> Page Action options when the changed value. Redirecting to the page and URL redirection are not an option in this case.
    Submit the page and redirect and SetValue both entail the same problems: after choosing a value in Selectlist1 the other elements are reset, but selectlist2 is populated with the items I want. All elements of the page are reset after choosing a value in Selectlist2 and Selectlist2 (and selectlist3) are still empty.

    So my question is: what is the best option to choose when I want to fill the lists that depends on the other? Are there other solutions to use, and then select list with redirection and SetValue?

    Hello

    For dependent Select lists 4 APEX, LOV cascading is the way to go.

    On the second list, select under "List of values" define "Cascading LOV Parent éléments" =
    On the third first + second or third, only value according to your particular situation.

    And when the value modified the Page Action = None.

    Concerning

  • Find the select privileges on views and a package

    Hi all

    I'm looking for a display of queries / who can I ask to search for users who have obtained access to the views.

    I have a few 100 views, and I want to know the users who have access to each notice.

    Interviewed several of the views predefied but I'm unable to find the information.


    Also, I need to find users who grants at the sight of packages.which to interview?

    Operating system: SOlaris SPARC
    Oracle Version: 11.1.0.7


    Please suggest


    Thanks and greetings
    KK

    Published by: Kk Sep 12, 2011 02:56

    >
    Also, can you help me with a query for packages?
    >

    You can pass the name of the PACKAGE, but also a parameter to the table TABLE_NAME

    SELECT "GRANT" | privilege | "on" | table_name | « à » || dealer of dba_tab_privs where table_name in
    (select object_name from dba_objects where owner = 'OWNER' and object_type = 'PACKAGE');

  • How to set the new tab to open my home page?

    If I press on a new tab, it opens a selection of windows of recently viewed things, while I want to repeated just as my search page.

    Go to Subject: config get browser.newtab.url change in its value to a link you want or on: House(default homepage)

  • Setting the 'Email' button to send only specific pages in a PDF file

    Hey everyone, could not find this question at the Board of Directors, so thought I would give it a shot.

    I have a PDF I do w / a cover page, what I want to know is if I put 'email PDF' button specially send the PDF without the included cover page (so the cover page is page 1 in a 5-page document, the pdf sent by email would only include pages 2-5).

    Not sure if this is possible, but I thought that I would like to tender hand to experts - thanks in advance!

    rty.jpg

    Is not possible.

  • Request OA region shows the previous search results when moving between pages

    Hi all

    I have a custom Page of OA, which is a query based on a LOV region to search for names of devices. The problem I am facing is once the device name is searched and I'm going to another page through quick links and back on the same page Search Device, it shows the previous search results. I am does not keep AM for all navigation page.

    I already tried things:
    4 K I tried refreshing VO using clearcache and reset methods on the VO.
    2 get, click on the OK button of the query in ProcessFormRequest region and the Go button I use forwardImmediatelyToCurrentPage. And in the process request method that I question the results manually when will click on a button. Otherwise I do it manually where clause condition 1 = 2 and ensure that the VO returns no rows.

    But still, I am not able to get rid of the issue.

    The used code is pasted below for your reference. It is urgent. Can you please provide pointers.


    ' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processRequest (pageContext, webBean);
    Try
    {
    Am = (VpaAdminAMImpl) pageContext.getApplicationModule (webBean) VpaAdminAMImpl;
    TkvpaDeviceSearchVOImpl deviceAll = am.getTkvpaDeviceSearchVO1 ();

    deviceAll.clearCache ();
    deviceAll.reset ();
    deviceAll.setWhereClause ("1 = 2");
    deviceAll.setWhereClauseParams (null);
    String query = deviceAll.getQuery ();
    System.out.println ("request getSearchResult: =" + query);
    deviceAll.executeQuery ();

    OAQueryBean queryBean = (OAQueryBean) webBean.findChildRecursive ("region1");
    String goAction = queryBean.getGoButtonName ();
    If (PageContext.GetParameter (goAction)! = null)
    {
    getSearchResult (pageContext, am, webBean);
    }
    }
    catch (Exception ex)
    {
    throwException ("SearchDeviceCO.processRequest", ex);
    }
    }


    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processFormRequest (pageContext, webBean);
    Action string = pageContext.getParameter (EVENT_PARAM);
    OAQueryBean queryBean = (OAQueryBean) webBean.findChildRecursive ("region1");
    String Go = queryBean.getGoButtonName ();
    System.out.println (PageContext.GetParameter (Go));

    If (PageContext.GetParameter (GB)! = null)
    {
    pageContext.forwardImmediatelyToCurrentPage (null, false, "N");
    }
    }

    Public Sub (VpaAdminAMImpl am, pageContext, OAWebBean webBean OAPageContext) getSearchResult
    {
    Try
    {
    String device = pageContext.getParameter ("deviceSearch");

    StringBuffer sb = new StringBuffer();
    If (device! = null & & device! = "")
    {
    SB. Append ("nom_peripherique =" "");
    SB. Append (Device);
    SB. Append("'");
    }

    String sql = sb.toString ();
    TkvpaDeviceSearchVOImpl deviceAll = am.getTkvpaDeviceSearchVO1 ();
    deviceAll.setWhereClause (sql);
    deviceAll.setWhereClauseParams (null);
    String query = deviceAll.getQuery ();
    System.out.println ("request getSearchResult: =" + query);
    deviceAll.executeQuery ();
    } catch (System.Exception e)
    {
    e.printStackTrace ();
    }
    }


    Thanks in advance,
    Abhishek Mishra

    Hi Abhishek,

    Please try the code below in your controller ProcessRequest
    This will clear the previous search from the cache.
    Example of
    OAQueryBean queryBean = (OAQueryBean) webBean.findChildRecursive ("QueryRegionName");
    queryBean.clearSearchPersistenceCache (pageContext);

    Hope that helps :-)

    Kind regards
    Chaouki

  • Selector - return and displaying the selected value

    Hello all, I have problem with selector which is connected to the simple XML through XMLDataModule.

    Definition:

    {} Selector
    ID: piCountry
    Title: qsTr("Country:") + Retranslate.onLanguageChanged
    dataModel: {XmlDataModel}
    Source: "states.xml".
    }
    pickerItemComponents:]
    {PickerItemComponent}
    type: "ListItem".
    content: {container
    {Label
    text: pickerItemData.title
    }
    }
    }
    ]
    onSelectedValueChanged: {}
    var piCountry.dataModel.data = selectedItem ([0, selectedIndex (0)]);
    Console.log("Selected>"+SelectedItem.Text)
    }
                           
    }

    STATES. Model XML:


       
       
       
       
       
       
       
       
       

    ...

    1. I can't achieve good get selected value based on the index selected. After Exchange of selected value, the error message appears:

    ERROR: UIObjectPrivate::notifyMessage: unable to set the focusIsDelegatedToColumn property
    ERROR: UIObjectPrivate::notifyMessage: unable to set the focusedColumn property
    some > undefined

    2. is it possible to display the value selected in the selector bar (after choosing and collapsing)?

    Thanks for any idea, I have been addressed in the morning but no reasonable results so far.

    Thank you.

    Karel

    Looks like you're missing the good at the end, add a ".title' in there like this:

    var selectedItem = piCountry.dataModel.data([ 0, selectedIndex(0) ]).title;
    

    Here is an example of a complete code of a similar selector to select a State, and also has a method to set the value of an external call and a method to change the title, once the switch has been reduced (must cover your 2nd question).

    /* Copyright (c) 2014 BlackBerry Ltd.
     *
     * Licensed under the Apache License, Version 2.0 (the "License");
     * you may not use this file except in compliance with the License.
     * You may obtain a copy of the License at
     *
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing, software
     * distributed under the License is distributed on an "AS IS" BASIS,
     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     *
     *  Created on: May 5, 2014
     *  Author: Mark Sohm
     */
    
    import bb.cascades 1.2
    
    Picker {
        property string stateValue: ""
        id: siteStatePicker
        title: "State"
        kind: PickerKind.Expandable
        dataModel: XmlDataModel {
            id: stateModel
            source: "../xml/US_States.xml"
        }
        pickerItemComponents: [
            PickerItemComponent {
                type: "state"
                content:
                Label {
                    id: stateLabel
                    text: pickerItemData.name
                }
            }
        ]
        onSelectedValueChanged: {
            siteStatePicker.stateValue = dataModel.data([0, selectedIndex(0)]).name;
        }
    
        onExpandedChanged: {
            if (!expanded)
            {
                siteStatePicker.title = siteStatePicker.stateValue;
            }
        }
    
        //Used to set the selected state.
        function setState(state)
        {
            for (var count = 0; count <= 49; count++)
            {
                if (state === stateModel.data([0, count]).name)
                {
                    siteStatePicker.select(0, count, ScrollAnimation.None);
                    siteStatePicker.stateValue = stateModel.data([0, count]).name;
                    siteStatePicker.title = siteStatePicker.stateValue;
                }
            }
        }
    }
    

    It's xml data.

    
        
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        
    
    
  • Unable to set the image of the gallery as a backdrop

    Hi all

    I was able to open the Gallery to choose the picture, but was not able to set the selected as a background image.

    Whenever I pick a picture, the default image will set to white.

    Here is my code, can anyone know where goes wrong?

    Thanks in advance.

    Container {
    
                background: recipeBackground.imagePaint
    
                attachedObjects: [
                    ImagePaintDefinition {
                        id: recipeBackground
                        imageSource: "asset:///images/bg.jpg"
                        repeatPattern: RepeatPattern.XY
                    }
                ]
                Container {
                    layout: DockLayout {
    
                    }
                    opacity: 1.0
                    visible: true
                    horizontalAlignment: HorizontalAlignment.Center
                    background: Color.Transparent
                    leftPadding: 0.0
                    ImageView {
                        imageSource: "asset:///images/header.jpg"
                        preferredHeight: 150.0
                        opacity: 0.9
    
                    }
                    Container {
                        verticalAlignment: VerticalAlignment.Center
                        horizontalAlignment: HorizontalAlignment.Fill
    
                        layout: StackLayout {
                            orientation: LayoutOrientation.LeftToRight
    
                        }
                        leftPadding: 200.0
                        Label {
                            text: "Testing"
                            preferredHeight: 100.0
                            verticalAlignment: VerticalAlignment.Center
                            horizontalAlignment: HorizontalAlignment.Center
                            textStyle {
                                base: SystemDefaults.TextStyles.MediumText
                                color: Color.White
                            }
                        }
                        ImageButton {
                            verticalAlignment: VerticalAlignment.Top
                            horizontalAlignment: HorizontalAlignment.Left
                            leftMargin: 150.0
                            defaultImageSource: "asset:///images/Settings.png"
    
                            onClicked:{
                                picker.open()
    
                            }
    
                        }
    
                        attachedObjects: [
                            FilePicker {
                                id: picker
                                property string selectedFile
                                title: qsTr("File Picker")
                                mode: FilePickerMode.Picker
                                type: FileType.Picture
                                viewMode: FilePickerViewMode.GridView
                                onFileSelected: {
                                    selectedFile = selectedFiles[0]
                                    recipeBackground.imageSource = selectedFiles[0]
                                }
                            }
                        ]
    
                    }
                }
    

    Well it just add the permission to access_shared bar - descriptor.xml and it works!

Maybe you are looking for

  • How can I resize (shrink) the address bar?

    Hello Please see this screenshot of my navigation bar: http://i.imgur.com/SfD5rKP.png I should have plenty of room for the buttons, but one is cut and separated in a submenu. I don't even think that logic given that one button is replaced by the menu

  • Power led red after that Satellite L755 was closed

    Hello. After I Shutdown Windows and the laptop is power off red power led is displayed.It is not blinking. What does that mean? + The message was edited: model number added to the topic.

  • My macbook shows 119 GB of total space instead of the designed 120 GB

    I erased my macbook SSD to install el captain and since then, the total space available about this mac > storage shows 119.45 instead of 120.77 as before. No idea how to solve this problem?

  • How to get free games that came with windows vista

    most of the games moved to saved games wants to recover the original program of games accompanying to conputer

  • Patching Server WCS

    Hi all I have a v4.2.62.11 WCS servers. This is a Windows server 2003 R2 standard edition service pack 2. I'm currently vulnerabilities of Microsoft patches patch on it. It's going to impact WCS? Someone met with installation of patches from Microsof