Assigning a value to an array cell populated [BULK]

Hi all,
I've got a problem in assigning a value to an array populated with BULK COLLECT INTO .
I can reproduce the problem with this
CREATE TABLE TEST_TABLE (
value1 NUMBER,
value2 NUMBER
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);
INSERT INTO test_table VALUES(1,1);And this is the PL/SQL anonymous block that gives me problems:
DECLARE
  SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
TYPE records_table IS TABLE OF t_rec;
  elist RECORDS_TABLE;
  CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
BEGIN
  OPEN table_cursor;
  FETCH table_cursor BULK COLLECT INTO elist;
    FOR j IN 1..elist.COUNT
    LOOP
      elist(j)(1) := elist(j)(1) +1;
    END LOOP;
  CLOSE table_cursor;
END; The error is
ORA-06550: line 13, column 7:
PLS-00308: this construct is not allowed as the origin of an assignment
ORA-06550: line 13, column 7:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:So it doesn't compile because of this line of code:
elist(j)(1) := elist(j)(1) +1;
Why doesn't it work?
If I try to do this, works perfectly:
DECLARE
TYPE v_num_table
IS
  TABLE OF NUMBER;
TYPE v_2_num_table
IS
  TABLE OF v_num_table;
  v_nums V_2_NUM_TABLE := V_2_NUM_TABLE();
BEGIN
  v_nums.EXTEND;
  v_nums(1) := v_num_table();
  v_nums(1).EXTEND;
  v_nums(1)(1) := 1;
  v_nums(1)(1) := v_nums(1)(1) +1;
  dbms_output.put_line(v_nums(1)(1) );
END;Edited by: user10396517 on 2-mar-2012 2.35

Variable "elist" is a collection of record, so you access an individual field of a given collection element by specifying the field name, not its position :
DECLARE
  SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
  TYPE records_table IS TABLE OF t_rec;
  elist RECORDS_TABLE;
  CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
BEGIN
  OPEN table_cursor;
  FETCH table_cursor BULK COLLECT INTO elist;
    FOR j IN 1..elist.COUNT
    LOOP
      elist(j).value1 := elist(j).value1 + 1;
    END LOOP;
  CLOSE table_cursor;
END;Your second example is different as you're dealing with a collection of collections.

