Get text.value fully dynamically (getAttribute)

Hello

I have a subroutine that should get any attribute of the dynamic element, based on the attribute name. Simplified version would be like:

function getElementAttribute(iElement, iAttributeName) {
  getElementAttribute = iElement.getAttribute(iAttributeName);
}

It works well, except that I don't know how to get the value of the text field entirely dynamically. Static and semi-dynamique code that works would be:

getElementAttribute = iElement.value.text.value; //fully static
getElementAttribute = iElement.resolveNode("#value.#text").value; //semi-dynamic

However, I can't do so totally dynamic and generic, without static attributes.

Here are my failed attempts:

iElement.resolveNode("#value.#text").getAttribute("value");
iElement.resolveNode("#value.#text.#value");
iElement.getAttribute("rawValue");
iElement.getAttribute("value.text.value");
iElement.getAttribute("#value.#text.#value");

Does anyone know a solution to this?

Thank you!

KR,

Barbaric Igor

Hello

I could be off track here, but if iElement is the JavaScript object that refers to the form the ["rawValue"] iElement element returns the rawValue.  So, you can replace the literal string "rawValue" with a variable?

Hope this helps

Bruce

Tags: Adobe LiveCycle

Similar Questions

  • Dynamically add the instanceManager text value to instanceManager another

    Hello

    I have a dynamic form that has two subforms with instanceManagers. One is called options, and another description. Subform 'options' has a button that adds an instance both "_options" and «_description» InstanceManagers

    I click the button twice so I have three instances of each. Each instance of "_options" has a field OPTION, and each instance of '_description' has a DESCRIPTION field. I want to write code that will automatically set the text value of the OPTION to the value of the DESCRIPTION text.

    example:

    -options

    -OPTION (input field)

    -descriptions

    -DESCRIPTION

    Click

    Click

    -options

    -OPTION (1)(input field)

    -OPTION (2)(input field)

    -OPTION (3)(input field)

    -description

    -Description (1)(input field)

    -DESCRIPTION (2) (field)

    -DESCRIPTION (3) (field)

    fill option fields

    -options

    -OPTION (1)(rawValue: the soup is good)

    -OPTION (2)(rawValue: soup really sux)

    -OPTION (3)(rawValue: soup is ok)

    and here's my problem - how do I get these values for the other instanceManager? I have a code that does not work, but I don't want to offer something. Please, help me, I am struggling with this instance of reference bs for awhile

    You must use xfa.resolveNode to analyze the number of index levels.

    I just did a quick test with a few tables on the output of a field event in Table1, I put a corresponding field in Table2 to the same value. Works the same with subforms.

    xfa.resolveNode ("Table2.Row1 [" + this.parent.index + "]"). TextField1.rawValue = this.rawValue;

    Depending on how many levels deep into the repeating subform your domain is that you will need to play with the 'this.parent.index' to get the path to the repeating subform (this.parent.parent.index, etc.).

    Hope that's what you're looking for!

  • 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 viewattribute and how to assign the text field. URG

    Hi all,
    I created messagestyled text programmatically and I want the value of viewAttribute.
    I don't know how to define the instance of the view and display attribute.

    I tried this way, it is what is called the vo class but after that i dnt know how to set

    Here the code that I used...

    (1) I create the messagestyled text
    OAFormattedTextBean cctextbean = (OAFormattedTextBean) pageContext.getWebBeanFactory () .createWebBean (pageContext, FORMATTED_TEXT_BEAN, OAWebBeanConstants.VARCHAR2_DATATYPE, "CCText");

    OAMessageStyledTextBean ccidbean = (OAMessageStyledTextBean) pageContext.getWebBeanFactory () .createWebBean (pageContext, MESSAGE_STYLED_TEXT_BEAN, OAWebBeanConstants.VARCHAR2_DATATYPE, "CCId");

    (2) and I called the view object
    OAViewObject ccview = (OAViewObject) AM.findViewObject ("CmpnyDetVO1");

    (3) I want to set the view instance and viewattribute using code. This stage i dnt know how to define.

    (4) I want to know, how to get the value of the attribute to display and how to set the value to the messagestyled text field.

    I'm new to OFA. It's Urgent.

    Thanks in advance
    Fabrice

    Hello

    use
    Import oracle.jbo.Row;

    OAViewObject ccview = (OAViewObject) AM.findViewObject ("CmpnyDetVO1");
    Line line (Row) = ccview.first ();
    Test String = (String) row.getAttribute ("");

    then to set the value of the text of messagestyled

    OAMessageStyledTextBean bean = (OAMessageStyledTextBean) webBean.findindexedchildrecursive ("CCId");
    bean.setText (test);

    Thank you
    Gerard

    Published by: Gauravv on August 4, 2009 09:38

  • Get the value of the Variable text

    Hi all

    How to get the value of the Variable text. I want to check the value of variable text title in each page.

    Thank you and best regards,

    Robert S

    myText.textVariableInstances.everyItem (.resultText) would do it.

    The representation of a TextVariable on the page is a TextVariableInstance. They are objects of 'text' (parent may be: cell phone, change, note, Note, history, TextFrame, XmlStory). The "resultText" property is the string that the variable instance currently shows. See Adobe InDesign CS5 (7,0) object model JS: TextVariableInstance

  • [v 20141] Cannot get the text value code entry type

    Hello world

    I noticed that there are a lot of changes between versions 2014.0 and 2014,1.

    In the old version, I used to put a text of the entry type and get its value in this way:

    //-------------------- put code -----------------------------------

    var text_element = sym.$("t_element")

    text_element.html("");

    inputtext_element = $('<input_/>').attr ({'type': 'text', 'placeholder': ", 'id': 'text_element', 'size': '30'});

    inputtext_element. CSS ("background-color", "#ffffff");

    inputtext_element. CSS ('font-size', '14px');

    inputtext_element. CSS ('color', ' #000000 ' ");

    inputtext_element. CSS ('outline', 'none');

    inputtext_element. CSS ("at borders', 'none');

    inputtext_element.appendTo (text_element);

    //------------------- get Code -------------------------------

    var input_value = $("#text_element").val ();

    If (input_value == 'something') {}

    doSomething();

    } else {}

    doSomethingElse();


    }

    //-------------------- end code ------------------------------

    But now I can not use this system.

    I inserted the text this way entry type:

    SYM. $("t_element") .html ("< input type = 'text' = ' to write here!' placeholder = 'textElement' size = '30' style =' border: none;") background-color: #FFF; do-size: 11pt; Color: #000000; " / > ») ;

    but now I can't retrieve its value.

    Thanks for the help!

    We do not add default jQuery as a dependency in 20141 more. Some of these tasks are dependent on the jQuery. Can you try to add jQuery as a dependency? You can use the option as shown in the attached screenshot. We are currently working on how to make it easier to add these dependencies if you need on a regular basis.

    DIA-

  • Getting a value from a text of entry in backing bean element

    I created a component of entering text on a page where I will enter a number, adjustment of Autosubmit as true. ValueChangeListener property is defined as #{test.displayTable} where displayTable is a method defined in managed bean test.

    Now I know to extract the value entered in the text input component by creating a RichInputText variable in the advanced properties.

    But in case the Advanced property is empty, then how I'll be able to recover the value of it? This is the code. I'm not able to get the value entered in the component. I can not even find any method getvalue for her.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    UIViewRoot root = facesContext.getViewRoot();
    RichInputText inputText = (RichInputText) root.findComponent("it1");  // it1 is the id of the input text component
    System.out.println("inputText: "+inputText);
    On the use of my statement, is out getting generated, whereas I had entered in 90.
    inputText: RichInputText[UIXEditableFacesBeanImpl, id=it1]

    Hello

    Always mention your JDev version.

    If you use a valueChangeListener for the field, you can get the value using valueChagedEvent.getNewValue ().

    Arun-

  • How can I get the text value of an element XML in MXML?

    Hello


    I have the following XML loaded into a variable of XML type:

    Properties of <>
    the RIMpro data collector Configuration < comment > < / comment >
    < key="server.pear.username"/ entry >
    < key = "enter server.apple.retry.times" > 5 < / entry >
    < Enter key = "rdc.proxy.host" > http://192.168.1.2:8080 < / Entry >

    /Properties >

    I can easily get the key attribute displayed in a DataGridColumn by setting the dataProvider my variable and the data in "@key" area  But I don't know how to get the text value in a second column...  Is it possible or do I have to change my XML to something like this:

    Properties of <>
    the RIMpro data collector Configuration < comment > < / comment >
    < key="server.pear.username"/ entry >
    < key = "enter server.apple.retry.times" value = "5" > < / entry > "
    < Enter key = "rdc.proxy.host" value ="
    http://192.168.1.2:8080"""> < / entry > "

    /Properties >

    Thanks in advance.


    Marc

    Yes, you'd better change your XML structure to fit the internal mechanisms of the DataGrid.

    As model dataField require each element of the grid line to have a named property to display, otherwise you will be forced to overcome this model to the custom help labelFunction for the particular column that will implement your custom actions on how to extract the appropriate data for this column of the grid line item. It will be much more complicated that just reorganize your xml structure.

  • Cannot get the value of the text element

    Hello

    I have a screen in the text field and I'm defining its value via javascript (using $s). If I keep the point as display text (does not save the State), I can see the value set, but get the undefined when I try to access it.
    If, on the other hand, I put it as (State record) I don't even set and get still undefined.

    Can someone please tell me how I can get its value or to register the value provided by the javascript?

    Thank you.
    Andy.

    PS You forgot to mention, I work with Apex 3.2

    Published by: Andy, 20 Sep, 2010 17:53

    This can help

    Re: Editing session with javascript State

  • Can Financial Reporting get the text value of the Capex planning Module?

    Hi all


    I read in the documentation that financial information can display Annotation using the planning information as a data connection source. Now, EN 9.3.1 may display the text value of the Capex Module?
    I tried to get the value of text, but it shows #error...

    Thank you

    Hello
    try to use the adapter to details of Planning in Financial Reporting Studio.
    Kind regards

  • As a dynamic form on the form? And how to get their value

    Hi all

    I want to make a form that would be a granular user to choose from a specific list of values to be passed as a parameter. Here is a script, it creates what I need, but the names of radio buttons are not unique. Can you please how to make, at the end of this form (window), I get the value of the selected radiobutton list item?

    #target photoshop
    app.bringToFront();
    var par = Array("Select your choise","test 1","test 2", "test 3");
    
    var rez = ask(par);
    alert(rez)
    
    function ask(par){
    wask = new Window('dialog', '');
    wask.orientation = "column";
    wask.alignment="top";
    wask.spacing=0;
        grs0 =wask.add('group');
        grs0.spacing=0;
        grs0.add('statictext', undefined, par[0]);
        grs0.alignment="top";
        grs0.preferredSize.height = 40;
            grs1 =wask.add('group');
            grs1.spacing=0;
            grs1.alignment="left";
            grs1.preferredSize.height = 20*par.length;
            grs1.orientation = "column";
        for(var i=1;i<par.length;i++){
            var g = grs0 +i;
            r= "rb"+i;
            r = grs1.add("radiobutton", undefined, par[i]);
            r.alignment="left";
            }
    bt1 = wask.add ("button", undefined, "Select");
    bt2 = wask.add ("button", undefined, "Close");
    
    bt1.onClick = function(){
    
    }
    
    wask.show();
    }
    
    
    
    

    I think that there are at least two ways to do something like that. One way would be to give the names of controls. You can find and then by name.

    var par = Array("Select your choise","test 1","test 2", "test 3");
    
    var rez = ask(par);
    if( rez == 1) alert(wask.findElement('rb1').value);
    
    function ask(par){
        wask = new Window('dialog', '');
        wask.orientation = "column";
        wask.alignment="top";
        wask.spacing=0;
        grs0 =wask.add('group');
        grs0.spacing=0;
        grs0.add('statictext', undefined, par[0]);
        grs0.alignment="top";
        grs0.preferredSize.height = 40;
            grs1 =wask.add('group');
            grs1.spacing=0;
            grs1.alignment="left";
            grs1.preferredSize.height = 20*par.length;
            grs1.orientation = "column";
        for(var i=1;i
    

    Another way would be to use an eval statement in the loop that creates the controls. Something like

    var par = Array("Select your choise","test 1","test 2", "test 3");
    
    var rez = ask(par);
    if( rez == 1) alert(wask.rb1.value);
    
    function ask(par){
        wask = new Window('dialog', '');
        wask.orientation = "column";
        wask.alignment="top";
        wask.spacing=0;
        grs0 =wask.add('group');
        grs0.spacing=0;
        grs0.add('statictext', undefined, par[0]);
        grs0.alignment="top";
        grs0.preferredSize.height = 40;
            grs1 =wask.add('group');
            grs1.spacing=0;
            grs1.alignment="left";
            grs1.preferredSize.height = 20*par.length;
            grs1.orientation = "column";
        for(var i=1;i		   
  • How to get the value of viewrow by chain

    With the help of Jdev11.1.1.5.0 - adfbc - ireport3.0.0

    Here I will describe: what I've done.

    use jsff (dynamic region) while hitting the af:tree nodes it opens. Fine OK

    I had somevo manually wroten Query. and the query is fine no problem with it
     here i give sample not a original query
    select * from sometable where acctid = :pacctid
    I do drag and drop the pacctid correspondent run params vo as selectoncechoice


    public static vo
    Value of data - to pay account, advance

    Announcement name - ap, given


    in this jsff
    *page representation*
    
    account type :   account payable (ap) - select one choice type
                            advance           (ad) - select one choice type
    
    like this some select once choice and some inputs.
    
    Run report - command button
     .jsff code 
    <af:selectOneChoice value="#{bindings.ACCT_TYPE.inputValue}"
                              label="Account Type"
                              shortDesc="#{bindings.ACCT_TYPE.hints.tooltip}"
                              id="soc3" required="true" 
                              autoSubmit="true"
                              binding="#{backingBeanScope.SUP1040V.soc3}"
                              valuePassThru="true"
                              valueChangeListener="#{backingBeanScope.SUP1040V.ValueChangeListener1}">
                             
            <f:selectItems value="#{bindings.ACCT_TYPE.items}" id="si3"/>
          </af:selectOneChoice>
    
     <af:commandToolbarButton text="Export in pdf" id="ctb2">
              <af:fileDownloadActionListener method="#{backingBeanScope.SUP1040V.Report}"
                                             />
            </af:commandToolbarButton>
    . Java
         //while hitting the button following logs are appeared i show it as commented format.
    
        public void Report(FacesContext context, OutputStream out) throws IOException,Exception
            {
            
                FacesContext ctx = FacesContext.getCurrentInstance();
                HttpServletRequest request =
                    (HttpServletRequest)ctx.getExternalContext().getRequest();
                HttpServletResponse response =  
                    (HttpServletResponse)ctx.getExternalContext().getResponse();
                
            .....
                         
                BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                System.out.println("print binding" +bindings1 );
           
    //while using sop i get this in my log : :  print binding  ReportsPageFragments_SUP1040VPageDef_WEB_INF_TaskFlows_SUP1040_V_TF_xml_SUP1040_V_TF
    
           
                JUCtrlListBinding listBinding1 = (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
                System.out.println("print list bindings" +listBinding1 );
           
    //while using sop i get this in my log : :  print list  bindings0
    
    
                Object selectedValue1 = listBinding1.getSelectedValue();
                System.out.println("print selected value" + selectedValue1);
    
    //while using sop i get this in my log : :  print selected  valueViewRow [oracle.jbo.Key[AP ]]    
                
                  
     request.setAttribute("ACCT_TYPE", //here i want the value  "AP" in  String  ); 
    
    if i use like this means
    request.setAttribute("ACCT_TYPE", soc1.getValue()  );  i get the index value.
    
    i need the dataname "ap" so i go above method which say wrotes ...
                 
              
                           ...                                    
                request.getRequestDispatcher(response.encodeURL("/sup1040servlet")).forward(request,response);
                
                System.out.println("hihihihih");
                response.flushBuffer();
                ctx.responseComplete();
           
            }
    
        public void ValueChangeListener1(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            String AcctType = valueChangeEvent.getNewValue().toString();
            System.out.println("AcctType" + AcctType);
            FacesContext contxt = FacesContext.getCurrentInstance();
            valueChangeEvent.getComponent().processUpdates(contxt); 
          
           BindingContainer bindings1 =
           BindingContext.getCurrent().getCurrentBindingsEntry();
           // Get the sepecific list binding
           JUCtrlListBinding listBinding1 =
           (JUCtrlListBinding)bindings1.get("ACCT_TYPE");
           // Get the value which is currently selected
           Object selectedValue1 = listBinding1.getSelectedValue();
           System.out.println(selectedValue1);
        }
    If I get ap means my report runs. or otherwise it will show an empty page.

    How to get the value of class viewrowimpl as string.

    Published by: ADF7 on March 24, 2012 07:27

    ADF7,
    I'm not sure that understand what you're up to.
    For as far as I understand you want to get the value of display rather than the index
    I use this code

        public void StatusChangedListener(ValueChangeEvent valueChangeEvent)
        {
            BindingContext lBindingContext = BindingContext.getCurrent();
            BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
            JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("Status");
            int newindex = (Integer) valueChangeEvent.getNewValue();
            Object row = list.getDisplayData(); // Wichtig um die liste zu laden!!!!
            Row lFromList = (Row) list.getValueFromList(newindex);
            Object lAttribute = lFromList.getAttribute("Value");
            String newVal = (String) lAttribute;
        }
    

    to get the value of a component of selectOneChoice...

    Timo

  • Get the value of the question page before submitting.

    Hello all, I use the Application Express 4.2.5.00.08. I have a question on getting a value for a page element before the page is sent. I have a dynamic action:

    Action: Moving the mouse (on a region/State)

    Real Action: $('a[href*="39"]').each (function (index) {}
    lnk = $(this) .attr ('href');
    $(this) .parent)
    . Parent ('tr')
    .Attr ("href data ', lnk")
    {.mouseover (function ()}
    $(this) .css ("cursor", "pointer");
    Lrowrequired var = $(this) .closest ("tr"),.
    BLOCK = lRow.find("td[headers=BLOCK]").text ();
    $x('P39_BLOCK').value = BLOCK;
    })
    {.mouseleave (function ()}
    $(this) .css ('cursor', 'default');
    })
    });

    I am successfully able to get the value of the line while I'm hovering above the report (and P39_BLOCK is refreshing). But, in this case, the value is not set whenever it changes. My question is, if I need to use this value (say, put an another page element when P39_BLOCK is changed) without submitting the page, how is that possible?

    Kind regards
    MFadel.

    Hi Mohamed,

    That's what bothers! In my first dynamic action, I have real action 'Execute JavaScript Code', which doesn't have a property "Page items to show.". And I need this code to retrieve values from the row of the report.

    On the right, you will have the option 'page elements to present' the dynamic JavaScript actions. Only the PL/SQL. And you do not need to handle things strictly the use of javascript. JavaScript is usually used to manipulate items on the page itself, not the things on the server/session). If you need to present before your PL/SQL block, you can either use AJAX call, or you can create a dynamic action of PL/SQL that runs before your JavaScript. Put this field in the 'submit' page elements and the block of code, just put null;

    Here's a sample in javascript, ajax call. It pushes three elements of the page in the session or in the scope where APEX can access their values. You can return values through AJAX if necessary also:

    $.ajax ({type: 'POST',})

    URL: "wwv_flow.show",

    data: {}

    p_flow_id: $('#pFlowId').val (),.

    p_flow_step_id: page,.

    p_instance: $('#pInstance').val (),.

    "x 01': P39_PAGE_ITEM_1, '.

    "x 02': P39_PAGE_ITEM_2, '.

    "x 03': P39_PAGE_ITEM_3, '.

    p_request: 'APPLICATION_PROCESS = YOUR_PROCESS_NAME'

    },

    success: function (data) {}

    Console.log (Data);

    }

    });

    Then you would have a PL/SQL process called YOUR_PROCESS_NAME that can refer to variables such as

    my_var_1 VARCHAR2 (100 CHAR): = APEX_APPLICATION. G_X01; -Javascript password

    my_var_2 VARCHAR2 (100 CHAR): = APEX_APPLICATION. G_X02; -Javascript password

    my_var_3 VARCHAR2 (4000 TANK): = APEX_APPLICATION. G_X03; -Javascript password

    Can I use in my "PL/SQL procedure? Because in the end, I'm trying to use this value in a PL/SQL procedure:

    To answer your last question, Yes, you can use the P39_BLOCK in your PL/SQL, how you demonstrated above, but you must submit in the 'page' referred to submit box, otherwise it uses the last value that has been submitted.

    What I'm not clear, is do you need really value before executing the PL/SQL or you just want your PL/SQL? If you just try to pass it in PL/SQL and then just use the dynamic action of PL/SQL and pass it by using the "elements of the page to present. '' Remember, if you need a new value to publish on the page, you will need to put these fields in the box "items to display the page.

    If you only need the value of front page because you will use in javascript, somewhere, then reference it with jQuery or js and then use AJAX to continue your treatment.

    A third way, you could do, is to create a dynamic action of PL/SQL that runs before the javascript code that is null; in the body of PL/SQL, but put the P39_BLOCK in the "elements of page to submit" box. Who will just send the page element, and then take action dynamic javascript. But, I don't know why you would do that since you can't have the value submitted for javascript to use.

    Hope that all makes sense.

    Jen

  • How to use Ajax get multiple values in an array?

    Hi All-

    I am using AJAX to get multiple values in a table using example of Denes Kubicek in the following link-

    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606:NO:

    Basically, I want to use the drop-down list to fill the rest of the values in the form.

    I created the example (Ajax get several values, 54522 application) on the Oracle site.

    http://apex.oracle.com/pls/apex/f?p=4550:1:0:

    Workspace: iConnect

    Login: demo

    password: demo

    I was able to reproduce his example on page 1 (homepage).

    However, I want to use system generate a table to complete this example and was not able to complete the data correctly.

    Page 2 (method 2) is that I'm struggling to fill the column values. When I checked the item application values in the Session, and values seems to be filled properly.

    That's what I did on this page:

    1 create an Application process on-demand - Set_Multi_Items_Tabular2:

    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
    
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
    
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
      HTP.prn ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    
    
    
    
    
    

    2. create two objects application - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2

    3. put the following text in the Page header:

    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
    }
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);    
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                }
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
                    }
                }
            }
        }
        get = null;
    }
    </script>
    
    
    Add the follwing to the end of the above JavaScript:
    
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    {
     var s = filter.id;
     var item = s.substring(3,8);
     var field2 = list2 + item;
     
     f_set_multi_items_tabular2(filter, field2);
    }
    
    
    
    
     
    
    
    

    4 query in the form:

    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    
    
    
    
    
    

    5. in the column of Book_ID_DISPLAY attribute:

    Add the following code to the attributes of the element: onchange = "javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#'); »

    Changed-> onchange = "javascript:setLOV(this,'f03'); »

    Now, T_ROWNUM2 returns the value as f03_0001. But TEMPORARY_APPLICATION_ITEM2 returns in the form [object HTMLSelectElement]...

    Please help me to see how I can fill the data in the tabular presentation format. Thank you in advance!

    Ling

    Updating code in red...

    Ling

    LC says:

    Application Item Value Item Name
    54522 3 TEMPORARY_APPLICATION_ITEM2
    54522 f03_0003 T_ROWNUM2

    No T_ROWNUM2 should be 0003.

    I made a copy of your page to make corrections.

    There are several problems.

    First you where submiting T_ROWNUM2 whereas you would use: t_rownum in the pl/sql code.

    I changed the name of the element in the f_set_multi_items_tabular2.

    Secondly you where now affecting the rownumber f03_0001 for the first line.

    Resulting XML returned as follows.

    this xml genericly sets multiple items
    CSS Mastery
    22
    Andy Budd
    1
    
    

    I changed the following text in the show_lov.

    var point = s.substring (4.8);

    var Field2 = item;

    I also had a compilation of pl/sql code error, there was a); missing the end of the last item. Fixed that too.

    But why do you think lpad won't work for lines 10 and more.

    LPAD ('10', 4, '0') will give "0010"

    LPAD ('100 ', 4,'0 ') will give "0100"

    LPAD ('1000 ', 4,'0 ') will give '1000'

    So unless you have more than 9999 lines you would have no problem.

    Nicolette

  • How to get the values of the entity Attirbute

    I have a takeover of modules with the global entity and any other entity attribute values

    example of XML Code modules:

    <? XML version = "1.0" encoding = "utf-8"? >
    < modules xmlns = "http://oracle.com/determinations/engine/relational/rulebase" >
    < text entity = "Global" name = "global" singleton = "true" >
    < attribute name = "MainInterviewComplete" type = "Boolean" / >
    < / entity >
    < text entity = name of the 'employer' singleton 'employer' = 'false' = >
    < attribute name = "TitleOfKBENStatement" type = "Text" / >
    < / entity >

    I want to get the value of the TitleOfKBENStatement attribute, which is located in the entity of the employer

    I tried these options in vb.net code

    OPTION 1:
    Dim target as Oracle.Determinations.Interview.Engine.InterviewGoal
    session. GoalService.GetGoalById ("attribute ~"&"TitleOfKBENStatement"&"~ employer ~ employer" "")
    OPTION 2:
    session. GetRulebase.GetRulebase.GetEntity ("use"). GetAttribute ("TitleOfKBENStatement")

    I need to get the VALUE of the attribute, the two methods would be retrieves the attribute NAME, any ideas, thank you.

    You need the instance of the entity of the employer you want to get the value of the attribute 'TitleOfKBENStatement '.

    Try something like

    Session ruleSession = session.GetRuleSession();
    Entity employerEntity = ruleSession.GetRulebase().GetEntity("employer");
    EntityInstance myEmployerInstance = employerEntity.GetEntityInstance(ruleSession, "myEmployerInstanceName");
    Attribute titleOfBENStatementAttr = employerEntity.GetAttribute("TitleOfKBENStatement");
    Object value = titleOfBENStatementAttr.GetValue(myEmployerInstance);
    

