Create dynamically a number of Input Fields

hi all,
one issue about creating dynamically a range of Input fields:
i have one sap.ui.layout.form.FormContainer.
at first i want to have one Input field in it. if this field is filled, i want to have a new one below, which is empty, and the cursor should be set to the new field.
so i know that there is an function addContent for the formcontainer, so i can listen to the changeEvent of the Input field, if this is filled i will add a new Input field.
at first: is this a good solution or is there any recommended way from SAP?
second: if i will implement it this way, how can i read the data from this "array" of input fields?
third: how can i set focus on input field in sapui5?
thanks for help!
Regards,
Alex

1) Solution sounds good to me
2) You can do it in multiple ways:
you can use content aggregation from FormContainer
you can access Input field by id (you would need to follow some kind of convention when giving id to newely created field, like "inputField" + count, count ++)
you can use RowRepeater (not sure though how it looks in FormContainer) and use a model for bining
3) SAPUI5 SDK - Demo Kit From my experience element.focus() works just fine

Similar Messages

  • Dynamically applying OVS on input field

    Hi,
    I have table with drop DropDownByKey UI element in one column. In all the other columns i have input field. Now based on the value of the DropDownByKey i have to apply the OVS on the input fields of the table column.
    Now my question is how can i apply the OVS dynamically.
    I can not change the properties of attributes, so want to change them dynamically.
    Thanks,
    Reeha Verma.

    Hi,
    You can check the value of context attribute binded to dropdown(KEY) and accordingly formulate the Input structure and output table.
    It seems that you have to do the data declecration in advance for all the possible values of dropdown.
    If you want to avoid the data decleration in advance then i think you have to dynamically create the context node and attribute to acheive the functionality.
    If you have limited values in DropDown then i think you can go with data decleration otherwise please try out with Dynamic context programming.
    Thanks,
    Rahul

  • Create dynamic directory name from form field on Sharepoint

    Trying to save pdf file to sharepoint site using URL; but need to create directory (initially) and filename dynamically. After directory created addtn'l files may populate dir, so need to check for directory exists; if so just copy files to dir based on field name. I'm able to save files to hard-coded location only, based on below.
    How to check and/or create dynamic directory base don field name?
    // folder level JavaScript to allow access to the identity object properties
    trustedIdentity = app.trustedFunction( function (sProperty)
    var iProperty = "";
    app.beginPriv();
    iProperty = identity[sProperty];
    app.endPriv();
    return iProperty;
    // folder level JavaScript to allow Save As population of file name
    mySaveAs = app.trustPropagatorFunction(function(myForm, path)
         app.beginPriv();
         var myForm = event.target;
         return rtn = myForm.saveAs(path);
         app.endPriv();
    myTrustFunct = app.trustedFunction(function(myForm, path)
         app.beginPriv();
         var vTest1 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test1[0]").rawValue.toString();
         var vTest2 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test2[0]").rawValue.toString();
         var vTest3 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test3[0]").rawValue.toString();
         var vTest4 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test4[0]").rawValue.toString();         
         var vpdf_url=location.href;location.href='http://mysite2010.com/documents
         var vPath = "/vpdf_url/" + vTest1 + Test2  + vTest3 + " .pdf";
              //console.println("vPath: " + vPath);
         var retn = mySaveAs(myForm, vPath);
         app.endPriv();
         return retn;

    Acrobat/Reader cannot create a directory. The directory needs to exist before Acrobat/Reader can save a PDF file to that directory.
    You could create a plug-in and use that plug-in to create the directory. The plug-in should also be able to determine if the directory exists or not.
    SharePoint can be tricky because it is not like most web sites. There is a special dash board that helps manage the different parts of SharePoint like list, folders, web parts, documents, etc so you may need to be aware of these features and adjust for them.
    For  folder level functions, I would not use any LiveCycle JavaScript variations. The folder level scripts are shared and accessible by Acrobat forms.

  • To create Dynamic Selection screen using Key Fields

    Hi All,
    We have a requirement where we want to create Dynamic selection screen using Key fileds of Z-table or any standard table.
    Please provide some solution if you have worked in this area.
    Thanks in Advance,
    Anand Raj Kuruba

    Hi,
    You can use the following statement.
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
    declares a node <node> of a logical database for dynamic selections in the selection include.
    To use the dynamic selections in the SELECT statements of the subroutine PUT_<node>, you must use the data object DYN_SEL. The data object DYN_SEL is automatically generated in the logical database program as follows:
    TYPE-POOLS RSDS.
    DATA DYN_SEL TYPE RSDS_TYPE.
    You do not have to program these lines yourself. The data object DYN_SEL is available in the database program but not in a connected executable program.
    The type RSDS_TYPE of the data object is defined in the type group RSDS as follows:
    TYPE-POOL RSDS.
    WHERE-clauses ------------------------------
    TYPES: RSDS_WHERE_TAB LIKE RSDSWHERE OCCURS 5.
    TYPES: BEGIN OF RSDS_WHERE,
    TABLENAME LIKE RSDSTABS-PRIM_TAB,
    WHERE_TAB TYPE RSDS_WHERE_TAB,
    END OF RSDS_WHERE.
    TYPES: RSDS_TWHERE TYPE RSDS_WHERE OCCURS 5.
    Expressions Polish notation ---------------
    TYPES: RSDS_EXPR_TAB LIKE RSDSEXPR OCCURS 10.
    TYPES: BEGIN OF RSDS_EXPR,
    TABLENAME LIKE RSDSTABS-PRIM_TAB,
    EXPR_TAB TYPE RSDS_EXPR_TAB,
    END OF RSDS_EXPR.
    TYPES: RSDS_TEXPR TYPE RSDS_EXPR OCCURS 10.
    Selections as RANGES-tables -----------------
    TYPES: RSDS_SELOPT_T LIKE RSDSSELOPT OCCURS 10.
    TYPES: BEGIN OF RSDS_FRANGE,
    FIELDNAME LIKE RSDSTABS-PRIM_FNAME,
    SELOPT_T TYPE RSDS_SELOPT_T,
    END OF RSDS_FRANGE.
    TYPES: RSDS_FRANGE_T TYPE RSDS_FRANGE OCCURS 10.
    TYPES: BEGIN OF RSDS_RANGE,
    TABLENAME LIKE RSDSTABS-PRIM_TAB,
    FRANGE_T TYPE RSDS_FRANGE_T,
    END OF RSDS_RANGE.
    TYPES: RSDS_TRANGE TYPE RSDS_RANGE OCCURS 10.
    Definition of RSDS_TYPE
    TYPES: BEGIN OF RSDS_TYPE,
    CLAUSES TYPE RSDS_TWHERE,
    TEXPR TYPE RSDS_TEXPR,
    TRANGE TYPE RSDS_TRANGE,
    END OF RSDS_TYPE.
    For more information, please check this link.
    http://help.sap.com/saphelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
    Regards,
    Ferry Lianto

  • Creating dynamic id for an input textbox?

    I have a datatable in my jsf page in which I need to create an input textbox that must have dynamic values for id attribute and not the hard coded one. What is the possible way to generate that??

    Not directly. But why would you? Don't you see a pattern in the generated ID's? Did you check the generated HTML output? If this problem is Javascript related, are you familiar with the 'this' reference?

  • How to create a form or data input field

    I would like to create a form of one cell (A1) and so create several tables with just one cell (just copy the tables). The value in that cell will change every day via a manual input. I then want to have one sort of aggregation table which will aggregate all (daily) values into one sheet, and show me all the daily values in several columns (each column has its own table)
    Would be great if you can help me
    Bart

    Hello
    If I understand well, the answer is available page 90 of the PDF User guide ( in the english one).
    +To refer to a cell in a different table, use the table name followed by two colons (::) and+
    +then the cell identifier (Table 2::B5). To refer to a cell in a table on another sheet, use+
    +the sheet name first (Sheet 2::Table 2::2006 Class Enrollment) if the table name isn’t+
    +unique in the spreadsheet.+
    Yvan KOENIG (from FRANCE mardi 28 août 2007 17:56:24)

  • Dynamic enabling of input fields via radio btn in report selection screen?

    Hi there!
    I was wondering whether one can dynamically enable/disable input fields on a selection screen of a report-program.
    Or is this only possible for selection screens in dynpro-programs?
    If possible for reports - could you give an example?
    Thanx a lot.
    Andreas

    Hi,
    yes..You can dynamically disable and enable inputs fields in the selection screen..
    Check this ex..If you press the first radio button..The second input will be disabled...And vice versa..
    PARAMETERS: p_r1 RADIOBUTTON GROUP g1 USER-COMMAND usr DEFAULT 'X',
    p_r2 RADIOBUTTON GROUP g1.
    PARAMETERS: p_input1 TYPE matnr MODIF ID m1,
    p_input2 TYPE matnr MODIF ID m2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_r1 = 'X'.
    IF screen-group1 = 'M2'.
    screen-input = '0'.
    ENDIF.
    ELSE.
    IF screen-group1 = 'M1'.
    screen-input = '0'.
    ENDIF.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    Thanks,
    Naren

  • Batch process to create large number of metadata fields in UCM?

    Is there any kind of scripting available to create a large number of metadata fields in UCM?.
    thanks

    I can give you a code in java, which adds two metadata fields. It's quite hardcoded, but you could use it as a basis for a script:
    String FIELD1_NAME = "xsecretKey";
    String FIELD2_NAME = "xattachmentID";
    if (binder == null)
    binder = new DataBinder(SharedObjects.getSafeEnvironment());
    String maxOrderQuery = "select MAX(dOrder) as dOrder from DocMetaDefinition";
    try
    String val = loader.getDBConfigValue(COMPONENT_NAME, COMPONENT_SUBNAME, null);
    //binder.putLocal("dName", FIELD1_NAME);
    binder.putLocal("dName", FIELD2_NAME);
    ResultSet tempRs = ws.createResultSet("Qmetadef", binder);
    if (val == null || tempRs.isEmpty())
    ResultSet rset = ws.createResultSetSQL(maxOrderQuery);
    String orderStr = ResultSetUtils.getValue(rset, "dOrder");
    int order = NumberUtils.parseInteger(orderStr, 0);
    setNewFieldParams(binder, "BigText", "secretKey", "<$dateCurrent()*1$>");
    addNewMetadataField(FIELD1_NAME, binder, ++order, null, null, ws, cxt);
    setNewFieldParams(binder, "Text", "attachmentID", null);
    addNewMetadataField(FIELD2_NAME, binder, ++order, null, null, ws, cxt);
    rset = ws.createResultSetSQL("select * from DocMeta where dID=0");
    if (!testResultSetFieldExists(rset, FIELD1_NAME))
    FieldInfo fi[] = loader.createFieldInfo(new String[] {
    FIELD1_NAME
    }, 200);
    //fi[0].m_type = 5;
    ws.alterTable("DocMeta", fi, null, new String[] {
    "dName"
    if (!testResultSetFieldExists(rset, FIELD2_NAME))
    FieldInfo fi[] = loader.createFieldInfo(new String[] {
    FIELD2_NAME
    }, 30);
    //fi[0].m_type = 3;
    ws.alterTable("DocMeta", fi, null, new String[] {
    "dName"
    loader.setDBConfigValue(COMPONENT_NAME, COMPONENT_SUBNAME, "7.0", "1");
    catch (Exception e)
    SystemUtils.dumpException(null, e);
    }

  • Password type input field - dynamically

    Hello,
    I can dynamically ask for user input using the APEX_ITEM package. My problem is that I'd also like to input passwords this way, but I couldn't find the appropriate function in APEX_ITEM. Is there a way to dynamically generate password-type input fields with the '*****' input style?
    Any help will be much appreciated,
    Denes Toth

    You are right, the APEX_ITEM API doesn't generate a input type="password" field.
    See Display as Password in updateable report for an alternative approach.

  • Issue in populating input field

    Hi all,
    I have ceated a form view with an input field, Total overdue. Now I created a query whose output is just a number. I have placed that query on the iview and created a chart from that query and hide that chart. Now i create a formula for the input field on the form view and in the DATA Fields, I can see the field from that hidden chart and placed that field on the formula for the input field i.e.#ID[ACDMV]@Total_Overdue_Amount.
    Now when i deploy the dashboard, form view field dispays as empty. Why it is so? It should be populated with the field "#ID[ACDMV]@Total_Overdue_Amount"
    Can anyone pls help what is the issue?
    Many Thanks.
    Best Regards,
    AI.

    Hi
    Just check, have you connected that form to the 'Output Port' of that chart? You need to connect that form either to the output of the 'Data Service (Query)' or to the chart output. Then only that formula will work.
    Regards
    Sandeep

  • Input Field disabled in Web Dynpro Application

    Hi,
    I created an application with three input fields and created the corresponding context. When I start the wd app the input fields are disabled and can not be edited. The property enabled if this fields is true!
    I compared the context with other wd app in my nwds and the only thing I recognize is that in other apps, at every attribute is a litte triangle. This attribute also have one property more - it is called "Input Element".
    So my questions are:
    1. What might be the reason why I can not edit the fields?
    2. How can I configure my attributes to get this triangle?
    I appreciate any comment!
    Regards

    Wow, that was more than fast :-D
    But you are absolutely right, THANKS!!! The input fields are enabled now.
    Do you might also know how I can get this triangle? I have this problem also in an other topic ([How-to Integrate Visual Composer UIs within a CE7.11 BPM Process|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2011e628-b317-2c10-9fa7-952155e10705]). Also see [Video|http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/6065bee4-a317-2c10-4c8c-cfa1c3eac185&overridelayout=true] at minute 06:05
    Regards

  • How to create Dynamic Webi 3.1 filename in Publication

    I have a webi 3.1 report that is being called from a publication used for bursting using the eFashion universe.  I want the file name to be dynamic, based on the profile.  Within the webi report I created a free standing cell that I set to "Western States" or "Eastern States" based on the states in the report at the time of the run (set by the profile).  This works correctly.  But there does not seem to be a way to get the report to use the free standing cell value as part of the report name.  From the publication, properties, destinations, use specific name I can only pick title and document name.  Neither of these is the free standing cell in the report.  I saw that version 4.0 has this ability but I can't upgrade for another year and deski is not an option.  Any suggestions?  Thank you.

    I figured out how to create dynamic report names with 2 fields within the Publication tool.  I padded fullname and  email in dynamic recipients to be the two fields I wanted from the report.  Then in Destinations, File Name:, Use specific name I picked userfullname and email address to create the report name.   But that would not work if I actually needed to use the email address to send the report to.  We don't have Java programmers and may have to find other options.  Thanks.

  • Can I create a dynamic number of inputs during runtime?

    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID               NUMBER                (This will be the primary key)
    TBL_FILE_NAME          VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID               NUMBER               (This will be the primary key)
    TBL_FILE_ID               NUMBER                (This will be the forign key to the file table)
    TBL_META_COLUMN     VARCHAR2(30)     (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE          VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    Other things to note is that we would like this to be on a single page.
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.

    Welcome to the Oracle Forums !
    >
    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID NUMBER (This will be the primary key)
    TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID NUMBER (This will be the primary key)
    TBL_FILE_ID NUMBER (This will be the forign key to the file table)
    TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    >
    Creating Page Items dynamically is not available. You will have to create excess items and hide/show , etc. But you cannot change the Item Type. All in all, too many limitations in this approach.
    >
    Other things to note is that we would like this to be on a single page.
    >
    The 100 item limit will hit you if you go with extra item on page. With Tabular Form that should not be a limitation, unless you are exceeding the 50 item limit of APEX_APPLICATION.G_Fnn items, and the 60 column limitation of Report region with "Use Generic Column Names (parse query at runtime only)" of Dynamic region.
    >
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    >
    If the type if item is variable it only means you need a way to store the item type. Meta Data of the Meta Data.
    >
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    >
    Yes, you can do it. Updatable report/ Tabular Form query can be constructed from the Meta Data using PL/SQL Function Returning SQL Query . It will be a bit of coding in PL/SQL where you use the Meta Data and the Meta Data of the Meta Data to piece together your SELECT with the right APEX_ITEMs. It might have a performance penalty associated with it, but will not be a serious degradation.
    >
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.
    >
    I guess that is just a good TNF. It is the Master-Detail Design Pattern, that sound more modern ? ;)
    Regards,

  • How to get the co-ordinates of a dynamically created input field

    Hello Frn's
    i have created a dynamic text view . but this text view is not appearing at proper position . I want palce it infront of a dynamically created input field . how can i do this ?
    as i am thinking ...i should first of all  get info about the co-ordinates of   dynamaclly creatd input field . and with respect to these co-ordinates ...set the position of  text View .
    Please suggest  your thoughts .
    Thanks and Regards
    Priyank Dixit

    Hi,
    There is no provision in WD for getting screen coordinates and then placing the UI element.
    You to add the UI element to layout editor and based on the layout type it will add the UI element to respective position.
    I would advice not to create dynamic UI elements( instead you can create them statically and then play with visibility status through context binding ). This will be more effective way and less error prone. This is also recommended practice.
    still,For dynamic creation you can refer to following wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
    regards
    Manas Dua

  • How to create a dynamic entry list for an input field in VC(ce 7.1)

    Hello all,
    I have an Input field, i need to create a Dynamic Entry List for it in VC(ce 7.1).
    How can this be done.
    Thanks in Advance.
    Thanks and Regards,
    Santhosh Guptha N

    Hi Santhosh,
    You can define Dynamic entry list for Drop down list and combo box but not for input field.
    [Refer this|http://help.sap.com/saphelp_nwce10/helpdata/en/2a/28249060dd4dbc872f6266f4557364/frameset.htm] for defining entry list.
    Let me know if it helped.
    Regards,
    Dharmi

Maybe you are looking for