Substitution-Strings in external JS-Files

Hi, can anybody tell me how to include external JavaScript-Files? When loading them in "Static-Files" Substitution-Strings like "#WORKSPACE_IMAGES#" or "&WORKSPACE_IMAGES." are not working. Thanks for your help!

Hi,
This is known limitation. See these posts
referencing workspace image in CSS file
Re: How to reference CSS in a template
2.2 uploaded css files, images and substitution strings
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

Similar Messages

  • How to read in text string pairs from an external txt file?

    I have an external txt file containing 26000 pairs of strings in the format
    string1a   string1b
    string2a   string2b
    string26000a string26000b
    all strings are always 4 characters in length.  For example,
    a123   jkdh
    b456   uusp
    How can use TestStand 2013 to input this data into local string array varaibles?  I also have legacy testers running TestStand 3.5, so I need a TestStand 3.5 solution as well.  Thanks in advance for any ideas.  Hopefully this can be done in TestStand without the use of LabView or LabWindows/CVI.

    Daniel E., thanks for the reply. 
         It is very frustrating to have to implement workarounds in order to access text in an external file when using TestStand.  TestStand already reads in text ini files, so it would probably take a TestStand software developer all of 1/2 day to write the code and 1/2 day to debug it.  Here I will restate the obvious.  Engineers have to deal with data, sometimes data generated from other applications.  Sharing data in a text file is one of the most basic functions (and one of the easiest to implement).  When I think of all the effort needed to support ActiveX, but NI did not see it fit to give TestStand users simple text file read/write functionality, it does not make sense to me.  Maybe it was too simple or mundane a task so it did not get developed?  Whatever the reason, I think users of TestStand deserve this basic functionality.
         Even if TestStand cannot read the data directly into array variables, it should provide some mechanism to read the text from the file, either line by line or all file text into a string, so the data could then be parsed into the array variables I need.
         I will pursue a CVI or LabView solution.  Please also know that I am not directing these comments at you, I do appreciate your reply.
    Regards,
    Ron

  • Using Flashvars to load external mp3 files

    I am trying to find a very good step by step tutorial on using "Flashvars" to load external mp3 files, I have been searching on google and the many I have found fall short in some way or another. From what I have been able to gather, I have tried using the code in red (commented out), which works, and modify it to use "Flashvars". The code that works, the mp3 file is hard coded, but my goal is to use "Flashvars" which I am attempting to do in the code following the code in red. I am also including the html code. Any help will be greatly appreciated.
    Thanks,
    David
    var soundReq:URLRequest = new URLRequest("mardi_gras2.mp3");
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
        sound.play();
    var soundReq:URLRequest = new URLRequest(root.loaderInfo.parameters.audio);
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
        sound.play();
    HTML CODE
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="mySoundvars" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="mySoundvars.swf" />
       <param name="FlashVars" value="audio=mardi_gras2.mp3" />
        <param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed src="mySoundvars.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="mySoundvars" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" FlashVars="audio=mardi_gras2.mp3" />

    Ok waterlovinguy,
    I went back to my original code, and I got things to work... I think my whole issue was with the HTML CODE. So I decided to use the "SWFObject generator". I had never used it before, frankly I had never heard of it until I started my searches on "Flashvars".
    Thank you very much for all your assistance, PEACE,
    David
    Final Codes below
    var my_var:String = new String();
    my_var = root.loaderInfo.parameters.myflashvar;
    myText.text = my_var;
    var soundReq:URLRequest = new URLRequest(root.loaderInfo.parameters.audio);
    var sound:Sound = new Sound();
    var soundControl:SoundChannel = new SoundChannel;
    sound.load(soundReq);
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
    function playSound(event:MouseEvent):void
        SoundMixer.stopAll();
        soundControl = sound.play();
    function stopSound(event:MouseEvent):void
        soundControl.stop();
    HTML Code
                    <!>>
                    <!<![endif]>
                        http://www.adobe.com/go/getflashplayer
                        </a>
                    <!>>
                    </object>
                    <!<![endif]>
                </object

  • Binary I/O: Changing a String inside a Binary File

    Hi people, good morning!
    I have written a method here which takes two files as parameters. The method opens the first file (which may or may not be binary) using FileInputStream, loading it into a byte array. This byte array is converted to String by a CharsetDecoder (ISO-8859-1 encoding) and then i use indexOf() on this String to find the initial position of the token i need to find.
    Then, i transform the replaced token with getBytes() and insert it in the same position as the index found above, writing everything to the second file parameter as bytes to a FileOutputStream.
    The problem is that the destination file, when opened with the associated program (Eg: Oracle Forms Builder for *.fmb files) says the file is corrupt. Seeing that the original file opens and compiles normally, i believe the substitution process is corrupting the file.
    Do you know what my code below is missing? Strangely enough, when the replaced token is not larger than the original token, the file is not corrupted...
    Any help is greatly appreciated.
    Regards!
    Thiago Souza
              FileInputStream in = null;
              FileOutputStream out = null;
              try {
                   File f = new File(nameFrom);
                   in = new FileInputStream(f);
                   byte b[] = new byte[(int) f.length()];
                   in.read(b);
                   Charset cs = Charset.forName("ISO-8859-1");
                   CharsetDecoder cd = cs.newDecoder();
                   CharsetEncoder ce = cs.newEncoder();
                   byte[] headerChange = "$Header: MDBFNDENABLEEVENTS.fmb 115.1 2006/08/10 10:00:00 appldev ship $".getBytes();
                byte[] headerBytes  = "$Header: %f% %v% %d% %u% ship $".getBytes();
                   String header       = cd.decode(ByteBuffer.wrap(headerBytes)).toString();
                   int headerExcess      = headerChange.length - headerBytes.length;
                   header: for (int counter = 0; counter < 30; counter++) {
                        String fileContents = cd.decode(ByteBuffer.wrap(b)).toString();
                        int index = fileContents.indexOf(header);
                        if (index < 0) break header;
                         int headerEnd = index + headerBytes.length;
                         int endChunk = b.length - headerEnd;
                         byte[] initArray  = new byte[index];
                         System.arraycopy(b, 0, initArray, 0, index);
                         byte[] finalArray = new byte[endChunk];
                         System.arraycopy(b, headerEnd, finalArray, 0, endChunk);
                         b = new byte[b.length + headerExcess];
                         System.arraycopy(initArray, 0 , b, 0, index);
                         System.arraycopy(headerChange, 0 , b, index, headerChange.length);
                         System.arraycopy(finalArray, 0, b, headerEnd + headerExcess, endChunk);
                   } //Final FOR
                   out = new FileOutputStream(new File(nameTo));
                   out.write(b);
                   out.flush();
               } finally {
                    if (out != null) out.close();
                    if (in != null) in.close();
               }

    If the file is binary, converting it into a String is not a reversible operation and you will definitely get data corruption. You need to work directly in bytes.

  • 'Basic' external actionscript file/class usage

    Hey All,
    I'm a bit baffled by something that should, in my humble opinion, be a piece of cake...
    The setup is really easy. A simple application with a single textinput, a button and a text component.
    When the button is clicked a function is called that sets the text from the inputfield to the text component.
    code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Script>
            <![CDATA[
                public function click(inputText:String):void {
                    outPutTxt.text = inputText;
            ]]>
        </mx:Script>
        <mx:TextInput x="10" y="10" id="inputTxt"/>
        <mx:Button x="178" y="10" label="Button" id="Btn" click="{click(inputTxt.text)}"/>
        <mx:Text x="251" y="12" text="Text" id="outPutTxt"/>
    </mx:Application>
    As I said, really easy.
    What I want to do is put the function 'click' into an external actionscript file or class. And still be able to, from within the external file, modify the outPutTxt stuff.
    I'm aware that I could create a public bindable variable inside of the external file and then bind the outPutTxt to that variable, but I would really like to be able to 'simply' force the value...
    Is that possible? If yes: how plix
    If it's not possible, I'd like to know as well! And in that case, how would I then re-use the same instance of a class/file in multiple seperate components? Say I got a 'login' thingie where a user logs in (data stored externally in a seperate actionscript file/class) and I want to re-use that information on other pages... Or is this done automatically?
    Any and all comments/answers are higly appreciated!
    Pieter

    Hey Levancho,
    thanks for your answer!! Much appreciated.
    However, the code you proposed threw an error...
    Errormessage:
    ReferenceError: Error #1069: Property outPutTxt not found on controls.Control and there is no default value.
        at controls::Control/btnClick()[C:\...\FlexTest_03\src\controls\Control.as:13]
        at FlexTest_03/__Btn_click()[C:\...\FlexTest_03\src\FlexTest_03.mxml:11]
    So I tried something else where I bind the text in my OutPutTxt to a variable inside of the external class file.
    Code:
    Class:
    package controls
        public class Control
            [Bindable]
            public var outPutText:String = "";
            public function Control()
            public function btnClick(inputText:String):void {
                this.outPutText =  inputText;
    Mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Script>
            <![CDATA[
                import controls.Control;
                [Bindable]
                private var control:Control = new Control();
            ]]>
        </mx:Script>
        <mx:TextInput x="10" y="10" id="inputTxt"/>
        <mx:Button x="178" y="10" label="Button" id="Btn" click="{control.btnClick(inputTxt.text)}"/>
        <mx:Text x="251" y="12" id="outPutTxt" text="{control.outPutText}"/>
    </mx:Application>
    And this basically did what I wanted to do... so I just need to do some major binding between my application and the classes I'll be using for my business logic.
    Now for something else entirely...
    Is there a way for me to pass the instance of my class between flex components?
    Pieter

  • How to use external jar files ??

    Hi all,
    In my user-defined function for mapping (IR) , I want to make use a Class which is available in an external .jar file.
    Our XI is working on Windows2003 OS. I set the classpath in OS environment variables.
    But it is not working.
    Where I should set the classpath ?
    Can anyone help.
    Thanks in Advance
    Chemmanz
    Message was edited by: Chemmanz

    Hi Chemmanz,
    For user defined functions, it is not necessary to use the external jar files.
    Just follow the below steps:
           1.      To create a new user-defined function, choose <b>Create New Function</b> in the data-flow editor at the bottom of the screen, on the left-hand side.
           2.      Specify the attributes of the new function in the subsequent window:
    Name:
    Technical name of the function. The name is displayed in the function chooser and on the data-flow object.
    Description:
    Description of how the function is used.
    Arguments:
    In this table, you specify the number of input values the function can process, and name them. All functions are of type String.
           3.      In the subsequent window, you can create Java source code:
                                a.      You can import Java packages to your methods from the Imports input field, by specifying them separated by a comma or semi-colon:
    You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since all message mappings require these packages and therefore import them.
    In addition to the standard packages, you can also specify Java packages that you have imported as archives and that are located in the same, or in an underlying software component version as the message mapping.
                                b.      Create your Java source text in the editor window or copy source text from another editor.
           4.      Confirm with Save and Close.
           5.      User-defined functions are limited to the message mapping in which you created the function. To save the new function, save the message mapping.
           6.      To test the function, use the test environment.
    The new function is now visible in the User-Defined function category. When you select this category, a corresponding button is displayed in the function chooser pushbutton bar. To edit, delete, or add the function to the data-flow editor, choose the arrow next to the button and select from the list box displayed.
    Regards,
    Prasad U

  • Bug report:on application import: page template substitution strings double

    apex version: 4.2.0.00.27
    We encounter an issue when we import an application export. In all the page templates we see that the standard substitution strings in the HEADER and FOOTER area have been added for a second time.
    EXPORTED CODE:
    wwv_flow_api.create_template (
    p_id => 32176400365879390 + wwv_flow_api.g_id_offset
    ,p_flow_id => wwv_flow.g_flow_id
    ,p_theme_id => 20
    ,p_name => '_vo_One Level Tabs_Simple'
    ,p_is_popup => false
    ,p_header_template => '<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">'||unistr('\000a')||
    '<head>'||unistr('\000a')||
    '<title>#TITLE#</title>'||unistr('\000a')||
    '<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_common2.js"></script>'||unistr('\000a')||
    '<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker.js"></script>'||unistr('\000a')||
    '<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker-ext.js"></script>'||unistr('\000a')||
    '<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_show_hide_region.js"></script>'||unistr('\000a')||
    '<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_desktop_all.js"></script>'||unistr('\000a')||
    '<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_legacy.js"></script>'||unistr('\000a')||
    '<link rel="stylesheet" href="#IMAGE_PREFIX#app/pbh/css/pbh.css" type="text/css" />'||unistr('\000a')||
    '<!--[if IE]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_20/ie.css" type="text/css" /><![endif]-->'||unistr('\000a')||
    '#APEX_CSS#'||unistr('\000a')||
    '#TEMPLATE_CSS#'||unistr('\000a')||
    '#THEME_CSS#'||unistr('\000a')||
    '#PAGE_CSS#'||unistr('\000a')||
    '#TEMPLATE_JAVASCRIPT#'||unistr('\000a')||
    '#APPLICATION_JAVASCRIPT#'||unistr('\000a')||
    '#PAGE_JAVASCRIPT#'||unistr('\000a')||
    '#HEAD#'||unistr('\000a')||
    '</head>'||unistr('\000a')||
    '<body #ONLOAD#>#FORM_OPEN#'
    ,p_box =>
    '<div id="t20Tabs">#TAB_CELLS##NAVIGATION_BAR#</div>'||unistr('\000a')||
    '<table border="0" cellpadding="0" cellspacing="0" summary="" id="t20PageBody" width="100%">'||unistr('\000a')||
    '<td width="100%" valign="top" id="t20ContentBody">'||unistr('\000a')||
    '<div id="t20BreadCrumbsLeft">#REGION_POSITION_01#</div>'||unistr('\000a')||
    '<div id="t20Messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##REGION_POSITION_02#</div>'||unistr('\000a')||
    '<div id="t20ContentMiddle">#BOX_BODY##R'||
    'EGION_POSITION_03##REGION_POSITION_04##REGION_POSITION_05##REGION_POSITION_06#</div>'||unistr('\000a')||
    '</td>'||unistr('\000a')||
    '</tr>'||unistr('\000a')||
    '</table>'
    ,p_footer_template =>
    '<div class="smallfont">PBH Versie: #APP_VERSION#</div>'||unistr('\000a')||
    '#FORM_CLOSE# '||unistr('\000a')||
    '#DEVELOPER_TOOLBAR#'||unistr('\000a')||
    '#GENERATED_CSS#'||unistr('\000a')||
    '#GENERATED_JAVASCRIPT#'||unistr('\000a')||
    '</body>'||unistr('\000a')||
    '</html>'
    ,p_success_message => '<table summary="" border="0" cellpadding="0" cellspacing="0" id="t20Notification">'||unistr('\000a')||
    '<tr><td class="L"></td><td width="100%">#SUCCESS_MESSAGE#</td><td class="R"></td></tr>'||unistr('\000a')||
    '</table>'
    ,p_current_tab => '#TAB_LABEL#'
    ,p_non_current_tab => '#TAB_LABEL#'
    ,p_notification_message => '<table summary="" border="0" cellpadding="0" cellspacing="0" id="t20Notification">'||unistr('\000a')||
    '<tr><td class="L"></td><td width="100%">#MESSAGE#</td><td class="R"></td></tr>'||unistr('\000a')||
    '</table>'
    ,p_navigation_bar => '#BAR_BODY#'
    ,p_navbar_entry => '#TEXT#'
    ,p_region_table_cattributes => ' summary="" cellpadding="0" border="0" cellspacing="5" align="left"'
    ,p_breadcrumb_def_reg_pos => 'REGION_POSITION_01'
    ,p_theme_class_id => 1
    ,p_grid_type => 'TABLE'
    ,p_grid_always_use_max_columns => false
    ,p_grid_has_column_span => true
    ,p_grid_emit_empty_leading_cols => true
    ,p_grid_emit_empty_trail_cols => false
    ,p_has_edit_links => true
    ,p_translate_this_template => 'N'
    ,p_template_comment => ''
    RESULT IN APEX for the HEADER
    <html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">
    <head>
    <title>#TITLE#</title>
    <script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_common2.js"></script>
    <script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker.js"></script>
    <script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker-ext.js"></script>
    <script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_show_hide_region.js"></script>
    <script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_desktop_all.js"></script>
    <script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_legacy.js"></script>
    <link rel="stylesheet" href="#IMAGE_PREFIX#app/pbh/css/pbh.css" type="text/css" />
    <!--[if IE]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_20/ie.css" type="text/css" /><![endif]-->
    #APEX_CSS#
    #TEMPLATE_CSS#
    #THEME_CSS#
    #PAGE_CSS#
    #TEMPLATE_JAVASCRIPT#
    #APPLICATION_JAVASCRIPT#
    #PAGE_JAVASCRIPT#
    *#APEXCSS#*_
    *#TEMPLATECSS#*_
    *#THEMECSS#*_
    *#PAGECSS#*_
    *#APEXJAVASCRIPT#*_
    *#TEMPLATEJAVASCRIPT#*_
    *#APPLICATIONJAVASCRIPT#*_
    #HEAD#
    </head>
    <body #ONLOAD#>#FORM_OPEN#
    The added substitution strings are bold + underlined.
    Is there a parameter (application, export, template, instance level) that we can set to prevent this ?
    Edited by: Karel C on 12-feb-2013 5:32
    Edited by: Karel C on 12-feb-2013 5:32

    Hi Patrick,
    The version info is: wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2009.01.12');
    This should be wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2012.01.01');
    ... but this error is due to a manual modification of the export file.
    We parameterise some values, so that the we can use the old-school DEFINE variables in our deploy process via SQL/plus.
    One of the developers made a copy-paste error when doing that ...
    So there is no bug !
    Thanks for the tip !!
    Kind regards,
    Karel

  • External Class files not updating when "Delete ASO Files" executed

    I've got an external .as file in the same folder as my flash file. In the process of writing the code, whenever I make a change and then test the movie, the flash movie is obviously still looking at the OLD information. I tried using the "Delete ASO Files" on the menu, to no avail.
    I can' find these ASO files anywhere on my computer. ARE they hidden?
    Aha! I tried something else. I quit flash,restarted and ran the same script with no changes. It returned the data correctly, but then gave me this unpleasant message:
    256 levels of recursion were exceeded in one action list.
    This is probably an infinite loop.
    Further execution of actions has been disabled in this movie.
    There are no loops of any kind in the code, which is below.  Thanks in advance for your assistance.
    //This is the Person.as file:
    class Person {
    public var HomName:String = "unknown";
    public var HomEmail:String = "unknown";
    public var HomPhone:String = "unknown";
    public var HomSaveFreq:Number = 0;
    public var HomSavePeriod:String = "unknown";
    //constructor//
    function Person(sn:String, se:String, sp:String, ss:Number, ssp:String) {
      HomName = sn;
      HomEmail = se;
      HomPhone = sp;
      HomSaveFreq = ss;
      HomSavePeriod = ssp;
    //functions for getting and setting all properties
    function get myName():String {
      return HomName;
    function get myEmail():String {
      return myEmail;
    function get myPhone():String {
      return myPhone;
    function get myHomSaveFreq():Number {
      return myHomSaveFreq;
    function get myPeriod():String {
      return myPeriod;
    function set myName(sn:String):Void {
      HomName = sn;
    function set myEmail(sn:String):Void {
      HomEmail = sn;
    function set myPhone(sn:String):Void {
      HomPhone = sn;
    function set myHomSaveFreq(sn:Number):Void {
      HomSaveFreq = sn;
    function set myPeriod(sn:String):Void {
      HomSavePeriod = sn;
    //this is the flash movie code
    var Client:Person = new Person("Terry,[email protected],323-232-3232,6,day");
    trace(Client.myName);
    trace(Client.myEmail);
    trace(Client.myPhone);
    trace(Client.myHomSaveFreq);
    trace(Client.myPeriod);
    stop();

    I don't have an anonymous ftp site, but its so simple, lets keep it simple.
    1. Create a new Flash file, AS 2.0 and paste this snippet in frame 1 script panel
    var Client:Person = new Person("Terry,[email protected],323-232-3232,6,day");
    trace(Client.myName);
    trace(Client.myEmail);
    trace(Client.myPhone);
    trace(Client.myHomSaveFreq);
    trace(Client.myPeriod);
    stop();
    2. make a text file and put the following code in it, and name the file Person.as
    class Person {
    public var HomName:String = "unknown";
    public var HomEmail:String = "unknown";
    public var HomPhone:String = "unknown";
    public var HomSaveFreq:Number = 0;
    public var HomSavePeriod:String = "unknown";
    //constructor//
    function Person(sn:String, se:String, sp:String, ss:Number, ssp:String) {
      HomName = sn;
      HomEmail = se;
      HomPhone = sp;
      HomSaveFreq = ss;
      HomSavePeriod = ssp;
    //functions for getting and setting all properties
    function get myName():String {
      return HomName;
    function get myEmail():String {
      return myEmail;
    function get myPhone():String {
      return myPhone;
    function get myHomSaveFreq():Number {
      return myHomSaveFreq;
    function get myPeriod():String {
      return myPeriod;
    function set myName(sn:String):Void {
      HomName = sn;
    function set myEmail(sn:String):Void {
      HomEmail = sn;
    function set myPhone(sn:String):Void {
      HomPhone = sn;
    function set myHomSaveFreq(sn:Number):Void {
      HomSaveFreq = sn;
    function set myPeriod(sn:String):Void {
      HomSavePeriod = sn;
    //: <)McFrisco

  • Set value of substitution string or global variable

    Hi all,
    is it possible to set the value of a substitution string or a global variable via sql or something else?
    it means is there a procedure like apex_application_install.set_application_alias() to set a value?
    Thanks,
    Kirsten

    So for each file I loop through I have:
    T.box = A1 (or A2, A3, etc...)
    InTable = true/false...
    T.box.setSelected(InTable) or
    (T.box.toString().setSelected(InTable), but it still
    recognizes the T.box as a String instead of the
    JCheckBox.T.box IS a String.
    What are the variables you are reading in? The name of the JCheckBox? Do you mean the name of the reference to a JCheckBox? So, initially you have a bunch of JCheckBoxes you created like
    JCheckBox box1 = new JCheckBox("Box1");and then you read in the "box1" from your file and another value that indicates whether it is checked or not?
    If this is the correct assessment then I would agree with the other post. When you create the JCheckBoxes, store them in a Hashmap(or something similar) with the 'name' as the key and the JCheckBox object as the value. Then, when you read in your values you just do:
    ((JCheckBox)boxMap.get(A1)).setSelected(InTable);

  • Modifying a Application Substitution String in Run-time

    Hello all,
    I have a substitution string defined in an application (under application definition) that needs to be different based on whether the application is on a development server or a test server. Is there a way that I can alter the value of that subsitution string on my test run-time instance after I've brought the application in from development? Perhaps an API call? APEX_INSTANCE_ADMIN doesn't appear to have anything for this.
    Or do I have to either do a test in code and set an application item when the application starts up, or pull it from a database table or constant?
    Thanks!
    John

    Shane,
    SubVersion works with files, so everything you do has to be a file, including all of your PL/SQL procs / functions / packages. If you have "cowboy coders" editing packages in the database with SQL Developer or TOAD, that's the first thing that needs to change. I regularly export my APEX apps and check them in. I also make a DDL-only backup of any schemas I'm working on at major mile-stones or before upgrades.
    There's a server and client component. The sever houses the repository and everyone checks projects out from and commits projects to the server. On the client-side, the TortoiseSVN client is by far the most popular Windows client. It perfectly integrates with Windows so you can right-click a file and lock, update, commit it.
    To work on a project, you:
    - check it out from the repository. you typically only do this once as you keep a working copy on your client pc.
    - get a lock on a file you want to edit. This is optional, but it's my preferred method. Now you are the only one that can commit the file back to the repository.
    - make your changes to the file, once you are happy, simply right-click and select commit. you can then enter comments on the file.
    - now, anyone else who wants to edit that file will see your changes when they request a lock or issue the "update" command.
    You can review every version of the file, diff versions, "Tag" a version of your code, and the list goes on.
    After a few hours you'll be comfortable with the client process. I think the server component of it deters most people as you have a number of choices to make and it can be slightly complicated to install. For this reason, I STRONGLY recommend trying one of the hosting providers as then all you have to worry about is the client-side. Additionally, your code is now backed-up off-site.
    I don't have any personal experience with these services, but here are a few reasonably priced ones. The first one has a free option which is where I would start with a test project just to get a feel for it.:
    - https://www.projectlocker.com
    - http://svnrepository.com/
    For what it's worth, the APEX team uses SubVersion, as do many dev teams inside Oracle (not the DB dev team though). Also, the new https://samplecode.oracle.com uses Subversion as part of an offering from CollabNet. My 1st project hosted there is called logger . You can brows the logger subversion repository here: https://logger.samplecode.oracle.com/source/browse/logger/
    Links:
    - [TortoiseSVN Client|http://tortoisesvn.tigris.org/]
    - [SubVersion Server|http://subversion.tigris.org/]
    Tyler Muth
    http://tylermuth.wordpress.com
    [Applied Oracle Security: Developing Secure Database and Middleware Environments|http://sn.im/aos.book]
    Edited by: Tyler on Nov 17, 2009 2:57 PM

  • How to insert External XML file content into XMLTYPE through Pro*c

    Could any one sugest me how to insert a external XML file content into Db
    into XMLTYPE datatype through Pro*c program.
    Thanks for any help...... who has done this
    Ghanta Tagore

    Hi
    After some good fight of 3 days, I have done it through Pro*c
    This is the way to handle this
    Buffer-->Temporary Clob-->XMLTYPE(using CreateXml)
    Pasting my piece o code to do this
    ===============
    OCIClobLocator *license_txt;
    varchar h_ttt[1024] = {'\0'};
    ub4 amt;
    int i;
    EXEC SQL ALLOCATE :license_txt;
    EXEC SQL LOB CREATE TEMPORARY :license_txt ;
    GetName(name); /*Gets Name to insert into name column in License Table*/
    for(i=0; i<4;i++)
    GetXMLL((char *)h_ttt.arr); /*Gets a string value of XML into this example*/
    /*<Tagore>Is From TCS Delhi</Tagore>*/
    /*This can be changed to get buffer from FILE */
    h_ttt.len = strlen((char *)h_ttt.arr);
    amt = sizeof(char) * h_ttt.len ;
    EXEC SQL LOB WRITE APPEND :amt FROM :h_ttt INTO :license_txt;
    EXEC SQL
    INSERT INTO license_table VALUES (:sss, :name, sys.xmltype.createXML(:license_txt))
    ================
    Thanks For ur Help
    Tagore Ghanta

  • Why substitution strings are keeping old value in translated application even after seed/publish?

    Hi,
    Recently I have notice a small but from the point of view of our customer "big" issue. We have defined in our application some substitution strings to keep more detailed information about the version of the application. They are later used in page templates to show mentioned info to the end users. Recently I had to update value of one of the substitution strings. The change is immediately visible in main application. Unfortunately it is not the case for the translated application. For some reason old value is kept. Even after doing "Seed" -> "Apply translation file" -> "Publish". It is still preserving the old value. I have tried to use "Translatable" checkbox in the template. In the translation file it is showing properly substitution string in the "source" and "target" tags but still it is resolved to the old value.
    We are using APEX 4.2.2.00.11 running on 11g.
    Waiting for any suggestions as maybe it is me forgetting about ticking somewhere additional "checkbox". Thank you in advance.
    Greetings,
    kempiak

    It was my mistake. Value of the substitution string is included in the translation file. I have changed it there and it works perfectly.
    Greetings,
    kempiak

  • Replacing occurrence of a string Using External tables??

    Hi,
    Is it possible to replace the occurrence of a string using external tables?
    For example, if you were loading a file that contained many fields. One of them was a description field. I want to be able to check this field for a string and if this string exists replace it with another.
    Is this possible with External tables?
    Thanks

    The external table can be used directly like a regular table using SQL if you defined it as PARALLEL 5.
    Access to external files is transparently parallelized, independent of the number of files (intra-file parallelism). The parallelism available through external tables increases performance dramatically compared to serial processing on a file-by-file basis.
    For more information:
    http://www.oracle.com/technology/products/oracle9i/daily/sept19.html

  • Read images from external jar file (Sun's Java L&F Graphics repository)

    Hi!
    I don't know how to read images from an external jar file. Sun has a Java Look and Feel graphics repository that contains a lot of good images that can be used on buttons and so on. This repository is delivered as a jar file, containing only images, and I want to read the image files from that jar file directly without including them inside my application jar file. The application and image jar files will be in the same directory.
    I have absolutely no clue how to solve this. Is it necessary to include the images inside my application jar file or is it possible to have them separate as I want.
    Would really appreciate some help!
    Best regards
    Lars

    Hi,
    There is two ways :
    1) Add your jarfile to the classpath.
    Use the class loader :
    URL url = ClassLoader.getSystemResource("your/package/image.gif");
    Image im = (new ImageIcon(url)).getImage();
    or
    Image im = Toolkit.getDefaultToolkit().getImage(url);2)If you don't want to add the jar to the classpath you can use this (under jdk 1.4):
    import java.util.*;
    import java.util.jar.*;
    import java.awt.*;
    import java.io.*;
    import java.awt.image.*;
    import javax.imageio.*;
    public class ImageUtilities {
         public static Image getImage(String jarFileName, String fileName) {
              BufferedImage image = null;
              try {
                   JarFile jar = new JarFile(new File(jarFileName), false, JarFile.OPEN_READ);
                   JarEntry entry = jar.getJarEntry(fileName);
                   BufferedInputStream stream = new BufferedInputStream(jar.getInputStream(entry));
                   image = ImageIO.read(stream) ;
              catch (Exception ex) {
                   System.out.println(ex);
              return(image);
    }I hope this helps,
    Denis

  • Appending an external text file

    Hi everyone. I need a little help. I'm trying to append an external text file. I'm able to read it using the "in.readLine()" and "BufferedReader" commands but can't figure how to append it. The reason being is I'm trying to add new information to each new line. For example my ext. text file looks something like this:
    Homer Simpson 3489 Evergreen Terrace Springfield
    Marge Simpson 3489 Evergreen Terrace Springfield
    Bart Simpson 3489 Evergreen Terrace Springfield
    Please note that I'm not using a string tokenizer to read the text file. If someone could please give me an example to append information to each new line I would greatly appreciate it. Also please note that the text file is being read into a vector to hold the information. Thank you.

    open the FileWriter or FileOutputStream you use in "append" mode..
    http://java.sun.com/j2se/1.4.1/docs/api/java/io/FileOutputStream.html
    FileOutputStream(String name, boolean append)
              Creates an output file stream to write to the file
              with the specified name.http://java.sun.com/j2se/1.4.1/docs/api/java/io/FileWriter.html
    FileWriter(String fileName, boolean append)
              Constructs a FileWriter object given a file name
              with a boolean indicating whether or not to append
              the data written.

Maybe you are looking for

  • HP HDX 16 Blu-Ray discs will not play!

    I have researched this Blu Ray issue for days without a real solution.  I am running Vista and notice many people feel upgrading to windows 7 was the issue, but I do not believe it is since I am still on Vista, with the same Blu-Ray disc issuey here.

  • RTMPT causes Flash player and browser to freeze

    I'm having a problem with outgoing RTMPT connections. Whenever I connect to "rtmpt://server/app/file" (or when specifying rtmp:// which falls back onto rtmpt:// due to firewall restrictions), the Flash player plugin causes the browser to freeze for 5

  • Question on Quorum : Windows Server 2012 R2 + SQL 2014 AlwaysOn AG

    OS on all nodes : Windows Server 2012 R2 SQL on all nodes : SQL Server 2014 CU2 2 cluster nodes in primary data center and AlwaysOn AG doing Sync Transfer between these nodes with auto failover. 2 cluster nodes in DR data center(Different subnet) and

  • View Postings and Messages for Valuation and Translation

    Hi Everyone, Inevitably after valuation (FAGL_FC_VAL) or translation (FAGL_FC_TRANS) is run at month-end and the user exits out of the transaction, questions arise as to how certain items were revalued or translated.  What I'm trying to locate is if

  • How to uninstall photoshop?

    how do i uninstall photoshop?