Maybe you are looking for

  • Not able to install firefox updates

    I downloaded the new firefox updates, but not able to install. I followed the steps.1. check if no instance of firefox is running in the Task Manager2 lunch Firefox as administrator.3. click on Yes4. it begins to install.5 throws an error as several

  • help, my computer icons are like windows 95 and nothing will work properly

    I can't get anything to work, all my icons look like a piece of paper with the corner folded, internet explore does not open. He repeated to me that there is a problem but I installed over and over again. Please can someone help

  • How do you get the timestamp for transfer video recorded on hard disk. Windows 7

    NEST camera time stamp each video created... once I have transferred to my Windows & hard drive to record, the date & time disappear.     How to get Windows & RULE to keep the subtitle of the date & time. Otherwise, the security video is worth nothin

  • Quota of change in QML container

    This doesn't seem to work: Container { layout: StackLayout { orientation: LayoutOrientation.LeftToRight } Container { id: cnLeft property int quota : 50 layoutProperties: StackLayoutProperties { spaceQuota: quota } background: Color.Red Label { text:

  • BlackBerry smartphones HELP! problems with text messaging? for blackberry bold 9900

    I just got the phone today and I have a problem! On text messaging, I try type but it comes up with a long, narrow bar instead of a rectangular shape, and I don't see what I'm typing! Then I go back and I CAN see, but it goes back! I can't delete tex