Data From GUI to Objects?

Ive been doing a lot of reading and asking a lot of questions about a program Im trying to tackle. Ive broken it down to its most basic form. I have a GUI with two text fields and a button. There is a main class that creates the GUI class and a Student class with a name and grade member. The user enters the name and grade into the fields and clicks the button to save the data to the student object. Im starting to clear up some, but Im still a little confused on where the student class goes in relation to the GUI. Im clear on the fact that student should not be a member object of the GUI (no GUI -> Student), but how then does the info get into the student class if its not a member of the GUI:
My simple code so far has this snipet:
private void jButton1_actionPerformed(ActionEvent e)
student.setName(textField1.getText());
student.setGrade(textField2.getText());
But this only works if student is a member object of the GUI and thats a no no apparently, so how else can I get the info to student?

I made this to demonstrate:
1 - how the truck objects are separate from the gui,
2 - how to pass the truck references (eg, truck1, truck2,...) into the gui, and
3 - how these are used to query and change the truck objects.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ClassTalk
    public static void main(String[] args)
        ShineyNewGUI gui = new ShineyNewGUI();
        ShineyNewPickupTruck truck1 = new ShineyNewPickupTruck("red");
        ShineyNewPickupTruck truck2 = new ShineyNewPickupTruck("yellow");
        ShineyNewPickupTruck truck3 = new ShineyNewPickupTruck("blue");
        ShineyNewPickupTruck truck4 = new ShineyNewPickupTruck("pink");
        ShineyNewPickupTruck[] fleet = { truck1, truck2, truck3, truck4 };
        gui.addTrucks(fleet);
class ShineyNewGUI
    ShineyNewPickupTruck[] trucks;
    ShineyNewPickupTruck selectedTruck;
    ShineyNewGUI()
        // north panel
        final JTextField colorField = new JTextField(12);
        colorField.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent e)
                selectedTruck.setColor(colorField.getText());
        JPanel northPanel = new JPanel();
        northPanel.add(new JLabel("truck color  "));
        northPanel.add(colorField);
        // center panel
        final JLabel outputLabel = new JLabel(" ");
        JPanel panel = new JPanel();
        panel.add(outputLabel);
        // south panel
        final JTextField indexField = new JTextField(4);
        final JButton showColorButton = new JButton("show color");
        showColorButton.addActionListener(new ActionListener()
            public void actionPerformed(ActionEvent e)
                // must be a number from [0 - 3]
                int index = Integer.parseInt(indexField.getText());
                selectedTruck = trucks[index];
                String truckColor = selectedTruck.color;
                outputLabel.setText("truck # " + index + " color = " + truckColor);
        JPanel southPanel = new JPanel();
        southPanel.add(new JLabel("truck #  "));
        southPanel.add(indexField);
        southPanel.add(showColorButton);
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(northPanel, "North");
        f.getContentPane().add(panel);
        f.getContentPane().add(southPanel, "South");
        f.setSize(400,300);
        f.setLocation(200,200);
        f.setVisible(true);
    public void addTrucks(ShineyNewPickupTruck[] trucks)
        this.trucks = trucks;
class ShineyNewPickupTruck
    String color;
    public ShineyNewPickupTruck(String color)
        this.color = color;
    public void setColor(String color)
        this.color = color;
}

