Tutorial 2 for BAPI WDA - set column settings in Wizard - page 7, step 4.

To the Pretty Good WDA Programmers, and/or Experts,
     I am new at this, so any help is appreciated.
     In the tutorial: Dynpro for ABAP: Tutorial 2 - BAPI Usage at: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600  has in page 7, step 4. Seems a little vague to me:
The Required Methods and Context Elements
On the two subsequent dialog windows, default values are listed for giving names to the context nodes and attributes required by the service call as well as to the required methods. The proposed names are based on the names of the embedded service, but you can change them as required.
    So the question is, in the wizard for page 7, step 4, what are the column settings set to: Parameter Values / Controller Attribute / Context Node ... to get the BAPI Input/Output and Changing columns looking like they do in the tutorial on the next page (pg 8)?
   Step-by-step, or in this case, column-by-column directions would be most helpful!
Thank You...
Edited by: Daniel Perecky on May 4, 2009 10:58 PM

To Trikanth and  Saurav,
   Thank you for those screen-shots Trikanth. They definitely helped point me in the right direction. The problem was that all of the 'Changing' structure sub-structures would end up in the view node.
   When I would try to map 'Changing | Flight_List' with the context, a message would appear: 'Mapping is only possible for Flight_List if Parent is Mapped'. Then when I mapped the entire 'Changing' node, it would map to the Component Controller, but then it would not map correctly to the output display table.
   Apparently only one dimension of structures could be mapped. A (deep) structure of structures cannot be.
   So in step 4, in the wizard, to make this work, I had to only make visible 'Changing' by what you both kindly confirmed: making it Context.
Settings Summary: Root Node- unchangable.
Parameter Group 'Importing'- Context (Node/Attribute)- Unchangeable 
Parameters-  Airline - Changed to Context (Node/Attribute)
Dest_From              - Changed to Context (Node/Attribute)
Dest_To                  - Changed to Context (Node/Attribute)
Max_Rows              - Changed to Context (Node/Attribute)
Parameter Group 'Changing'- Context (Node/Attribute)- Unchangeable                             
Date_Range            - left as Controller Attribute
Extension_In           - left as Controller Attribute
Flight_List               - Changed to Context (Node/Attribute)  <---
Extension_Out         - left as Controller Attribute
Return                     - left as Controller Attribute
So, when 'Changing' and ONLY 'Flight_List' was made visible in the node, it mapped correctly to both the Context node and to the output table columns.
This is great. Thanks a Lot!

