Urgent!!help me! how to create UIInput component in code?

hello all
how to create UIInput component in code? my code as followed:
                    UIComponent nComponent = application.getComponent("Input");
                    if (!(nComponent instanceof UIOutput)) {
throw new ClassCastException("error message...");
                    nComponent.setParent(parentComponent);
                    nComponent.setRendererType("Text");
                    nComponent.setComponentId(getClientId(context,nComponent));
                    UIOutput newComponent = (UIOutput)nComponent;
newComponent.setValueRef("mymodel.propname");
and input can get value from model,but can not update value to model?why?how can i do?

Trying to understand the code snippet you posted. Could you please explain why you are casting your input component to output, then setting the valueRef on it ??
-Jayashri

Similar Messages

  • [Help] Learn How To Create InputDialog

    I still learn how to create a component.
    I want to create a simple input dialog which modeled after JOptionPane.showInputDialog, but i can't get the value, it's always show null. Anybody know where i doing wrong?
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class kotakPesan extends JFrame implements ActionListener {
         String jdlPesan;
         String isiPesan;
         JPanel p = new JPanel();
         JButton bOk = new JButton("Ok");
         JTextField tIsi = new JTextField();
         JLabel lIsi = new JLabel();
         String A;
         public String inputPesan (String Judul, String Isi) {
              this.jdlPesan = Judul;
              this.isiPesan = Isi;
              tampilInputPesan();
              return A;          
         public void tampilInputPesan () {
              setTitle(jdlPesan);
              lIsi.setText(isiPesan);
              p.setLayout(new GridLayout(3, 1));
              p.add(lIsi);
              p.add(tIsi);
              p.add(bOk);
              getContentPane().add(p);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setVisible(true);
              bOk.addActionListener(this);
         public void actionPerformed (ActionEvent aE) {
              A = tIsi.getText();
    }Main Method:
    public class Sim {
         public static void main (String[] args) {
              kotakPesan p = new kotakPesan();
              String A = p.inputPesan("Masuk", "Angka");
              System.out.println(A);
    }

    I'm also learning java and I'm not quite sure what are you trying to do. Are you trying to read your pre-defined input in the text field?
    I've created a simple window with a text field, a button and the program will produce a sample output. I hope it will help you a bit.
    import javax.swing.*;
    import java.awt.event.*;
    public class TestWindow extends JFrame
         //Window attributes - references
         private JPanel panel;
         private JLabel inputLabel, outputLabel, resultLabel;
         private JTextField inputField;
         private JButton clickButton;
         //Window size - in pixels
         private final int WINDOW_WIDTH = 300;
         private final int WINDOW_HEIGHT = 450;
         //Constructor
         public TestWindow ()
              setTitle ("This is a simple window.");
              setSize (WINDOW_WIDTH, WINDOW_HEIGHT);
              setDefaultCloseOperation ( JFrame.EXIT_ON_CLOSE );
              createPanel ();
              add (panel);
              setVisible (true);
         private void createPanel ()
              inputLabel = new JLabel ("Enter an integer of your choice: ");
              outputLabel = new JLabel ("Your number is: ");
              resultLabel = new JLabel ("---------------");
              inputField = new JTextField (5);
              clickButton = new JButton (" dum dum dum ");
              clickButton.addActionListener (new TempListener ());
              panel = new JPanel();
              panel.add (inputLabel);
              panel.add (inputField);
              panel.add (outputLabel);
              panel.add (resultLabel);
              panel.add (clickButton);
         //Action listener for the button.
         private class TempListener implements ActionListener
              public void actionPerformed (ActionEvent event)
                   int textToInt;
                   String inputFieldTempOut = "";
                   String text = inputField.getText ();
                   textToInt = Integer.parseInt (text);
                   if (textToInt % 2 == 0)
                        if (textToInt == 0)
                             inputFieldTempOut = "Neither even nor odd.";
                        else
                             inputFieldTempOut = "An even number.";
                   else
                        inputFieldTempOut = "An odd number.";
                   resultLabel.setText (inputFieldTempOut);
    public class TestWindowDemo
       public static void main(String[] args)
          TestWindow tw = new TestWindow();
    }

  • Requesting all to help me how to create lsmw using idoc method

    hi
    thanx for ur answer
    requesting every body in the forum to help me how to create lsmw using idoc method.
    regards,
    balaji

    Hi Balaji,
    LSMW using IDOC is similar to using flat file method. Here you are getting data from IDOC container and mapping data with Idoc segments insted of flatfile column.
    Hope this is what you are looking for. If helpful then don’t forget to reward me for that
    Darshan

  • How to create a sub head(code) in a catalog- for service notification

    Hi everyone,
    How to create a sub head(code) in a catalog- for service notification?
    Please guide with your valuable comments.
    Please guide its very urgent.
    Thanks and Regards
    Edited by: MPVash Vash on Oct 24, 2008 8:14 AM
    Edited by: MPVash Vash on Oct 30, 2008 7:38 AM

    Hi,
    Go to T-code QS41, give the catalog and code group and enter.
    U can click on the code after selecting the code group and create new  codes.
    In SPRO u should see which type of catalog is assigned to the notification type. This u can see in the overview of the notification type by selecting the notification type in SPRO.
    Regards
    Haricharan

  • Hi, folks can some body help me¡  How  I can  use  de second  code  to  the  Itunes card  to  use  the  Itunes card.... My  number is vanished, how  i can submit  my  Itunes card?

    Hi, folks can some body help me¡  How  I can  use  de second  code  to  the  Itunes card  to  use  the  Itunes card.... My  number is vanished, how  i can submit  my  Itunes card?

    iTunes Store: Invalid, inactive, or illegible codes
    http://support.apple.com/kb/TS1292

  • How to create custom component in CRM 2007

    Hi.
    I am new for the CRM 2007 Web UI.
    Here we have CRM_UI_FRAME.
    Like this so many Components are there.
    I want how to create our own component.
    I created it as follows.
    Open the Transaction code bsp_wd_cmpwb.
    Provide Z Name in the Component.
    Zcomponent
    Press Create button.
    Go to Run Time Repository.
    Press Change Mode.
    Create a MODEL as ALL.
    GO to Browser Component Structre.
    Select View.
    Provide View name.
    Create the View.
    Go to view Layout.
    Provide the code like this.
    <%@page language="abap"%>
    <%@ extension name="htmlb" prefix="htmlb"%>
    <%@ extension name="xhtmlb" prefix="xhtmlb"%>
    <%@ extension name="crm_bsp_ic" prefix="crmic"%>
    <%@ extension name="bsp" prefix="bsp"%>
    <cthmlb:overviewFormConfig/>
    Create the context under the context.
    Go to Configuration tab.
    Assigne the Attributes to the Screen.
    GO to the Run Time Repository.
    press change mode.
    Assigne the view name to the Window.
    Save it.
    Test the Componet. But it is not diaply anything on the screen.
    How i will get the data into the web UI.
    Can anybody expalin about this one to me with screen shorts if possible.
    I want add some fields into the web UI. Provide some values into that. Capture the values.
    Navigate the data from one screen to another screen. How it is possible. I did not understand. 
    If i am changing any screens in the pre define component it shows dump.
    So, now i need Custom component with adding of the fields.
    Please give me proper information regarding this one.
    Thank You.
    Krishna. B.

    Hi,
    Try put the htmlb to show a field:
    <thtmlb:label design="LABEL" for="//<context>/<field>" text="<field>"/>
    <thtmlb:inputField  id="<field>" maxlength="31" size="20" value="//<context>/<field>"/>
    In order to get value, you can write a simple code in the event_handler:
    LR_BOL                      type ref to IF_BOL_BO_PROPERTY_ACCESS
    LR_BOL = ME->TYPED_CONTEXT-><context>->COLLECTION_WRAPPER->get_current()
    var1 = LR_BOL->GET_PROPERTY_AS_STRING('FIELD').
    take a look at lr_bol methods so that you can see the set and get methods.
    Regards,
    Renato.

  • Urgent help in coding of creating New Business partner?

    Hi Friends,
    I need urgent help on this.Please give me the solution.
    This is the coding which i written for creating new BP.
    FUNCTION ZCTS_NEW_CONTACT.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(BUSINESSPARTNER) LIKE  BAPIBUS1006_HEAD-BPARTNER
    *"     VALUE(CNEWINFO) TYPE  ZCTS_CONTACTS
    *"     VALUE(CDATA) LIKE  BAPIBUS1006_CENTRAL STRUCTURE
    *"        BAPIBUS1006_CENTRAL
    *"     VALUE(BUSPART1) LIKE  BAPIBUS1006_RELHEAD-BUSINESSPARTNER1
    *"     VALUE(BUSPART2) LIKE  BAPIBUS1006_RELHEAD-BUSINESSPARTNER2
    *"     VALUE(RELCAT) LIKE  BAPIBUS1006_RELHEAD-RELATIONSHIPCATEGORY
    *"  EXPORTING
    *"     VALUE(MESG) TYPE  CHAR100
    DATA: lt_return like bapiret2 occurs 0 with Header line.
    DATA: CTPERS  LIKE BAPIBUS1006_CENTRAL_PERSON OCCURS 0 WITH HEADER LINE.
    DATA : PARTN_GRP TYPE BAPIBUS1006_HEAD-PARTN_GRP.
    DATA : PARTN_CAT TYPE BAPIBUS1006_HEAD-PARTN_CAT.
    DATA: BEGIN OF ADADD.
       INCLUDE STRUCTURE BAPIBUS1006_ADDRESS.
      DATA: END OF ADADD.
    DATA: BEGIN OF ADTEL OCCURS 0.
       INCLUDE STRUCTURE BAPIADTEL.
      DATA: END OF ADTEL.
    DATA: BEGIN OF ADSMP OCCURS 0.
       INCLUDE STRUCTURE BAPIADSMTP.
      DATA: END OF ADSMP.
    CTPERS-FIRSTNAME  = CNEWINFO-FNAME.
    CTPERS-LASTNAME   = CNEWINFO-LNAME.
    PARTN_CAT = 1.
    PARTN_GRP = 002.
    ADADD-CITY = CNEWINFO-CITY .
    telephone info **
      ADTEL-TELEPHONE = CNEWINFO-PHONE.
      ADTEL-CONSNUMBER = '001'.
      APPEND ADTEL.
      ADTEL-TELEPHONE = CNEWINFO-MOBILE.
      ADTEL-CONSNUMBER = '002'.
      APPEND ADTEL.
    email information **
      ADSMP-E_MAIL = CNEWINFO-EMAIL .
      APPEND ADSMP.
    CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'
      EXPORTING
        PARTNERCATEGORY                    = PARTN_CAT
        CENTRALDATA                        = CDATA
        PARTNERGROUP                       = PARTN_GRP
        CENTRALDATAPERSON                  = CTPERS
        ADDRESSDATA                        = ADADD
    IMPORTING
       BUSINESSPARTNER                    = BUsinessPartner
    TABLES
        TELEFONDATA                        = ADTEL
        E_MAILDATA                         = ADSMP
        RETURN                             = lt_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
         WAIT = 'X'.
    *PARTN_CAT = 1.
    *PARTN_GRP = 002.
    *ADADD-CITY = CNEWINFO-CITY .
    telephone info **
    ADTEL-TELEPHONE = CNEWINFO-PHONE.
    ADTEL-CONSNUMBER = '001'.
    APPEND ADTEL.
    ADTEL-TELEPHONE = CNEWINFO-MOBILE.
    ADTEL-CONSNUMBER = '002'.
    APPEND ADTEL.
    email information **
    ADSMP-E_MAIL = CNEWINFO-EMAIL .
    APPEND ADSMP.
    CALL FUNCTION 'BAPI_BUPR_PFCT_CREATEFROMDATA'
          EXPORTING
            BUSINESSPARTNER1           = BUSPART1
            BUSINESSPARTNER2           = BUSPART2
            RELATIONSHIPCATEGORY       = RELCAT
         TABLES
           RETURN                     = lt_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
         WAIT = 'X'.
    LOOP AT lt_return WHERE TYPE = 'E'.
        MESG = ' NOT CREATED NEW CONTACT'(020).
        EXIT.
      ENDLOOP.
    ENDFUNCTION.
    Early reply is highly appriciable.
    Regards,
    BONA

    Hi,
    Thanks for early reply.
    When i tested created new BP.
    Wheni check wether it is created or not its not created.
    What is the problem.is there modifications i have to do int he coding.
    Thanks,
    BONA.

  • Please help. How to create reports including charts in pdf format .

    Please help.
    I have two problems.
    Any help will be highly appreciated.
    1. I need to query database through JDBC (which is easy) using servlet or JSP and then create a report in pdf format (which I do not know how to). If anyone knows how to create a report in pdf format, I would highly appreciate.
    2. I need to generate charts and embed them in these reports. I do not know how to make charts. If anyone knows and helps me out, I would highly appreciate. I have to make charts and embed them in the pdf reports.
    Thanks a lot in advance.
    Indrasish.

    Ok ibasuroy, but i don�t speak ingles.
    first problem:
    http://sourceforge.net/projects/jfreereport/
    JFreeReport is a Java class library for generating reports. It provides a flexible printing functionality for Java applications and supports output to Printers and PDF, Excel, HTML and XHTML, PlainText, XML and CSV files.
    second problem:
    http://sourceforge.net/projects/jfreechart/
    JFreeChart is a class library, written in Java, for generating charts. Utilising the Java2D APIs, it currently supports bar charts, pie charts, line charts, XY-plots and time series plots.
    write my. I have a class JDBCAdpater and a BridgeJFreeReport
    [email protected]

  • Help! how to create a repository correctly of owb?

    I have installed oracle11 in the directory c:\app\***\product\11.1.0\db_1 and installed owb in the directory c:\app\***\product\11.1.0\owb11gr1. When i tried to Create a Repository Using the Repository Assistant, the system gives out an error message:OWBSYS is not granted access to owb home/owb/bin/admin/rtrepos.properties:Please run UnifiedRepos/reset_owbcc_home.sql specifiying the path of the Oracle Home from which the Control Center Service is being run.
    Then I run the script reset_owbcc_home.sql and put in "C:/app/***/product/11.1.0/owb11gr1" according to the prompt.
    But it still can not work, it gives out another error,"there is no table or views"
    Can anyone tell me how to create a repository correctly?
    Thanks!

    With your database 11g install OWB is already installed under the ORACLE_HOME's owb directory. You should/could have just used it.
    I'd suggest a cleanout and start again, here are the steps:
    1. Close any open OWB
    2. from db home,
    Stop runtime service - cd owb/rtp/sql sqlplus OWBSYS/OWBSYS @stop_service
    3. drop your target user, design user
    4. cleanout OWBSYS, recreate:
    cd owb/UnifiedRepos
    sqlplus using your sysdba
    @clean_owbsys
    @cat_owb <tablespace_of_your_choice)
    Now run reposinst.bat from your database Oracle home
    Cheers
    David

  • Urgent help need:How inventory system and fulfillment system work

    Hi Every one ,
    I have an requirement to work on inventory and fulfillment system,below are my questions,
    1)I have stock level quantity for an sku is 2 ,if one user done with his order with quantity of 2 then how we can show quantity to the second customer (if stock not available we gone loss the business )
    how we can handle this ?
    2)There are few orders are completed(if some are orders are having quantity available in stock some or backorders)
    here how the fulfillment system understand those orders and how it will update the inventory.
    Could you please any one help me how to work on above requirements or else give me some other solutions to full fill above .
    Regards,
    Jyothi Chidurala
    Edited by: Jyothi.mj on May 22, 2013 5:08 AM
    Edited by: Jyothi.mj on May 23, 2013 4:28 AM

    >
    1)I have stock level quantity for an sku is 2 ,if one user done with his order with quantity of 2 then how we can show quantity to the second customer (if stock not available we gone loss the business )
    how we can handle this ?
    you can always call InventoryManager.AVAILABILITY_STATUS_IN_STOCK to check whether the item is available in inventory , It is the business call if item not available how they want to handle this .
    hope this helps

  • Urgent HELP! how to resize a layout and change the color from black to white

    Hey!!!
    im in urgent help of someone to answer my questions. I have a huge Indesign exam monday and two of the questions are   
    -resizing a layout
    -changing a color layout to black and white
    I have done many porjects in Indesign but to be honest i don't know what they are refering but resizing a layout or changing the layout color to black and white. If any body can explain me this a little be I be so thankful!
    Thanks,
    Fiama Piccardo

    I've decided to relent a little and give you a hint, so you can do some looking and figure this out for yourself. Everything you need for either of those tasks is accessed from the File menu...
    And a further hint. Indesign does not have a black and white or grayscale working colorspace, so you never truly have a black and white layout, though all of the objects in the file may use only black ink. You can, however, output a PDF, in a couple of ways, that will convert your color file to one that uses only black.

  • Urgent Help. How to send the email in HTML format in Version 4.6c

    Hi,
      Please help me how to send a mail in HTML format with logo and specified format. Is it possible to send the SAPscript or Smartform in HTML format to external mail address.  The logo and the format is very important in this e-mail.
      quick response will help me better.
    Regards,
    Naidu

    Here is a sample program which emails HTML in the body.  Of course you can put an HTML tag in there that would point to the logo on some server(internet).  Notice we are just putting the HTML code in the MAILTXT table,  This is how we do it at my company.
    report zrich_0002.
    data: maildata   like sodocchgi1.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    start-of-selection.
      clear:    maildata, mailtxt,  mailrec.
      refresh:  mailtxt, mailrec.
      perform build_text_message.
      perform build_receivers.
      perform send_mail_nodialog..
    *      Form  BUILD_TEXT_MESSAGE
    form build_text_message.
      maildata-obj_name = 'TEST'.
      maildata-obj_descr = 'Test Subject'.
      mailtxt  = '<html>'.
      append mailtxt.
      mailtxt  = '<head>'.
      append mailtxt.
      mailtxt  = '<title>Untitled Document</title>'.
      append mailtxt.
      mailtxt  = '<meta http-equiv="Content-Type" content="text/html;'.
      append mailtxt.
      mailtxt  = 'charset=iso-8859-1">'.
      append mailtxt.
      mailtxt  = '</head>'.
      append mailtxt.
      mailtxt  = '<body>'.
      append mailtxt.
      mailtxt  = '<div align="center"><em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif">THIS'.
      append mailtxt.
      mailtxt  = '  IS A TEST </font></em><font' .
      append mailtxt.
      mailtxt  = 'color="#0000FF" size="+7" face="Arial,'.
      append mailtxt.
      mailtxt  = 'Helvetica, sans-serif"></font>'.
      append mailtxt.
      mailtxt  = '</div>'.
      append mailtxt.
      mailtxt  = '</body>'.
      append mailtxt.
      mailtxt  = '</html>'.
      append mailtxt.
    endform.
    *      Form  BUILD_RECEIVERS
    form build_receivers.
    *  mailrec-receiver = '[email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
    endform.
    *      Form  SEND_MAIL_NODIALOG
    form send_mail_nodialog.
      call function 'SO_NEW_DOCUMENT_SEND_API1'
           exporting
                document_data              = maildata
                document_type              = 'HTM'
                put_in_outbox              = 'X'
           tables
                object_header              = mailtxt
                object_content             = mailtxt
                receivers                  = mailrec
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.
    Regards,
    Rich Heilman

  • Please can anybody help me  how to create the job by using HR_JOB_API?

    hi,
    actually i tried by using this,but iam not able to do that.
    1.should we create job definition before job creation?
    2. should we create flexfield segment values before job definition?
    3. what are the parameters we have to give mandatatory?
    up to my knowledge when we crate job from front end then automatically job definition and job will be created.
    but here how to do that please let me know.
    and if u have any sample code please send me as soon as.
    if jobdefinition and flexfield vlues must be defined before job creation then let me know how to create jobdefinition and flexfield values.

    ever thought about attending a training? When you think this is not needed, please read the flex guide, then the hr guide, and then scan some metalink notes on hrms api's.
    good luck,
    thierry

  • How to create PR using T.code CJ20N

    Dear all,
    I am a MM guy, i want to test the scenario in my IDEAS system
    how to create a PR with CJ20N t.code,based on that i want to create PO to vendor please provide me detials steps .
    Please consider me as a Enduser
    if any documentation please send to svgk111@gmail
    points will be rewarded
    Regards
    venu gopal
    Edited by: venu kk on Jun 26, 2008 7:35 AM

    Hi Venu,
    Reply given by Rahul Tyagi is correct. Another way to get PR thru CJ20N is :
    Open CJ20N , Open your Project by clicking onto the Open Icon --> Click on the network --> Put the description of the PR in the description field > Put WBS element in the WBS element field by taking the columns to the right hand side.> Select the particular line item --> Click on to the Component Overview icon at the bottom --> Put your MM into the Material Field --> Put the requirement qty. -->Now select the item category as L for Stock Item and N for Non Stock
    item , then one POP UP window will appear --> Select " Third Party Order" --> Then put your customer number and press enter --> Save the document.
    Now , again open CJ20N and select the particular Activity ---> select the material component attached to that activity and on the right hand screen  you can see the PR number.
    Hope this will also help you
    Regards,
    Dhruv Kumar Malhotra

  • How to create a new company code and how to assign it to billing units?

    i am working on roll out project.....please help me in creating a new company code....

    Hi,
    You have raised this query in wrong Forum. Please raise ur query in the relevant forum.
    rgrds,
    Randhir Soni

Maybe you are looking for