APEX new documentation of tree - get selected value

Hello

I played for a while with the new tree APEX and also the sample application that I have not found anything at all on this subject. Unfortunately after a few painful hours, I'm not even able to get is of value (at least, I guess it should be possible somehow to get the value of a selected node). The only documentation that I could find was this:

SQL query

Enter the SQL source for this component.

Examples

 select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status, level, ename as title, 'icon-tree-folder' as icon, empno as value, ename as tooltip, null  as link from emp start with mgr is null connect by prior empno = mgr order siblings by ename 

More information

  • Type: SQL statement
  • Supported Bind Variables: Application, Page and System Variables
  • The minimum column: 7
  • The maximum column: 7

So please, any ideas how to get the value of a selected node would be highly appreciated. There is already a similar question here APEX 5.0 tree , but the proposed solution redirects to the same page and sets the item via the link values. I don't want to redirect anywhere, do anything, I just want to read the value of a selected node.

Thank you very much

Pavel

I simplified my previous solution and she calls a underlying $s directly from select function, is not necessary to create a JS function in a header.

So all we need to do are:

(1) create an element on the page P1_SELECTED_EMP

(2) create a region of the tree and as a source of the region use the following select

select case when connect_by_isleaf = 1 then 0
            when level = 1            then 1
            else                          -1
      end as status,
      level,
      "ENAME" as title,
      'fa-folder' as icon,
      empno as value,
      empno as tooltip,
      'javascript:$s(''P1_SELECTED_EMP'', '''||EMPNO||''')' as link
from "#OWNER#"."EMP"
start with "MGR" is null
connect by prior "EMPNO" = "MGR"
order siblings by "ENAME"

Tags: Database

Similar Questions

  • Search select one option to get selected value no description

    Hello

    I have a link called 'responsible' (source of data is the list by model).

    The original version has the description and code of two attributes.

    And I select only one option in jsff to represent above.

    In value, replace listner I am discovering current selected information using code below
    ADFUtils.evaluateEL("#{bindings.responsible.items['" + (Integer)valueChangeEvent.getNewValue() + "'].label}");
    But it always gives me the description.

    If I try
    ADFUtils.evaluateEL("#{bindings.responsible.items['" + (Integer)valueChangeEvent.getNewValue() + "'].value}");
    seems that it gives a certain number

    I'm amazing hos to get the code?

    Help needed please

    Try this

        public void StatusChangedListener(ValueChangeEvent valueChangeEvent)
        {
            BindingContext lBindingContext = BindingContext.getCurrent();
            BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
            JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("responsible");
            int newindex = (Integer) valueChangeEvent.getNewValue();
            Object row = list.getDisplayData(); // make sure the data is present
            Row lFromList = (Row)list.getValueFromList(newindex);
            Object lAttribute = lFromList.getAttribute("code");
            String newVal = (String) lAttribute;
            //.....
         }
    

    Timo

  • 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.

    
        
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
        
    
    
  • Java Swing-how do I get the value of a JTable to display dynamically in a JPanel

    I need the sum of the values from the values entered in the JTable to be included in the text of the partition field in the adjoining JPanel.
    Also posted here - http://www.coderanch.com/t/512189/GUI/java/value-JTable-show-up-dynamically.
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    
    import java.awt.*;
    import java.util.*;
    import java.awt.color.*;
    import java.awt.event.*;
    
    public class TableandPanel extends JFrame
    {
         public static void main(String[] args)
         {
              JFrame frame = new JFrame("Table and Panel");
                                           frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                                           frame.setSize(100, 300);
            
                                            frame.setVisible(true);
                  String colHdrA = "Some Values";                    
                  TableofSums tableofSums = new TableofSums(10, colHdrA);
                  int sumValue = tableofSums.getSumValues();
                  String sumValueS = String.valueOf(sumValue);
                  SumValuesPanel newPanel = new SumValuesPanel( "Score", sumValueS, "Rank");
                  JPanel thePanel = new JPanel();
                  thePanel.add(new JScrollPane(tableofSums));
                  thePanel.add(newPanel);
                  frame.add(thePanel);
                  frame.pack();
              frame.setVisible(true);
         }
    }
    
    //---------table class starts here---------------------------
    
    public class TableofSums extends JPanel implements TableModelListener
    {
        public static void main(String[] args)
         {          
             SwingUtilities.invokeLater(new Runnable() 
                {
                    public void run() 
                      {               
             JFrame frame = new JFrame("Table");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             frame.setSize(208, 230);
             //frame.add(new JScrollPane(table));
                frame.setVisible(true);
                String colHdrA = "Some Values";                    
                TableofSums tableofSums = new TableofSums(10, colHdrA);
                 frame.setContentPane(tableofSums);
                  //frame.add(new JScrollPane(timerepTable));
               frame.pack();
               frame.setVisible(true);
                       
                   }
                });
         }
         
         private int noOfRows = 0;
         private JTable table;
         private String colName = null;
         private int sumValues = 0;
         
         public TableofSums(int noOfRows, String colName)
         {
              this.noOfRows = noOfRows;
              this.colName = colName;
              makeTable();          
         }
         
         private void makeTable()
         {
              Object columns[] = new Object[] {"<html><center>" + this.colName + "</center></html>"};
              
             Object[][] data = new Object[noOfRows][1];
             
             for (int i = 0; i<noOfRows; i++)
                {                
                    data[0] = new Integer(0);          
         }
         DefaultTableModel model = new DefaultTableModel(data, columns);
         model.addTableModelListener(this);
         table = new JTable(model)
         {
         @Override
         public boolean isCellEditable(int row, int column)
         {
         switch (column)
         {
              case 0: return true;
         }
         return false;
         }
         
         @Override
         public Class<?> getColumnClass(int columnIndex)
         {
         switch (columnIndex)
         {
         case 0: return Integer.class;
         }
         return null;
         }
         };
         table.setRowHeight(25);
         table.setDefaultRenderer(Integer.class, new SomeCellRenderer());
         this.add(new JScrollPane(table));
         }

    ///--------------------------------tablemodellistener---------------------------------
    //gets the values entered in the table and calculates the sum
    //-------------------------------------------------------------------------------------------
         public void tableChanged(TableModelEvent e)
    {
         System.out.println(e.getSource());
         if(e.getType() == TableModelEvent.UPDATE)
         {
              int row = e.getFirstRow();
              int column = e.getColumn();
              TableModel model = table.getModel();
              sumValues = 0;
              for (int i=0; i<noOfRows; i++)
              {
                   int intValue = (Integer)model.getValueAt(i, column);
                   sumValues += intValue;
              }
              System.out.println ("row modified: " + row + " sumValues: " + sumValues);
         }
         
    }
    //--------------------------------------cell renderer------------------------------------------------------
         
         public class SomeCellRenderer extends JLabel implements TableCellRenderer
         {
              
         public SomeCellRenderer()
         {
              setOpaque(true);      
         }

         public Component getTableCellRendererComponent(JTable table, Object
                   value, boolean isSelected, boolean hasFocus, int row, int column)
              {
              String cellValue = String.valueOf(value);
              this.setText(cellValue);
              this.setBackground(Color.LIGHT_GRAY);
              this.setHorizontalAlignment(SwingConstants.CENTER);
         return this;
              }
         }
         public int getSumValues()
         {
              return sumValues;
         }
    }


    //-------------------------Panel Class Starts here-------------------------------------

    public class SumValuesPanel extends JPanel
    {
         /**
         * @param args
         */
         public static void main(String[] args)
         {
              JFrame.setDefaultLookAndFeelDecorated(true);
              JFrame frame = new JFrame("SumValuesPanel");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              SumValuesPanel newContentPane = new SumValuesPanel( "Score", "XX.XX", "Rank");
              
              frame.setContentPane(newContentPane);
              frame.pack();
              frame.setVisible(true);
         }
         
    //------Variables declaration
    private JPanel thePanel;
    private JLabel scorejLabel;
    private JTextField ScorejTextField;
    private String scoreLabel;
    private String scoreValue;
    private JLabel rankLabel;
    private String rankLabelTxt;
    private JTextField rankTextField;
    private String rankText;
    //-------End of variables declaration

    public SumValuesPanel (String setScoreLabel,String setScoreVal, String rankLabel)
    {
         scoreLabel = setScoreLabel;
         scoreValue = setScoreVal;
         this.rankLabelTxt = rankLabel;
              
         createSumValuesPanel();
    }

    private void createSumValuesPanel()
    {         
    thePanel = new JPanel();

    rankLabel = new JLabel();
    rankTextField = new JTextField();
         scorejLabel = new JLabel();
    ScorejTextField = new JTextField();

    thePanel.setBackground(new Color(235, 233, 230));
    thePanel.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    thePanel.setPreferredSize(new Dimension(200, 180));

    scorejLabel.setHorizontalAlignment(SwingConstants.CENTER);
    scorejLabel.setText(scoreLabel);
    scorejLabel.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    scorejLabel.setPreferredSize(new Dimension(40, 20));

    ScorejTextField.setEditable(false);
    ScorejTextField.setHorizontalAlignment(JTextField.CENTER);
    ScorejTextField.setText(scoreValue);
    ScorejTextField.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    ScorejTextField.setMaximumSize(new Dimension(60, 25));
    ScorejTextField.setMinimumSize(new Dimension(35, 15));
    ScorejTextField.setPreferredSize(new Dimension(55, 20));

    rankLabel.setHorizontalAlignment(SwingConstants.CENTER);
    rankLabel.setText(rankLabelTxt);
    rankLabel.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    rankLabel.setPreferredSize(new Dimension(90, 20));

    rankTextField.setEditable(false);
    rankTextField.setBackground(new Color(255,255,0));
    rankTextField.setHorizontalAlignment(JTextField.CENTER);
    rankTextField.setText(rankText);
    rankTextField.setBorder(BorderFactory.createLineBorder(new Color(0, 0, 0)));
    rankTextField.setPreferredSize(new Dimension(55, 20));

    thePanel.add(scorejLabel);
    thePanel.add(ScorejTextField);
    thePanel.add(rankLabel);
    thePanel.add(rankTextField);

    this.add(thePanel);
    }

    }
    Edited by: 799076 on Oct 1, 2010 8:50 AM
    
    Edited by: 799076 on Oct 2, 2010 3:59 AM - added the code tags.
    
    Edited by: 799076 on Oct 2, 2010 4:01 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    OK, here's my "simple" example Say you have a class, TablePanel, that extends from JPanel that holds a JTable and this table contains two columns of integers in a DefaultTableModel and you want to get and display the sum of the columns of numbers whenever they are changed:

    class TablePanel extends JPanel {
       public static final String[] COL_HEADERS = {"A", "B"};
       private static final Integer[][] DATA = {{1, 2}, {3, 4}, {5, 6}};
       private DefaultTableModel model = new DefaultTableModel(DATA, COL_HEADERS) {
          @Override
          public Class getColumnClass(int columnIndex) {
             return Integer.class;
          }
       };
    
       public TablePanel() {
          JTable table = new JTable(model);
          setLayout(new BorderLayout());
          add(new JScrollPane(table));
       }
    //....
    

    A way to listen for changes to the table is to provide a method that allows outside classes to add a TableModelListener your JTable model:

       public void addTableModelListener(TableModelListener listener) {
          model.addTableModelListener(listener);
       }
    

    You could also give him public methods to enable this class get the money and return:

       public int getSumA() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 0);
          }
          return sum;
       }
    
       public int getSumB() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 1);
          }
          return sum;
       }
    }
    

    While you have another class, SumPanel, that displays two JLabels, one to hold the sum of column A and one for the sum of column B:

    class SumPanel extends JPanel {
       private JLabel sumA = new JLabel(" ", SwingConstants.RIGHT);
       private JLabel sumB = new JLabel(" ", SwingConstants.RIGHT);
    
       public SumPanel() {
          setLayout(new GridLayout(1, 0));
          add(sumA);
          add(sumB);
    
          //....
       }
       //.....
    

    You'd give public methods to allow outside classes to set the text for the JLabels that class:

       public void setTextSumA(String text) {
          sumA.setText(text);
       }
    
       public void setTextSumB(String text) {
          sumB.setText(text);
       }
    

    Then, you might have your own class TableModelListener, ModelListener, which has references to both of the above classes:

    class ModelListener implements TableModelListener {
       private TablePanel tablePanel;
       private SumPanel sumPanel;
    
       public ModelListener(TablePanel tablePanel, SumPanel sumPanel) {
          this.tablePanel = tablePanel;
          this.sumPanel = sumPanel;
    
          //...
       }
    //....
    

    who will set the SumPanel labels whenever its tableChanged method is called by the model:

       @Override
       public void tableChanged(TableModelEvent e) {
          int sumA = tablePanel.getSumA();
          int sumB = tablePanel.getSumB();
    
          sumPanel.setTextSumA(String.valueOf(sumA));
          sumPanel.setTextSumB(String.valueOf(sumB));
       }
    
    }
    

    Then you can link everything together in your main graphical interface as follows:

          TablePanel tablePanel = new TablePanel();
          SumPanel sumPanel = new SumPanel();
          ModelListener myModelListener = new ModelListener(tablePanel, sumPanel);
          tablePanel.addTableModelListener(myModelListener);
    

    All assembled, it could look as follows:

    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableModel;
    
    public class TableAndPanel2 {
    
       private static void createAndShowUI() {
          TablePanel tablePanel = new TablePanel();
          SumPanel sumPanel = new SumPanel();
          ModelListener myModelListener = new ModelListener(tablePanel, sumPanel);
          tablePanel.addTableModelListener(myModelListener);
    
          JFrame frame = new JFrame("Table And Panel 2");
          frame.getContentPane().add(tablePanel, BorderLayout.CENTER);
          frame.getContentPane().add(sumPanel, BorderLayout.PAGE_END);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
       }
    
       public static void main(String[] args) {
          java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
                createAndShowUI();
             }
          });
       }
    }
    
    class TablePanel extends JPanel {
       public static final String[] COL_HEADERS = {"A", "B"};
       private static final Integer[][] DATA = {{1, 2}, {3, 4}, {5, 6}};
       private DefaultTableModel model = new DefaultTableModel(DATA, COL_HEADERS) {
          @Override
          public Class getColumnClass(int columnIndex) {
             return Integer.class;
          }
       };
    
       public TablePanel() {
          JTable table = new JTable(model);
          setLayout(new BorderLayout());
          add(new JScrollPane(table));
       }
    
       public void addTableModelListener(TableModelListener listener) {
          model.addTableModelListener(listener);
       }
    
       public int getSumA() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 0);
          }
    
          return sum;
       }
    
       public int getSumB() {
          int sum = 0;
          for (int i = 0; i < model.getRowCount(); i++) {
             sum += (Integer) model.getValueAt(i, 1);
          }
    
          return sum;
       }
    
    }
    
    class SumPanel extends JPanel {
       private JLabel sumA = new JLabel(" ", SwingConstants.RIGHT);
       private JLabel sumB = new JLabel(" ", SwingConstants.RIGHT);
    
       public SumPanel() {
          setLayout(new GridLayout(1, 0));
          add(sumA);
          add(sumB);
    
          sumA.setBorder(BorderFactory.createLineBorder(Color.black));
          sumB.setBorder(BorderFactory.createLineBorder(Color.black));
       }
    
       public void setTextSumA(String text) {
          sumA.setText(text);
       }
    
       public void setTextSumB(String text) {
          sumB.setText(text);
       }
    }
    
    class ModelListener implements TableModelListener {
       private TablePanel tablePanel;
       private SumPanel sumPanel;
    
       public ModelListener(TablePanel tablePanel, SumPanel sumPanel) {
          this.tablePanel = tablePanel;
          this.sumPanel = sumPanel;
    
          tableChanged(null);
       }
    
       @Override
       public void tableChanged(TableModelEvent e) {
          int sumA = tablePanel.getSumA();
          int sumB = tablePanel.getSumB();
    
          sumPanel.setTextSumA(String.valueOf(sumA));
          sumPanel.setTextSumB(String.valueOf(sumB));
       }
    
    }
    
  • How to get the value of the tree node without reloading the Page. !

    Hello
    I worked with apex 4.2 and I've created trees and as a table to retrieve the date according to the value of the tree node select the code tree something like that

    {
    Select case when connect_by_isleaf = 1 then 0
    When level = 1 then 1
    of another-1
    end the status,
    level,
    'ENAME' as the title,
    NULL as an icon,
    'EMPNO' as value,
    NULL as ToolTip,
    ' f ? p = 36648:34:5234984107903:P40_SELECTED_NODE :'|| EmpNo as link
    "Dept". "" EMP ".
    Start by "MGR" is nothing
    connect prior "EMPNO" = "MGR".
    siblings arrested by 'ENAME '.
    }
    and I put the Page selected node element: P40_SELECTED_NODE. the tree worked well and recover the data in tabular form according to the value of tree node

    My Question:
    1. I want to recover the data without submitting the page where whenever I select the value of the tree make page reload to update the tabular presentation with the new value, there is a way to convey the value of the tree node to point P40_SELECTED_NODE and in the form of refreshment without page reload.

    2-i want when selected in the page tree run process according to the value of the on-set tree node to create dynamic action with (jquery selector: div.tree li > a) but the value of the incorrect node.

    Concerning
    Ahmed;

    Take a look at my sample tree application.
    When you select a node, a details report is updated. That should help you implement for your situation.
    However, one thing to note is the link on each node that you have. Click on a node to redirect to the same page and set the value of P40_SELECTED_NODE. You can keep the element, but the link should go, as it's him "reload" the page whenever you click on a node. Implementation of the action of "onselect" tree and setting the page element to the value of the node that will be in place. Be sure to add the page element in the elements present in the form of tables.
    The reason why your selector didn't return the correct value is that you have a click event bound to the anchor tag in each element of the list. The anchor tag does not hold the real value (usually and id), but holds that the display value. The items list item containing the real value in their attribute "id". Therefore, to get this value you should always inspect the first parent of the clicked anchor tag. (which is another way to solve it, of course)

  • Get the value of a tree

    How can I get the value of a tree node? For example, I want to it works like this:

    When I click on a node, I get redirected to another page, but the tree needs mark the node on which I clicked.
    When I has no links in the tree, the links are marked when I click, but if I choose a link for any node, the tree is updated.

    I can solve my problem? I tried with examples, but still does not work.

    Thank you.

    Remove the column from link to leave the node or make the URL as "#" so that the page is not reload when the user clicks on a node.

    If you have a page item say "* P100_SELECTED_NODE *" which must be set with the id of the node to the selected node.

    Now to set the P100_SELECTED_NODE
    Add the following code to the section "run when the page loads" of the tree page

      $('div.tree li a').click( function() {
        node_id = $(this).parents('li:first').attr('id');
       $s('P100_SELECTED_NODE',node_id);
       alert('Node set with new value: ' + node_id );   //for testing
      });
    
  • How to get the value of the interactive report into apex 5 column

    Hello

    I want to create the master detail report with ajax.

    If I want to get the value of a specific column of interactive report when click on one line and has a value of element of selected row column value.

    Then use the elements of value to refresh the details report.

    You have a better idea to refresh the report Details according to select line of the master report without refreshing the whole page?

    Hi SYSMAN2007,

    SYSMAN2007 wrote:

    I want to create the master detail report with ajax.

    If I want to get the value of a specific column of interactive report when click on one line and has a value of element of selected row column value.

    Then use the elements of value to refresh the details report.

    You have a better idea to refresh the report Details according to select line of the master report without refreshing the whole page?

    You can do this with the help of dynamic action. You need to get the value of the column of a line click in IR (using jQuery) and set the value to the elements which, in turn, can be used as a filter to other reports on the same page.

    See: How to use the values in the columns of an interactive report (Apex 5)

    Can you reproduce your problem on apex.oracle.com and share the credentials of the workspace, so that I can demonstrate how this can be achieved.

    See an example of how it can be done with dynamic actions: https://apex.oracle.com/pls/apex/f?p=35467:5

    Kind regards

    Kiran

  • Get the value of the tree node


    Hello

    I use the hierarchy tree to build a menu (in oracle 11 gform).

    I need to retrieve the value of the selected node (child_id), and when I write what follows, I get an error: frm-47307: could not get the properties of the tree root node .

    the statement is:

    l_node_value: = Ftree.Get_Tree_Node_Property (htree,: SYSTEM.) TRIGGER_NODE, Ftree.NODE_VALUE);

    I use this query to populate the tree (and it works fine...):

    Select the case sensitive option

    When connect_by_isleaf = 1 then

    0

    When level = 1 then

    1

    on the other

    -1

    end as status

    level

    name as title

    null as an icon

    CHAILD_ID as value

    Of

    (

    SELECT TO_CHAR (CUO. OBJECT_ID) CHAILD_ID,.

    PARENT_ID TO_CHAR (NULL).

    CUO. OBJECT_PROMPT NAME,

    OBJECT_TYPE 'G '.

    OF CRDX_USER_OBJECT COU

    WHERE GROUP_ID = - 1

    UNION

    SELECT TO_CHAR (CGO. OBJECT_ID) CHAILD_ID,.

    TO_CHAR (CGO. PARENT_ID FOLDER_ID),

    CGO. OBJECT_PROMPT NAME,

    OBJECT_TYPE

    OF OGS CRDX_GROUP_OBJECT

    )

    Start by parent_id is null

    connect by parent_id = prior CASE OBJECT_TYPE WHEN 'G' THEN CHAILD_ID END

    Can someone help me?

    Thanks in advance,

    Elad

    : SYSTEM. TRIGGER_NODE is valid for one of the WHEN-TREE-NODE-xxx-triggers.

    If you want to get the value of the node selected in any other place, you need the integrated Ftree.GET_TREE_SELECTION

  • Exception while trying to get the selected value for the choice of SelectOne in ADF Mobile

    I added the following code after arriving through this post https://forums.oracle.com/thread/2536419

    DCBindingContainer dcBindings = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding iterBind = (DCIteratorBinding) dcBindings.get ("facilitySelectItems");

    Attribute String = (String) iterBind.getCurrentRow () .getAttribute (0);

    But Jdeveloper complained class BindingContext wasn't available and I get the jar file adfm.jar has not been added to the project. I added it manually the path C:\JDeveloper11r24\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar. Once I've deployed code on an android emulator, I get the below error. Can someone please?

    07-25 13:18:03.812: D/CordovaLog (869): [SEVERE - oracle.adfmf.framework - adf.mf.internal - logError] request: {classname: oracle.adfmf.framework.api.Model; method: evaluateMethodExpression; params: [0: #{pageFlowScope.IBCMSearchBean.getSearchParams}] [1:] [2: {}] [3:] ;} exception: {message: oracle/adf/model/binding/DCBindingContainer (unsupported major.minor version 50.0); the severity: ERROR; .Guy: oracle.adfmf.framework.exception.AdfException; .exception: true ;}}}

    The version of the compiler maximum the JDev shows that 1.4. And I'm using version 11.1.2.4.0 for JDeveloper. The JDK version is 1.6.0_24.

    Sorry I missed the question!

    First of all, to get the value of selectedItem in selectOneChoice do not have another function in the domain controller. Here is an excellent article by Frank that explains this. Or you can use the below function to get the selected value immediately. Here the market is the value of selectOneChoice attribute. I wasn't aware of this method until you have read this article.

    {} public void getAndSetMarketValue (market of the object)

    ValueExpression ve = (ValueExpression) AdfmfJavaUtilities.getValueExpression ("#{bindings.marketSelectItems}", Object.class);

    AmxAttributeBinding attrBinding = (AmxAttributeBinding) ve.getValue (AdfmfJavaUtilities.getAdfELContext ());

    access the iterator that populates the list of values in

    the selectManyChoice component

    AmxIteratorBinding amxListIterator = attrBinding.getIteratorBinding ();

    the AmxIteratorBinding is a wrapper for the BasicIterator

    iterator which sets out the information we need

    ListIterator BasicIterator = amxListIterator.getIterator ();

    for each index value, query the name of the service (you can

    access and attribute from the line) to display

    SelectedValue = string

    (String) listIterator.getAttributeValueAtIndex (((New Integer ((String) market))) .intValue (), "Value");

    }

    Second, you can use #{row} in commandLink's action since it is something that is evaluated when the user clicks on the link and we do not have access to #{line} after that the entire component is rendered. To remedy this give an action for the commandlink which is a function in the bean and the function of bean back to the action of the link selected.

    ListOfReports.amx

    .......

    .......

    LoginBean.java

    ......

    public String returnClickValue() {}

    Option of string = AdfmfJavaUtilities.evaluateELExpression("#{viewScope.selectedItem}").toString ();

    return option;

    }

    ......

  • Get the selected value of a select list item in a tabular presentation.

    Hi, I have a tabular form and I'm trying to get the selected value of a select list item and store the selected value in a page element hidden elsewhere on the form of tables, so I can use this value.

    I already have something similar to the input on the tabular presentation elements.

    Get the initial values
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems var = $(' input [nom = "f12"]', ligne) [0];

    numberOfItems = 123456.123

    What I want to do is soemthing similar as above but capture the value of a select element in tabular form. I thought I could do something like:

    Get the selected value
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems var = $('selected [name = "f08"] .val ()', line) [0];

    But this method leaves the as undefined var numberOfItems.

    Please help me to find a way to identify the item 'select' in the tabular form called "f08" and get this value.

    I am a newbie to jQuery selectors etc...

    Thank you.

    Strange that you do not get an error when you run your 2nd selector.
    In any case for this kind of thing, see the HTML code of your tabular form and tell us what triggers, the element can be useful. Or better create an example at apex.oracle.com.
    In any case, I see two errors:
    (1) is there any html element "not selected" instead, the LOV in the APEX element has the select tag
    (2) you can not write a. val() inside a selector that you must place it after your selection.

    So I'd like to rewrite your code to:
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems = $("select_[nom_="f08"]",_row).val () var [0];

  • How to get the selected values of &lt; af:selectManyCheckbox &gt;

    Hi, I use jdeveloper 11.1.2 and I drag-and - drop a view such as selecting Multiple object (< af:selectManyCheckbox) component and now I'm trying to get the checked values in backing bean so that I can save in the database.

    At the moment I get all the values, but not the selected values.

    JSPX Page.

    < af:selectManyCheckbox value = "#{bindings." HREmpDetailsVO1.inputValue}.
    label = 'EMPLOYEES '.
    Binding = "#{backingBeanScope.backing_TestForm.SMC1} '"
    ID = "smc1" >
    < f: selectItems value = "#{bindings." HREmpDetailsVO1.items}.
    Binding = "#{backingBeanScope.backing_TestForm.SI1} '"
    ID = "si1" / >
    < / af:selectManyCheckbox >


    Bean class:

    public list getSelectedValues() {}

    If (selectedValues == null: refreshSelectedList) {}

    selectedValues =
    attributeListForIterator (selectedValuesIteratorName,
    selectedValuesValueAttrName);
    }
    Return selectedValues;
    }

    public static list attributeListForIterator (iter, DCIteratorBinding,
    String valueAttrName) {}
    AttributeList list = new ArrayList();
    {for (line r: {iter.getAllRowsInRange ())}
    attributeList.add (r.getAttribute (valueAttrName));
    }
    return attributeList;
    }


    Can someone help me pls by getting the values with the example code.

    Thanks in advance

    http://anindyabhattacharjee.blogspot.com/2010/10/working-with-ADF-choice-elements.html

  • Get the value of select Combobox data

    Hi all

    I have a major issue while trying to get the value of the items selected through the change event in a combobox control.  Here is my code... I really need help ASAP... Thanks in advance

    public var test:ArrayCollection = new ArrayCollection([
                { Id:"one", Amount:2000 },
                { Id:"two", Amount:1000 },
                { Id:"three", Amount:200 } ]);

    protected function regionCB_changeHandler(event:ListEvent):void
                   {
                      Alert.show(//tried so many things here to acces the items amount field.. nothing is working
                   }
    <s:ComboBox change="regionCB_changeHandler(event)" dataProvider="{test}" labelField="Id" id="regionCB" visible="false" />

    Have you tried selectedItem.Amount?

  • How to get the everypageitems up, down, let's just without selecting values

    Hi all

    Is it possible to find all values for top, left, right, bottom without selecting this particular pageitems PageItems in a script.  Already, I had by Visual basic. But without selecting the particular pageItem, I couldn't get the value. If I select the particular pageitem via loop I can easly get it. Kindly advice me the possibilities and the solution.

    Thanks for looking into this...

    Hello

    Not exactly what you are looking for. But you could bring together the left, top, right and bottom values of each element of the page and store them in the array like this (using javascript):

    myPathPos = new Array();

    myDoc = app.activeDocument;

    for (i = 0; i

    myPath = myDoc.pageItems [i];

    myPathPos [i] = [myPath.left, myPath.top, myPath.left + myPath.width, myPath.top - myPath.height];

    }

    Then extract them with myPathPos [0] [1], for example, which will give you the value of the first pageItem in your document.
    See you soon
  • I opened a document, selected, copied. When I try to paste it into a new blank document I get a message indicating low memory

    Original title: out of memory

    I opened a document, selected, copied.  When I try to paste it into a new blank document I get a message indicating low memory and I can't makeit work.  What should I do?

    Hmmm, Word document?  What is this document?

    As a side note, you might just go into Windows Explorer and make a copy of the entire file, rename and then edit according to your needs.

  • ([JDev12c, ADF] 1) how to get the value of a field of the line currently selected in question 2) af:table: flowScope

    Hallo,

    How can I get the value of a field in the row that is currently selected in an af:table?

    I need to pass this value to a setCurrentRowWithKeyValue who took the record to display in another (by a button) called page:

    Limited workflow

    Page1 - goToPage2-> setCurrentRowWithKeyValue-> PAGE2

    I defined a managed bean flowScope for the workflow in which I created the variable 'CodeToSetPage2Row '.

    I will store the value of the field for the selected line in this variable so that I can move on to the setCurrentRowWithKeyValue.

    Could be this method OK? Ore is there any good practice to achieve this goal?

    The managed bean flowScope used to go to the stubborn task may take some values from the outside?

    The workflow defined will be executed in a dynamic region.

    Thank you

    Federico

    Federico, you cannot use a flow variable scope for this page. The region has no access to the bean. You must use a workflow for this parameter.

    To get an attribute of the currently selected line you make slide data vo of control on the page attribute. This will create a link attribute for this attribute. Once this link exists, switch to source mode and remove the component that you do not want.

    The framework passes the value of the current row in this affair of the attribute (table should be in single selection mode).

    Click on the button, you switch the binding of the attribute for the setting of task flow using a setPropertyListener.

    In the workflow, you call the setCurrentRowWithKeyValue with the parameter of workflow as the default activity.

    Timo

Maybe you are looking for