Reading and storing variables

hello. i have a question about file i/o. say i have a text file that is names vars.txt and looks like this:
1
2
3
4
5
How can i take the first number and store it to a variable, take the second and store it to a variable, and so on? if you could give a short example, that would be excellant. just say the variables are int varone, int vartwo, etc. for ease of understanding. thanks a lot in advance.

BufferedReader br =  null;
try{
   br = new BufferedReader(new InputStreamReader(new FileInputStream("value.txt")));
   String s = "";
   while((s=br.readLine())!=null){
       System.out.println("Value is " + s);
}catch(IOException ie){}
finally{
   try{
       if(br!=null) br.close();           
   }catch(Exception e){}
}Its upto you to convert the String value into integer and do whatever you want.

Similar Messages

  • How to create,read and update variables in application scope in ejb

    In my project currently i am using three layers
    1. Struts for the presentation web layer(jsp, form beans and action class)
    2. Business logic using ejb.(uses other classes for storing business logic)
    3. Dao for data base object
    I need to implement caching using hashmap in the business logic (ejb). I am getting a path link everytime my business logic access a file. What I need to do is that as many users use the same link , i want to cache it into a hashmap, so that if the same file link is accessed again it can directly got from the hashmap and hence the processing time decreases.
    Please help me how to implement this?
    I have tried the following
    1. get servlet context in the struts action class and pass it to the ejb
    2. Using of static hashmap for storing that....which i cant use coz that hasmap needs to be updated in some other java class
    Awaiting ur reply eagerly

    use CTAS method in your requirement, first before read [b]this
    venki
    http://venki-hb.blogspot.com/

  • Reading and Storing Temperatur​e

    Hello,
    I am new to LabVIEW programming. I have jsut purchased the cFP-1804 and TC-120. My goal is to read the 8 thermocouple temperatures simulateneously, display that data on screen and store it in an excel file. Currently, I am trying to just read the thermocouples. I have started out with one to keep things simple. I was able to read the temperature in MAX when I tested the channel. I figured al I needed to do was go to the the block diagram of my project go to Express>>Input>>Fieldpoint. This brings up the configure Fieldpoint window I browse and find the channel I want to use and wire the value out area to a numeric indicator. However when I run it I get the "Error 32812 occurred at FP Read.vi". I have searched the forums and don't quite understand the KB articles. I would figure if I went through the configure FieldPoint window it would have performed all of the work for me.
    So, my first question is, Am I performing the read operation with the correct VI? I would ideally like to have just have indicators on the front panel and not have to insert the iak file name and the other information associated (ie - have all of this information preprogrammed).
    Is there an easy way to wire a button to the VI to initiate the temperature being read? There does not seem to be a place to wire a boolean button to the Express>>Input>FieldPOint VI I've chosen.
    Any help is greatly appreciated.

    I tried the Instrument IO Assistant put I get a prompt telling me that MAX or Instrument IO assistant is not isntalled correctly. I have these install CD's at work so I can't check and see if that is the problem. I am sure MAX is installed correcly b/c I have been using it. Is the instrument IO assistant an add on?
    Since I cannot use the Instruement IO Assistant I thought I would try my luck with the FieldPoint VI's. I was unable to find any example VI's that shipped with the FieldPoint.
    But I did wire up a program that I was sure to work. I wanted to read a single thermocouple. So I wired a FieldPoint IO vi to the FR Read (polymorphic) vi which in turn connect to a Waveform chart. I just wanted this to run conitnuously, so, I put a while loop around it to run.
    Upon starting the program I get the error: "Error 32812 occurred at FP Read.vi"
    I searched the forums for why this error could have occured and tried the fix  the knowledge base article (Why Do I Get Error 32812 From Some FieldPoint Modules But Not Others?) gave. The fix basically says to go into MAX and click
    "Find Devices" I did that and it did not help. Anyone have any
    expreience with this error? I would greatly appreciate the help.
    The funny thing is I can write to my DO-400 module without any errors but not the TC-120 (I am trying to read from).
    Thanks

  • Reading and storing data in an array

    I'm trying to write a program to read in a list of numbers, store them in an array and then output them in ascending order.
    I've written the following so far but when executed, I got this error...
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 100
         at ReadingAnArray.main(ReadingAnArray.java:30)
    Could someone look at this and tell me where I went wrong?
    int[] numList = new int[100];
              int number = 0;
              int count = 0;
              int i, j;
              int temp;
              System.out.println("Enter up to 100 positive integers ending with " + SENTINEL);
              number = console.nextInt();
              while (number != SENTINEL)
                   numList[count] = number;
                   count++;
              for(i=0; i<numList.length; i++)
                   for(j=i+1; j<numList.length; j++)
                        if (numList[i] > numList[j])
                             temp = numList;
                             numList[i] = numList[j];
                             numList[j] = temp;
              for(i=0; i<numList.length; i++)
                   System.out.println(numList[i]);          
    When clicking on the error message, it points to the code line numList[count] = number;Any help is very much appreciated.
    ntjava
    Message was edited by:
    ntjava
    Message was edited by:
    ntjava

    Here's my snippet of code so far. If I entered 12 1 26 15 34 75 -999, it will fill the first 94 lines with 0 and the last 6 in ascending order like
    0
    0
    1
    12
    15
    26
    34
    75
    How do I get it to fill the first 6 elements of the array with my numbers and skip the rest?
         System.out.println("Enter up to 100 positive integers ending with " + SENTINEL);
              number = console.nextInt();
              for(count=0; count < numList.length; count++)
                   while (number != SENTINEL)
                        numList[count] = number;
                        count++;
                        number = console.nextInt();
              for(i = 0; i < numList.length; i++)
                   for(j= i+1; j < numList.length; j++)
                        if (numList[i] > numList[j])
                             temp = numList;
                             numList[i] = numList[j];
                             numList[j] = temp;
              for(i = 0; i < numList.length; i++)
                   System.out.println(numList[i]);          
    Message was edited by:
    ntjava

  • Modbus Ethernet read and write to a Eurotherm 6180XIO Modbus server using LV8.2 shared variables

    I am having EXTREME difficulty trying to establish communications with a Modbus device using LV8.2 shared variables.  The device is a Eurotherm 6180XIO Datalogger configured as a Modbus master.  The PC and a cFP-1804 are slaves.  All IP addresses are set correctly.  This approach using shared variables would seem simple, but I can't find any examples or proper guidance on how to get it working.  I am trying to avoid having to mess around with TCP/IP, OPC, or any other old-fashioned method.
    I have read many threads on related topics but none directly apply to this situation.  I have created a library containing a Modbus I/O server and shared variables bound to read and write holding registers.  I have followed all recommended tips for creating such variables but I can neither read or write data.  All data types are U16 due to Modbus protocol limitations.  I have also applied the LV x10 factor in the most significant digit in the register offset (6 digits instead of 5).
    I have a cFP-1804 on the same network which reads into the datalogger OK.  The registers I use are 31000 (for CH0 on module 0, 31002 for CH1, etc) and the data can be read as FLOAT32.  I have updated the firmwate on the 1804 to the latest level.  I cannot even get shared variables to read SGL values.  Using registers 301001 for CH0 and 301002 for CH1 I can only read U16 values, and not a 2-word SGL.
    Third party Modbus simulation software is able to write to and read from registers very easily, but not LabVIEW.
    Some questions are:
    - do I use a Modbus master or slave as an I/O server in the library as a target for binding the shared variables?
    - is there some other wierd translation in register offsets between LabVIEW and traditional Modbus?
    - is this actually possible using shared variables or am I wasting my time?

    Sending the whole 60-character string using a string or array would be the most efficient.  I have tried both methods, and these only cause the datalogger to flag a message log but no text is displayed.
    For a string variable, I have used the following binding "My Computer\Modbus Test.lvlib\ModbusServer6180\442305", where ModbusServer6180 is a Modbus I/O server configured with the logger IP address, and 42304 is the register offset at the start of the text block in the logger.  I need to write to 30 consecutive registers starting with this one.  I am not using buffering and have not enabled single writer.
    Can anyone confirm whether this method should work in 8.2?
    Does the string need a special termination character?

  • How many ways to read and write a local variable in a called VI?

    Ciao!
    I'm producing my first TestStand sequence. It is called "FirstAttempt" and it is made by a single step which calls a VI. One of the first dilemmas i encountered realizing this sequence is how to read and write a local variable (created going in Variables -> Locals ('FirstAttempt') -> <right click to insert local>) in the called VI.
    The first way (the only one i tried) is to create a control and an indicator on the VI front panel, connect them to their respective terminals in the connector pane and then specify (going in Step Settings -> Module) that these connectors (shown in the Parameter Name column) are linked to the local variable (selected in the Value column).
    The second way (not tried) consists in using TestStand API: create a Sequence Context reference on the VI front panel, link it to a property node in the block diagram, select the property "Locals" and extract from this the local variable name and value which, i think, can be readable and writable.
    So...
    Are the shown ways correct?
    Are there other ways?
    Knowing that a "local" variable can be considered "global" within the whole sequence, is there the possibility to simply create a reference to the local variable and use the reference in the called VI block diagram in order to save space in the connector pane (if using method 1) or in the block diagram (if using method 2)?
    Thanks!
    Message Edited by aRCo on 09-17-2009 05:09 AM

    Hi,
    Before TestStand 3 you would use the second way you quoted as its the only way.
    But now you would use the first way you quoted. You may still what to pass the SequenceContext if you were going to use the TestStand API. For TestStand 3.x and above you would use this way as the first chose. (Personnelly, I would not pass the SequenceContext into a VI if I know it was never going to be used in that VI.)
    Not sure I understand your final comment, maybe you are liking it to passing the reference of a control to a subVI so that the control can be updated from within the subVI.
    If this is the case and you had a situation where you had a step that was running in parallel with the rest of the steps in the sequence either as a separate thread or execution and were dependent on the contents of the  local variable changing from that parallel running step, then you would have to use the API SetVal method to change the local.
    Hope this is clear.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Having Truble Reading and Echoing Using PHP in HTML. Possible Variable Scope Problem?

    Hey guys,
       Thanks for your always knowledgable help! Today I am working with displaying text from a text file in an HTML table using PHP. I can't get the data to display properly, I think it has something to do with the scope of the variables, but I am not sure. Here is the code I am struggeling with:
    <table width="357" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td width="165">Pizza 1</td>
        <td width="186"><? echo  $price['0']; ?></td>
      </tr>
      <tr>
        <td>Burger 1</td>
        <td><? echo $price['1']; ?></td>
      </tr>
      <tr>
        <td>Drink 1</td>
        <td><? echo $price['2']; ?></td>
      </tr>
    </table>
    In the above PHP (not shown) the array $price is filled properly (I tested by echoing each bit line by line) but by the time we get into the HTML it seems the array is empty or it is not liking how I am calling it. Does the scope of a PHP variable end with the closing "?>" tag? Am I missing something? Bellow is the full code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    body {
        background-color: #333;
        color: #FFF;
    </style>
    </head>
    <body>
    <?php
    $menu=fopen("prices.txt","r") or exit("Unable to open file!");
    $price=array();
    $priceposition=null;
    $tempstring;
    //This loop does all of the READING and populating of variables
    while(!feof($menu))
        //Check to see if this is the first pass, if not add one to the array possition
        if ($priceposition==null){
            $priceposition=0;
        else{
        $priceposition++;
        //populate the temparary string
        $tempstring = fgets($menu);
        //Populate the array if the temporary string is not a comment
        if(substr($tempstring,0,2) != "//"){
            $price['$priceposition']= $tempstring;
            echo $price['$priceposition'];
      //End of reading loop
    fclose($menu);
    ?>
    <table width="357" border="1" cellspacing="0" cellpadding="0">
      <tr>
        <td width="165">Pizza 1</td>
        <td width="186"><? echo  $price['0']; ?></td>
      </tr>
      <tr>
        <td>Burger 1</td>
        <td><? echo $price['1']; ?></td>
      </tr>
      <tr>
        <td>Drink 1</td>
        <td><? echo $price['2']; ?></td>
      </tr>
    </table>
    </body>
    </html>
    and you can run the code on my test server here: christianstest.info/phptest/readwritetesting/readtest.php
    thanks guys!

    MurraySummers wrote:
    Try changing this -
    fclose($menu);
    to this -
    fclose($menu);
    echo "<pre>";exit(print_r($price));
    and see what you get.
    Wow, what a great little peice of testing code, thanks! That showed me the problem right away! Is there any way to test your php line by line in Dreamweaver CS6? I am used to computer programing in Visual Studio and Eclipse where they have an option of running code line by line and seing how variables populate and change with each line of code execution. Or is thier a program that can do this for PHP?

  • My Xtreamer media player won't read srt sub files downloaded from my iMac and stored in a 1Tb seagate external disk. However, the Xtreamer Elvira media player will read all the .avi files I have loaded in the external disk. Any ideas?

    My Xtreamer media player won't read srt sub files downloaded from my iMac and stored in a 1Tb seagate external disk. However, the Xtreamer Elvira media player will read all the .avi files I have loaded in the external disk. Any ideas?

    I am experiencing the same issue with a new external DVD burner, a Sony DRX-840U. When I load a CD into this external drive it appears in iTunes but when you go to import or play the CD iTunes indicates playing or importing for each individual track for just a moment. The end result is that nothing is ever imported or played. I am experiencing this on two different systems. One a notebook running Win2K and the other a desktop running XPpro. If I use the internal DVD drives on either of these systems everything work just fine. Yet I am able to use this new external DVD drive with every other application. For example Window Media Player has no problem playing or importing the same CD that iTunes fails on. The last person indicated that if one set the DVD drive in question to be the drive of choice under preferences>advanced>burning that all was ok. I my case this Sony external drive is the drive listed as the drive of choice for burning yet the issue still exists.
    As this appears to be an issue that others are also experiencing help from Apple Tech Support would be greatly appreciated.

  • Reading digital line and local variable

    I am using digital lines in my program to start and stop "Flat Sequence Structures"
    like time measurement ( 4 sequence, start and stop time with "Tick Count" )
    Is it good behaviour if i use once "Read from Digital Line.vi" and other starts and stops etc. with Local variables?
    Or can i just use "Read from Digital Line.vi" many times in my VI? (same line)

    Most experienced LV programmers try to avoid both sequence structures and local (and global) variables. The state machine architecture is often preferred. Look at the examples with LV and search for "State machine" on this site.
    I would probably use one read line or read port VI in a loop and pass the data to other, independent loops for processing (the timing) via queues.
    Lynn

  • File wont read,  and I'm ready to tear my hair out!!!

    Good Morning
    I wrote a short program to read a .txt file and assign values into an array. My program works, woo hoo (or so I thought...)
    But when I took the same code, and pasted into a function of a larger program, the file doesnt get read! In my larger program, I need the function to return the value of the array so I can use the array elsewhere. II originally thought the file didn't read because the .txt file and program were not stored in the same folder, which is not the case. So now I am wondering if I needed to pass a value to the function, or to call the function from inside the larger file, or basically what the heck I am missing! I am just not seeing it and am totally lost and dreaming of this, when I sleep of course!
    Code that works on its own -
    import java.io.*;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.Scanner;
    public class readInput {
       public static void main(String args[])throws FileNotFoundException, IOException  {
                //declaration of variables
                int i; // close the term.dat file
                int counter = 0; // counter for loop, also the index of the array for terms
                   int [] termInfo  = new int[3];
                  int test =0;
               try {
                FileReader termInput = new FileReader("terms.txt"); // creates file reader for rates file
                Scanner scan1 = new Scanner(termInput); // scanner searches the file for what is requested
                while (scan1.hasNext()) {
                    if (scan1.hasNextInt()) {
                        // if found, assign to an array value
                        i = scan1.nextInt();
                        termInfo[counter] = i;
                        System.out.println("Value " + test + " in term array is " + termInfo[counter]);
                        counter++;
                        test++;
                    } //close of if
                } //close of while
              termInput.close(); // close the term.dat file
             } // CLOSE TRY
              catch (FileNotFoundException e) {
              System.out.println("ERROR!!! FILE NOT FOUND");
               }  // close catch
         } //close of readInput
    }//close of mainCode from function that compiles but doesnt read (this is a rather long program, so I am only giving the function itself) --
        //function to read the files and load arrays
        public int[] readInput() throws FileNotFoundException, IOException  {
              int i; // term variable to hold content of file
               int counter = 0; // counter for loop, also the index of the array for terms
               int test =0;
               try {
                FileReader termInput = new FileReader("terms.txt"); // creates file reader for rates file
                Scanner scan1 = new Scanner(termInput); // scanner searches the file for what is requested
                while (scan1.hasNext()) {
                    if (scan1.hasNextInt()) {
                        // if found, assign to an array value
                        i = scan1.nextInt();
                        termInfo[counter] = i;
                        System.out.println("Value " + test + " in term array is " + termInfo[counter]);
                        counter++;
                        test++;
                    } //close of if
                } //close of while
              termInput.close(); // close the term.dat file
             } // CLOSE TRY
              catch (FileNotFoundException e) {
              System.out.println("ERROR!!! FILE NOT FOUND");
               }  // close catch
              return termInfo;
    } //close of readInput

    Here's how I'd do that... with a "generic" (i.e. reusable) helper class...
    package krc.utilz;
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.LinkedList;
    import java.util.Set;
    import java.util.HashSet;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Scanner;
    import java.io.File;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    * A bunch of Helper methods for int and Integer arrays.
    public abstract class IntArrayz
       * Converts a List<Integer> to an array of int's.
       * If list is null then null is returned
       * If list is empty then an empty int array is returned.
       * @param list List<Integer> the List of Integers to convert
       * @return int[] - list as an array of ints.
      public static int[] toIntArray(Collection<Integer> list) {
        if (list==null) return null;
        if (list.isEmpty()) return new int[0];
        int[] a = new int[list.size()];
        int i=0;
        for (Iterator<Integer> it=list.iterator(); it.hasNext(); ) {
          a[i++] = it.next();
        return a;
       * Reads and returns an array of int's from the given File.
       * @param File file - The file to read. Format must be as required by
       *  http://java.sun.com/javase/6/docs/api/java/util/Scanner.html#nextInt()
       * @return int[] - Array of integers populate with the contents of the file.
      public static int[] read(File file) throws FileNotFoundException, IOException  {
        List<Integer> result = new LinkedList<Integer>();
        FileReader reader = null;
        try {
          reader = new FileReader(file);
          Scanner scanner = new Scanner(reader);
          while ( scanner.hasNext() ) {
            if (scanner.hasNextInt()) {
              result.add(scanner.nextInt());
            } else {
              scanner.next(); // skip the next token.
        } finally {
          if(reader!=null)reader.close();
        return IntArrayz.toIntArray(result);
    }(many methods removed to make it < 5000 characters)
    usage
    package krc.utilz.test;
    import krc.utilz.IntArrayz;
    import java.io.File;
    import java.util.Arrays;
    class IntArrayzTest
      public static void main(String args[] ) {
        try {
          System.out.println(Arrays.toString(IntArrayz.read(new File("integers.dat"))));
        } catch(Exception e) {
          e.printStackTrace();
    }Cheers. Keith.

  • How can i read a stored picture in oracle Long Raw datatype? blob or clob?

    How can i read a stored picture in oracle Long Raw datatype? Like a blob or clob?....i am using jdk 1.3
    This is because...i tried to read it like a blob but i obtain a exception...about Type of column no valid......but the column exist....and it contains the long raw datatype of the pictures.....this is my code:
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.InputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.DriverManager;
    import oracle.sql.BLOB;
    import oracle.sql.BLOB.*;
    import oracle.jdbc.driver.*;
    import java.sql.*;
    class rec_ima1
    public static void main(String h[])
    Connection con = null;
    Blob bl;
    final ImageIcon image1;
    JPanel photo;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
    String query = "Select * from pictures where ID = '18840'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    if (!rs.next())
    System.out.println("Empty Result Set");
    bl = rs.getBlob(5);
    if (bl == null) {
    System.out.println("Null Blob");
    return;
    InputStream is = bl.getBinaryStream();
    int imageLength = (int) bl.length();
    System.out.println(imageLength);
    System.out.println(bl.length());
    byte[] imageData = new byte [imageLength];
    is.read(imageData, 0, imageLength);
    image1 = new ImageIcon(imageData);
    photo = new JPanel() {
    public void paint(Graphics g){
    g.setColor(Color.lightGray);
    g.drawImage(image1.getImage(), 0, 0, this);
    } catch (Exception e) {
    e.printStackTrace();
    Now i tried using clob:
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.InputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.DriverManager;
    import oracle.sql.CLOB;
    import oracle.sql.CLOB.*;
    import oracle.jdbc.driver.*;
    import java.sql.CallableStatement;
    class rec_ima4
    public static void main(String h[])
    Connection con = null;
    Clob cl;
    JPanel photo;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    con= DriverManager.getConnection("jdbc:oracle:thin:@123.3.12.213:1521:db_name","user","password");
    con.setAutoCommit (false);
    String query = "Select * from pictures where ID = '18840'";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery( query );
    while (rs.next()) {
    oracle.sql.CLOB clob = (CLOB) rs.getObject(5); //line 47
    } catch (Exception e) {
    e.printStackTrace();
    This is the runtime exception:
    java.lang.ClassCastException: [B
    at rec_ima4.main(rec_ima4.java:47)

    Thanks by answering to me......
    Well....i did that....but what is ImageIO?....
    I declared a ImageIcon imageIO, but this give me the following:
    rec_ima3.java:49: cannot resolve symbol
    symbol : class BufferedImage
    location: class rec_ima3
    BufferedImage bi = ImageIO.read(bInput);
    ^
    rec_ima3.java:49: cannot resolve symbol
    symbol : variable ImageIO
    location: class rec_ima3
    BufferedImage bi = ImageIO.read(bInput);
    ^
    What classes i have to import?.....what is ImageIO?
    Thanks

  • How to use Text and Image variables for printing

    I have been working on product configurator with AS3 for several months now.
    I am not proficient with AS3.
    Now, it seems that maybe my design is all wrong.
    Is there a proper way to do this?
    I have a main timeline that has movie clips showing images of different options for the product.
    On the first frame, I use buttons to select the choice for option 1 from the Option1_mc.
    Then I store the choice in a variable.
    I use a button to go to the next choice (frame 10.)
    On frame 10, I use buttons to select the choice for option 2 from the Option2_mc.
    This is stored in another variable.
    There are about 10 options that are selected and stored in variables.
    Some are text values and others are instances of images from the Option movie clips.
    I made a Print_mc to use for printjob.
    I can't get the values of the variables to display in the first frame for printing.
    Any helpl would be appreciated.

    you're welcome.
    you won't insert a variable into a textfield.  you'll assign the text property of your textfield to be the value one of your variables points to.
    so, for example, if you have:
    var var1:String="this is a test";
    you can use:
    tf.text=var1;

  • Read a session variable

    I have set a session variable "var1" in the pagedef using ADFUtil.setEL("#(sessionScope.var1)",myValue);
    How do I read this session variable, "var1" in select statement in a View Object please?
    Thanks

    Do NOT try to access the variables stored in a scope in a view controller project directly in the Model layer. It breaks the MVC paradigm.
    For your use-case,
    1) Create a View Object with a View Criteria that has a single bind variable.
    2) Have a method in AMImpl that takes a single parameter and applies the View criteria for the View Object Instance in 1) by setting the value for the bind variable with the input parameter and execute the View Object and expose this method through client interface.
    3) Use this method in ViewController project and Invoke the method.
    Thanks,
    Navaneeth

  • Loading External SWF and setting variables

    Hello Everyone.
    I'm sure you are all a where of the FlashVars attribute for
    Flash embeds which holds variables for SWF's when they are
    rendered. I'm attempting to load an External SWF dynamically
    from within my own SWF and need to provide it with the values
    normally stored in the FlashVars. For the example below I
    wait until the External SWF is completely loaded using the
    onLoadInit event from moviecliploader and then i attempt to
    set the required variables that the loaded SWF needs. This works
    great in test and debug mode (ie. Test Movie and Debug Movie
    from the Control menu), but when i publish my FLA to SWF and run
    the SWF the variables will NOT get set in the loaded External SWF.
    From my readings ive people have mentioned that the player is only
    able to access Methods of an External SWF. If this is the case then
    how do they expect people to set the FlashVars of dynamically
    loaded SWFs? I investigated the loadVariables procedure as well and
    had the same results in test mode and was wasn't reliable because
    of timing issues.
    The sample source is below... if anyone has any ideas or has
    come across this issue before, I would really appreciate some
    insight.
    Thank you in advance for your time.
    var loader_mc:MovieClipLoader = new MovieClipLoader();
    var mclListener:Object = new Object();
    loader_mc.addListener(mclListener);
    mclListener.onLoadProgress = function(target_mc:MovieClip,
    numBytesLoaded:Number, numBytesTotal:Number) {
    // DO NOTHING
    mclListener.onLoadComplete = function(target_mc:MovieClip) {
    // DO NOTHING
    mclListener.onLoadInit = function(target_mc:MovieClip) {
    // WORKS IN TEST MODE NOT IN PUBLISH/SWF MODE
    target_mc._root.param1 = "value1";
    // WORKS IN TEST MODE NOT IN PUBLISH/SWF MODE
    _level0.container_mc.param1 = "value1";
    this.createEmptyMovieClip("container_mc",
    this.getNextHighestDepth());
    container_mc._lockroot = true;
    loader_mc.loadClip("somecoolflash.swf", container_mc);

    I've tried that as well and it behaves the same as onLoadInit
    ... Works when i test but doesnt when i publish to a swf. I think
    this is security related and the flash player just cant write to a
    loaded swf and set variables.

  • Error while checking in and storing

    Dear All
    I am trying to attaching a file using CV01n, when i am doing for check in - i am getting following error message
    Error while checking in and storing
    Message no. 26253
    What may be the issues, even my my repositories working fine ( configured contentserver, status is active)
    Regards
    chandra

    Dear Chandra,
    please check in transaction OACT if the storage category is assigned to the correct content repository. Further please read also through notes 707568 and 833576.
    Best regards,
    Christoph

Maybe you are looking for

  • Excise amount not appearing in MIRO

    Hi, For a PO line item I have captured the excise invoice thro J1IEX and then created a GR with reference to the Excise invoice. Due to some reason I reveresed the GR without posting the excise invoice. Then again the GR was done and the Excise invoi

  • Mouse hand over a block of multiple records help

    Hello , i have add a bean i my form so that i could change the cursor to a hand when the mouse is over an item. the problem that i have is that the block is a multiple record block i am showing 5 records. so the mouse change only in the first record

  • ALV output save

    Hi everyone, I m very new to ABAP objects and i have never worked on this. I have one requirment, In my ALV(Normal not Oops) output there r some records. If i select one record and click on save it shud be saved.The user shud select only one at a tim

  • Verizon has mostly only 4G LTE smartphones. The iPhone 5 is rumored to have 4g LTE

    Will the iPhone 5 be only avaiable with 4G LTE or i will that be optional?

  • Import // rename photos

    does anybody know how can I replace about 2000 photos in indesign without having to import and rename the photos? for example if I have 4 photos in a document, named A,B,C,D located in a folder named X and I want to replace them with 4 different phot