Adding content to a textframe

Hi all,
I want to add some content to a textframe which already has some text in it. If i use the following code
tframe.content += "appended text"
then the text is appended to the textframe but all the text that was previously present in the the textframe has their paragraph style  reset to the paragraph style of the new text.
What i need is that the paragraph style of the original text should not change and the new text takes up the paragraph style of the para in which it is added.
Second issue is how do i add a special character like a Em-Dash to the text that i want to place in the textframe. If i use the enum like SpecialCharacters.EM_DASH it displays a number(the value of the enum) in the frame but not the actual character.
Thanking all of you in anticipation of great suggestions as always.
Manan

Hi Peter,
Your solution worked thanks, but i have some confusion i was trying with the code as
pi.insertionPoints.lastItem().contents = "appended text"
this code was working fine unless i tried to append text in a threaded textframe. In some cases the text was jumbled up depending upon where it was inserted, in some cases some portion of text was inserted in reverse order. Could you explain what was wrong in this code, also what does -1 index in your code stand for.
It will be very nice and helpful of you if you could clear up my confusion.
Thanks
-Manan

Similar Messages

  • HT1451 Getting a -54 error while iTunes is adding content.

    Getting a -54 error while iTunes is adding content. Any ideas on how to recify error. I am trying to rebuild the database without much luck. My media content is kept on a seperate drive than the system.
    Thanks
    Jim

    The CD I imported (in the above post) is now not in my iTunes library. Any help would be appreciated .

  • I added content to a document in Pages on my Mac last night, which was saved to icloud and this morning it was gone. Can I get my precious work back? Thanks

    Hello
    I added content to a document in Pages on my Mac last night, which was saved to icloud and this morning the additions were gone. Can I get my precious work back? Thanks

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • Adding Content To the Top-Level of Navigation bar ?

    Hi,experts ,
       i have a problem with adding content to the top-level of navigation bar ?
    I have the authority of administration.I have added a customizing role with the entry-point property to myself userid . I have checked my navigation-target page's property can be visible in top-level navigation. I checked my my display level is set as 2 .
       However ,i dont get the folder content at the top-level navigation.Anyway,when i check the delta link trace,there is no folder that connect to my role .
       Anyone helps me out ?
    Thanks in Advance .

    Hi Eleanor,
    If you already created a role with an entry point and assigned it directly to you user, you may just have to refresh the portal page. You may also check the authorizations of you role.

  • How to Specify Metadata When Adding Content Using iTunes U Web Service?

    I've been developing Java applications using iTunes U Web service and uploaded content to iTunes U site using iTunes U Web service without problem. Now I want to add metadata fields (name, artist name, album name, etc.) for the tracks I uploaded. It seems to me that "AddTrack" will do. So I tested it but it neither adds a track under the specified group nor updates metadata fields for an existing track. It turned out "MergeTrack" actually updates metadata fields for an existing track. So is there any way to specify metadata at the time of adding content using iTunes U Web service? And what exactly does AddTrack do? This is all about contents hosted by iTunes U site and no RSS is involved.
    I'm referring to the "AddTrack" method in iTunes U Web service:
    http://deimos.apple.com/rsrc/doc/iTunesUAdministrationGuide/iTunesUWebServices/c hapter18_section_21.html#//appleref/doc/uid/AdminGuide-CH13-SW26

    Thanks for all the replies. My question is whether there is any way to specify metadata WHEN adding content using iTunes U Web service. Specifying metadata AFTER adding content can be achieved by MergeTrack (weird naming) and it does work.
    As for setting track level meta-data in the media file and then upload it, there're several reasons against that, among which are:
    1. Some track metadata are context-dependent. A video about buildings on Michigan Ave in Chicago can be track #2 in a history course and described as "historic view of the Magnificent Mile", but the same media can also be track #5 in a landscape design course and described as something like "contemporary architecture". Setting these metadata in the media file itself is not the preferred way to do it since it implies maintaining a version of the same media for any course/group it gets uploaded to.
    2. Setting metadata in a location separate from the media file helps track the metadata change and search for media without digging into the media itself.
    3. If MergeTrack "updates" metadata, there got to be some other method that "creates" metadata - that's what a well-designed API should look like. And setting metadata in the media file is not an equivalent to a "create metadata" method call. In rickwolf's term, that implicit AddTrack should actually be made explicit so the party uploading content can explicitly specify metadata instead of having iTunes U extract metadata from the media.
    It is still not clear what "AddTrack" does exactly, maybe rickwolf is right - it's only relevant to tracks created through RSS.
    So it seems to me there is no other way to specify metadata WHEN adding content using iTunes U Web service than setting metadata in the media file. To me it is more like a design flaw.
    Message was edited by: Stone Xiang
    Message was edited by: Stone Xiang
    Message was edited by: Stone Xiang

  • Adding Content

    First let me say that the documentation, while accurate, is not helpful.
    One task I have is to use the generic webservice to add content. I have created multipart/related content to post to the server. The content looks exactly like the content (except for the exact contents of the XML portion, obviously) the server sends when i get a document using the webservice.
    The server doesn't like it. I get a 500 error with no logging of anything... anywhere.
    What is the correct way to go about adding content using the generic webservice?

    I guess a level of frustration is building up here.
    I am looking at this stuff:
    http://docs.oracle.com/cd/E21764_01/doc.1111/e10807/a01_wsdl_and_soap.htm#BEHFACEG
    A co-worker found some sample applications (not sure where) which demonstrate that the sample file (below) can be posted.
    I am trying to adapt to my client app what is in the sample app (which like many sample apps is inexplicably written to run from a command line) to get it working
    and am running into one of 2 different errors. With the lack of logging on the server side; it is very hard to tell what is happening here.
    I think I am 1 or 2 small code errors away from having this working but I can't discern a logical path to a debugging approach from here.
    ------123454321
    Content-Type: text/xml; charset=utf-8
    Content-ID: <SoapContent>
    <?xml version='1.0' ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <idc:service xmlns:idc="http://www.stellent.com/IdcService/" IdcService="CHECKIN_UNIVERSAL">
    <idc:document dDocName="SoapTest001" dDocAuthor="sysadmin" dDocTitle="Soap Test 001 Document" dDocType="Document" dSecurityGroup="Secure" dDocAccount="">
    <idc:file name="primaryFile" href="c:/temp/primary.txt"></idc:file>
    <idc:file name="alternateFile" href="c:/temp/alternate.html"></idc:file>
    </idc:document>
    </idc:service>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    ------123454321
    Content-Type: text/plain
    Content-ID: <primaryFile>
    This is the primary text.
    This is line two.
    This is line three.
    This is line four.
    This is line five.
    ------123454321
    Content-Type: text/html
    Content-ID: <alternateFile>
    <html>
    <head>
    <title>Alternate File Title</title>
    </head>
    <body>
    <table>
         <tr><td>This is the first row.</td></tr>
         <tr><td>This is the second row.</td></tr>
         <tr><td>This is the third row.</td></tr>
         <tr><td>This is the fourth row.</td></tr>
         <tr><td>This is the fifth row.</td></tr>
         <tr><td>This is the sixth row.</td></tr>
         <tr><td>This is the seventh row.</td></tr>
    </table>
    </body>
    </html>
    ------123454321--
    client app:
    import java.io.*;
    import java.net.*;
    import java.util.ArrayList;
    import java.util.List;
    import org.apache.commons.codec.binary.Base64;
    public class SOAPClient {
         public String urlIn;
         public String action;
         public String xmlContent="";
         public byte[] mimeDoc;
         public String uuid;
         public String user;
         public String password;
         public String messageOut;
         public String resultText;
         public String stackTrace;
         public boolean multiPart;
         public int statusIndicator = 0;
         public List outputObject = new ArrayList();
         // class shared variable space
         private InputStream responseIn;
         private byte[] responseInBytes;
         private List mimeHolder = new ArrayList();
         private List lengthHolder = new ArrayList();
         private List payloadHolder = new ArrayList();
         public SOAPClient (String thisURL, String thisAction, String thisXML){
              urlIn = thisURL;
              action = thisAction;
              xmlContent = thisXML;
         public SOAPClient (String thisURL, String thisAction, String boundry, byte[] documentIn, String un, String pw){
              urlIn = thisURL;
              action = thisAction;
              uuid = boundry;
              mimeDoc = documentIn;
              user = un;
              password = pw;
         public void executeCall () throws IOException{
              String retValue = soapPostaction();
              if(retValue.length() < 1 && messageOut.length() < 1){
                   messageOut = "No data returned";
              if(retValue.length() > 1 && messageOut.length() < 1){
                   messageOut = "Call suceeded";
              resultText = retValue;
         public static void main(String[] args) {
           protected String soapPostaction() {
                String outputText = "";
                try {
                     URL u = new URL(urlIn);
                     URLConnection uc = u.openConnection();
                     HttpURLConnection connection = (HttpURLConnection) uc;
                     connection.setDoOutput(true);
                     connection.setDoInput(true);
                     connection.setRequestMethod("POST");
                     connection.setRequestProperty("SOAPAction", action);
                     if(xmlContent.length() > 10){
                            connection.setRequestProperty("Content-Type", "text/xml;charset=UTF-8");
                            OutputStream out = connection.getOutputStream();
                            Writer wout = new OutputStreamWriter(out);
                            wout.write(xmlContent);
                            wout.flush();
                            wout.close();                      
                     } else {
                            connection.setRequestProperty("Content-Type", "Multipart/Related;boundary=" + uuid + ";type=text/xml; start=\"<SoapContent>\"");
                            connection.setRequestProperty("Content-Length",String.valueOf(mimeDoc.length));
                            String userpassword = user + ":" + password;
                            byte[] encoded = Base64.encodeBase64(userpassword.getBytes());
                            connection.setRequestProperty("Authorization", "Basic " + encoded);
                            connection.setDoOutput(true);
                            OutputStream wout = connection.getOutputStream();
                            int br = 0;
                            byte[] bf = new byte[mimeDoc.length];
                            InputStream dataOut = new ByteArrayInputStream(mimeDoc);
                            while(br != -1){
                                 br = dataOut.read(bf);
                                 wout.write(bf);
                            wout.flush();
                            wout.close();                                              
                     // get the body of the response
                     responseIn = connection.getInputStream();
                     byte[] buffer = new byte[1];
                     ByteArrayOutputStream baos = new ByteArrayOutputStream();
                     int bytesread = 0;
                     while(bytesread != -1){
                          bytesread = responseIn.read(buffer);
                          baos.write(buffer);
                     responseInBytes = baos.toByteArray();
                     // figure out what the server returned
                     String header = "";
                     String[] boundryMarker = null;
                     String boundryMarkerString = null;
                     for (int j = 1; ; j++) {
                        header = uc.getHeaderField(j);
                        if (header == null)
                             break;
                        if (uc.getHeaderFieldKey(j).startsWith("Content-Type"))
                             break;
                     if(header != null){
                          String[] headerParts = header.split(";");
                          if(headerParts[0].substring(0,headerParts[0].length()).startsWith("multipart/related")){
                                 for (int x = 0;x < headerParts.length;x++){
                                      if (headerParts[x].substring(0,8).startsWith("boundary")){
                                      boundryMarker = headerParts[x].split("=");
                                      boundryMarkerString = "--" + boundryMarker[1].substring(1,boundryMarker[1].length()-1);
                     ByteArrayInputStream readDataIn = new ByteArrayInputStream(responseInBytes);
                     // for multipart/related documents we need to read through the array and
                     // find the boundary markers so we can dig the various parts out
                     if(boundryMarkerString != null){
                          MyBufferedReader brd = new MyBufferedReader();
                          Reader dataIn = new BufferedReader(new InputStreamReader(readDataIn));
                          brd.TplBufferedReader(dataIn);
                          String thisLine = "";
                          String testLine = "";
                          int startLine = 1;
                          int endLine = 0;
                          int z = 0;
                          String[] lineBuffer = new String[400];
                          outer:
                          while(thisLine != null){
                               // find start
                               testLine = thisLine.trim();
                               if(testLine.startsWith(boundryMarkerString)){
                                    thisLine = brd.readLine(); // throw away line
                                    if(thisLine == null)
                                         break outer;
                                  z = z + thisLine.getBytes().length;
                                      String tempHolder = brd.readLine(); // this is the content type. We actually need to read this line
                                    lineBuffer = tempHolder.split(":");
                                  z = z + tempHolder.getBytes().length;
                                    thisLine = brd.readLine(); // throw away line
                                  z = z + thisLine.getBytes().length;
                                    thisLine = brd.readLine(); // throw away line
                                  z = z + thisLine.getBytes().length;
                                      startLine = z;
                                    // find end
                                      inner:
                                    while(thisLine != null){
                                       thisLine = brd.readLine();
                                       testLine = thisLine.trim();
                                       z = z + thisLine.getBytes().length;
                                       if(testLine == null || testLine.startsWith(boundryMarkerString)){
                                            endLine = z - startLine - boundryMarkerString.length() - 4; // constant accounts for newline and eof characters
                                            break inner;
                                    getStreamPortion (lineBuffer[1].trim(), startLine, endLine);
                                    continue outer;
                               thisLine = brd.readLine();
                               if(thisLine != null){
                                      z = z + thisLine.getBytes().length;                                
                          multiPart = true;
                     } else {
                          multiPart = false;
                     ByteArrayInputStream dumpData = new ByteArrayInputStream(responseInBytes);
                     outputText = convertStreamToString(dumpData);
                     stackTrace = "";
                     messageOut = "Sucess";
                     statusIndicator = 0;
                     return outputText;
                catch (IOException e) {
                     statusIndicator = '1';
                     try {
                          StringWriter sw = new StringWriter();
                          e.printStackTrace(new PrintWriter(sw));
                          stackTrace = sw.toString();
                          messageOut = "Java IO error: check \"stackTrace\" for details.";
                          sw.close();
                     catch (IOException er){
                     return "";
                } finally {
                     System.gc();
           private void getStreamPortion (String mimeType, int startAt, int endAt) throws IOException{
                String localMime = mimeType;
              byte[] outBuffer = new byte[endAt];
              int q;
              int z = 0;
              for(q=0;q<responseInBytes.length;q++){
                   if(q>=startAt && q<=(endAt + startAt)){
                        outBuffer[z]= responseInBytes[q];
                        z = z + 1;
                   if(z >= endAt)
                        break;
              mimeHolder.add(mimeHolder.size(), localMime);
              lengthHolder.add(lengthHolder.size(),Integer.toString(outBuffer.length));
              payloadHolder.add(payloadHolder.size(),outBuffer);
                List tempAr = new ArrayList();
                tempAr.add(mimeHolder.get(outputObject.size()));
                tempAr.add(lengthHolder.get(outputObject.size()));
                tempAr.add(payloadHolder.get(outputObject.size()));
                outputObject.add(tempAr);
         public String convertStreamToString(InputStream is) throws IOException {
                if (is != null) {
                     Writer writer = new StringWriter();
                     char[] buffer = new char[1024];
                     try {
                          Reader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
                          int n;
                          while ((n = reader.read(buffer)) != -1) {
                               writer.write(buffer, 0, n);
                     } finally {
                          is.close();
                          return writer.toString();
                     } else {
                          return "";}
      }

  • How to install downloaded "additional value-added content" for CS6?

    I purchased CS6 and downloaded using Akamai Download Manager.  In addition to the main CS6 download, there were additional files that are also available to download.  There names indicate they are"additional value-added content not included in the trial version" of CS6. Downloading them leads to file folders that can be opened, and selecting the appropriate language folders leads to what appears to be a folder of fonts. Once this file folder is downloaded, how do I go about ensuring these fonts are actually installed on my (Mac) computer?

    Like any font - you add them to your Fontbook utility.
    Mylenium

  • Adding contents to Existing web applicaitons

    Hi All,
    Following link talks of adding contents from oracle content server to exsting webapplications. Does any one has an idea or some sample examples on this.
    http://www.oracle.com/us/products/middleware/content-management/revolutionary-one-click-mgmt-ds-077616.pdf
    I tried adding Site studio tag libraries to a webapplication, that shows site studio services in the component panel. Such as Placeholder, DataFile, IdcService, which I can drag and drop on the jsp page. When I run the application, it gives me follwoing error
    "oracle.stellent.wcm.server.request.RequestException: No sites are configured"
    Could you please provide some pointers.
    Regards,
    Sanjay

    Hi
    When you have to run the sites / contents from UCM on an external application then you will have to create a Site using SS Designer - Create the Sections / Pges /Layouts . These Pages / Layouts are where your Placeholders would be placed which can be then ported to an existing external application / site and used to retrieve contents from UCM .
    If you are using UCM 11g then you can use Jdev to port your existing application on Jdev and add the Site Studio elements / assets to these apps directly . In SS / UCM 11g there is this added capability to have a completely external site (w.r.t UCM) and run your applications .
    Hope this helps .
    Thanks
    Srinath

  • Error while adding content type fields in the EditForm.aspx for an customlist item.

    This is office 365. I have content type which is attached to custom list.
    Added new site column "CustomerAction" which was added to Content type, now when I added this field in the EDITForm.aspx using the SharePoint designer, this form is called when the custom list item is being edited.
    But when I added this extra field to EDITFORM.aspx it is giving error,. the standard correlationid error.
    Can anyone suggest, what could be problem !
    Thanks
    Labhesh
    Labhesh Shrimali

    Hi Labhesh,
    When we add the site column to the content type, there is an option to update the all
    content types which inheriting from this type.
    If we set this to Yes, then the site column will be added to the list where the content type or its child content type has been used and this column will be added to the EDITFORM.aspx too.
    So we don’t need to re-add this site column to EDITFORM.aspx.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Get text content from Linked TextFrames in order

    Hi,
    How can I get the text content out one by one in order for a linked textframes? Thanks.
    Henry

    for ID 2.0.2 in VBScript
    for a=1 to myStory.TextFrames.Count
    myContents = myStory.TextFrames.Item(a).TextContents
    next
    for ID CS1 and ID CS2 in VBScript
    for a=1 to myStory.TextFrames.Count
    myContents = myStory.TextFrames.Item(a).Contents
    next
    for ID CS3 in VBScript
    for a=1 to myStory.TextContainers.Count
    myContents = myStory.TextContainers.Item(a).Contents
    next
    robin
    www.adobescripts.com

  • Make symbol width equal to dynamically added content

    Hey everyone,
    I have a nav menu with 4 instances of a toggle button symbol that contains a text element name "label". After compositionReady I'm iterating over each instance and changing the "label" to another value that I load from an array. I'm able the swap out the names easy enough using .each() but am having trouble figuring out how to change the width of the symbol to the width of the text content so they don't overlap.
    Any suggestions? Thanks,
    Dave

    I got it!
    resdesign, thank you for the link. I tried adding a <span> tag around the label text as the link suggested - which worked - but I found that for some reason it was adding in the width of the symbol plus the width of the text element child. So I changed the css width property of the symbol to 'auto' and it worked like a charm... didn't even need the <span> tags anymore - which will keep it tidier.
    Thanks again for the input. I believe the members of this forum are the most helpful of any forum I've ever been apart of.
    Here is the final code:
    var labels = ["LABEL", "A LONG LABEL", "A REALLY LONG LABEL", "LBL"];
    var xPos = 400;
    for(var i = 0; i < labels.length; i++){
              var newBtn = sym.createChildSymbol( "toggle_btn" , "navBar" );
              //var btnLabel = "<span>" + labels[i] + "</span>";
              //newBtn.$( "label" ).html( btnLabel );
              newBtn.$( "label" ).html( labels[i] );
              newBtn.getSymbolElement().css({
                                                                                                                  'display' : 'inline-block',
                                                                                                                  'white-space' : 'nowrap',
                                                                                                                  'left' : xPos,
                                                                                                                  'width' : 'auto',
                                                                                                                  'top' : 10
              console.log( "menu button " + i + " added at " + xPos + "px" );
              xPos += (newBtn.$("label").width() + 20);
    And a link to the zipped files:
    https://www.dropbox.com/s/5n2hj5kppp6wdky/Test3.zip
    Many thanks!
    David

  • Adding content via multiple computers

    So here's what I got. For awhile I've been managing my iPhone on my computer. Syncing my apps, and manually adding music. I just purchased a new comp and I'm trying to manage my iPhone with it, but I'm unable to add any music to the phone via the new comp. I'm assuming its because I had it synced to the old computer? I tried un checking the sync box on the old comp, but that deletes all my content on the phone. So how to I start using my new computer to manage my phone without deleting everything on it?

    I am on a Mac and through Apple auto back "Time Machine" thank God I have not ever had this an issue as if you get a new Mac you just hook it up to your hard drive (or can be done wireless through an Apple Time Capsule) and click and your entire Mac is restored iTunes and everything.
    ANYWAY ... I don't think this is your case though (plus I was putting together a case for you to go with a Mac if your not on 1 now). You should be able to backup your iPhone completely and then transfer that backup to your new computer. I know you can go to Store- Deauthorize computer and this might do it. Good luck!

  • Adding content from a database

    Hi there, I'm looking for a way to add content to a JComboBox from a database. I have the code to connect the database to my application working fine but am struggling to find the appropriate way to make my JComboBox display data from my database. I'll leave all the code I have at present...
    import java.sql.*;
    import java.io.IOException;
    import java.io.*;
    import java.util.Properties;
    public class ConnectDB {
         public static void init(String fileName)
         throws  IOException, ClassNotFoundException
              Properties props = new Properties();
              FileInputStream in = new FileInputStream(fileName);
              props.load(in);
              String driver = props.getProperty("jdbc.driver");
              url = props.getProperty("jdbc.url");
              username = props.getProperty("jdbc.username");
              password = props.getProperty("jdbc.password");
              Class.forName(driver);  
         public static Connection getConnection() throws SQLException
              return DriverManager.getConnection(url,username,password);
         private static String url;
         private static String username;
         private static String password;
    }     (I obviously have a text file in my folder with my connection details)
    Then I'm trying to build a GUI in netbeans that will retrieve and update my database so I have something like this...
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            jComboBox1.addItem("Please Click Button");
            try{
            ConnectDB myDB = new ConnectDB();
            myDB.init("DBoracle.txt");
            Connection conn = null;
            conn = myDB.getConnection();
            String query = "select * from Employee";
            Statement stmt = null;
            stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery(query);
            rs.next();
            String s = rs.getString(2);
            //Return the second entry from my database and add it to my JComboBox
            // in theory i'll be adding a loop later to add all the entries to my JComboBox
            jComboBox.setItem(s);
            catch(Exception e){}
        }                                     

    Thanks cotton for at least trying to point out my errors, I am only too aware of my lack of experience in doing this sort of thing hence why I'm posting here I'm a student trying to learn about these things and at the moment am admittingly struggling with it. I have read and followed the JDBC tutorial, infact that's where I started with this but it is at best limited and could maybe do with some more sample code on expanding the idea. It does however point to the fact that it is kinda limited in how it returns data:
    The ResultSet.getXXX methods are the only way to retrieve data from a ResultSet object, which means that you have to make a method call for each column of a row. It is unlikely that this is the cause of a performance problem, however, because it is difficult to see how a column could be fetched without at least the cost of a function call in any scenario. We welcome input from developers on this issue.
    Perhaps some of the developers on here could help solve this issue...
    I know my code is a bit messy but it's the trial and error approach I use, cumbersome I know but it's all I know with my limited knowledge. Probably not the best for posting on here but this is my near complete code. The extra textfield will be used to return data from a trigger which tested ok too. So my problem is I want to make textfield1 a combobox that returns all my primary keys from my table and then I could click on one and all my textfields would reflect my choice. e I'm guessing I'd be using an actionListener approach? I don't need the actual code for it I'm quite happy to plough on and try and figure it out for myself cos it's how I'll learn just want a suggestion on how I would approach it..
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
       //Removed this code cos post too big!
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            try{
            ConnectDB myDB = new ConnectDB();
            myDB.init("DBoracle.txt");
            Connection conn = null;      
            conn = myDB.getConnection();
            String query = "select * from SYSTEM.monitoringLab";
         Statement stmt = null;
            stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery(query);
            //rs.next();
            // this was being used earlier to test that I was getting my results set
            String s = rs.getString(1);
            String t = rs.getString(2);
            String u = rs.getString(3);
            String v = rs.getString(4);
            String w = rs.getString(5);
            String x = rs.getString(6);
            jTextField1.setText(s);
            jTextField2.setText(t);
            jTextField3.setText(u);
            jTextField4.setText(v);
            jTextField5.setText(w);
            jTextField6.setText(x);
            conn.close();
            stmt.close();
            catch(Exception e){
            System.err.println("Got an exception! ");
            System.err.println(e.getMessage());
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
            jTextField1.setText(null);
            jTextField2.setText(null);
            jTextField3.setText(null);
            jTextField4.setText(null);
            jTextField5.setText(null);
            jTextField6.setText(null);
        private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
            try{
            ConnectDB myDB = new ConnectDB();
            myDB.init("DBoracle.txt");
            Connection conn = null;
            conn = myDB.getConnection();
            Statement stmt = null;
            stmt = conn.createStatement();
            stmt.executeUpdate("INSERT INTO SYSTEM.monitoringLab values ("
                    + jTextField1.getText() + "," + jTextField2.getText() + ","
                    + jTextField3.getText() + "," + jTextField4.getText() + ","
                    + jTextField5.getText() + "," + jTextField6.getText() + ")");
            conn.close();
            stmt.close();
            catch(Exception e){
            System.err.println("Got an exception! ");
            System.err.println(e.getMessage());
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JLabel jLabel5;
        private javax.swing.JLabel jLabel6;
        private javax.swing.JLabel jLabel7;
        private javax.swing.JLabel jLabel8;
        private javax.swing.JTextField jTextField1;
        private javax.swing.JTextField jTextField2;
        private javax.swing.JTextField jTextField3;
        private javax.swing.JTextField jTextField4;
        private javax.swing.JTextField jTextField5;
        private javax.swing.JTextField jTextField6;
        private javax.swing.JTextField jTextField7;
        // End of variables declaration
    }Edited by: jojololo on Dec 11, 2009 4:44 AM

  • Invoke Save Content on Assigned TextFrame

    Hi,
    I'm trying to solve one situation... when assigned story is in status "In use and out of date". This one is quite disturbing for client (even more for developer) and could lead to unwanted direction like - getting back the old content and loosing any modification which you entered. If you want to reproduce it, it is very easy:
    1. Create incopy assigned text frame
    2. Save it, save document
    3. Check Out the Story
    4. Enter some content
    5. Save document
    --- at this point everything is cool and status of Story is "In Use"
    6. Enter content and hit "UNDO"
    --- at this point you get "In Use and Out of Date" status
    One solution to solve this is that you just hit Save and Assignment is "In use" status or you could do Save Content from Edit->InCopy menu or from "right click on text frame" pop-up menu just for that Story.
    Now, the question is... is there a solution to do "Save Content" by scripting... no metter what is selected at that point. Something like:
    For (Browse through all Assignments)
    --- If (Assignment is in status "In use and out of date")
    --- --- Do the Save Content for that Assignment
    --- End If
    Next
    And just to be clear - not to use the InvokeMenu method.
    Thanks!
    Marko

    Hi Jarek,
    I agree that "out of date" status is very needed and shows to client if the change is made to TextFrame... but take a look again in that little icon over the frame (my screenshot)...
    The icon says - "In use and out of date"... this is situation from InDesign which you can reproduce without another user doing check out/check in in InCopy. So - only you and nobody else. The icon means that you are editing the content of the frame and in the same time - your content needs an update?!
    Just to mention that this situation I couldn't reproduce in InCopy. Here you will find very simple explanation about this icon and some comments.
    http://incopysecrets.com/the-strange-case-of-the-editing-and-out-of-date-status.php/commen t-page-1
    And because you can not be absolutely sure that client will not hit Save and Undo, I would like to implement in my editorial system workflow, a peace of code which will check the assignments and when spot that status -> do something... alert, message, save content, save doc or else...
    I would appreciate if someone could provide me even with little help on how to catch this status in InDesign.
    Regards,
    Marko

  • [e-Tester]: Adding Content to Authentic Plugin ActiveX

    Hi everyone,
    Altova XMLSpry provides a free ActiveX plugin, which I am using in my webapplication (written using JSPs) to edit XML content.
    Has anyone tried e-Tester to enter content in this special ActiveX plugin? I can't seem to enter any text data (or sometimes, it appears in the wrong places, when I am playing it back)..
    Many thanks,
    Nuno Viana ([email protected])

    Hi,
    thanks for your reply!
    Basically, the Authentic Plugin is an ActiveX object, which is scrollable and contains a form with input-text fields, pull-down menus and clickable links which make the form itself to change length (adding or removing of new input fields dynamically).
    Well...I tried to record the writing of text in a couple of the input-text fields, as well as selecting appropriate options from the pull-down menus. I had to scroll-down the object itself since the embedded form inside the ActiveX control is larger than the MS IE windows's height.
    Anyway, I have used the "Windows Event Record" (as suggested by the manual) when clickin/entering text/choosing options...but when playing it back, I saw a couple of characters appearing in different input-fields, as if the (x,y) coordinates previously recorded were somehow wrong...and the characters were being actually entered in different places in the form instead of being added to the correct input text field...
    Thanks for any help.
    Nuno

Maybe you are looking for

  • Audit fixes - username equal password

    Background: Oracle 11g on Windows environment I am working on a query that will provide a list all usernames in my system where the username and password are the same. The problem is the passwords are not plan text so the query give zero result. Is t

  • Import of Profitcenter not possible

    Hello experts, I would like to import some profitcenter after updating of SAP from 8.8 to 8.81 PL05. Since 8.81 there are some more fields by profitcenter like the field EffectivFrom. This field need a date format. Normally DTW needs alwayss the foll

  • Photoshop prefs not saving

    Numerous issues since trying out some of the CC 2014 offerings including Unable to update any apps in the Mac OS desktop app since first updating Premiere and After Effects. Premiere updates and load After Effect 2014 won't open Seems related to pref

  • Upload FONT into BI

    Hi All, - BI 7.0 - in our BEX Web Template we wish to use new fonts not already present in the system. I was wondering if someone of you knows how: - Upload new font into the system - edit efficiently the BEX Web Template with this new font Thanks in

  • How to Reset You F1-12

    Does anyone know? Some how while trying to change my Expose & Spaces all of my F's were deleted I sapose... I went to Expose and set back a few of them, the only ones I need to reset is the brightness, the sound, and the Rewind/FastForward/Play set.