Similar Messages

  • Problem in assigning value to an array element

    hi all
    in the following prog i am not able to assign the value to the array element
    i am not getting why it is giving me error
    //my program is as follows
    public class ArrayTest
         static int [] intArray = new int[5];
         static int [] intArray1 = new int[1];
         intArray1[0] = 5; // this line gives error
         static char [] charArray = new char[5];
         public static void main(String args[])
              System.out.println(charArray);
              intArray1 = intArray;
    }thanx in advance as usual

    The problem is that you try to execute code outside a method. This can be only done in form of a variable declaration or as a static initilization block which will be executed once when the class is loaded:public class ArrayTest
         static int [] intArray = new int[5];
         static int [] intArray1 = new int[1];
         static char [] charArray = new char[5];
         static {
              intArray[0] = 5;
         public static void main(String args[])
              System.out.println(charArray);
              intArray1 = intArray;
    }

  • How do I store the values in the @D array in the below mentioned VI? Only the last row in the Array is populated with values from the image.

    Hello Guys,
    I am trying to build a sinogram from 180 projection images and I am not able to store the summed values into the array as it is moving the values and then populating all the rows except for the last with ZERO.
    Thanks in advance.
    Attachments:
    sinogram.vi ‏53 KB

    Your loop runs only three times, so all you can possibly populate is 3 rows.
    Typically, you would initialize a shift register with the initialized array, then use replace array subset, feeding the modified array back into the shift register. However, in this case you could just autoindex the 1D array at the output tunnel to build the resulting 2D array.
    Sorry, I am not familiar with sinograms. Do you have a link describing the algorithm?
    LabVIEW Champion . Do more with less code and in less time .

  • How to assign values for boolean array in LabVIEW?

    I want assign values for boolean array.Iam not able to do that.For each boolen i want to assign each value.Plz help me......
    Please Mark the solution as accepted if your problem is solved and donate kudoes
    Solved!
    Go to Solution.

    Hi agar,
    values in an array are "assigned" by building an array (using BuildArray) or by replacing values in an existing array (ReplaceArraySubset)!
    Good starting point could be this...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Assign values from one array to another

    Hi, I am trying to solve a problem that asks that I assign values in the array that is input, which meet a certain criteria, into another array. isFunny will determine if a given integer is funny, countFunnies will determine how many integers in the given array are funny or not. collectFunnies should assign elements from the first array that are funny into the new array. Please take a look at the code, I am at a loss, everything looks good to me.
    public class BatchOne
    public boolean isFunny(int x) {
    if (x%2 == 0) {return true;}
    else {return false;}
    public int countFunnies(int[] a) {
    int count = 0;
    for (int funCheck :a) {
    if(isFunny(funCheck)) {
    count++;
    return count;
    public int[] collectFunnies(int[] a) {
    int count = 0;
    int i = 0;
    for (int funCheck :a) {
    if(isFunny(funCheck)) {
    count++;
    int[] array = new int[count];
    for (int funCheck : a) {
    if(isFunny(funCheck)) {
    array[i] = funCheck;
    i++;
    return array;
    Thanks,
    T

    Ok, I am new to programming and posting so likely need some refinement to my posts.
    I am using BlueJ to write my code, the above posted is my entire code. It is compiling correctly but when I run, the return was giving me back something strange, I am not sure if I can post a screenshot because it would be hard to explain.
    However, upon further review, it seems that there are some intricacies with BlueJ that I am obviously not used to, because when I select to inspect the return, the program seems to be returning an array of values that is in line with my intended goal.
    Thank you for your guidance in terms of how to use the forums.
    T

  • Need help assigning values to an array of Strings

    why do i get an error message saying this isn't a statement?
    String customer[z] = {"::" + s1 + ":" + s2 + ":" + s3};
    what is the correct syntax for assigning values to an array of strings?

    help helpArrays in Java are static, meaning their size cannot change once they've been created. Somewhere in your code you need to declare the String array like this,
    String[] costumer = new String[10];Now customer has 10 elements (room for 10 strings) and you can do for example this,
    int z = 0;
    costumer[z] = "string1" + "string2";This means the two strings are added and assigned to element 0 of the array.
    If you can't take it from here you need to step back for a while and carefully study a beginners textbook on Java.

  • Accessing values in an array of JComboBoxes

    Hello. I am building a program to calculate a user's GPA. This is a class assignment and so has some requirements I'm meeting.
    There are two event handlers: One runs a loop to add course input lines; one calculates the GPA based on the inputs.
    There are two related problems: When I instantiate JComboBoxes into two arrays (credits[] and grade[]) in the loop, the layout works but the calculate button only returns the values of credits[0] and grade[0] regardless of selection. When I instantiate the arrays outside the loop, the calculate button works but not the layout. I am at a complete loss. I'm posting the full code with comments. Sorry for it being very long.
    package macdonnell_COMP228Lab4_Ex1;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class GPACalc extends JFrame {
         private String[] letterGrades = {"A+","A","B+","B","C+","C","D+","D","Fail"}; // Values to be used in combGrades
         private double[] gradePoints = {4.5,4.0,3.5,3.0,2.5,2.0,1.5,1.0,0};
         private String[] numberCourses = {"0","1","2","3","4","5","6","7","8"}; // Used to fill cbNumberCourses
         private String[] creditHours = {"1","2","3","4"}; //number of hours per week in the class
         private String[] numberGrades = {"90-100%","80-89%","75-79%","70-74%","65-69%","60-64%","55-59%","50-54%","0-49%"};
         private String[] combGrades = new String[9]; // Used to fill the JComboBox in grade[]
         //Arrays to hold JComboBoxes for Course Inputs
         private JComboBox[] credits = new JComboBox[8];
         private JComboBox[] grade = new JComboBox[8];
         private JLabel lblCreditHoursEarned = new JLabel("Credit Hours Earned: ");
         private JTextField txtCreditHoursEarned = new JTextField(5);
         private JLabel lblCurrentGPA = new JLabel("Current GPA: ");
         private JTextField txtCurrentGPA = new JTextField(5);
         private JLabel lblNumberCourses = new JLabel("Number of Courses: ");
         private JComboBox cbNumberCourses = new JComboBox(numberCourses); //ComboBox for users to select number of course inputs
         private JLabel lblNumber = new JLabel("Number: ");
         private JLabel lblCourseCode = new JLabel("Course Code: ");
         private JLabel lblCreditHours = new JLabel("Credit Hours: ");
         private JLabel lblGrade = new JLabel("Grade: ");
         private JLabel label;
         private JTextField coursCode;
         GridBagLayout gridBag;
         Container c;
         private JButton calculate = new JButton("Calculate");
         CalculateButtonHandler calculateButton = new CalculateButtonHandler();
         private JLabel lblYourGPA;
         public GPACalc(){
              for (int i = 0; i < combGrades.length; i++){
                   combGrades[i] = letterGrades[i] + ": " + numberGrades;
              /* This block is used for instantiating the JComboBoxes in credits[] and grade[] outside the loop
              //Assign course input ComboBoxes to arrays
              credits[0] = new JComboBox(creditHours);
              credits[1] = new JComboBox(creditHours);
              credits[2] = new JComboBox(creditHours);
              credits[3] = new JComboBox(creditHours);
              credits[4] = new JComboBox(creditHours);
              credits[5] = new JComboBox(creditHours);
              credits[6] = new JComboBox(creditHours);
              credits[7] = new JComboBox(creditHours);
              grade[0] = new JComboBox(combGrades);
              grade[1] = new JComboBox(combGrades);
              grade[2] = new JComboBox(combGrades);
              grade[3] = new JComboBox(combGrades);
              grade[4] = new JComboBox(combGrades);
              grade[5] = new JComboBox(combGrades);
              grade[6] = new JComboBox(combGrades);
              grade[7] = new JComboBox(combGrades);
              gridBag = new GridBagLayout();
         c = getContentPane();
         c.setLayout(gridBag);
         // ROW 1
         GridBagConstraints Constr1 = new GridBagConstraints();
         Constr1.gridx = 0; //first column
         Constr1.gridy = 0; //first row
         Constr1.gridwidth = 2; //number of cells in the row that will be covered
         Constr1.gridheight = 1; //number of cells in the column
         Constr1.fill = GridBagConstraints.HORIZONTAL; //resize the component horizontally
         // add the text field
         gridBag.setConstraints(lblCreditHoursEarned, Constr1); //apply the constraints to the grid
         c.add(lblCreditHoursEarned);
         GridBagConstraints Constr2 = new GridBagConstraints();
         Constr2.gridx = 3; //second column
         Constr2.gridy = 0; //first row
         Constr2.gridwidth = 1; //number of cells in the row that will be covered
         Constr2.gridheight = 1; //number of cells in the column
         Constr2.fill = GridBagConstraints.HORIZONTAL; //resize the component horizontally
         // add the text field
         gridBag.setConstraints(txtCreditHoursEarned, Constr2); //apply the constraints to the grid
         c.add(txtCreditHoursEarned);
         GridBagConstraints Constr3 = new GridBagConstraints();
         Constr3.gridx = 5; //fourth column
         Constr3.gridy = 0; //first row
         Constr3.gridwidth = 1; //number of cells in the row that will be covered
         Constr3.gridheight = 1; //number of cells in the column
         Constr3.fill = GridBagConstraints.HORIZONTAL; //resize the component horizontally
         // add the text field
         gridBag.setConstraints(lblCurrentGPA, Constr3); //apply the constraints to the grid
         c.add(lblCurrentGPA);
         GridBagConstraints Constr4 = new GridBagConstraints();
         Constr4.gridx = 6; //fifth column
         Constr4.gridy = 0; //first row
         Constr4.gridwidth = 1; //number of cells in the row that will be covered
         Constr4.gridheight = 1; //number of cells in the column
         Constr4.fill = GridBagConstraints.HORIZONTAL; //resize the component horizontally
         // add the text field
         gridBag.setConstraints(txtCurrentGPA, Constr4); //apply the constraints to the grid
         c.add(txtCurrentGPA);
         //ROW 2
         GridBagConstraints Constr5 = new GridBagConstraints();
         Constr5.gridx = 5; //fourth column
         Constr5.gridy = 1; //second row
         Constr5.gridwidth = 1; //number of cells in the row that will be covered
         Constr5.gridheight = 1; //number of cells in the column
         Constr5.fill = GridBagConstraints.HORIZONTAL; //resize the component horizontally
         // add the text field
         gridBag.setConstraints(lblNumberCourses, Constr5); //apply the constraints to the grid
         c.add(lblNumberCourses);
         GridBagConstraints Constr6 = new GridBagConstraints();
         Constr6.gridx = 6; //fourth column
         Constr6.gridy = 1; //second row
         Constr6.gridwidth = 1; //number of cells in the row that will be covered
         Constr6.gridheight = 1; //number of cells in the column
         Constr6.fill = GridBagConstraints.HORIZONTAL; //resize the component horizontally
         // add the text field
         gridBag.setConstraints(cbNumberCourses, Constr6); //apply the constraints to the grid
         c.add(cbNumberCourses);
         //ROW 3
         GridBagConstraints Constr7 = new GridBagConstraints();
         Constr7.gridx = 0;
         Constr7.gridy = 2;
         Constr7.gridwidth = 1;
         Constr7.gridheight = 1;
         Constr7.fill = GridBagConstraints.HORIZONTAL;
         gridBag.setConstraints(lblNumber, Constr7);
         c.add(lblNumber);
         GridBagConstraints Constr8 = new GridBagConstraints();
         Constr8.gridx = 2;
         Constr8.gridy = 2;
         Constr8.gridwidth = 1;
         Constr8.gridheight = 1;
         Constr8.fill = GridBagConstraints.HORIZONTAL;
         gridBag.setConstraints(lblCourseCode, Constr8);
         c.add(lblCourseCode);
         GridBagConstraints Constr9 = new GridBagConstraints();
         Constr9.gridx = 4;
         Constr9.gridy = 2;
         Constr9.gridwidth = 1;
         Constr9.gridheight = 1;
         Constr9.fill = GridBagConstraints.HORIZONTAL;
         gridBag.setConstraints(lblCreditHours, Constr9);
         c.add(lblCreditHours);
         GridBagConstraints Constr10 = new GridBagConstraints();
         Constr10.gridx = 6;
         Constr10.gridy = 2;
         Constr10.gridwidth = 1;
         Constr10.gridheight = 1;
         Constr10.fill = GridBagConstraints.HORIZONTAL;
         gridBag.setConstraints(lblGrade, Constr10);
         c.add(lblGrade);
         //ROW 4 is built by the event handler cbNumberCourses.addItemListener at line 191; insert panel to hold ROW 4
         //ROW 5
         GridBagConstraints Constr11 = new GridBagConstraints();
         Constr11.gridx = 6;
         Constr11.gridy = 11;
         Constr11.gridwidth = 1;
         Constr11.gridheight = 1;
         Constr11.fill = GridBagConstraints.HORIZONTAL;
         gridBag.setConstraints(calculate, Constr11);
         c.add(calculate);
         //ROW 6 is added in the SubmitButtonHandler at line 242
         calculate.addActionListener(calculateButton);
         cbNumberCourses.addItemListener(
                   new ItemListener(){
                        public void itemStateChanged(ItemEvent e){
                             for (int i = 0; i < cbNumberCourses.getSelectedIndex(); i++){
                                  label = new JLabel(Integer.toString(i+1));
                                  coursCode = new JTextField(10);
                                  GridBagConstraints ConstrA = new GridBagConstraints();
                                  ConstrA.gridx = 0;
                                  ConstrA.gridy = i+4;
                                  ConstrA.gridwidth = 1;
                                  ConstrA.gridheight = 1;
                                  ConstrA.fill = GridBagConstraints.HORIZONTAL;
                                  gridBag.setConstraints(label, ConstrA);
                                  c.add(label);
                                  GridBagConstraints ConstrB = new GridBagConstraints();
                                  ConstrB.gridx = 2;
                                  ConstrB.gridy = i+4;
                                  ConstrB.gridwidth = 1;
                                  ConstrB.gridheight = 1;
                                  ConstrB.fill = GridBagConstraints.HORIZONTAL;
                                  gridBag.setConstraints(coursCode, ConstrB);
                                  c.add(coursCode);
                                  credits[i] = new JComboBox(creditHours);
                                  GridBagConstraints ConstrC = new GridBagConstraints();
                                  ConstrC.gridx = 4;
                                  ConstrC.gridy = i+4;
                                  ConstrC.gridwidth = 1;
                                  ConstrC.gridheight = 1;
                                  ConstrC.fill = GridBagConstraints.HORIZONTAL;
                                  gridBag.setConstraints(credits[i], ConstrC);
                                  c.add(credits[i]);
                                  grade[i] = new JComboBox(combGrades);
                                  GridBagConstraints ConstrD = new GridBagConstraints();
                                  ConstrD.gridx = 6;
                                  ConstrD.gridy = i+4;
                                  ConstrD.gridwidth = 1;
                                  ConstrD.gridheight = 1;
                                  ConstrD.fill = GridBagConstraints.HORIZONTAL;
                                  gridBag.setConstraints(grade[i], ConstrD);
                                  c.add(grade[i]);
                             c.validate();
         private class CalculateButtonHandler implements ActionListener{
              public void actionPerformed(ActionEvent event){
                   double creds, points, qualityPoints, gpa;
                   double totalQualityPoints = 0;
                   double totalCredits = 0;
                   for (int i = 0; i < cbNumberCourses.getSelectedIndex(); i++){
                        System.out.println(i);
                        System.out.println(credits[i].getSelectedItem());
                        System.out.println(grade[i].getSelectedItem());
                        //creds = Double.parseDouble(creditHours[credits[i].getSelectedIndex()]);
                        creds = Double.parseDouble((String)credits[i].getSelectedItem());
                        points = gradePoints[grade[i].getSelectedIndex()];
                        totalCredits = totalCredits + creds;
                        qualityPoints = creds * points ;
                        totalQualityPoints = totalQualityPoints + qualityPoints;
                        System.out.println(creds);
                        System.out.println(points);
                   gpa = totalQualityPoints / totalCredits;
                   String yourGPA = "Your GPA is: " + gpa;
                   lblYourGPA = new JLabel(yourGPA);
                   GridBagConstraints Constr12 = new GridBagConstraints();
              Constr12.gridx = 3;
              Constr12.gridy = 12;
              Constr12.gridwidth = 1;
              Constr12.gridheight = 1;
              Constr12.fill = GridBagConstraints.HORIZONTAL;
              gridBag.setConstraints(lblYourGPA, Constr12);
              c.add(lblYourGPA);
              c.validate();
         public static void main(String[] args) {
              GPACalc mf = new GPACalc();
              mf.setSize(650,700);
              mf.setVisible( true ); // display frame

    I changed the cbNumberCourses.addItemListener to an ActionListener. For whatever reason, this has fixed all my problems.

  • How 2 assgin a character value to the auxillary cell

    Hi,
         I'm assigning a character value to the auxiliary cell in the macro. But it gives me a dump. So do let me know can I assign a character value to the auxiliary cell ( I need to display this value for the alert text).
    Thanks,
    Siva.

    Why are you trying to use a character in the planning book - why not a representative value in numbers
    but if you HAVE to use characteristic then you can also try to use the notes functionality (right click on a cell and go to notes if you have not seen this )
    These notes are usually anchored to a cell. These notes are stored in a table (check in se 16 with wildcard on notes ) and is associated to the value of a cell
    So if you can reference a cell value and put in the conditons to the values on it you might be able to manipulate the values in the table for notes and this will cause the notes in the interactive planning boo to change accoring to the value of the cell

  • Assign a value from dropdownlist to input field value on BSP page

    Hi,
    I'm new to SAP and ABAP. We have a CRM project in which I have to maintain BSP pages.
    Now, coming to my problem: I have a input field with
    value = "//BTAdminH/HeaderInfo"
    This field is normally maintainable. The required function is now to set this field as not maintainable/readonly. Then, the value should be set automatically to an value, which will be selected from a dropdownListBox. After saving, the value HeaderInfo should have the same value like the selected value from the dropdownListBox.
    How can I now set the field as readonly (this should be the easier part) and
    how can I set the value for the HeaderInfo to the value of the selected value from the dropdownListBox?
    If I set it directly like this
    value = "//BTActivity/Priority"
    it is shown on the BSP page correclty, but it is not saved as HeaderInfo.
    Please help me.
    Enja

    Hello Gokul,
    test was only for test purposes! I am using as a separator the plus sign!
    But this is not the problem!
    In debugging, the local variable has the concatenated value! So, this is working!
    oncatenate ls_ddlb1-value ls_ddlb2-value ls_ddlb3-value into lv_headerinfo SEPARATED BY ' + '.
    But when I assign the value of my set_headerinfo to the local variable, then it is returning only the separator sign!!!
    if BTAdminH->GET_HEADERINFO( 'HEADERINFO' ) is initial.
        BTAdminH->SET_HEADERINFO( attribute_path = 'HEADERINFO' value = lv_headerinfo ).
      endif.
    If I declare the local variable as one of the dropdown values, then it is getting populated also for set_headerinfo
    lv_headerinfo  =ls_ddlb1-value.
    So, the assigning is also working! But it is not working, when the local variable equals more than one value! I hope that I could explained it in the right way for you!!!!
    So. why is the value for set_headerinfo not the same as the one for the local variable! The local variable has the correct value after the concatination.
    Regards
    Enja

  • Jsp:useBean and assigning a value to that bean

    Hello,
    I have a type called Country and I have declared a bean using the "jsp:useBean" syntax.
    I then try to assign a value to that bean in a scriptlet. Eventually I try to retrieve the values using "jsp:getProperty". The problem is that it appears to null.
    Here is the code of the jsp
    <%@ page language="java" %>
    <%@ page import="com.parispano.latinamericaguide.*" %>
    <%
    /* We retrieve the Countries object from the servlet context. */
    ServletContext sc = getServletContext();
    Countries cs = (Countries)sc.getAttribute("countries");
    %>
    <jsp:useBean id="country" class="com.parispano.latinamericaguide.Country"/>
    <%
    /* If the request contains a country id, then we set the variable. */
    country = cs.getCountryFromId(Integer.parseInt(request.getParameter("countryID")));
    %>
    <html>
    <head>
    <title>Country details</title>
    </head>
    <body>
    <table>
    <tr><td>Name</td><td><jsp:getProperty name="country" property="name"/><!-- This is not working--></td></tr>
    <table>
    <%
    out.println(country.getName());//This is working
    %>
    </body>
    </html>This is the code for the bean
    package com.parispano.latinamericaguide;
    * @author Julien Martin
    * Represents a country.
    public class Country implements Comparable {
         private int id;
         private String name;
         private int landArea;
         private String capital;
         private String currency;
         private String flag;
         private String internet_domain;
         private String dialling_code;
         private float literacy;
         private float male_life_expectancy;
         private float female_life_expectancy;
         private String map;
         private int population;
         private int population_year;
         private float birth_rate;
         private int birth_rate_year;
         private float death_rate;
         private int death_rate_year;
         private int gdp;
         private int gdp_per_head;
         private int gdp_year;
         private float unemployment_rate;
         private int unemployment_rate_year;
         public Country() {
         public Country(
              int id,
              String name,
              int landArea,
              String capital,
              String currency,
              String flag,
              String internet_domain,
              String dialling_code,
              float literacy,
              float male_life_expectancy,
              float female_life_expectancy,
              String map,
              int population,
              int population_year,
              float birth_rate,
              int birth_rate_year,
              float death_rate,
              int death_year_rate,
              int gdp,
              int gdp_year,
              float unemployment_rate,
              int unemployment_rate_year) {
              this.id = id;
              this.name = name;
              this.landArea = landArea;
              this.capital = capital;
              this.currency = currency;
              this.flag = flag;
              this.internet_domain = internet_domain;
              this.dialling_code = dialling_code;
              this.literacy = literacy;
              this.male_life_expectancy = male_life_expectancy;
              this.female_life_expectancy = female_life_expectancy;
              this.map = map;
              this.population = population;
              this.population_year = population_year;
              this.birth_rate = birth_rate;
              this.birth_rate_year = birth_rate_year;
              this.death_rate = death_rate;
              this.death_rate_year = death_year_rate;
              this.gdp = gdp;
              this.gdp_year = gdp_year;
              this.unemployment_rate = unemployment_rate;
              this.unemployment_rate_year = unemployment_rate_year;
         public float getBirth_rate() {
              return birth_rate;
         public int getBirth_rate_year() {
              return birth_rate_year;
         public String getCapital() {
              return capital;
         public String getCurrency() {
              return currency;
         public float getDeath_rate() {
              return death_rate;
         public int getDeath_rate_year() {
              return death_rate_year;
         public String getDialling_code() {
              return dialling_code;
         public float getFemale_life_expectancy() {
              return female_life_expectancy;
         public String getFlag() {
              return flag;
         public int getGdp() {
              return gdp;
         public int getGdp_per_head() {
              return gdp / population;
         public int getGdp_year() {
              return gdp_year;
         public int getId() {
              return id;
         public String getInternet_domain() {
              return internet_domain;
         public float getLiteracy() {
              return literacy;
         public float getMale_life_expectancy() {
              return male_life_expectancy;
         public String getMap() {
              return map;
         public String getName() {
              return name;
         public int getPopulation() {
              return population;
         public int getPopulation_year() {
              return population_year;
         public int getLandArea() {
              return landArea;
         public float getUnemployment_rate() {
              return unemployment_rate;
         public int getUnemployment_rate_year() {
              return unemployment_rate_year;
         public void setBirth_rate(float f) {
              birth_rate = f;
         public void setBirth_rate_year(int i) {
              birth_rate_year = i;
         public void setCapital(String string) {
              capital = string;
         public void setCurrency(String string) {
              currency = string;
         public void setDeath_rate(float f) {
              death_rate = f;
         public void setDeath_rate_year(int i) {
              death_rate_year = i;
         public void setDialling_code(String string) {
              dialling_code = string;
         public void setFemale_life_expectancy(float f) {
              female_life_expectancy = f;
         public void setFlag(String string) {
              flag = string;
         public void setGdp(int i) {
              gdp = i;
         public void setGdp_per_head(int i) {
              gdp_per_head = gdp/population;
         public void setGdp_year(int i) {
              gdp_year = i;
         public void setId(int i) {
              id = i;
         public void setInternet_domain(String string) {
              internet_domain = string;
         public void setLiteracy(float f) {
              literacy = f;
         public void setMale_life_expectancy(float f) {
              male_life_expectancy = f;
         public void setMap(String string) {
              map = string;
         public void setName(String string) {
              name = string;
         public void setPopulation(int i) {
              population = i;
         public void setPopulation_year(int i) {
              population_year = i;
         public void setlandArea(int i) {
              landArea = i;
         public void setUnemployement_rate(float f) {
              unemployment_rate = f;
         public void setUnemployment_rate_year(int i) {
              unemployment_rate_year = i;
         public String toString() {
              return name;
         public int compareTo(Object o) {
              Country c = (Country)o;
              int cmp = name.compareTo(c.name);
              System.out.println(cmp);
              return cmp;
    }Can anyone please help?
    Thanks in advance,
    Julien.

    Thanks,
    I have added scope="application". It still show "null" indicating that the bean is not initialized with the properties. I would like a quicker way to initialize a bean property than invoking the setProperty tag for each property.
    Here is a simple example that demonstrates the problem:
    <%@ page language="java" %>
    <%@ page import="com.tests.*" %>
    <jsp:useBean id="monBean" class="com.tests.MonBean" scope="application"/>
    <%
    MonBean mb = new MonBean();
    mb.setName("toto");
    monBean= mb;
    %>
    <html>
    <head>
    <title>Lomboz JSP</title>
    </head>
    <body bgcolor="#FFFFFF">
    <jsp:getProperty name="monBean" property="name"/>
    </body>
    </html>And the bean
    package com.tests;
    public class MonBean {
    private String name;
    public String getName() {
         return name;
    public void setName(String name) {
         this.name = name;
    }This show "null".
    Any other idea why this is not working?
    Thanks,
    Julien

  • Assigning a value to a global binding

    I'm using a Global binding for a header field called ReportClassification. It ensures that if the user changes the value of the field, all the fields will be kept in sync.
    How do I pre-assign a value to the global so that the fields wil be pre-populated? I thought about having an initialize event that does the following :
    global.ReportClassification="UNCLASSIFIED";
    Doesn't seem to do anything.

    Yep. I'm still using Javascript. Maybe I need to understand how the Master Page fields are referenced from Pages. Essentially I can change the value of a master field from the master page field's initialize method. When I try to change it from the page (eg. in the pages initialize method or when the OK button is pressed on the dialog and the commit method is called) it doesn't update. There is no error but it just doesn't change.
    I've tried alerting the element from the commit method and I can get the element's value. I just can't set it. Is there some security issue doing on there. You can't change a master field value from a page.
    eg. In the commit method or in the initialize method of the page.
    app.alert("element="+ReportForm.pageSet.Page1.Header.ReportClassification);
    - returns [object XFAObject]
    app.alert("element.rawValue="+ReportForm.pageSet.Page1.Header.ReportClassification.rawValu e);
    - returns UNCLASSIFIED
    ReportForm.pageSet.Page1.Header.ReportClassification.rawValue="SOMETHING ELSE";
    - no change in the value

  • Assigning a Value to Text

    Okay so I am new to numbers and still trying to figure out a few things. My problem is I am trying to assign a value to text. It's nothing complicated I'm just trying to create a work schedule and I want a value of 1 (indicating 1 hour) assigned to each cell that has text in it.
    For instance John Doe is working in the office from 8-1. Each column has a heading that indicates that hour and each row is assigned to one employee. I'd like to highlight from 8-1 for John and insert the text "Office" in each cell and have it calculated at the end as 5 hours (1 for each cell that has the text office).
    Thanks for the help!
    Amsel

    As far as I know, the spreadsheet doen't behave this way.
    Highlighting a cell or a range of cells is not sufficient to trigger a function.
    In column D the formula is:
    =IF(C=TRUE,"Office","")
    in the footer cell of column D the formula is:
    =COUNTIF(D,"Office")
    Yvan KOENIG (from FRANCE vendredi 15 août 2008 15:03:41)

  • How to display updated values in an array of clusters?

    Hi all!
    I am designing and coding a LabView application. In one of the modal dialog boxes of the application, I have to dynamically create an array of a cluster in the front panel. The array of the cluster is one dimensional. The number of rows of the array control containing the clusters is dynamic, depending on the user input. I have selected number of rows of the array as 4 in the test vi. The number of columns is fixed to 1.
    The cluster comprises of two elements - a numeric indicator labeled "Machine #" and a radio button control with three choices. The three choices are "Pump", "Compressor", and "Fan". I am assigning a machine number to the numeric indicator in the cluster during initialization of the screen. Similarly, I am assigning a default selection - "Compressor", among the three choices of the radio buttons of the cluster. This is done for each element of the array.
    As far as I can figure out, I am assigning these values correctly. However, I am unable to see the changes on the front panel in the values of the elements within the cluster during the run time. What am I doing wrong? How can I solve this problem?
    I am uploading the test vi that I have written till now. Any help is much appreciated. Thanks a lot in advance.
    Sincerely,
    Aninda

    Hi!
    Maybe, I forgot to attach the VI in my previous posting. Here it is.
    Sincerely,
    Aninda
    Attachments:
    SetupScrn2.vi ‏59 KB

  • How to write values to an array and call these to produce an xy graph

    Hi, Hopefully someone can help. I have attahced my VI.
    I am happy with how to write data to a file, which I have already done. The next thing I want to do, is write the pressure and acoustic values to an array for the duration of my testing (Testing is when the log switch is on). Once I switch the log button on my front panel off, I want to be able to call another VI which will display an XY graph of the Pressure and acoustics Vs Time. This will be populated from the array I create. Can anyone please help.
    Thanks in advance.
    Attachments:
    PSV TEST MAIN.vi ‏203 KB

    Since you are acquiring one point at a time, use a shift register and build an array of points , bundle it and display on XY graph
    As shown in attached VI
    Attachments:
    PSV.vi ‏250 KB

  • AE CC 2014 - Wiggle Expression not assigning similar values on scale

    So I've just noticed that the wiggle expression no longer works how it used to. I found a released article explaining changes in the Noise Algorithm used for the wiggle expression what’s new and changed in the 2014 update to After Effects CC  |  After Effects region of interest and am referring to the "fixed bug in implementation of Perlin noise algorithm" section.
    I'm not sure if this is what's causing the issue but let me explain.
    I'm just adding a wiggle expression on to an object's scale.
    wiggle(5,50);
    This would normally scale the object's parameters with the same value. so it would be (100,100) to (125,125) and so on.
    Now however with CC2014 the expression is assigning different values to each value so getting (125, 115) or something even if the 'constrain proportions' button is enabled.
    So I tried to trick it:
    temp=wiggle(5,50);
    [temp[0],temp[1]];
    Still got different values even though i'm telling it to insert the same variable?
    temp=wiggle(5,50);
    temp;
    Still got different values... I don't get it can anyone help?

    Try this. Add an expression control slider to the layer with the following expression:
    wiggle(5, 50)
    Then add this expression to your scale property:
    w = value[0] + effect("Slider Control")("Slider");
    [w, w]
    The problem exists because wiggle will act on all of the values in the array of the property you have selected independently. so you have to set up something with only one value like an expression control slider.

Maybe you are looking for