Similar Messages

  • POWL accessing data from multiple tables/objects

    Hello,
    I have a query on the POWL applications.
    If the powl application has to access data from multiple tables/objects, then the solution would be creating a data structure of those tables/objects and referring to that structure in GET_OBJECT_DEF methods.
    Is there any other soln? or I am right here?
    The queries which are saved for a particular user are transportable? if not, how can they be made transportable?
    Thanks & regards,
    Ravish

    you are right, you can do in get_objects method.
    POWL_QUERIES are transportab;e, you can save them in POWL_QUERY transaction.
    Best regards,
    Rohit
    http://wiki.sdn.sap.com/wiki/display/WDABAP/POWL

  • While Loading Master data from BW Info Object

    Hi,
    What is the difference between the two options
    "set filters by Attributes AND Hierarchies" and
    "set filters by Attributes OR Hierarchies"
    when we load master data attributes/texts from BW Info Object.
    can someone please explain in detail with example.
    Thanks,
    Rishi

    Hi Rishi,
    While looking at your question -
    What is the difference between the two options
    "set filters by Attributes AND Hierarchies" and
    "set filters by Attributes OR Hierarchies"
    when we load master data attributes/texts from BW Info Object.
    can someone please explain in detail with example.
    This is not what you are explaining in second post.
    Kindly close old threads properly if your queries are resolved , so that it will helps other.
    Shrikant 

  • Move Data from Converted Database Objects Successfully Finish ?

    I am using SQL Developer 3.2.20.09 try to migrate KSMMS database from SQL Server 2008 to Oracle 11g R2. After the migration process is done, the Captured Database Objects model, and Converted Database Objects model have been created in the Migration Projects Navigator panel on the left side, and the corresponding sql scripts has been generated in the project output directory. I run the sql scripts, it created all the tables, views, index and stored procedures in the oracle database, everything seems working perfectly. However when I try to Move Data (by right clicking Converted Database Objects) and try to move all the data from SQL Server to Oracle database, the Data moving process run less then 1 minute, and show me the result as Data Move successfully. I have about 1 GB data in the SQL Server database, it seems nothing has been moved into Oracle DB. Here are the detail structures of MS SQL Server Database which I am trying to migrate to Oracle:
    The SQL Server Database name is KSMMS, under that database there are 9 users (azteca, cwweb, dbo, guest, plladmin, pw, pwadmin, tbills, wsdadmin). All my application objects (tables, views, indexes, procedures) are under azteca user, during the migration process, Converted Database Objects creates user azteca_KSMMS and dob_KSMMS, all my application objects have been created under azteca_KSMMS user schema. The generated .sql scripts actually can create all the objects under azteca_KSMMS schema, however when I try to Move Data, nothing has been moved into Oracle database. I opened an SR#3-6708733861 last Friday, it seems Oracle Support can't find what cause the problem during the Data Move process. Any help regarding my questions will be highly appreciated. Thanks.
    Kevin

    I changed Data Move Mode to Online and run the Data Move again. Same Results: Migration action have completed successfully. However no records have been moved into Oracle tables.
    I am running SQL Developer under Windows 8 Operation system. There is no Oracle client software available for Windows 8, does that cause any problems?
    Kevin

  • I want to divide the Numarical data from the  particular object

    we have a data in the particular object  like this
    rama1283krishna
    suri89tambi
    kondalu96737sony
    But as per our requirement we have to saparate the numerical data only
    1283
    89
    96737 Like this
    please advise how to get the data like this
    Thank u in advance

    Try this in webi = Trim(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace([object];"a";"");"b";"");"c";"");"d";"");"e";"");"f";"");"g";"");"h";"");"i";"");"j";""))
    do it for all the alphabets.
    or try this in universe
    regexp_replace([Your Object],' ')

  • Passing data from an XML object to an itemRenderer

    I'm trying to color the background of a column in a datagrid and have found a sample file that illustrate the concept. However, the sample has data stored in an arrayCollection whereas mine is in an XML object. The problem is that the data in the sample file is apparently automatically passed to the itemRenderer (shown below: note the trace statement). My XML object does not appear to automatically pass data to the itemRenderer. So my questions are:
    1. Is there a simple way to pass data stored in an XML object to an itemRenderer
    or
    2. Should I convert my XML to an arrayCollection? If so, what's the best way to do this-- I've tried the following, but without success:
    <mx:Model id="xmldata" source="example3.xml"/>
      <mx:ArrayCollection id="myAC" source="{ArrayUtil.toArray(xmldata.Example1)}" />
    Here's what the xml looks like:
    <TABLE>
       <EXAMPLE1>
          <difficulty> 0.5 </difficulty>
          <discrimination> 0.7 </discrimination>
          <item> 3 </item>
       </EXAMPLE1>
    </TABLE>  
    Here's the itemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Label xmlns:mx="http://www.adobe.com/2006/mxml">
        <!--
            This item renderer simply extends Label and overrides the updateDisplayList function to
            draw a gradient-filled rectangle. The colors in the gradient are determined from the
            data.
        -->
        <mx:Script>
        <![CDATA[
            import flash.geom.Matrix;
            import flash.display.GradientType;
            import flash.display.Graphics;
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                super.updateDisplayList(unscaledWidth,unscaledHeight);
                var m:Matrix = new Matrix();
                m.createGradientBox(unscaledWidth,unscaledHeight);
                var g:Graphics = graphics;
                            trace("data.col3="+data.col3)
                var colors:Array = (data.col3 < 2000 ? [0x0000CC,0x0000FF] : [0x00CC00,0x00FF00]);
                g.clear();
                g.beginGradientFill(GradientType.LINEAR, colors, [0.2,0.6], [0,255], m);
                // the rectangle is drawn a little high and a little tall to compensate for the gap
                // the DataGrid introduces between rows.
                g.drawRect(0, -2, unscaledWidth, unscaledHeight+4 );
                g.endFill();
        ]]>
        </mx:Script>
    </mx:Label>

    This sample code should answer your question of how to bring data into the renderer automatically. It comes in via the DataGrid dataProvider and then you refer to it in the renderer as data.XYZ, where XYZ is the field in the XML with the data. See FB 3 help sys on e4x syntax.
    ------------------ mainapp.mxml --------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="srvc.send();">
      <mx:Script>
        <![CDATA[
          import mx.rpc.events.ResultEvent;
          import mx.collections.XMLListCollection;
          [Bindable] private var xlc:XMLListCollection;
          private function dataHandler(evt:ResultEvent):void{
            xlc = new XMLListCollection(evt.result..EXAMPLE1 as XMLList);
        ]]>
      </mx:Script>
      <mx:HTTPService id="srvc" url="data2.xml" result="dataHandler(event)"
        resultFormat="e4x"/>
      <mx:DataGrid dataProvider="{xlc}">
        <mx:columns>
          <mx:DataGridColumn headerText="Difficulty" dataField="difficulty"/>
          <mx:DataGridColumn headerText="Discrimination" dataField="discrimination"/>
          <mx:DataGridColumn headerText="Item" itemRenderer="MyLabel"/>
        </mx:columns>
      </mx:DataGrid>
    </mx:Application>
    ----------- MyLabel.mxml --------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Label xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import flash.geom.Matrix;
          import flash.display.GradientType;
          import flash.display.Graphics;
          override protected function updateDisplayList(unscaledWidth:Number,
            unscaledHeight:Number):void{
            super.updateDisplayList(unscaledWidth,unscaledHeight);
            this.text = data.col3;
            var m:Matrix = new Matrix();
            m.createGradientBox(unscaledWidth,unscaledHeight);
            var g:Graphics = graphics;
            var colors:Array = (data.col3 < 2000 ? [0x0000CC,0x0000FF] : [0x00CC00,0x00FF00]);
            g.clear();
            g.beginGradientFill(GradientType.LINEAR, colors, [0.2,0.6], [0,255], m);
            g.drawRect(0, -2, unscaledWidth, unscaledHeight+4 );
            g.endFill();
        ]]>
      </mx:Script>
    </mx:Label>
    ------------ data2.xml ----------------
    <?xml version="1.0" encoding="utf8"?>
    <TABLE>
       <EXAMPLE1>
          <difficulty> 0.5 </difficulty>
          <discrimination> 0.7 </discrimination>
          <col3> 3 </col3>
       </EXAMPLE1>
    </TABLE>

  • Saving Form Data From GUI

    I have a GUI which aims to save client's details (Name, Address and Phone No) for an estate agency. There are two types of client: Buyers and Sellers and am trying to get the clients details saved into the appropriate class depending on which client type was selected on the JFrame. I have two packages:
    *uwePropertiesDomain
    *uwePropertiesUInterface
    uwePropertiesDomain contains the following classes:
    *Buyer
    *Seller
    uwePropertiesUInterface contains the following class:
    *uwePropertiesUI
    I have written the following code for the submit button on the JFrame:
    private void submitButtonActionPerformed(java.awt.event.ActionEvent evt)
        if (evt.getSource() == submitButton)
            if (((String)clientTypeBox.getSelectedItem()).equals("Buyer"))
                uwePropertiesDomain.Buyer buyer = new uwePropertiesDomain.Buyer();
                //String[] clientInfo;
                buyer.save(new String[]{nameField.getText() , addressField.getText(), phoneField.getText()});
            else
                uwePropertiesDomain.Seller seller = new uwePropertiesDomain.Seller();
                //String[] clientInfo;
                seller.save(new String[]{nameField.getText() , addressField.getText(), phoneField.getText()});
        } And the following in Buyer/Seller classes:
    String[] clientInfo;    
    public void save(String[] args)
       this.clientInfo = args;
    }This all compiles, however, where is the data saved to? How would I go about searching for a client using their name?

    In your class, define a List such as ArrayList (easier than an array--you don't need to know the number of objects ahead of time).
    List buyerList = new ArrayList();
    List sellerList = new ArrayList();Then, in submitButtonActionPerformed, say:
    uwePropertiesDomain.Buyer buyer = new uwePropertiesDomain.Buyer();
    buyer.save(new String[]{nameField.getText() , addressField.getText(), phoneField.getText()});
    buyerList.add(buyer); // ADD THISAnd similar for seller.
    You may want a Buyer constructor that takes those three values, instead of having to call "save" separately.
    Now, you'll have a list of buyers and sellers, and you can perform searches on them (look up Comparable, redefining .equals/.hashCode, Comparator, etc.).

  • Issue with import master data from BW info object using DM

    Hi All,
    We have master data loads on weekly basis.
    One of them, product master data is loaded from 0material using DM package.
    While loading the attributes we exclude couple of Products based on the attributes (say Product sub family)
    ex - Having conversion file which excludes product sub family - ML. so all the products under that sub family are excluded from the load.
    Hierarchy load - How can we skip the products which are excluded during attribute run?
    For the first hierarchy load, we copied all the product ID which are part of product sub family - ML and entered in conversion file "NODENAME" and "PARENT" to skip.
    But during the subsequent runs, whenever we have a new  product under Family ML the hierarchy job fails. Attached the error. we then manually enter that product to be excluded in the hierarchy load and the job runs fine.
    Is there a way to automate this process.
    Version - BPC 10 SP 17 .NET 3.5
    Appreciate any thoughts on this.
    Thanks in advance/
    Raghu

    Thanks for your response.
    We are currently using the first option you have mentioned. But the problem is when we have new product coming in BW (which is part of attribute we skip while loading attributes from BW to BPC) we manually need to add that product to skip in hierarchy conversion file also.
    As i can see, the selection option to skip is available only while loading the attributes but not for hierarchy load.
    Please correct me if am wrong.
    Regards,
    Raghu

  • Error while deleting the data from DSO

    Hi Experts
    I am getting the ABAP Dumps when I am trying to delete the data from the DSO Objects in my Systems.
    "    An entry was to be entered into the table                                                    
         "\FUNCTION=RSAR_ODS_GET\DATA=L_TH_ISOSMAP" (which should have                               
        had a unique table key (UNIQUE KEY)).                                                        
        However, there already existed a line with an identical key.                                                                               
    The insert-operation could have ocurred as a result of an INSERT- or                         
        MOVE command, or in conjunction with a SELECT ... INTO.                                                                               
    The statement "INSERT INITIAL LINE ..." cannot be used to insert several                     
         initial lines into a table with a unique key.     "
    I have tried with multiple DSO's and Have the same issue. Please need your suggestions.
    Regards,
    Mahesh

    Hi......
    I think in the ODS setting Unique Data Records checkbox is ticked........if so.........The DataStore object can be used for loading unique data records...........If the loaded request does contain data that is already in the DataStore object, activation of the request will lead to an error.
    Find the request in SE16>>RSICCONT table .........and try to delete there....it may work........
    Check this.....
    u2022 Note 1007717 -Deleting from Data Store object: Termination w/o log
    u2022 Note 998704 - Deleting req from DataStore obj: Status at end of processing
    u2022 Note 1037507 - System Termination when you delete from DataStore objects
    Regards,
    Debjani.....

  • Re Init because descrepancy in data from R/3 to BW

    Due to discrepancy in data I need to re run the init from 2LIS_11_VAITM. Daily deltas are loading in to the cube.
    I have data in the Cube for the last 3 months. It is about 5 million records. I have notified the Key users and I have a down time between 6.00pm and 3.00 in the morning.
    The data flows from 2LIS_11_VAITM to ODS and then to Cube..
    Please give me step by steps.. Do I need to do directly in Production or through development..
    Thanks,
    Sudha..

    Hi,
    Before doing reinit check whether repair full request will help.
    Check the OSS Note 739863 'Repairing data in BW' for all the details !
    "Symptom
    Some data is incorrect or missing in the PSA table or in the ODS object (Enterprise Data Warehouse layer).
    There may be a number of reasons for this problem: Errors in the relevant application, errors in the user exit, errors in the DeltaQueue, handling errors in the customers posting procedure (for example, a change in the extract structure during production operation if the DeltaQueue was not yet empty; postings before the Delta Init was completed, and so on), extractor errors, unplanned system terminations in BW and in R/3, and so on.
    Solution
    Read this note in full BEFORE you start actions that may repair your data in BW. Contact SAP Support for help with troubleshooting before you start to repair data.
    BW offers you the option of a full upload in the form of a repair request (as of BW 3.0B). If you want to use this function, we recommend that you use the ODS object layer.
    Note that you should only use this procedure if you have a small number of incorrect or missing records. Otherwise, we always recommend a reinitialization (possibly after a previous selective deletion, followed by a restriction of the Delta-Init selection to exclude areas that were not changed in the meantime).
    1. Repair request: Definition
    If you flag a request as a repair request with full update as the update mode, it can be updated to all data targets, even if these already contain data from delta initialization runs for this DataSource/source system combination. This means that a repair request can be updated into all ODS objects at any time without a check being performed. The system supports loading by repair request into an ODS object without a check being performed for overlapping data or for the sequence of the requests. This action may therefore result in duplicate data and must thus be prepared very carefully.
    The repair request (of the "Full Upload" type) can be loaded into the same ODS object in which the 'normal' delta requests run. You will find this request under the "Repair Request" option in the InfoPackage (Maintenance) menu.
    2. Prerequisites for using the "Repair Request" function
    2.1. Troubleshooting
    Before you start the repair action, you should carry out a thorough analysis of the possible cause of the error to make sure that the error cannot recur when you execute the repair action. For example, if a key figure has already been updated incorrectly in the OLTP system, it will not change after a reload into BW. Use transaction RSA3 (Extractor Checker) in the source system for help with troubleshooting. Another possible source of the problem may be your user exit. To ensure that the user exit is correct, first load a user exit with a Probe-Full request into the PSA table and check whether the data is correct. If it is not correct: Search for the error in the exit user. If you do not find it, we recommend that you deactivate the user exit for testing purposes and request a new Full Upload. It If the data arrives correctly, it is highly probable that the error is indeed in the user exit.
    We always recommend that you load the data into the PSA table in the first step and check the result there.
    2.2. Analyze the effects on the downstream targets
    Before you start the Repair request into the ODS object, make sure that the incorrect data records are selectively deleted from the ODS object. However, before you decide on selective deletion, you should read the Info Help for the "Selective Deletion" function, which you can access by pressing the extra button on the relevant dialog box. The activation queue and the ChangeLog remain unchanged during the selective deletion of the data from the ODS object, which means that the incorrect data is still in the change log afterwards. After the selective deletion, you therefore must not reconstruct the ODS object if it is reconstructed from the ChangeLog. (Reconstruction is usually from the PSA table but, if the data source is the ODS object itself, the ODS object is reconstructed from its ChangeLog). You MUST read the recommendations and warnings about this (press the "Info" button).
    You MUST also take into account the fact that the delta for the downstream data targets is created from the changelog. If you perform selective deletion and then reload data into the deleted area, this may result in data inconsistencies in the downstream data targets.
    If you only use MOVE and do not use ADD for updates in the ODS object, selective deletion may not be required in some cases (for example, if incorrect records only have to be changed, rather than deleted). In this case, the DataMart delta also remains intact.
    2.3. Analysis of the selections
    You must be very precise when you perform selective deletion: Some applications do not provide the option of selecting individual documents for the load process. Therefore, you must first ensure that you can load the same range of documents into BW as you would delete from the ODS object. This note provides some application-specific recommendations to help you "repair" the incorrect data records.
    If you updated the data from the ODS object into the InfoCube, you can also delete it there using the "Selective deletion" function. However, if it is compressed at document level there and deletion is no longer possible, you must delete the InfoCube content and fill the data in the ODS object again after repair.
    You can only perform this action after a thorough analysis of all effects of selective data deletion. We naturally recommend that you test this first in the test system.
    The procedure generally applies for all SAP applications/extractors. The application determines the selections. For example, if you cannot use the document number for selection but you can select documents for an entire period, then you are forced to delete and then update documents for the entire period in the data target. Therefore, it is important to look first at the selections in the InfoPackage exactly before you delete data from the data target.
    Some applications have additional special features:
    Logistics cockpit: As preparation for the repair request, delete the SetUp table (if you have not already done so) and fill it selectively with concrete document numbers (or other possible groups of documents determined by the selection). Execute the Repair request.
    Caution: You can currently use the transactions that fill SetUp tables with reconstruction data to select individual documents or entire ranges of documents (at present, it is not possible to select several individual documents if they are not numbered in sequence).
    FI: The Repair request for the Full Upload is not required here. The following efficient alternatives are provided: In the FI area, you can select documents that must be reloaded into BW again, make a small change to them (for example, insert a period into the assignment text) and save them -> as a result, the document is placed in the delta queue again and the previously loaded document under the same number in the BW ODS object is overwritten. FI also has an option for sending the documents selectively from the OLTP system to the BW system using correction programs (see note 616331).
    3. Repair request execution
    How do you proceed if you want to load a repair request into the data target? Go to the maintenance screen of the InfoPackage (Scheduler), set the type of data upload to "Full", and select the "Scheduler" option in the menu -> Full Request Repair -> Flag request as repair request -> Confirm. Update the data into the PSA and then check that it is correct. If the data is correct, continue to update into the data targets."
    Hope this helps.
    Regards,
    Amruth

  • Best practice for linking fields from multiple entity objects

    I am currently transitioning from PHP to ADF. I'm looking for the best practice for linking data from multiple entity objects.
    Example:
    EO 'REQUESTS' has fields: req_id, name, dt, his_stat_id, her_stat_id
    EO 'STATUSES' has fields: stat_id, short_txt_descr
    'REQUESTS' is linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.his_status_id
    'REQUESTS' is also linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.her_status_id
    REQUESTS.his_status_id is independent of REQUESTS.her_status_id
    When I create a VO for REQUESTS, I want to display: REQUESTS.name, REQUESTS.dt, STATUSES.short_txt_descr (for his_stat_id), STATUS.short_txt_descr (for her_stat_id)
    What is the best practice for accomplishing this? It appears I could do it a few different ways:
    1. Create the REQUESTS VO with a LOV for his_stat_id and her_stat_id
    2. Create the REQUESTS VO with the join to STATUSES performed within the query for the VO. This would require joining on the STATUSES EO twice (his_stat_id, her_stat_id)
    3. I just started reading about View Links - would that somehow do what I'm looking for?
    I also need to be able to update his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr from a dropdown.
    Any suggestions on how to approach such a stupidly simple task?
    Using jDeveloper 11.1.2.2.0 if that makes a difference in the solution.
    Thanks ahead of time,
    CJ

    CJ,
    I vote for solution 1 as it's just your use case. As you said you what to update the his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr by a drop down. This is exactly the LOV solution.
    ViewLinks are used fro master detail navigation (which you don't do here) and Joining the data make it difficult to update (and you still need a LOV for the drop down box.
    Timo

  • Data from the outputstream to a file in the server.

    Hello everyone,
    I have put the data in the outputstream. I need to place the data in a pdf and put it in a location in the unix box. Any suggestion? Below is the code i have written so far.
    public ByteArrayInputStream inputStream;
    public ByteArrayOutputStream pdfFile;
    public ServletOutputStream os;
    DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response = (HttpServletResponse)sessionDictionary.selectValue(null,"HttpServletResponse");
    try {
    os = response.getOutputStream();
    String contentDisposition = "attachment;filename=PrintPage.pdf";
    response.setHeader("Content-Disposition",contentDisposition);
    response.setContentType("application/pdf");
    XMLNode xmlNode = (XMLNode) am.invokeMethod("getEmpDataXML"); //This method invokes the required data from the view object
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    xmlNode.print(outputStream);
    inputStream = new ByteArrayInputStream(outputStream.toByteArray());
    pdfFile = new ByteArrayOutputStream();
    }catch(Exception e)
    throw new OAException("Hello "+e.getMessage(), OAException.ERROR);
    Thank You in advance.
    Pk

    hi Swetha,
    Go through the below links and these will solve your problem
    [How to Upload and Download Files in a Web Dynpro for Java Application|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9076a593-2b08-2d10-2890-9a7078246ec4?QuickLink=index&overridelayout=true]
    [Storing data in a Text File in server  |Re: Storing data in a Text File.;
    Hope these links are useful
    regards
    Mahesh

  • Post - Processing Video Data From NetStream

    Is it possible to intercept video data from a NetStream object and do some custom post-processing say 'deblocking  on decoded data  or decryption on encoded content' etc. The Sound class provides access to the SampleData but i havent been able to find the Video class providing similar support. Am i missing something or is this inherently impossible
    Thanks in advance
    Sunil M

    I managed to perform video post-processing through alchemy some time ago.  I think I drew the video to a BitmapData object, converted the pixels to a bytearray with getPixels() to read them, and then updated the contents with setPixels() straight from alchemy's memory bytearray every frame.  Just watch out for endianness.
    Really, I imagine video postprocessing would be better suited for a pixel bender filter than alchemy code, and in general it is definitely not something flash player is designed to do.

  • Query Engine to get Instance Data from Binary format to actual format

    Hi all,
    In OBPM 10GR3 is there a way to get Engine Instance Data contained in the table PPROCINSTANCE in the BPM Engine DB using the Fuego API in the catalog?
    I could not find any method?
    Is there any?
    I want to get the column INSTANCEDATA which is a BLOB and then get values from that BLOB which obviously would turn into a Binary Object inside BPM .
    So we can retrieve data from that Binary Object?
    Edited by: user8752903 on Jul 11, 2011 2:12 PM

    You can use PAPI
    InstanceInfo istinfo = processSession.processGetInstance("/TestProcess#Default-1.0/1234/0");
    DynamicObject dynObject = (DynamicObject) istinfo.getVariable("instanceVariable", Locale.ENGLISH);

  • How to retrieve name4 data from backend for display on View Ship-to Address

    Hi Everyone,
    I need your advise / help:
    I added name4 in shiptodetails1.jsp for new ship-to address when ordering.  This name4 can be entered, saved to backend and display before submit rder.  but when dispaly the created order, the name4 data is not shown on View Ship-to party Address page.  Seems address.getName4() is not enough, I need to modify some method to retrieve the data from backend address object. Can anyone guide me what and how to enhance forretrieving name4 data from backend, so it can display on View Ship-to Address?
    Any advises / suggestions?
    Thanks, Jin

    Hi Jin,
    I hope you already found the solution but here some more detail.
    I am working on ISA with ECC so I do not have an access to CRM system.
    As you are facing problem to retrieve data from back-end while displaying it on order status page you can debug code of class DetailStrategyR3.class.
    There is a method fillDocument this method call RFC BAPI_ISAORDER_GETDETAILEDLIST. This RFC actually read Order related data from backend and fill the SalesDocument object. Method fillDocument also call other methods like fillShipTo.
    During debug in NWDS you can see address data and check the values of Address object. If Name3 or Name4 and nickName contains no value then you can't get it on JSP page because it is not coming from the RFC.
    So I suggest you should first check DetailStrategyR3.class as it is preparing Document for display purpose. When you open any order on orderstatusdetail page this class comes in Action and prepare SalesDocumet with all necessary information including  Ship to Address of that order. So If here you do not get value in Name3, Name4 or Nickname then you have to do some custom development
    Check Below code while debug in NWDS.
    //fill ship-to information on header and item level
            fillShipTo(document,
                       partnerTable,
                       getDetailedList.getTableParameterList().getTable(
                               "ORDER_ADDRESS_OUT"),
                       connection);
            ShipToData shipTo = document.getHeaderData().getShipToData();
            orderHeader.setShipToData(shipTo);
    Check shipTo object in "Variable" window while debugging. Here you will get address object and can see all the variable value like FirstName, LastName, Name1, NAme2, Name3...NickName etc..... If no value in Name3, Name4 then you will not get on Page.
    I hope this will help you to understand why Name3-Name4-Nickname does not have a Value though you have provided while creating an order.
    Thanks and Regards.
    eCommerce Developer

Maybe you are looking for