Android - dynamic number of checkboxes & items

i wanna make the Activity show a dynamic number of CheckBoxes/ListItems (not sure what it's called) depending on the number of records i have (something like the "show all SMS threads" and "delete SMS threads" screen).
how do i do that?

If you have a question about the java LANGUAGE, feel free to ask it.
But that is not what you have. You can make snippy remarks all you want, you fail at thinking about what the right place is to ask your questions and thus you get an unhelpful response. That's your own failure.

Similar Messages

  • Checkbox item: How to get all values checked?

    See http://htmldb.oracle.com/pls/otn/f?p=24317:46
    The report query is simply
    select
    'One' one,
    'Two' two,
    'Three' three,
    'Four' four
    from dualThe checkbox item is a named static LOV with STATIC2:ONE,TWO,THREE,FOUR and a Source value of ONE:TWO:THREE:FOUR so that all boxes appear checked when the page is first rendered.
    All the 4 columns have a column condition like
    instr(':'||:P46_COLS||':',':ONE:') > 0to ensure that column is rendered only if the corresponding checkbox is checked.
    The report has Dynamic column headings with the following PL/SQL function body
    return 'ONE:TWO:THREE:FOUR';To my (pleasant) surprise, this works very nicely. When column TWO is conditionally not rendered, its corresponding column heading is also skipped with no effort on my part. Nice.
    Question:
    Instead of "hard-coding" that string ONE:TWO:THREE:FOUR in the 2 places I mentioned above (checkbox item source and report heading), is there a way to access the "all values checked" version of that LOV item so that it will dynamically pick up the latest LOV changes? The way I have done it currently, if I change the named LOV, I need to also change those 2 places where I have hardcoded the values.
    Any ideas? Thanks

    Scott:
    I thought about that but the LOV has dozens of values, each with a verbose display value and a return value of the column name (upto 30 characters) and the display values are still being "worked on" by the users.
    So, the "all columns" string would be a big, unweildy string that would be hard to edit.
    It is much easier to edit, resequence and generally work with a Shared Component LOV defined as a Static LOV because you get that nice page (4000:4111) where you can read everything nicely formatted instead of a STATIC2:<big long string>!
    Can I have my cake and eat it too?!
    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 create Dynamic number of attachments in BPM Process ?

    Hi All,
    I have a requirement to create a dynamic number of attachments, as per need. I am aware of attachment.create() but i believe with this i can only create only the fixed number of attachments. Is there any way by which i can play around with create() api or is there any other API to fullfill the requirement??
    Any response is well appreciated.
    Regards,

    Hi,
    You can create the n-items in the region by creating items in the controller. i mena to see say by looping..
    Thanks,
    Kumar

  • Checkbox Item: character string buffer too small (APEX 4.0. - 4.2.)

    Hi all,
    I'm currently running the Oracle Application Express 4.0.2 on the Oracle DB 11g and thinking about the APEX upgrading to current 4.2. version. We have there quite big application used by the inernal employees so prior I need to test, if the migration will work.
    I installed the new server with database and the APEX 4.2. and import the current application. Everything seems to working good except few checkboxes, which returns me the error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small."
    LOV (Source) Code of Checkbox Item:
    SELECT email as display_value, id as return_value
    FROM users
    WHERE <some conditions>;
    In the current version 4.0.2. I get the checkbox item (total count of the rows approx. 650), but in the 4.2. I get this "string buffer too small" error and the page could not be rendered (if I add to the same query limitation: "rownum<242" it will display the item).
    Could you please help me with this issue? Any idea, what I should set up in the new APEX to get the same results or you see there any limitation, why it does not work in the new version, but in the old version the same SQL works fine?
    Thank you all in advance.
    Regards,
    Tomas.

    1007462 wrote:
    Hi all,Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your forum profile with a real handle instead of "1007462".
    I'm currently running the Oracle Application Express 4.0.2 on the Oracle DB 11g and thinking about the APEX upgrading to current 4.2. version. We have there quite big application used by the inernal employees so prior I need to test, if the migration will work.
    I installed the new server with database and the APEX 4.2. and import the current application. Everything seems to working good except few checkboxes, which returns me the error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small."
    LOV (Source) Code of Checkbox Item:
    SELECT email as display_value, id as return_value
    FROM users
    WHERE <some conditions>;
    In the current version 4.0.2. I get the checkbox item (total count of the rows approx. 650), but in the 4.2. I get this "string buffer too small" error and the page could not be rendered (if I add to the same query limitation: "rownum<242" it will display the item).
    Could you please help me with this issue? Any idea, what I should set up in the new APEX to get the same results or you see there any limitation, why it does not work in the new version, but in the old version the same SQL works fine?The total size of the HTML generated for an LOV-based item in APEX is restricted to 32K (this limit applies to every version). Why you are hitting this limit in the new instance may be due to differences in data or the database configuration (e.g. character set) rather than changes introduced in APEX.
    Is the data exactly the same? Is the database configuration the same? When you limit the number of rows so the checkboxes are displayed and view the page source, is there any difference in the HTML used to render the checkbox form elements between the two versions?
    That said, from a usability perspective 650 LOV options is rather a lot, and your application may very well outgrow this limit naturally in any version of APEX as more users as added. It is probably worthwhile thinking about other ways to display these options.

  • ADF triggering dynamic number of components

    I have a three-level View object dependency Category -> Class -> Subclass and want to create a dynamic form with the following logic:
    When user chooses a Category from drop down, page is updated with a number of Class drop-down lists presenting all the Subclasses - i.e. I have a dynamic number of selectOneChoice components depending on Category selection. Category to Class dependency is implemented with Category valueChangeListener querying Classes with category Id, Class to Subclass is simple View Link / tree value binding. Subclass value binding to backing bean is done with a HashMap.
    Does ADF faces framework let me re-create actual page components with partial page rendering (or some other mechanism)?
    I should fully re-generate all selectOneChoice components inside forEach every time user changes Category.
    My page components:
    <af:selectOneChoice value="#{bbean.category}"
    label="Category"
    autoSubmit="true" immediate="true"
    id="category" valuePassThru="true"
    valueChangeListener="#{bbean.categoryChanged}">
    <f:selectItems value="#{bindings.Categories.items}"/>
    </af:selectOneChoice>
    <af:forEach var="class" items="#{bindings.Classes.children}">
    <af:selectOneChoice value="#{bbean.subclass[class.id]}"
    label="#{class.name}"
    partialTriggers="category"
    id="class" valuePassThru="true">
    <af:forEach var="subclass" items="#{class.children}">
    <af:selectItem label="#{subclass.name}" value="#{subclass.id}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:forEach>
    The above code is a development from earlier less-complex UI. For all I've tried I cannot come up with the desired effect. When I change Category it doesn't affect sub- drop downs in any way. If I activate the Category valueChangeListener, Category change will cause validation phase null property exceptions:
    2.9.2008 14:05:40 com.sun.faces.lifecycle.ProcessValidationsPhase execute
    SEVERE: Error testing property 'null' in bean of type my.project.view.managed.Search$1
    javax.faces.el.PropertyNotFoundException: Error testing property 'null' in bean of type my.project.view.managed.Search$1
    ...

    John & Frank,
    Unfortunately enclosing layout component with partialTriggers="category" doesn't help - I've tried that already (panelgroup & panelpage, that is). Thanks for impressive response time though ;)
    Edit: Sorry, yes it helps! Thanks. The problem happens to be the HashMap value binding, it breaks up things after valueChangeListener refreshes the Class VO. After removing that the surrounding panelGroup does component refresh correctly. Back to drawing board..
    Erik
    Edited by: Erik Westerinen on Sep 2, 2008 5:26 AM

  • Dynamic action to change item label

    Hi All,
    How can I use dynamic action to change item label?
    thanks.

    Hi,
    fac586 wrote:
    Why and when do you want to dynamically change a label? This would have a detrimental effect on usability and accessibility.
    Consider a visually impaired user of your app using a screen reader. The screen reader identifies a checkbox labelled "Free Cake". They like the sound of that, so navigate to the checkbox to tick it. Your dynamic action fires when it gets focus and changes the label to "Give all my money to Fadi".I think this would confuse even a sighted user! I don't know the OP full requirements or constraints but I can bet the OP does not want to change the item label when the user navigates to it.
    I have to say that I don't like forms that change as the user enters data. I think that enabling and disabling fields is OK, but not hiding or showing or changing labels or field types.
    In any case, if you have to do it, an alternative to changing an item label is to have 2 separate items: one hidden and one shown. Then, using some triggering event, you can hide one and show the other.
    Because there are built-in dynamic actions to hide and show items but not to change item labels, one might thing that one approach is more acceptable than the other. However, if those 2 separate items occupy the same spot in the page, from a user point of view (or screen reader for that matter) I don't see any difference between those two approaches (in my view, both bad practices.)
    And because of its lots of nested tables, lack of headings etc, apex pages are not screen-reader friendly anyway... This is an interesting plugin for firefox that shows how your page would be read by a screen reader:
    http://www.standards-schmandards.com/projects/fangs/
    fac586 wrote:
    You can use an "execute javascript" dynamic action type to do it.Yes, you can. But should you?I don't know. As I mentioned above, I don't like the idea. However, as I also mentioned above, I don't know anything about the OP constraints or requirements.

  • Dynamic List of Checkboxes and their Default Values

    Hello,
    I have spent more than five hours feebly attempting to figure out how to make a dynamic list of checkboxes (using an LOV) adhere to the values in the database which those checkboxes represent. The LOV itself works; I can get a nice list of checkboxes with the appropriate names, but I can't get HTML DB to check the boxes that have a value of 'Y' in the database. The code for my LOV follows:
    SELECT mesg_name n, mesg_id r
    FROM notifications
    WHERE mesg_id = (SELECT mesg_id
                      FROM subscriptions
                      WHERE upper(network_id) = upper(:APP_USER))Since this is a dynamic list of checkboxes, I obviously cannot use the "Label" property to set the labels of each checkbox. That is what n is in the query above. r is the unique ID of the message (a varchar2) that I will need to pass back to the program after the page is submitted by the user for processing. I cannot take up the value field of the checkbox with a "Y" or something as equally vague. The ID of the subscription that the user is subscribing to or unsubscribing to must be passed back to the program so the appropriate modifications to the database table can be made.
    I would most appreciate it if anyone could lend assistance.
    Thank you,
    Marc Weil

    Marc,
    I think I see what you're trying to do. You'll have to separate process that renders the LOV as a series of check boxes from the process that sets the checked values for each user.
    Before the LOV is rendered on a page, make sure you set the session state value of the LOV item to a colon separated set of IDs based on your query:
    SELECT mesg_id
    FROM subscriptions
    WHERE upper(network_id) = upper(:APP_USER)
    If you have trouble, let me know, I'll try to come up with an example.
    Sergio

  • Dynamic Population of List Item Not Working

    My requirement is to have 1 list item that is populated based on the value selected for a second list item. in the when-list-changed trigger of the second list item, i make a call to a procedure (code below). This seems to not like any of the clear_list or populate_list. the list item type is poplist. i set the class to list. if i use populate_list in when-new-form-instance, there's no problem. PLEASE HELP. When can't I populate list using a procedure??
    ERROR: frm-40734 internal error pl sql error occurred
    PROCEDURE Refresh_List IS
    v_rg_name VARCHAR2(40) := 'RGTEST';
    v_rg_id RecordGroup;
    v_sql varchar2(2048);
    problem EXCEPTION;
    status number;
    list_id item;
    BEGIN
         list_id := Find_Item('BLK_TEST.LST_TEST');
    v_sql:='select column_name from sys.all_tab_columns where table_name=''testtable''';
                   v_rg_id := Find_Group( v_rg_name );
                   IF Not Id_Null(v_rg_id) THEN
                             DELETE_GROUP( v_rg_id ) ;
                   End if;
                   clear_list(list_id);
                   v_rg_id := Create_Group_From_Query( v_rg_name, v_sql ) ;
                   status := Populate_Group( v_rg_name );
                   POPULATE_LIST(list_id, v_rg_id);
                   POPULATE_LIST('BLK_TEST.LST_TEST', 'RGTEST'); also tried this.
                   if status <> 0 then
                             raise problem;
                   end if;
              EXCEPTION
                   WHEN problem THEN
                             message('problem.');
                   WHEN others THEN
                             message('tooto');
    END;

    Thanks for the response. I've tried this example too and it still doesn't like the things mentioned in previous post. In addition, it doesn't like SET_RECORD_PROPERTY(:system.cursor_record,'EMP',status,new_status); I get the same sort of error. The form compiles fine though.
    Background on form:
    this form was created to allow users to dynamically build an update statement. On this form are a number of list items and text boxes that are not populated from a database. So the datablock doesn't retrieve values from the database and the only updating that will be done is when the user clicks an "update" button to execute the sql statement that is built. Could this issue I'm having be related to the way i designed my datablock and items? When the user selects an item from one of the list items, the record status goes to "Changed". So I assumed my issue was because of this and thought the set_record_property statement would help...but that is generating the same error. what am i missing? if i look at the index value of the record group after create_group_from_query, it is -1. after populate_group, it is still -1. should it still be -1?? any help is greatly appreciated.

  • 57F4 challan print - getting parent item no and po number for child item

    Hi ,
    In 57F4 challan, Subcontract components - i.e Child items are used for creating the challans.
    However while printing needs the parent item no with the purchase order number for that child item number.
    It is getting stored in RM07M structure.
    Any inputs / suggestions how to retrive parent item number and purchase order number for child item i.e for subcontract items?
    Thank you .
    Prasad.

    Thank you for the reply. I checked the table RSEG table for material document and PO details, however the RSEG gets populated when there is credit or debit entries.
    In this 57F4 challan there is no credit or debit enteries hence would not get in RSEG table.
    Appreciate your inputs for any other alternative.
    OR is there any table or Function Module to get the enteries of the struture of RM07M .

  • Restriction on number of line items in an automatically generated document

    Hi all,
    As per my info, an accounting document must have a minimum of 2 line items to complete the document. At the same time an accounting document can have a maximum of 999 line items.
    My observation:-
    When I am posting depreciation using t-code AFAB, system is posting depreciation document (document type AF). While checking, I found that the system has posted around 16 document for a period.
    On further checking, I observed that the each document contains a max 100 line items.
    I am using SAP 4.7
    My Query:-
    a> Is there any way / place wherein we can restrict the maximum number of line items possible for a given docuemnt type or for all document types in the client?
    b> In case it is not possible to restrict the number of line items per document, what could be possible reason for the system behaviour wherein it is posting about 100 line items per document & thereafter starts a new document.
    Thanking you in advance
    Santosh K Agarwal

    Hi,
    I have been reading CIN. There I came across with a statement i.e. "There is restriction on no of line items to be in an Excise Invoice".
    where you read this i dont know
    but yes for outgoing excise invoice we can put limitation in sap cin
    as per incoming excise invoice i think no  limitation
    in path SPRO-tax on goods movemnet-India-basic setting-maintain excise registration here you can maintain this
    and yes this for india only for other country they may have different
    Regards
    Kailas ugale

  • Number of line items in each Invoice

    Hi Gurus,
    I have one requirement
    i need to display one column in the Report i.e. "Line items per eachinvoice" which should give the number of line items per that Invoice
    when iam using tcode 'FB03' at ECC - Document Display it is giving
    for Doc 1111 - 2 line items
    for Doc 2222 - 12 line items
    so in the report that column should display
    2 for Doc 1111
    12 for Doc 2222
    please guide me how to do this
    Thank you

    create a formula with constant 1
    and set the exception aggregation as Total, and set the reference char as Line Item.
    Make sure you have Invocie in the report.
    - Danny

  • How to count number of checkboxes selected from a table in sapui5

    Hi
    I have a table in which one of the column is checkbox.
    Now user can check 'n' number of checkboxes in the same column.
    So now i need to count the number of checkboxes selected in that column.
    how to do that..??
    Please help me on this.
    Thanks
    Sathish

    Hi Sathish,
    If you are using table mean surely you are binding the table to some model like JSON model. You can bind the checked value of the column with the checkbox in the template. So while checking you can directly check the property by taking the reference from the model. Navigate through all the objects in the model and check  the property you wanted.
    This is the logic I have used to get the checked property form the table column. My table id is "tableId" and it is being binded with "/tableModelData" of json model.
      var myModel = sap.ui.getCore().getElementById("tableId").getModel().getProperty("/tableModelData");
      for(var i= 0 ; i< myModel.length ; i++)
      var singleObject = myModel [i];
      if(singleObject.checked ==  true){
    your logic.

  • Maximum number of line items in sales order

    hi,
    Is there a limit on the maximum number of line items that are permitted in a sales order?
    Thanks,
    Shailaja

    Hi
       I think the correct reply would be 999,999 because data type of item number POSNR is NUM 6, which means that it can hold upto value 999,999.
         However, at the same time keep the following into consideration:
    1. FI document has a restriction of 999 line items per document. So, depending on the account settings, there will be a lower limit. E.g. if each Sales order line item results in 2 line items in the accounting document, then the max. no. of SO line items is limited to 499.
    2. If FI summarization is active, then the system summarizes the account postings, thus reducing the no. of FI line items. Hence, a SO can accomodate more than 999 line items. However, this means that certain line item level details will not be available to the Finance guys (which they may not like).
    3. As the number of line items in a Sales order increases, the system performance suffers greatly. There are performance fixes available, but in general, it is painful to load a SO with large no. of line times through BDC's. 10 Sales orders with 100 lines each consume less system resources than 1 Sales order with 1000 lines.

  • Number of Line Items Issue at the time of Payroll posting

    Dear All,
    While creating a posting document (Payroll posting) for FI, the maximum number of line item allowed is 999 where as I have 1464 line items. I am creating only one document based on Company code and it is giving me the following error, which is because of number of line item;
    Acct determination not defined for trans. HRA 1002  in chart of accts AGCA
    Message no. F5113
    Diagnosis
    An automatic posting cannot be created because the account determination for transaction HRA with keys 1002  is not defined in chart of accounts AGCA.
    System Response
    The document cannot be posted.
    Procedure
    Depending on the type of processing, you can hold the document and post it later. If this is not possible and the error cannot be eliminated straightaway in customizing, you must leave processing and enter the document later.
    Procedure for the system administrator
    Correct the account determination for the specified transaction. Proceed
    Please tell me how to create least amount of documents for posting?
    Regards.

    SPRO> payroll >Reporting posting payroll result to Accoutning > Activities in Account system >Assigning Accounts >Assign Technical accounts
    Here eneter 1001 payroll clearing account and next enter 1002 same payroll clearing account. by doing this it will allow document splitting.

Maybe you are looking for