How to retrieve Post Parameter

Hi All,
I am new to JSF..I need to retrieve Post parameters from plain HTML pages.
Once i receive the post parameter in JSF then i need to validate one of the parameter and redirect user to diffrent pages based on the parameter value.
What is the best way doing this scenario..
The source of the parameters are from HTML pages comes from diffrent locations..
Any help would be highly appriciated..

Try the following code snippet to access request parameters:
FacesContext facesContext = getFacesContext();
ExternalContext externalContext = facesContext.getExternalContext();
Map requestMap = externalContext.getRequestMap();Now that you have the request map, you can retrieve any of the request parameters using:
<ObjectType> parameter = <ObjectType>requestMap.get(<ParameterName>);where <ObjectType> is the data type of the request parameter and <ParameterName> is the name of the request parameter.

Similar Messages

  • How to retrieve the parameter names from a JSP page ? Urgent Please

    Hello,
    Can anybody tell me how to retrieve the parameter names from the JSP
    page. (without using getParameterNames() method.)
    The problem with the getParameterNames() method is I get the Jumbled output.
    I need it very badly
    With regards
    Ananth R
    email:[email protected]
    [email protected]

    Dear duffymo,
    My primary intention is to convert the JSP form information into a XML file.
    If I do not get the Parameter names in the correct order how can I maintain
    tag order in XML file.
    For ex: (JSP PAGE VIEW)
    Name--
    FirstName
    MiddleName
    LastName
    Address--
    Street1
    Street2
    City
    Country
    &so on
    (XML File to be generated)
    <Name>
    <FirstName>Value</FirstName>
    </Name>
    <Address>
    <street1>value</street1>
    </Address>
    & so on
    If I use getParameterNames() to get all the parameter names(Which form the tag names in the XML file ) the Enumeration object it returns will not be in the same order as the text fields in JSP.From this I can not construct a meaningful XML file.
    order means: Order of entry on the page, from top to bottom
    That's it
    Waiting for your responses

  • Retrieve POST variables just like in a normal HTTP forms

    Hi All :D
    Can anyone tell me how to retrieve POST variables just like
    in a normal HTTP form?
    I have 2 flex applications. One will send the POST variables
    and I would like the other to retrieve
    these variables. How to implement this?
    Thanks :D

    "JuggerOgre" <[email protected]> wrote in
    message
    news:g92bce$kgf$[email protected]..
    > Hi All :D
    >
    > Can anyone tell me how to retrieve POST variables just
    like in a normal
    > HTTP
    > form?
    > I have 2 flex applications. One will send the POST
    variables and I would
    > like
    > the other to retrieve
    > these variables. How to implement this?
    Flex is a client side application. You could send them from
    one client and
    then request them from the other client, or you could use
    something like
    BlazeDS to "push" the information.
    HTH;
    Amy

  • How to retrieve the result parameter ?

    Hello every body.
    We have selected the result parameter checkbox in a method created in a ZXXX bussiness object. We need to know how to retrieve this result from the task.
    Thank you in advance.
    Juan.

    Hi Juan,
    You can retrieve the result parameter from the method defining the Task.
    Just double click on the task number and you will be taken to the "Standard Task: Change" screen.
    Here Look out for a Small binding symbol in the Object Method cluster.
    Click on the binding symbol and do the necessary binding to get the result from the method to the Task containers.
    And subsequently, u can do the binding betweent the task containers and the workflow containers.
    Hope this helps.
    Regards,
    Raj

  • T.code FF7A - How to retrieve items posted before linking the GL account to

    Hi Experts,
    While executing the T.code FF7A, postings that have been created before making the link between the GL account and the cash position grouping are not retrieved to the report.
    Does anyone know how to retrieve those past postings on FF7A report ?
    Many thanks for your help.

    There are a couple options depending on the additional details of your situation....
    Within t-code FDFD, there is a button labeled Data Setup.  This button is intended for use when cash management (CM) is activated for an existing company code and CM needs to be updated with transactions created prior to the activation.  It deletes all data in cash management for the Co.Cd. and then builds the CM data for all GL, customer and vendor accounts.  There are also options to update CM for other areas (Sales, Procurement, Treasury, etc.)
    Also within t-code FDFD, there is a button labeled Correct Data.  This button can be used instead of the Data Setup button, if the CM data for a particular area needs to be corrected.  This function has the following options:  All GL accounts, All GL accounts with open items, All GL accounts w/o open items (non-open item managed accounts), All Customers/Vendors, All Customers, All Vendors.
    It's best to run these functions when transactions are not being created on the system.
    Regards,
    Shannon

  • How to retrieve url attributes in a bsp ?

    Hi,
    I would like to create a BSP and then to be able to get and use an attribute from an url in it. Below an example because i think i'm not clear enough:
    I create a bsp ztest. And i want to access to this bsp with the following url:
    http(s)://
    Then, in the bsp i want to retrieve the parameter pmsgnb to be able to use it.
    Is this possible ? How can i do that ?
    Thanks in advance.
    Best regards,
    Stéphane.

    Hi Stef,
    because you are just starting out with ABAP I would like to give you a few tips. You may of course already know about some of this.
    When in that ABAP editor you can hit F1 at any time to get online help on the ABAP language. This is context-sensitive so if you place your cursor on an ABAP statement F1 will take you to the online help for that statement. The online help often contains sample syntax so you can see how to use the statements in your code.
    Inside the ABAP Workbench (transaction SE80) you can navigate to Environment->Examples to see a lot of ABAP coding samples with supporting documentation. For example under "Environment->Examples->ABAP Examples->ABAP Database Access->Open SQL->Read data" are over 20 sample programs showing various ways of retrieving data from the database.
    If possible go on an Introduction to ABAP training course. If not, at least buy some books on the subject. The ones that are published most recently will be more focused towards object-oriented programming and so they are more relevant than the older ones which tend to focus on SAPGUI programming and reporting.
    When learning the ABAP language remember that BSP is a special use-case for ABAP and therefore has characteristics and behaviours that are unique to it. Essentially BSP combines two different development techniques - namely ABAP and the web.
    In the SDN forums it is not a great idea to ask too many "newbie" questions. For a while you will get responses but later on the useful people will put you on their "do not respond" list. When using the SDN forums make sure you search for an anwser to your problem before posting, make sure you post in the correct forum and beware the "points junkies". These people just blast you with a huge copy and paste from their "knowledge base" in the hope you will allocate them points. They often don't really bother to read your question.
    For your specific issue I think the INTO clause needs to come before the WHERE clause.
    Try..
    SELECT GUID FROM CRMD_ORDERADM_H  INTO ls_guid_ticket WHERE PROCESS_TYPE = pmsgnb.
    Your question does raise another issue. You should try and avoid directly reading, and especially updating, the SAP database tables. This is how traditional ABAP programmers had to work, but contemporary SAP developments expose persistent data through classes, methods, function modules, etc. When trying to manipulate SAP data you should always try and find the proper way to do it, the way SAP does it, rather than directly accessing the database. This ensures you process any configured "business rules" that apply to that data, makes your program more maintainable, and minimised the chances of other changes to the system effecting the reliability of your program.
    By way of example, lets say you wanted to change a user's class to 'TESTER'. You could write code to directly modify the field CLASS in the table USR02 to do this. But the correct way to do it would be to call the BAPI for this purpose, like this.
    username = 'MUSTER'.
    logondata-class = 'TESTER'.
    logondatax-class = 'X'.
    call function 'BAPI_USER_CHANGE'
          exporting
              username          = username
              LOGONDATA         = logondata
              LOGONDATAX        = logondatax
         tables
               return           = return .
    Now, if SAP change the data model for user master records in any way you can be sure that your code will still work because they will also maintain the standard interfaces to the data model, in this case the suite of BAPI_USER* function modules.
    The other by-product of this strategy is that you maximise code-reuse and minimise the amount of code you have to write. Of course sometimes direct database access is unavoidable, even with the latest SAP delivered code. For example I am currently working for a customer in the Auto industry and I have found the SAP delivered code around Warranty Claims to be so inefficient that I have to use direct database access to get reasonable performance.
    I hope this helps you. Good luck with your ABAP.
    Cheers
    Graham Robbo

  • [Exchange 2013/Online][PS] How to retrieve existing remote PowerShell sessions

    I'm trying to figure out how to retrieve all existing remote PowerShell sessions (user-managed) between a client and an Exchange 2013 server.
    Running Get-PSSession only returns remote sessions created within the current PowerShell session (system-managed). I need to do this from within a
    different PowerShell session, possibly even from a different computer from where those remote sessions were established.
    Documentation for Get-PSSession states that this should be possible starting with PS 3.0 since user-managed sessions are now stored locally on the remote server (in my case, the Exchange 2013 server) and can later be retrieved from any system-managed session
    by using Get-PSSession with either the ComputerName or ConnectionUri parameter sets.
    Here's how those remote sessions are created:
    PS $> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://<exchange_server>/powershell/ -Credential $credential -Authentication Basic -AllowRedirection
    PS $> Import-PSSession $Session
    And how I try to retrieve those session afterward:
    PS $> Get-PSSession -ComputerName <exchange_server> -ApplicationName powershell -Authentication Basic -Credential $credential -UseSSL -Port 443
    PS $> Get-PSSession -ConnectionUri https://<exchange_server>/powershell/ -AllowRedirection -Authentication Basic -Credential $credential
    Both methods yield no results (nor errors), while running Get-PSSession (without any parameters) within the same user-managed session would successfully return the session. 
    The only explanation I could think of right now is that somehow, WinRM on the Exchange server is not running PS 3.0 even though:
    $PSVersionTable.PSVersion returns 3 0 -1 -1
    winrm id returns ProductVersion = OS: 6.2.9200 SP: 0.0
    Stack: 3.0
    But when I attempt to disconnect a remote session with this Exchange server using Disconnect-PSSession, I get the
    following error message: 
    Disconnect-PSSession : Disconnect-PSSession operation failed for runspace Id = XXXXX
    for the following reason: The disconnection operation is not supported on the remote computer. To support
    disconnecting, the remote computer must be running Windows PowerShell 3.0 or a later version of Windows PowerShell.
    So I guess I have a couple questions:
    Are remote PSSession even supposed to be maintained on
    an Exchange 2013 server? 
    If so, is it possible to retrieve them from a different session using GET-PSSession?
    Which version of PS 3.0 is used by WinRM on an Exchange 2013 server?
    thanks

    Thanks for your help. 
    1. I know that remote PS sessions are supported, I have no issue connecting to the Exchange server. The issue is with
    reconnecting to an existing PS session.
    2. As mentioned in my original post, PS & WinRM 3.0 are installed on the client:
    $PSVersionTable.PSVersion returns 3
    0 -1 -1
    winrm
    id returns ProductVersion = OS: 6.2.9200 SP: 0.0 Stack:
    3.0

  • How to retrieve modeinfo[n].context_id_uuid from inside an ABAP program ?

    If you login to an SAP session and then create another session via the system menu option (not a second login), transaction SM04 will show two different values for the parameter:
    modeinfo[n].context_id_uuid
    I need to know how to retrieve the value of this parameter from inside an ABAP program.
    This question is related to the one Rich and Naren and I were discussing - about how to create a unique shared buffer memory id that will distinugish between a two sesssions of a single user who happens to be "MIGO'ng" twice.
    Thanks for whatever answer anyone can provide ...
    djh
    Note: also posted in ABAP General ...

    Rich answered in ABAP general:
    REPORT ZRICH_0001 .
    type-pools: thfb.
    data: context_id type THFB_CONTEXT_ID.
    CALL FUNCTION 'TH_GET_CONTEXT_ID'
    IMPORTING
       CONTEXT_ID       = context_id .
    write:/ context_id .

  • How to get the parameter from Java Script into the Parameter crystal Report

    Hi All,
    Crystal Report is integrated with Oracle 10g. I created the base SQL query for col1, col2, col3 and col4. Java Script pass parameter value (185) to Col1.
    My question is how to create crystal report to make Col1 as parameter and how to get the parameter value 185(Col1) from Java Script. Is there any additional code I need to include in the crystal report?
    FYI.
    Java script sends the right parameter value.There is no issue in java script.
    This is an automatic scheduled process when batch runs, Java script should pass the parameter value and the crystal report should get the value and produce the output report.

    Not sure if this is an application question or if you are trying to hook into Crystal Reports parameter UI? If the later then no option other than report design. If an application then I can move this to the Java Forums.
    If you are asking how to alter the parameters I suggest you remove the Java reference and post a new question so it's not confusing the issue.
    Please clarify?

  • How to Retrieve a Crystal Report's Unmanaged Destination Filename

    Hi all,
    I have looked very closely at Robert Twigg's response to the post "[Destination Path and name of a scheduled Report|http://forums.sdn.sap.com/thread.jspa?messageID=9588160#9588160]" dated 9/1/10 and while it does retrieve the unmanaged destination path, the filename retrieved is the managed filename.  How does one go about retrieving an instance's unmanaged filename?
    When I look at a Crystal Report instance details, it definitely knows what the unmanaged filename that was populated, here is a sample instance detail:
    External Destination: File copy the instance with the filename: "ALOG_Deferred_Clearing_RPT_2011-12-13-11-43-09.pdf" to the folder: "/apps/efs_bobj/IMPL/XX" .
    As you can clearly see, the filename consists of report name, date, and time that was specified as "%SI_NAME%_%SI_STARTTIME%.%EXT%" in the destination filename.
    Here's the snippet to retrieve the managed filename:
    IInfoObject report = (IInfoObject) reports.get(0);
    // Get the file name from the instance.
    IFiles files = (IFiles) report.getFiles();
    IFile file = (IFile) files.get(0);
    Any insight on how to retrieve an instance's unmanaged filename would be highly appreciated.
    Thanks in advance,
    Hart Penn
    Edited by: hartpenn on Dec 14, 2011 2:14 PM
    Edited by: hartpenn on Dec 14, 2011 2:15 PM
    Edited by: hartpenn on Dec 14, 2011 2:19 PM

    Thank you for your response.  I am querying for the report instances using the query below:
    IInfoObjects iRptObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS " +
                                               "Where SI_KIND='Pdf' AND " +
                                               "SI_INSTANCE>0 ");
    Collection<IInfoObject> iRptObjs = iRptObjects;
    for (IInfoObject iRptObj : iRptObjs) {
        ISchedulingInfo iSchedInfo = iRptObj.getSchedulingInfo();
        IEvents triggerEvents = iSchedInfo.getDependants();
        if (triggerEvents.size() > 0) {
            for (int j=0; j < triggerEvents.size(); j++) {
                IInfoObjects events = (IInfoObjects)infoStore.query("SELECT * FROM CI_SYSTEMOBJECTS " +
                                                                    "Where SI_KIND='Event' AND " +
                                                                    "SI_ID=" + (Integer) triggerEvents.get(j));
                if (events.size() > 0) {
                    IEvent curEvent = (IEvent)events.get(0);
        IDestinationPlugin destPlugin =
            (IDestinationPlugin) infoStore.query("Select Top 1* from CI_SYSTEMOBJECTS " +
                                                 "Where SI_NAME = 'CrystalEnterprise.DiskUnmanaged'").get(0);
        IDestinations dests = iSchedInfo.getDestinations();
        Collection<IDestination> destObjs = dests;
        if (dests.size() > 0) {
            // we have a dest set up
            for (IDestination destObj : destObjs) {
                if (destObj.getName().compareTo("CrystalEnterprise.DiskUnmanaged") == 0) {
                    // Copy the destination properties to the destination plugin.
                    destObj.copyToPlugin(destPlugin);
                    // Get the scheduling options for the unmanaged disk.
                    IDiskUnmanagedOptions diskUnmanagedOptions =
                        (IDiskUnmanagedOptions) destPlugin.getScheduleOptions();
                    // Get the destination files
                    List destFiles = diskUnmanagedOptions.getDestinationFiles();
                    String pathName = (String)destFiles.get(0);
        IFiles iFiles = (IFiles) iRptObj.getFiles();
        IFile myFile = (IFile) iFiles.get(0);
        logger.debug("Object: " + iRptObj.getTitle() +
                     ", ID: " + iRptObj.getID() +
                     ", Kind: " + iRptObj.getKind() +
                     ", Trigger Event: " + curEvent.getEventName());
        logger.debug("Dest: " + pathName);
        logger.debug("Filename: " + myFile.getName());
    while this is not efficient, it does retrieve the instances. However, the file name returned is not what was specified in the destination filename. Here is some info returned and displayed:
    Object: ALOG_Deferred_Clearing_RPT, ID: 128776, Kind: Pdf, Trigger Event: EVT_121311_114308
    Dest: /apps/efs_bobj/IMPL/XX/%SI_NAME%_%SI_STARTTIME%.%EXT%
    FileName: ~ce46086dd492ac788.pdf
    As you can see, the filename is clearly the managed filename.
    Edited by: hartpenn on Dec 14, 2011 3:43 PM
    Edited by: hartpenn on Dec 14, 2011 4:02 PM
    Edited by: hartpenn on Dec 14, 2011 4:03 PM
    Edited by: hartpenn on Dec 14, 2011 4:17 PM
    Edited by: hartpenn on Dec 14, 2011 4:26 PM
    Edited by: hartpenn on Dec 14, 2011 4:27 PM
    Edited by: hartpenn on Dec 14, 2011 4:28 PM

  • How to get a parameter without name in JSP?

    hi everyone, My question is how to get a parameter without name in JSP? I have two pages, 1.html and 2.jsp.
    in 1.html, I embeds some Javascript codes in HTML contents like below ( changed < to ( , > to )):
    function toSubWin( obj )
    window.open('test.jsp?'+obj.firstChild.toString(),'sw');
    (a onClick='toSubWin(this)'style="background:green")focus(/a)
    How can I get the parameter in 2.jsp?
    THANK YOU IN ADVANCE!!

    Does obj.firstChild.toString() evaluate to a "name=value" type of String ?
    Or better what does obj.firstChild.toString(),'sw' evaluate to ? It has to end up in a name=value format, else its just gibberish appended to the url.
    In the jsp, you have to obviously know the name to get the parameter. There's a getParameterNames() method which returns you a Collection of parameter names as Strings, you could probably use that to retrieve the param values.
    Then there's a getParameterMap() method which returns an immutable Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
    However to what ends you employ them in a program which doesnt know its inputs is a different story.
    cheers,
    ram.

  • How To Retrieve an Object's Value Defined Using c:set ... Tag?

    I have the value of a variable defined in JSP#1 (JSP#1 is not a form) using JSTL tag:
       <c:set var="id" value="${articleForm.article}" scope="session"/>Now, I have an object 'id' in the session scope. The object 'id' and all the information, which are defined in JSP#1, are forwarded to JSP#2.
    JSP#2 is a form. But, the 'id' is not used in JSP#2.
    JSP#2 has a submit button and then, a servlet takes over the control after that button is clicked. All the text fields in JSP#2 together with the object 'id' are forwarded to this servlet.
    I have two questions:
    1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.
    2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)
        int articleID = Integer.parseInt( session.getAttribute( "id" ) );   or, it should be retrieved in another way?

    I'm not sure you understand the concept of a session object.
    Java objects stay on the server. There is no transmission between the web browser and the client.
    The scope just sets how long the server "remembers" that variable.
    request scope - only lasts one request. Once a web page is returned to the client, the server forgets all request variables.
    session scope - lasts for one user - across multiple requests/web pages.
    1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.From your description, you appear to have it right - your object should be in session scope.
    2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)If articleForm.article is an String then that looks the right way to access it.
    You might have to do it like this:
    int articleID = Integer.parseInt( (String)session.getAttribute("id"));
    The Integer.parseInt method takes a String as a parameter - while session.getAttribute() returns an Object.
    This code will work if the object stored in the session is a String.
    The object stored in the session is ${articleForm.article} What type does articletForm.getArticle() return? That is the type you need to cast it to when retrieving it from the session.
    Cheers,
    evnafets

  • How to retrieve data from the HTML form in the JEditorPane?

    I could quite easily use JEditorPane to render and display a simple HTML file.
    My HTML looks like this:
    <html>
    <head>
    <title> simple form</title>
    </head>
    <body bgcolor="cccccc">
    <center><h1>SURVEY THING</h1>
    </center>
    <form id="survey">
    <p>1.Type something in.</p>
    <textarea cols=25 rows=8>
    </textarea>
    <BR>
    <p>2.Pick ONLY one.</p>
    <input type="radio" name="thing" value="0" Checked> NO choice <BR>
    <input type="radio" name="thing" value="1"> First choice <BR>
    <input type="radio" name="thing" value="2"> Second choice
    <BR>
    <p>3.Pick all you like.</p>
    <input type="checkbox" name="stuff" value="A"> A <BR>
    <input type="checkbox" name="stuff" value="B"> B <BR>
    <input type="checkbox" name="stuff" value="C"> C <BR>
    <input type="submit" value="give data">
    <input type="reset" value="do clensing">
    </form>
    </body>
    </html>
    It gets diplayed fine and I can type in text, select radio buttons (they behave mutualy-exclusive,
    as they should) and check checkboxes.
    The problem I have is with retrieving the values which were entered into the form.
    If I, after editing, try to write the html to the file using HTMLWriter,
    it records the changes I made into the textarea, however all the radio and checkbox selections are lost.
    Maybe the problem is that when I enter the values I do not use any methods like
    insertBeforeStart and so on, but I believe I shouldn't need to use them to populate a form.
    Especially I never change the structure of the HTML.
    Also, when I try to traverse the Element tree and see the input elements attributes,
    I can never see a change in the entered values. However it is probably b/c I am traversing through
    the model and the changes are in the view (just a guess.)
    Anyway, if anybody could direct me onto the right path: how to retrieve the values typed in the form,
    or if it is possible at all in the JEditorPane, I would greatly appreciate.
    thanks
    maciej
    PS. I have seen the answer to a similar question posted some time last year. However, I am trying
    to find a soultion which allows forms/surveys to be built by people who have no java and only basic
    html knwledge. And Axualize way is probably a little bit too "high-tech."

    Maybe helpful for u.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Container;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    public class TestHtmlInput extends JFrame {
         JEditorPane pane=new JEditorPane();
         public TestHtmlInput() {
              super();
              pane.setEditorKit(new HTMLEditorKit());
              pane.setText("<HTML><BODY><FORM>" +
              "<p>1.Input your name.</p>" +
              "<INPUT TYPE='text' name='firstName'>" +
              "<p>2.Input your information.</p>" +
              "<TEXTAREA rows='20' name='StationDescriptions' cols='100'>" +
              "<p>3.Pick ONLY one.</p>" +
              "<input type='radio' name='thing' value='0' Checked> NO choice <BR>" +
              "<input type='radio' name='thing' value='1'> First choice <BR>" +
              "<input type='radio' name='thing' value='2'> Second Choice <BR>" +
              "<p>4.Pick all you like.</p>" +
              "<input type='checkbox' name='stuff' value='A'> A <BR>" +
              "<input type='checkbox' name='stuff' value='B'> B <BR>" +
              "<input type='checkbox' name='stuff' value='C'> C <BR>" +
              "<p>5.Choose your nationality.</p>" +
              "<select name='natio'>" +
              "<option>12</option>" +
              "<option selected>13</option>" +
              "</select>" +
              "</FORM></BODY></HTML>");
              this.getContentPane().add(new JScrollPane(pane));
              JButton b=new JButton("print firstName text");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        System.out.println("Number of Components in JTextPane: " + pane.getComponentCount());
                        for (int i = 0; i <  pane.getComponentCount(); i++) {
                             //NOTE FOR BELOW: know its a Container since all Components inside a JTextPane are instances of the inner class
                             //ComponentView$Invalidator which is a subclass of the Container Class (ComponentView$Invalidator extends Container)
                             Container c = (Container)pane.getComponent(i);
                             //the component of this containers will be the Swing equivalents of the HTML Form fields (JButton, JTextField, etc.)
                             //Get the # of components inside the ComponentView$Invalidator (the above container)
                             Component swingComponentOfHTMLInputType = c.getComponent(0);
                             //each ComponentView$Invalidator will only have one component at array base 0
                             //DISPLAY OF WHAT JAVA CLASS TYPE THE COMPONENT IS
                             System.out.println(i + ": " + swingComponentOfHTMLInputType.getClass().getName());
                             //this will show of what type the Component is (JTextField, JRadioButton, etc.)
                             if (swingComponentOfHTMLInputType instanceof JTextField) {
                                  JTextField tf = (JTextField)swingComponentOfHTMLInputType;
                                  //downcast and we have the reference to the component now!! :)
                                  System.out.println("  Text: " + tf.getText());
                                  tf.setText("JTextField found!");
                             } else if (swingComponentOfHTMLInputType instanceof JButton) {
                             } else if (swingComponentOfHTMLInputType instanceof JComboBox) {
                                     JComboBox combo = (JComboBox)swingComponentOfHTMLInputType;
                                     System.out.println("  Selected index: " + combo.getSelectedIndex());
                                } else if (swingComponentOfHTMLInputType instanceof JRadioButton) {
                                     JRadioButton radio = (JRadioButton)swingComponentOfHTMLInputType;
                                     System.out.println("  Selected: " + new Boolean(radio.isSelected()).toString());
                             } else if (swingComponentOfHTMLInputType instanceof JCheckBox) {
                                     JCheckBox check = (JCheckBox)swingComponentOfHTMLInputType;
                                     check.setSelected(true);
                                     System.out.println("  Selected: " + new Boolean(check.isSelected()).toString());
                             } else if (swingComponentOfHTMLInputType instanceof JScrollPane) {
                                  JScrollPane pane = (JScrollPane)swingComponentOfHTMLInputType;
                                  for (int j=0; j<pane.getComponentCount(); j++) {
                                       //JTextArea area = (JTextArea)swingComponentOfHTMLInputType.getComponent(0);
                                       Container c2 = (Container)pane.getComponent(j);
                                       for (int k=0; k<c2.getComponentCount(); k++) {
                                            Component c3 = (Component)c2.getComponent(k);
                                            if (c3 instanceof JTextArea) {
                                                 JTextArea area = (JTextArea)c3;
                                                 System.out.println("  " + area.getClass().getName());
                                                 System.out.println("     Text: " + area.getText());
                                                 area.setText("JTextArea found!");
                             } else {
              this.getContentPane().add(b,BorderLayout.SOUTH);
         public static void main(String args[]) {
              TestHtmlInput app = new TestHtmlInput();
              app.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              app.setSize( 400, 900 );
              app.setVisible( true );
    }

  • How to pass a parameter into execute sql task and later use it into dataflow task?

    i am in a situation, where i have a logging table in which i have a primary key called ETL_log_ID which is an identity column and acts as a foreign key for various fact table and dimension tables which are populated using SSIS packages. Now i wanna use the
    ETL_log_ID as a parameter in the execute sql task which populates the log table and pass the same value in the data flow task which populates the facts and dimension. Can you let me know how to pass the parameter in a step by step procedure.
    Thanks,
    Nikhil
      

    Nikhil,
    You can check the following :
    http://www.programmersedge.com/post/2013/03/05/ssis-execute-sql-task-mapping-parameters-and-result-sets.aspx
    http://stackoverflow.com/questions/7610491/how-to-pass-variable-as-a-parameter-in-execute-sql-task-ssis
    Regarding the usage in Dataflow task, Can you elaborate on that a little?
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • BAPI FUNCTION MODULE  BAPI_ACC_DOCUMENT_POST : How to give posting keys?

    Hi ,
    i am using BAPI_ACC_DOCUMENT_POST to post accounting document. This accounting document is used to post amount from reconcilation account to bank GL account.the table parameter am using is ACCOUNTGL (in the function module)Now i want to give posting keys to the function module parameter. can anyone please guide me how to give posting keys?
    Edited by: Santhosh Kumar  Cheekoti on Dec 18, 2008 7:48 AM

    Hi,
    As pointed out in one of the previous post, posting key will be decided by the BAPI depending on the sign of the amount. Have a look at bthe following code:-
    DATA: doc_header LIKE BAPIACHE09,
          criteria   LIKE BAPIACKEC9 OCCURS 0 WITH HEADER LINE,
          doc_item   LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,
          doc_ar     LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,
          doc_values LIKE BAPIACCR09 OCCURS 0 WITH HEADER LINE,
          return     LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
          extension1 like BAPIACEXTC occurs 0 with header line,
          obj_type   LIKE bapiache08-obj_type,
          obj_key    LIKE bapiache02-obj_key,
          obj_sys    LIKE bapiache02-obj_sys,
          docnum     LIKE bkpf-belnr.
    *DATA:
    *       ITEMNO_ACC     POSNR_ACC
    *       FIELDNAME     FIELDNAME
    *       CHARACTER     ACPI_RKE_CRIGEN
    * Fill Document Header
    doc_header-bus_act = 'RFBU'.
    doc_header-bus_act = 'RMRP'.
    *doc_header-bus_act = 'SD00'.
    doc_header-username = sy-uname.
    doc_header-header_txt = 'TEST BOC BAPI POSTING'.
    doc_header-comp_code = 'IN10'.
    doc_header-compo_acc = 'FICA'.
    doc_header-doc_date = '20060127'.
    doc_header-pstng_date = sy-datlo.
    doc_header-doc_type = 'SA'.
    ** Fill Line 1 of Document Item
    *doc_item-itemno_acc = '1'.
    *doc_item-gl_account = '0000500001'.
    *doc_item-pstng_date = sy-datum.
    *doc_item-item_text = 'TEST POSTING DEBIT ITEM'.
    *doc_item-costcenter = ''.
    *doc_item-quantity = '1'.
    *doc_item-base_uom = 'ST'.
    *APPEND doc_item.
    *CLEAR doc_item.
    ** Fill Line 2 of Document Item
    *doc_item-itemno_acc = '2'.
    *doc_item-customer = '0000000016'.
    *doc_item-gl_account = '0000000016'.
    *doc_item-pstng_date = sy-datlo.
    *doc_item-item_text = 'TEST POSTING CREDIT ITEM'.
    *APPEND doc_item.
    *CLEAR doc_item.
    doc_ar-itemno_acc = '1'.
    doc_ar-gl_account = '0000500001'.
    doc_ar-pstng_date = sy-datum.
    doc_ar-item_text = 'TEST POSTING DEBIT ITEM'.
    doc_ar-costcenter = ''.
    doc_ar-quantity = '1'.
    doc_ar-base_uom = 'ST'.
    APPEND doc_ar.
    CLEAR doc_ar.
    * Fill Line 2 of Document Item
    doc_ar-itemno_acc = '2'.
    doc_ar-customer = '0000000016'.
    doc_ar-gl_account = '0000000016'.
    doc_ar-pstng_date = sy-datlo.
    doc_ar-item_text = 'TEST POSTING CREDIT ITEM'.
    doc_ar-stat_con = ' '.
    doc_ar-costcenter = '0000201681'.
    APPEND doc_ar.
    CLEAR doc_ar.
    * Fill Line 1 of Document Value.
    doc_values-itemno_acc = '1'.
    doc_values-currency_iso = 'INR'.
    doc_values-amt_doccur = '200.00'.
    doc_values-currency = 'INR'.
    doc_values-CURR_TYPE = '00'.  "Doc currency
    APPEND doc_values.
    CLEAR doc_values.
    * Fill Line 2 of Document Value
    doc_values-itemno_acc = '2'.
    doc_values-currency_iso = 'INR'.
    doc_values-amt_doccur = '200.00-'.
    doc_values-currency = 'INR'.
    doc_values-curr_type = '00'.  "Doc currency
    APPEND doc_values.
    CLEAR doc_values.
    * Add tax code in extension1 table.
    extension1-field1 = 'BAPI CALL'.
    APPEND EXTENSION1.
    * Fill CRITERIA for CO-PA
    *refresh criteria.
    *criteria-ITEMNO_ACC = '1'.
    *criteria-FIELDNAME     = 'ARTNR'.
    *criteria-CHARACTER     = '000000000001312251'.
    *Append criteria.
    *criteria-ITEMNO_ACC = '1'.
    *criteria-FIELDNAME     = 'WERKS'.
    *criteria-CHARACTER     = 'IN91'.
    *Append criteria.
    *criteria-ITEMNO_ACC = '1'.
    *criteria-FIELDNAME     = 'KNDNR'.
    *criteria-CHARACTER     = '0000000016'.
    *Append criteria.
    *criteria-ITEMNO_ACC = '1'.
    *criteria-FIELDNAME     = 'FKART'.
    *criteria-CHARACTER     = 'ZIN2'.
    *Append criteria.
    *criteria-ITEMNO_ACC = '1'.
    *criteria-FIELDNAME     = 'KAUFN'.
    *criteria-CHARACTER     = '0000000633'.
    *Append criteria.
    *criteria-ITEMNO_ACC = '1'.
    *criteria-FIELDNAME     = 'KDPOS'.
    *criteria-CHARACTER     = '000010'.
    *Append criteria.
    *criteria-ITEMNO_ACC = '1'.
    *criteria-FIELDNAME     = 'VKGRP'.
    *criteria-CHARACTER     = '009'.
    **Append criteria.
    * All tables filled - now call BAPI.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
      EXPORTING
        documentheader       = doc_header
      IMPORTING
        OBJ_TYPE             = doc_header-obj_type
        OBJ_KEY              = doc_header-obj_key
        OBJ_SYS              = doc_header-obj_sys
      TABLES
    *    criteria             = criteria
        accountgl            = doc_item
        ACCOUNTRECEIVABLE    = doc_ar
        currencyamount       = doc_values
        return               = return
        EXTENSION1           = EXTENSION1.
    LOOP AT return WHERE type = 'E'.
      EXIT.
    ENDLOOP.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader       = doc_header
      IMPORTING
        OBJ_TYPE             = doc_header-obj_type
        OBJ_KEY              = doc_header-obj_key
        OBJ_SYS              = doc_header-obj_sys
      TABLES
    *    criteria             = criteria
        accountgl            = doc_item
        currencyamount       = doc_values
        return               = return
        EXTENSION1           = EXTENSION1.
    LOOP AT return WHERE type = 'E'.
      EXIT.
    ENDLOOP.
    IF sy-subrc EQ 0.
      WRITE: / 'BAPI call failed - debug and fix!'.
    ELSE.
      CLEAR return.
      REFRESH return.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
       IMPORTING
         return        = return.
      WRITE: / 'BAPI call worked!!'.
      WRITE: / doc_header-obj_key, ' posted'.
    ENDIF.
    Regards
    Raju Chitale
    Edited by: Raju Chitale on Dec 18, 2008 8:31 AM

Maybe you are looking for

  • Problems syncing the iPod touch

    My iPod Touch synced fine at first, but now all I get is an error message "The iPod (xxx)cannot be synced. The disk could not be read from or written to." What am I doing wrong? I have tried resetting it, restarting it. Now tempted to 'relocate' it i

  • Overhead calculation not happening after using orgin group.

    overhead calculation not happening after using orgin group. There was a runtime error earlier related to u201Cdefine credit u201C IMG node under costing sheet component and we have applied SAP note 769946 and that error was gone out of the way We wan

  • Interactive script editor: read values of answers into non-branching action

    Dear all, When we develop a new interactive script, I would like to read the value of the answers into a non-branching action. For examle: Are you ill? yes/no If no --> are you staying on another addres then [customer_adres]? yes/no if no --> please

  • IDSM comand lines removal from 6509 vss switch

    Hi in our network we have implimented VSS withtwo Cisco 6509 -Eswitches. In these switch I have installed IDS module and following are my IDS configurations. intrusion-detection switch 1 module 4 management-port access-vlan 21 intrusion-detection swi

  • Using the Android Reader app, why is the signature option greyed out?

    I have a client that has enlisted me to create 3 fillable PDF forms. I used FormsCentral to create these fillable forms, then I saved them as PDFs to my Dropbox. I opened the Adobe Reader app on my Tablet, and access the forms. As for the client, the