Similar Messages

  • Cs.ini set custom property via wizard page

    I'm unable to understand why custom property DeployType is not parsed in CS.ini when set via custom wizard page. However when used
    Property("DeployType")<>"ThinDesktop" as a condition for skipping Application Selection Wizard. It works. Also, at the end of the wizard screen in summary page I see DeployType value is set to whatever radio button is selected.
    However, DeployType section is not parsed in CS.ini.
    Please help.
    CS.ini
    [Settings]
    Priority=ByLaptop, ByDesktop, DefaultGateway, DeployType, Default
    Properties=MyCustomProperty, DeployType
    [Default]
    OSInstall=Y
    SkipCapture=YES
    SkipAdminPassword=YES
    SkipProductKey=YES
    SkipComputerBackup=YES
    SkipBitLocker=YES
    [DefaultGateway]
    192.168.137.1=Home
    [Home]
    ;set timezone
    [ByLaptopType]
    Subsection=Laptop-%IsLaptop%
    [Laptop-True]
    ;laptop apps here
    [ThinDesktop]
    ;process selected apps
    SkipApplications=Yes
    [FullDesktop]
    ;list apps
    MadantoryApplications01="{5f3c6612-3a21-4b60-b592-968f70d7f8bd}"
    Wizard page:
    <Wizard>
      <Global>
      </Global>
      <Pane id="CDeploymentType" title="Computer Deployment Type">
        <Body><![CDATA[<H1>Select Computer Deployment Type :</H1>
    <table>
     <tr>
      <td>
       <input type=radio name="DeployType" id="TDRadio1" Checked value="ThinDesktop" language=vbscript AccessKey=A>
      </td>
      <td>
       <Label class="Larger" for=TDRadio1 language=vbscript ><u class=larger>T</u>hin Desktop.</Label>
      </td>
     </tr>
      <tr>
      <td>
       <input type=radio name="DeployType" id="FDRadio2"  value="FullDesktop" language=vbscript AccessKey=B>
      </td>
      <td>
       <Label class="Larger" for=FDRadio2 language=vbscript ><u class=larger>F</u>ull Desktop.</Label>
      </td>
     </tr>
    </table>]]></Body>
      </Pane>
    </Wizard>

    I'm unable to understand why custom property DeployType is not parsed in CS.ini when set via custom wizard page. However when used
    Property("DeployType")<>"ThinDesktop" as a condition for skipping Application Selection Wizard. It works. Also, at the end of the wizard screen in summary page I see DeployType value is set to whatever radio button is selected. However, DeployType
    section is not parsed in CS.ini.
    There are some misconceptions here.
    Typically, the cs.ini file is parsed *before* running the wizard. You don't actually *set* DeployType in the cs.ini file, so there is nothing to do here.
    Now if you wish to re-run the cs.ini file after the wizard, during the task sequence, then read this:
    http://www.deployvista.com/tabid/36/EntryID/139/language/en-US/Default.aspx
    Also note, that typically, if a value is already set, then ZTIGather.wsf will *not* override the value from something in the cs.ini file.
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • Looking for suggestions on setting up our search results page

    We are now about 4 months into a project.. and its now
    getting to the point
    that our archive table has got duplicate records( this is a
    good thing )
    So in our archive table we allow our employee data to be in
    there multiple
    times ( keeping history of each time frame an employee has
    worked here )
    So since the employee regardless of how many times they have
    worked for us,
    is always issues the same employee number for payroll
    purposes... we had to
    find a way to make the records unique
    So the table was designed so that any employee that has
    multiple records
    would have a record count that would then make it unique.
    Example...
    Employee # Name Work TimeLine RecId
    2222 Dave 1999-2001
    1
    2232 John 1998 - 1999
    1
    2222 Dave 2003-2005
    2
    2222 Dave 2005-2007
    3
    Currently our search would display all 3 records but since
    they all have the
    same Employee#( which is how the page is currently setup to
    display the
    current record )
    How can we update our detail page to display employee#2222
    recid 1
    Since we currently have the page using the "Go to detail"
    page using the
    employee# obviously if you have multiple records with the
    same ID the detail
    page will not work..
    So is it possible to pass 2 values to the detail page to
    display the correct
    record? or any suggestions on what changes we can make..
    I guess when you stare at something for so long you don't see
    the obvious
    solutions...
    Any help or idea on how to update this would be great..
    thanks
    ASP, SQL2005, DW8 VBScript

    thanks.. i will give that a try.
    ASP, SQL2005, DW8 VBScript
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]..
    > On 14 Nov 2007 in macromedia.dreamweaver, Daniel wrote:
    >
    >> <A HREF="/Field/emp_details_arc.asp?<%=
    >> Server.HTMLEncode(MM_keepNone) &
    MM_joinChar(MM_keepNone) & "cid=" &
    >> rsName.Fields.Item("cid").Value %>"><%=
    UCase(
    >> rsName.Fields.Item("cfname").Value ) %></A>
    >
    > Breaking this down:
    >
    > <A HREF="/Field/emp_details_arc.asp?
    > <%=
    > ' No idea what these are
    > Server.HTMLEncode(MM_keepNone) &
    MM_joinChar(MM_keepNone)
    > ' This is where your CID is comes from:
    > & "cid=" & rsName.Fields.Item("cid").Value
    > ' This is where you'd add recid. I assume that recid is
    in a field
    > ' of that name
    > & "&recid=" &
    rsName.Fields.Item("recid").Value
    > %>"><%= UCase(
    rsName.Fields.Item("cfname").Value ) %></A>
    >
    >> I would imagine i would need to also update my
    detail page to except
    >> 2 variables... which would involve the stored
    procedure to be
    >> updated.
    >
    > Correct.
    >
    > --
    > Joe Makowiec
    >
    http://makowiec.net/
    > Email:
    http://makowiec.net/contact.php

  • Setting new cell variant for an alv table column

    Hi,
    I want to set a new cell variant for a column. Therefore I did the following steps:
    1. Create an object of CL_SALV_WD_CV_STANDARD
    2. SET_KEY( 'CELLVAR1 )
    3. set_cell_design([..]-goodvalue_medium )
    4. SET_EDITOR( lr_alv_input_field )
    After that I added the cell variant to the column by using the method "add_cell_variant".
    The last step is to call method SET_SELECTED_CELL_VARIANT.
    I checked my program by using get_selected_cell_variant( ) and the return string was okay.
    But when the table is displayed, the new cell variant isn't working. I defined an input field as the cell editor for my new cell variant but when the table is shown, it is just text - no input possible. In addition to that the selected cell design (goodvalue_medium , step 3) isn't working. So I think the cell variant is not used.
    Can you help me?
    Thanks & Regards,
    Hendrik

    Hi
    I wonder if you can help me please, I too am having issues implementing ALV cell changes in WDA?
    I am basically trying to dynamically change the individual color of a cell (not the entire column or row) dependant on certain criteria. I apologies but find that you are the closest resource for any potential information. Please see screen shot below.
    Currently my code is as follows:
    see: www.picasaweb.google.co.uk/dave.alexander69/Pictures#5244416971466907938
    data: lr_cv TYPE REF TO cl_salv_wd_cv_standard.
    loop at table 1 row data
            loop at table columns
              for the date columns only...
              IF <fs_column>-id(4) = 'CELL'.
               get and set column header dates from select option user input - done
                loop at table 2 row data (table 2 contains date ranges for row concerned)
                  MOVE: ls_zdata-variance TO lv_variance.
                  method 1 - as in sap press WD4A -:
                  lr_cv = cl_wd_table_standard_cell=>new_table_standard_cell(
                                                     view        = view
                                                    variant_key = lv_variance ).
                 as mentioned...
                  CREATE OBJECT lr_cv.
                  lr_cv->set_key( 'VARIANCE' ).
                  lr_cv->set_cell_design( '09' ).
                  lr_cv->set_editor( lr_input_field ).
                  lr_column->add_cell_variant( lr_cv ).
                  lr_column->set_cell_editor( lr_input_field ).
                  lr_column->set_sel_cell_variant_fieldname( 'VARIANCE' ).
                  lr_column->set_cell_design_fieldname( value = 'COLOR_CELL' ).
                  lr_field = lr_table->if_salv_wd_field_settings~get_field( <fs_column>-id ).
                  lr_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
                  the only way I get cell coloring to work - but this is for entire column?
                  ls_zdata-color_cell = cl_wd_table_standard_cell=>e_cell_design-one.
                  MODIFY lt_zdata FROM ls_zdata..
                ENDLOOP.
              ENDIF.
              IF <fs_column>-id = 'COLOR_CELL'.
                CALL METHOD lr_column->set_visible( EXPORTING value = '00' ).
              ENDIF.
            ENDLOOP
          ENDLOOP.
    As you see I am in the dark a bit regarding cell variants and wonder if you can point me in a better direction.
    Many thanks for any help,
    Dave Alexander

  • Is there a set up tutorial for using Outlook with iCloud

    I am using Outlook on my PC (windows 7 and Outlook 2010)
    1. Is there a set up tutorial for using Outlook with iCloud?
    2.  Please clarify, I don't need to set up a XXX@me email account to get iCloud to sync with Outlook, correct?
    3.  My emails appear to by syncing, but the Outlook Calendar does not sync its Pre-Cloud entries with my Iphone and IPad.  Is this what is to e expected? 
    4.  If I put a calendar entry on my PC's Outlook Calendar, it should sync with my Iphone and Ipad correct?  Again, what about entries that were made in Outlook before I signed up for iCloud? 
    I am hoping there is a simple step by step tutorial somewhere, because I am pretty disappointed with Apple about how confusing this is all becoming. 

    Hello:
    Sorry I can't bring you a solution but I am surprised your mail is working. Many of us with outlook 2010 seem to be having trouble sending. It seems apple's Pxx-smpt.mail.me.com server is rejecting the loging. I have tried it on three PC's with Win7 and Outlook 2010. It simply does not work after installing from the iCloud control panel. I have also manually configured the servers, encryption method, etc to no avail.
    On the positive side, Calenda and contacts does work. First time around, the claendar duplictaed everything but I manually cleans it out. The iCloud calendar is a seperate calendar in Outlook. It seems to perform a sync with your local calendar one time. From them on, I beleive you need to use the iCloud calendar to have the same appointments show on each device. I renamed the defaut iClouds calendar to "iCloud Calendar". It's definatelly confusing and not seamless. It would be nicer to sync your OL calendar permenantly so you don;t see two or more.
    Let me know your settings for iCloud email on Outlook. Try sending an email from the @me.com account.
    Thanks,
    Kevin

  • How do I set proxy settings for a Java app behind a corporate server?

    I have the source code of a Download Manager program written in Java. It has to be run within my college network in which we use the "Corporate Client" server to access the internet. The HTTP proxy is 172.16.68.6 and Port number is 3128. How do I define these parameters in my java program so that it can download files from the internet?
    The source code for the program is:
    There are four classes:
    1. DownloadManager.java
    2. Download.java
    3. DownloadTable.java
    4. ProgressRenderer.java
    /*__DownloadManager.java__*/
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    // The Download Manager.
    public class DownloadManager extends JFrame
            implements Observer {
        // Add download text field.
        private JTextField addTextField;
        // Download table's data model.
        private DownloadsTableModel tableModel;
        // Table listing downloads.
        private JTable table;
        // These are the buttons for managing the selected download.
        private JButton pauseButton, resumeButton;
        private JButton cancelButton, clearButton;
        // Currently selected download.
        private Download selectedDownload;
        // Flag for whether or not table selection is being cleared.
        private boolean clearing;
        // Constructor for Download Manager.
        public DownloadManager() {
            // Set application title.
            setTitle("Download Manager");
            // Set window size.
            setSize(640, 480);
            // Handle window closing events.
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    actionExit();
            // Set up file menu.
            JMenuBar menuBar = new JMenuBar();
            JMenu fileMenu = new JMenu("File");
            fileMenu.setMnemonic(KeyEvent.VK_F);
            JMenuItem fileExitMenuItem = new JMenuItem("Exit",
                    KeyEvent.VK_X);
            fileExitMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionExit();
            fileMenu.add(fileExitMenuItem);
            menuBar.add(fileMenu);
            setJMenuBar(menuBar);
            // Set up add panel.
            JPanel addPanel = new JPanel();
            addTextField = new JTextField(30);
            addPanel.add(addTextField);
            JButton addButton = new JButton("Add Download");
            addButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionAdd();
            addPanel.add(addButton);
            // Set up Downloads table.
            tableModel = new DownloadsTableModel();
            table = new JTable(tableModel);
            table.getSelectionModel().addListSelectionListener(new
                    ListSelectionListener() {
                public void valueChanged(ListSelectionEvent e) {
                    tableSelectionChanged();
            // Allow only one row at a time to be selected.
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            // Set up ProgressBar as renderer for progress column.
            ProgressRenderer renderer = new ProgressRenderer(0, 100);
            renderer.setStringPainted(true); // show progress text
            table.setDefaultRenderer(JProgressBar.class, renderer);
            // Set table's row height large enough to fit JProgressBar.
            table.setRowHeight(
                    (int) renderer.getPreferredSize().getHeight());
            // Set up downloads panel.
            JPanel downloadsPanel = new JPanel();
            downloadsPanel.setBorder(
                    BorderFactory.createTitledBorder("Downloads"));
            downloadsPanel.setLayout(new BorderLayout());
            downloadsPanel.add(new JScrollPane(table),
                    BorderLayout.CENTER);
            // Set up buttons panel.
            JPanel buttonsPanel = new JPanel();
            pauseButton = new JButton("Pause");
            pauseButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionPause();
            pauseButton.setEnabled(false);
            buttonsPanel.add(pauseButton);
            resumeButton = new JButton("Resume");
            resumeButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionResume();
            resumeButton.setEnabled(false);
            buttonsPanel.add(resumeButton);
            cancelButton = new JButton("Cancel");
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionCancel();
            cancelButton.setEnabled(false);
            buttonsPanel.add(cancelButton);
            clearButton = new JButton("Clear");
            clearButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionClear();
            clearButton.setEnabled(false);
            buttonsPanel.add(clearButton);
            // Add panels to display.
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(addPanel, BorderLayout.NORTH);
            getContentPane().add(downloadsPanel, BorderLayout.CENTER);
            getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
        // Exit this program.
        private void actionExit() {
            System.exit(0);
        // Add a new download.
        private void actionAdd() {
            URL verifiedUrl = verifyUrl(addTextField.getText());
            if (verifiedUrl != null) {
                tableModel.addDownload(new Download(verifiedUrl));
                addTextField.setText(""); // reset add text field
            } else {
                JOptionPane.showMessageDialog(this,
                        "Invalid Download URL", "Error",
                        JOptionPane.ERROR_MESSAGE);
        // Verify download URL.
        private URL verifyUrl(String url) {
            // Only allow HTTP URLs.
            if (!url.toLowerCase().startsWith("http://"))
                return null;
            // Verify format of URL.
            URL verifiedUrl = null;
            try {
                verifiedUrl = new URL(url);
            } catch (Exception e) {
                return null;
            // Make sure URL specifies a file.
            if (verifiedUrl.getFile().length() < 2)
                return null;
            return verifiedUrl;
        // Called when table row selection changes.
        private void tableSelectionChanged() {
        /* Unregister from receiving notifications
           from the last selected download. */
            if (selectedDownload != null)
                selectedDownload.deleteObserver(DownloadManager.this);
        /* If not in the middle of clearing a download,
           set the selected download and register to
           receive notifications from it. */
            if (!clearing) {
                selectedDownload =
                        tableModel.getDownload(table.getSelectedRow());
                selectedDownload.addObserver(DownloadManager.this);
                updateButtons();
        // Pause the selected download.
        private void actionPause() {
            selectedDownload.pause();
            updateButtons();
        // Resume the selected download.
        private void actionResume() {
            selectedDownload.resume();
            updateButtons();
        // Cancel the selected download.
        private void actionCancel() {
            selectedDownload.cancel();
            updateButtons();
        // Clear the selected download.
        private void actionClear() {
            clearing = true;
            tableModel.clearDownload(table.getSelectedRow());
            clearing = false;
            selectedDownload = null;
            updateButtons();
      /* Update each button's state based off of the
         currently selected download's status. */
        private void updateButtons() {
            if (selectedDownload != null) {
                int status = selectedDownload.getStatus();
                switch (status) {
                    case Download.DOWNLOADING:
                        pauseButton.setEnabled(true);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.PAUSED:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.ERROR:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
                        break;
                    default: // COMPLETE or CANCELLED
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
            } else {
                // No download is selected in table.
                pauseButton.setEnabled(false);
                resumeButton.setEnabled(false);
                cancelButton.setEnabled(false);
                clearButton.setEnabled(false);
      /* Update is called when a Download notifies its
         observers of any changes. */
        public void update(Observable o, Object arg) {
            // Update buttons if the selected download has changed.
            if (selectedDownload != null && selectedDownload.equals(o))
                updateButtons();
        // Run the Download Manager.
        public static void main(String[] args) {
            DownloadManager manager = new DownloadManager();
            manager.show();
    This example shows how to create a simple download manager in Java. It contains four classes in foru Java source files:
    Download.java: Contains Download class which downloads a file from a URL.
    DownloadManager.java: Contains the main class for download manager application.
    DownloadsTableModel.java: Contains the class which manages the download table's data.
    ProgressRenderer.java: Contains the class which is responsible to render a JProgressBar in a table cell.
    The contents of the listed files are written below.
    /*__Download.java__*/
    import java.io.*;
    import java.net.*;
    import java.util.*;
    // This class downloads a file from a URL.
    class Download extends Observable implements Runnable {
        // Max size of download buffer.
        private static final int MAX_BUFFER_SIZE = 1024;
        // These are the status names.
        public static final String STATUSES[] = {"Downloading",
        "Paused", "Complete", "Cancelled", "Error"};
        // These are the status codes.
        public static final int DOWNLOADING = 0;
        public static final int PAUSED = 1;
        public static final int COMPLETE = 2;
        public static final int CANCELLED = 3;
        public static final int ERROR = 4;
        private URL url; // download URL
        private int size; // size of download in bytes
        private int downloaded; // number of bytes downloaded
        private int status; // current status of download
        // Constructor for Download.
        public Download(URL url) {
            this.url = url;
            size = -1;
            downloaded = 0;
            status = DOWNLOADING;
            // Begin the download.
            download();
        // Get this download's URL.
        public String getUrl() {
            return url.toString();
        // Get this download's size.
        public int getSize() {
            return size;
        // Get this download's progress.
        public float getProgress() {
            return ((float) downloaded / size) * 100;
        // Get this download's status.
        public int getStatus() {
            return status;
        // Pause this download.
        public void pause() {
            status = PAUSED;
            stateChanged();
        // Resume this download.
        public void resume() {
            status = DOWNLOADING;
            stateChanged();
            download();
        // Cancel this download.
        public void cancel() {
            status = CANCELLED;
            stateChanged();
        // Mark this download as having an error.
        private void error() {
            status = ERROR;
            stateChanged();
        // Start or resume downloading.
        private void download() {
            Thread thread = new Thread(this);
            thread.start();
        // Get file name portion of URL.
        private String getFileName(URL url) {
            String fileName = url.getFile();
            return fileName.substring(fileName.lastIndexOf('/') + 1);
        // Download file.
        public void run() {
            RandomAccessFile file = null;
            InputStream stream = null;
            try {
                // Open connection to URL.
                HttpURLConnection connection =
                        (HttpURLConnection) url.openConnection();
                // Specify what portion of file to download.
                connection.setRequestProperty("Range",
                        "bytes=" + downloaded + "-");
                // Connect to server.
                connection.connect();
                // Make sure response code is in the 200 range.
                if (connection.getResponseCode() / 100 != 2) {
                    error();
                // Check for valid content length.
                int contentLength = connection.getContentLength();
                if (contentLength < 1) {
                    error();
          /* Set the size for this download if it
             hasn't been already set. */
                if (size == -1) {
                    size = contentLength;
                    stateChanged();
                // Open file and seek to the end of it.
                file = new RandomAccessFile(getFileName(url), "rw");
                file.seek(downloaded);
                stream = connection.getInputStream();
                while (status == DOWNLOADING) {
            /* Size buffer according to how much of the
               file is left to download. */
                    byte buffer[];
                    if (size - downloaded > MAX_BUFFER_SIZE) {
                        buffer = new byte[MAX_BUFFER_SIZE];
                    } else {
                        buffer = new byte[size - downloaded];
                    // Read from server into buffer.
                    int read = stream.read(buffer);
                    if (read == -1)
                        break;
                    // Write buffer to file.
                    file.write(buffer, 0, read);
                    downloaded += read;
                    stateChanged();
          /* Change status to complete if this point was
             reached because downloading has finished. */
                if (status == DOWNLOADING) {
                    status = COMPLETE;
                    stateChanged();
            } catch (Exception e) {
                error();
            } finally {
                // Close file.
                if (file != null) {
                    try {
                        file.close();
                    } catch (Exception e) {}
                // Close connection to server.
                if (stream != null) {
                    try {
                        stream.close();
                    } catch (Exception e) {}
        // Notify observers that this download's status has changed.
        private void stateChanged() {
            setChanged();
            notifyObservers();
    /*__DownloadTableModel.java__*/
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class manages the download table's data.
    class DownloadsTableModel extends AbstractTableModel
            implements Observer {
        // These are the names for the table's columns.
        private static final String[] columnNames = {"URL", "Size",
        "Progress", "Status"};
        // These are the classes for each column's values.
        private static final Class[] columnClasses = {String.class,
        String.class, JProgressBar.class, String.class};
        // The table's list of downloads.
        private ArrayList downloadList = new ArrayList();
        // Add a new download to the table.
        public void addDownload(Download download) {
            // Register to be notified when the download changes.
            download.addObserver(this);
            downloadList.add(download);
            // Fire table row insertion notification to table.
            fireTableRowsInserted(getRowCount() - 1, getRowCount() - 1);
        // Get a download for the specified row.
        public Download getDownload(int row) {
            return (Download) downloadList.get(row);
        // Remove a download from the list.
        public void clearDownload(int row) {
            downloadList.remove(row);
            // Fire table row deletion notification to table.
            fireTableRowsDeleted(row, row);
        // Get table's column count.
        public int getColumnCount() {
            return columnNames.length;
        // Get a column's name.
        public String getColumnName(int col) {
            return columnNames[col];
        // Get a column's class.
        public Class getColumnClass(int col) {
            return columnClasses[col];
        // Get table's row count.
        public int getRowCount() {
            return downloadList.size();
        // Get value for a specific row and column combination.
        public Object getValueAt(int row, int col) {
            Download download = (Download) downloadList.get(row);
            switch (col) {
                case 0: // URL
                    return download.getUrl();
                case 1: // Size
                    int size = download.getSize();
                    return (size == -1) ? "" : Integer.toString(size);
                case 2: // Progress
                    return new Float(download.getProgress());
                case 3: // Status
                    return Download.STATUSES[download.getStatus()];
            return "";
      /* Update is called when a Download notifies its
         observers of any changes */
        public void update(Observable o, Object arg) {
            int index = downloadList.indexOf(o);
            // Fire table row update notification to table.
            fireTableRowsUpdated(index, index);
    /*__ProgressRenderer.java__*/
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class renders a JProgressBar in a table cell.
    class ProgressRenderer extends JProgressBar
            implements TableCellRenderer {
        // Constructor for ProgressRenderer.
        public ProgressRenderer(int min, int max) {
            super(min, max);
      /* Returns this JProgressBar as the renderer
         for the given table cell. */
        public Component getTableCellRendererComponent(
                JTable table, Object value, boolean isSelected,
                boolean hasFocus, int row, int column) {
            // Set JProgressBar's percent complete value.
            setValue((int) ((Float) value).floatValue());
            return this;
    }

    Thank you for the quick reply! But the solution provided by you, it seems, has still not been able to address my issue. I ran the program at command prompt with your said parameters, but the download still gave an error in the App window.
    Also, is there some way of defining these parameters in the source code? I am keen in using NetBeans to run the program.
    Cheers!

  • I purchased a text tone from Itunes.  It shows up in my library, but not as a text tone.  Is there a way for me to set it as a text tone for all texts?  Or I am stuck with factory settings?

    I purchased a text tone from Itunes.  It shows up in my library, but not as a text tone.  Is there a way for me to set it as a text tone for all texts?  Or I am stuck with factory settings?

    So it is conseidered a customized text tones even if it was purchased through iTunes?  Confusing.  Since I bought it through itunes as a text tone I assumed it would work.  OOOPS
    Thanks so much

  • How to set column widths in tables for selected table only, not globally throughout document?

    I've been utilizing the below script (thank you so much Ramkumar. P!) to set column widths throughout a sizable InDesign book with tables on every page and it is truly a time saver. At this point in time, I have three versions of it because there are different column widths throughout the book. Is it possible to augment the script to run only on a selected text frame (containing a table)? If so, would someone be kind enough to share the augmented script with me? I've been trying to figure out this seemingly simple change through trial and error with no success as yet. I realize this is a totally newbie request and I'm entirely at the mercy of the kindness of the Javascript gods that contribute within this forum. Seeing that in a different post related to this script, one such guru responded to a request as simple as "Where do I put the scripts in InDesign" gave me enough courage to ask for some help! Thank you in advance to anyone willing to provide a solution.
      var myDoc = app.activeDocument;
         var myWidths = [100, 100, 150, 150];
         for(var T=0; T < myDoc.textFrames.length; T++){
             for(var i=0; i < myDoc.textFrames[T].tables.length; i++){
                 for(var j=0; j < myWidths.length; j++){
                     myDoc.textFrames[T].tables[i].columns[j].width = myWidths[j];
         alert("Table width updated successfully...");

    Hello all
    I have the same problem in that I'm not a scripting person, but was able to get the above script working without problem, and it does set irregular table column widths perfectly, so thanks to Ramkumar. P for that.
    BUT, it changes the column width for ALL tables in the document, whereas I would like to just target the selected table.
    Any ideas as to how I might amend this script to achieve this?
    Thx, Christian

  • What is the best program for playing games,dics,3d settings such as "groove setting"

    what is the best program for playing games,dics,3d settings such as "groove setting"?

    Aubry,
    why don't you send your sequences straight to Compressor first, encode your movies as MPEG 2 and AC3 audio and import all assets in DVD studio PRO?
    G.

  • Web Dynpro for ABAP: Tutorial 2 - BAPI Usage

    Hi ,
    I am new in  WD for ABAP and i trying to finish tutorials from SDN. The  Second tutorial
    "Web Dynpro for ABAP: Tutorial 2 -BAPI Usage" is giving me headache .I was following the tutorial in a letter ,
    but the table is not filled d after I hit  "search" button. Does someone had same experience and possible solution.
    Thanks
    Chris

    Actually in this application the data that is required is flowing. So I have tried making the import parameters as the controller attributes in spite of context node in the service call. Then it passes the data into the import parameters as WD_THIS->KUNNR.
    But still when I am debugging the data is not coming. What could be the issue.

  • Appraisal: Setting Column/ Row Access for substatus

    Dear All,
    I was setting column & row access for the Appraisal template.
    I have already set it for the three main status i.e. "In Planning", "In Review" & "In Process".
    But i am unable to set it for different substatuses i.e. substatus of status "In Process". Actually i want to give different access for different substatus of the main status.
    Looking for your valuable advice.Please consider this matter as urget.
    Thanks & regards,
    Tarun

    Hi Tarun
    How did u do it thru ABAP? Could you kindly explain me in detail? Have u changed any standard FM? Please explain
    Thank you in advance

  • Programatically setting column values for table

    hi...
    I am programatically setting column values for table.
    But these values are not getting reflected on table after commit.
    I mean to say,new values are not persisted after commit.
    The code is as follows,It is in Application Module class
    public void createRecord()
    OAViewObject vo = (OAViewObject)this.getOpptyLoeVO1();
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    row.setAttribute("Id",new Number(850));
    row.setAttribute("Model","Honda");
    row.setAttribute("Role","Team Lead");
    row.setAttribute("Hours",new Number(35));
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    getTransaction().commit();
    Here "Id,Model,Role,Hours" are columns in table .

    Hi,
    is your VO based on an Entity Object?
    If not, you can't update values in the DB using only a View Object!
    If yes, you should control that, in your VO, you have not selected the flag "Read Only" for the EO you want to update.
    Hope this helps you.
    Bye
    Raffy

  • Setting a Primary Key for a newly added Column

    Is it possible for setting a primary key for a newly added column in a table having records?

    Hi,
    km**** wrote:
    oh if the table has records then it is not possible ah...No, the table can have rows at the time you add the Primary Key constraint. Solomon was just saying that the column(s) that you are making into the Primary Key must already have unique values. A Primary Key can not be NULL, so you must do the steps in this order:
    (1) ALTER TABLE to add the column(s) (if this hasn't been done already)
    (2) UPDATE the table, to put unique values in all rows for the Primary Key column(s)
    (3) Add the PRIMARY KEY constraint
    You need to do step (2) before you do step (3)

  • How can I change the margin settings in the pages inspector to make them more specific for label templates. I need margins that can be set to hundreths of a centimetre not just tenths.

    How can I change the margin settings in the pages inspector to make them more specific for label templates. I need margins that can be set to hundreths of a centimetre not just tenths.

    I doubt you need hundreths as you would not even be able to measure that and the printer doesn't hold the paper to those tolerances.
    fruhulda is right. Pages accepts higher measure but rounds it in the measure field.
    If you want absolute accuarcy you need to set your measures to points. Everything else is being recalculated.
    Peter

  • For the iPod Classic, in settings, how does the volume limit work? After setting a limit, how to re-set to a new volume limit?

    For the iPod Classic, in settings, how does the volume limit work? After setting a limit, how to re-set to a new volume limit?

    This thread - with a quote from an LR4 Beta thread - says that all 6 central Basic controls in PV2012 (Exposure thru Blacks) are now image-adaptive, as were Recovery, Fill Light, and Clarity in previous versions:
    http://forums.adobe.com/message/4253485
    Whether they are suitable for creating a Timelapse sequence without significant flicker is entirely subjective and up to you - and of course, dependant on your specific images & how they change over time.  Sorry, not much advice beyond try PV2012, and revert back to PV2010 if you get too much flicker.

Maybe you are looking for

  • How can I search for details in job log files

    Hi, I'm looking for a specific entry in the job log.  I don't know when it was written (other than the date), to find the log without trial and error, I need a specific time to open the correct one in IDC. The entry was written by the modifyADSuser p

  • I am going to move out for college next year, should I get my own apple ID?

    My whole family shares the same apple ID, including one sister who is already moved out. If I understand correctly only 5 computers can be associated with an apple ID. So my thoughts are that as each of my siblings and I move out over the years and e

  • What Macbook Pro to get for video editing?

    For software like adobe after effects cs5, what macbook would be the best, I have pretty limited money so is the base model ok? if not whitch one works well? Thanks!

  • Beige vertical stripes on monitor OS windows 7

    Light beige vertical stripes appear on my ViewSonic monitor whenever there's any movement on the screen, including mouse movements espically when the wheel is used. When there's nothing moving on the screen the stripes disappear, although on the YouT

  • Am I able to fix an iPhone 4 GSM without a warranty or a receipt?

    I am in Ottawa, Ontario, Canada and I got an iPhone 4 GSM from my friend, which I plan to use if my iPhone 4S dies and I need a loaner. The iPhone 4 GSM is not jailbroken and it's locked to Telus Mobility in Canada. The iPhone is running iOS 6.1. How