dynamic checkboxes

Hello

I created a few dynamic checkboxes like the code below: -.

Key enumeration = hContacts.keys ();
int i = 0;
While (Key.hasMoreElements ())
{
            
String strKey = (String) key.nextElement ();
System.out.println ("key-->" + strKey);
String strValue = (String) hContacts.get (strKey);
System.out.println ("value-->" + strValue);
HFM [i] = new HorizontalFieldManager();
[i] = new CheckboxField chk (strValue, false);
SF [i] = new SeparatorField();
HFM [i]. Add (CHK [i]);
HFM [i]. Insert (CHK [i]);
i ++ ;
}
      
                 
VFM VerticalFieldManager = new VerticalFieldManager();
for (int j = 0; j)<>
{
VFM. Add (HFM [j]);
VFM. Add (SF [j]);
}

This.Add (VFM);

Now clicking on a button, I wanted to get the selected checkboxes any body can help me how to deal with this.

Thank you & best regards

As you code indicates you have check boxes in the table and you can use the array index itself as id.

Tags: BlackBerry Developers

Similar Questions

  • Help with dynamic checkbox of database results

    Hello

    I create dynamic checkboxes based on a read to sqlite database.  I am able to get the data and the number of boxes is being created, but I'm having a problem populating the labels from the boxes.  This is the section of code that gets the results of the database and creates the boxes.

    Table of results: var = stmt.getResult () .data;

    for each (var obj:Object in the result)

    {

    var cb:CheckBox = new CheckBox();

    CB.label = obj.toString ();

    cb.setStyle ("color", 0x00593B);

    cb.setStyle ("symbolColor", 0x000000);

    container.contentGroup.addElement (cb);

    }

    Neil

    For me, this has been answered on another forum.

    The line cb.label = obj.toString ();

    needed to be replaced by data.

    CB.label = obj.myDatabaseFieldName;

    myDatabaseFieldName would be the column you extract data from and should be the actual name of the table.

    Neil

  • How to get the value of a dynamic checkbox?

    Hello

    I created a report with the following region.
    SELECT 
         apex_item.checkbox(1,employee_id) " ",
         employee_name,
         status
    FROM employee 
    WHERE parent_id IN (
            SELECT employee_id FROM employee WHERE username=lower(:APP_USER))
    I have a button that include the selected employees. I wrote the following code, but when I pressed the button it gives the error "the requested page is not found.".

        BEGIN
        FOR i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
           UPDATE employee
           SET selected = 'Y'
           WHERE employee_id = to_number(APEX_APPLICATION.G_F01(i));
        END LOOP;
       COMMIT;
       END;
    The problem with the code above, because when I write another process to this button, it works. Thanks for the replies.

    Hello

    Problem was that column type is "simple check box", even, you have used APEX_ITEM to generate.
    Column type must be "standard report column.

    Now the page gives no error "the requested page is not found." When you submit the page, and a checkbox is checked.
    In apex.oracle.com process crashes now table emp having no column TICKED.

    Kind regards
    Jari

  • Dynamic checkboxes filling

    I'm hung up on how to fill out the box on an update. What I have is a list of options that apply to a workorder with a foreign key related to the ID of the extra. What I'm trying to understand is how to check if it is in the DB of the workorder to update foreign key column. The first query works fine on the initial INSERTION and the second query displays only the original extras. Is it possible to combine or use a statement indicates?

    "< name cfquery ="ExtrasUpdate"datasource =" "#DataSource #" username = "#dbUserName #" password = "#dbPass #" >
    SELECT ID, name FROM HVAC_extras WHERE ID IN (#SESSION. HVAC. ExtrasID #)
    < / cfquery >

    "< name cfquery ="Extras"datasource =" "#DataSource #" username = "#dbUserName #" password = "#dbPass #" >
    SELECT * from HVAC_extras
    ORDER BY ID
    < / cfquery >

    < cfoutput query = 'Extras' >
    < table width = "98%" border = "0" cellspacing = "2" cellpadding = "2" >
    < b >
    < td width = "9%" >
    < cfinput type = "checkbox" name = "Extras" value = "' #Extras.ID # ' ticked 'no' = >"
    < table >
    "< td width ="91% "> < a href="/WorkOrders/data/extras.cfm?ID=#Extras.ID# "target ="_blank"> #Extras.Name # < /a >
    -#DollarFormat (Extras.Price) # < table >
    < /tr >
    < /table >
    < / cfoutput >

    Thanks for any help.
    I hope that makes sense!

    You CAN use and always get what you want:

    Aside1: if you already have the extras to the workorder id
    in question stored in SESSION. HVAC. ExtrasID (probably as a
    comma-separated list), then you should not at all of your request to ExtrasUpdate.

    Aside2: instead of out an entire table for each Extra, why
    don't you move the to the INSIDE of the

    ,
    If you export separate for each extra within the same lines a table?

    Try this:


    password = "" #dbPass # ">"
    SELECT * FROM HVAC_extras ORDER BY ID;















    target = "_blank" > #extras. Name #-#DollarFormat (Extras.Price) #.

    --

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com

  • Dynamic checkbox

    I have a recordset that returns 2 folders and I need to display 15 check boxes that are coded by hand. If one of the two values correspond to one of the box, I need to disable this check box and move on to the next

    the problem with the attached code is it turns off the first box T-03, but he don't not disbale T-06 is in the recordset that returns T-03, T-06

    any ideas?

    > I have a recordset that returns 2 records

    Try a slight variation...


    .. disabled...

  • Dynamic box of database results

    Hello

    I create dynamic checkboxes based on a read to sqlite database.  I am able to get the data and the number of boxes is being created, but I'm having a problem populating the labels from the boxes.  This is the section of code that gets the results of the database and creates the boxes.

    Table of results: var = stmt.getResult () .data;
                    
    for each (var objobject result)
    {
    var cb:CheckBox = new CheckBox();
    CB.label = obj.toString ();
    cb.setStyle ("color", 0x00593B);
    cb.setStyle ("symbolColor", 0x000000);
    container.contentGroup.addElement (cb);
    }

    Neil

    Hello

    normally, your "obj" is dynamic and must contain a property with the column you want to display from DB in the label of the cb. (I do not this template, so not sure...)

    So, you should try:

    CB.label = objthe_column_name

    If you want a label based on more than 1 column, you can replace the method. toString(), by using a specific class to manage your ValueObject (instead of object).

  • The dynamic expandable boxes - select all / deselect all

    I have dynamic checkboxes in a Repeater.

    I want to create a button to select all and clear all who will select each box and uncheck each box respectively. I'm hitting a wall.

    Here is the code in the box:
    < mx:Button id = "subCatButtonSelect" label = "Select all" click = "selectAll (); "/ >
    < mx:Repeater id = "subCategoryPickerList" >
    "< mx:CheckBox id = data =" {subCategoryPickerList.currentItem.subCategoryID "subCategoryCheckbox"} "label =" {subCategoryPickerList.currentItem.name} "width ="175"/ >
    < / mx:Repeater >

    Here's what I have to select all, which currently does not work:

    private void selectAll (): void {}
    var idx:int;
    var len:int = subCategory.length;
    for (idx = 0; idx < len; idx ++) {}
    subCategoryCheckbox [idx] .selected = true;
    }
    }

    "Subcategory" is a collection of ArrayCollection providing data for each checkbox.

    Any help is appreciated! Thank you very much!

    Hello Tracy,.

    Thanks for the reply...

    In fact, I got this working yesterday. I'm not sure how or why it suddenly started to work, but I did the test you suggested (subCategoryCheckbox [0] .selected = true; a button) and debugged/tested all the individual lines of the function, and it separated. (Yes, the dataProvider for the Repeater is assigned elsewhere - good question however).

    Thanks again for your help!

  • Cabinet collapse functionality does not.

    Hello

    I use jdeveloper 11.1.1.6.

    I have a requirement where I need to display info from different agencies. Lets say if I pass id of entity, it will return all organizations related to it. And I display dynamic checkboxes based on a response. For example, if it returns only agencies 2A and B, only these two checkboxes with Source (all organizations by default) system will be displayed. If you select the check box for the Agency, only that agency info gets appear. Until this game, it works fine.

    Example of boxes:

    (Sourcesystem) CheckBox1, CheckBox2 (A) CheckBox3 (B) CheckBox4 (C)

    The news of the Agency appears in panelBoxes. as

    < (non folding) af:panelBox >

    < af:panelBox for X (retractable) >

    < af:panelBox >

    < af:panelBox for Y (retractable) >

    < af:panelBox >

    < af:panelBox (retractable) z >

    < af:panelBox >

    < af:panelBox >


    If you select Source system in the box, all are working properly, the Panel boxes are reduction and development. If you select the check box or box B, the reduction feature works, but expand does not work. I know it's pretty weird. If anyone has experienced the same problem and found a solution, please help me.

    In one sentence, the reduction panleBox feature (also tried showDetailItem) doesn't work the way it is supposed to work. any help is appreciated.

    Thank you

    Stéphane

    Please try with instead of . Hope this works

  • Dynamic Action condition javascript checkbox.checked count &gt; 0

    Hi all

    I'm stuck with a condition of the dynamic action. I have the following:

    $("#P302_COMPANY").val () .length > 0 & & ($("#P302_DEPARTMENT").val () .length > 0 | $("#P302_PRODUCT").val () .length > 0 | $("#__P302_INDUSTRY__").val () .length > 0)

    What would be nice if all items were areas of text, but P302_PRODUCT and P302_INDUSTRY are the lists box, and I want to check if 1 or more values in the list are checked... but I can not work how to do it... any ideas?


    Thank you

    TSD

    Hi Tod

    then three is still fair to say if the element has a checked value?

    Yes, but not straight forward.  You need a javascript routine that traverses the dom looking for items of type box to the appropriate div, and then, for each item in the loop, set a flag if the checkbox is set (assuming that you only 1 of the total updated check).

    Another way would be to create a hidden page element, say P302_PRODUCT_CHECKED, then put a dynamic action on the element of the page P302_PRODUCT with the onclick event and a condition that if the box return value is not null, then the real event will mark the beginning session state (PL/SQL Expression - apex_util.set_session_state) and the value for P302_PRODUCT_CHECKED to say 'Y '.  You would need a false event to set P302_PRODUCT_CHECKED to null if the checkbox is not set. You can then test #P302_PRODUCT_CHECKED == 'Y '.

    Concerning

    Paul

  • How do I select the checkbox in a dataGrid created dynamically by program

    How do to select the checkbox everything programmatically in a dataGrid created dynamically as shown below
    <! [[CDATA
    Import mx.controls.dataGridClasses.DataGridColumn;
    Import mx.collections.ArrayCollection;

    Import mx.controls.DataGrid;
    Import mx.controls.CheckBox;

    [Bindable]
    private var dtGrid:DataGrid;
    [Bindable]
    private var chkBox:CheckBox;

    [Bindable]
    private var peeps: ArrayCollection collection;

    private function init (): void
    {
    friends = new ArrayCollection();
    peeps.addItem ({firstName: "Beautiful", lastName: "Dude", age: 24 gender: "male"});
    peeps.addItem ({firstName: "Red", lastName: "Dude", age: 25 gender: "male"});
    peeps.addItem ({firstName: "Top", lastName: "Guy" of the age: 25 gender: "male"});
    peeps.addItem ({firstName: "Cute", lastName: "Girl", age: 24, sex: "female"});
    peeps.addItem ({firstName: lastName "to"hot,":"Chick", age: 24, sex:"female"});
    peeps.addItem ({firstName: lastName "Lazy",: "The man", age: 25 gender: "male"});

    var dataGridColumn:DataGridColumn = new DataGridColumn("");
    dataGridColumn.itemRenderer = new ClassFactory (CheckBox);

    dtGrid = new DataGrid();
    dtGrid.dataProvider = friends;
    this.addElement (dtGrid);

    var tempColArray:Array = new Array();
    tempColArray [0] = dataGridColumn;

    for (var i: int = 0; dtGrid.columns.length > i; ++ i)
    {
    tempColArray [i + 1] = dtGrid.columns [i];
    }

    dtGrid.columns = tempColArray;
    dtGrid.invalidateDisplayList ();
    }
    []] >
    Thanks and regards,
    Kake

    You might be better off working examples of CheckBox DataGrid on my

    blog

    --

    Alex Harui

    Flex SDK Team

    Adobe System, Inc..

    http://blogs.Adobe.com/aharui

  • Add a dynamically created checkbox in DataGrid

    Rquirement: Add a dynamically created checkbox in the first column of a dynamically created a DataGrid .
    Note: The dataprovider of the DataGrid is a collectible arraycollection, which is populated by tables in the database. Therefore, whenever the DataGrid columns can varry depents on the table.

    The code below would work for you. Please give it a try.

    Import mx.controls.dataGridClasses.DataGridColumn;
    Import mx.collections.ArrayCollection;
               
    Import mx.controls.DataGrid;
    Import mx.controls.CheckBox;
               
    [Bindable]
    private var dtGrid:DataGrid;
    [Bindable]
    private var chkBox:CheckBox;
               
    [Bindable]
    private var peeps: ArrayCollection collection;
               
                
               
    private function init (): void
    {
    friends = new ArrayCollection();
    peeps.addItem ({firstName: "Beautiful", lastName: "Dude", age: 24 gender: "male"});
    peeps.addItem ({firstName: "Red", lastName: "Dude", age: 25 gender: "male"});
    peeps.addItem ({firstName: "Top", lastName: "Guy" of the age: 25 gender: "male"});
    peeps.addItem ({firstName: "Cute", lastName: "Girl", age: 24, sex: "female"});
    peeps.addItem ({firstName: lastName "to"hot,":"Chick", age: 24, sex:"female"});
    peeps.addItem ({firstName: lastName "Lazy",: "The man", age: 25 gender: "male"});
                      
    var dataGridColumn:DataGridColumn = new DataGridColumn("");
    dataGridColumn.itemRenderer = new ClassFactory (CheckBox);
              
    dtGrid = new DataGrid();
    dtGrid.dataProvider = friends;
    this.addElement (dtGrid);
                      
    var tempColArray:Array = new Array();
    tempColArray [0] = dataGridColumn;
    for (var i: int = 0; dtGrid.columns.length > i; ++ i)
    {
    tempColArray [i + 1] = dtGrid.columns [i];
    }
                      
    dtGrid.columns = tempColArray;
    dtGrid.invalidateDisplayList ();
    }
    ]]>

  • CheckBox group in dynamic LOV-based form

    I try to add a set of check boxes to a form and have problems to get the data incoming or outgoing check box group. I try to use the check boxes to view the transactions that are affected by a specific notification. The table relation is a number to-many between the REG_NOTIFICATION and MISC_VALUES tables with the table NOTIFICATION_LINK providing the link-to-many. I've defined something (P950_REG_TRX) on the form as a checkbox and connected to my named dynamic LOV. The LOV source is:

    SELECT DISTINCT MISC_VALUES_DESC display_value, MISC_VALUES_CODE return_value
    of MISC_VALUES
    WHERE MISC_VALUES_CODE_TYPE = 'REG_TRX. '
    order by 1

    and he correctly generates the boxes with their labels. So far, so good!

    I've set up a page called GET_REG_TRX rendering process. It is an anonymous PL/SQL block and looks like:

    declare
    as_check_box htmldb_application_global.vc_arr2;
    I integer: = 1;
    Start
    for r in (select MISC_VALUES_SEQ_ID
    of NOTIFICATION_LINK
    where NOTIFICATION_SEQ_ID =: P950_NOTIFICATION_SEQ_ID) loop
    as_check_box (i): = r.MISC_VALUES_SEQ_ID;
    i := i 1;+
    end loop;
    +: P950_REG_TRX: = htmldb_util.table_to_string (as_check_box, ' :');) +
    end;

    When I run the application, the form fills correctly except for the boxes. They remain empty. I checked the State of Session data and P950_REG_TRX contains a set of colon delimited numbers that correspond to the data in the MISC_VALUES table. So why not showing that the checked checkboxes? _

    I also added a page that deals with the process for updating the database when the boxes were changed. It is also not update the NOTIFICATION_LINK table. Here's the source for the process:

    declare
    as_check_box htmldb_application_global.vc_arr2;
    Start
    delete from NOTIFICATION_LINK where NOTIFICATION_SEQ_ID =: P950_NOTIFICATION_SEQ_ID;
    as_check_box: = htmldb_util.string_to_table (: P950_CHECKBOX, ' :');)
    because me in 1.as_check_box.count
    loop
    insert into NOTIFICATION_LINK (NOTIFICATION_SEQ_ID, MISC_VALUES_SEQ_ID)
    values (: P950_NOTIFICATION_SEQ_ID, as_check_box (i));
    end loop;
    end;

    The part of the removal of this process works, but not the part of the update.  So, what's the problem here?

    I'd appreciate any help I can get on it.

    BTW - I followed the instructions clearly written in Simple HTML-DB Oracle Application Express of the Rampant to this day.

    Hello:

    What is the point of process for the page process that fills the box run? Make sure it is before that regions are rendered.
    In the post send process page reference you a page named 'P950_CHECKBOX', element while in the rendering of page-process page, you reference the item "P950_REG_TRX". Which of them is the checkbox element?

    CITY

  • dynamic action if checkbox is enabled

    Hello

    I've created a report with a checkbox for each line

    Select apex_item.checkbox(1,sid,'UNCHECKED') "",

    user name,

    SID,

    Serial No.,

    status,

    program

    session $ v

    where username in (select uname vtb.al_anwender)

    Now, I want to execute a statement to kill session checkbox if (one or more) is enabled.

    How can I identify the sid and serial # checked lines?

    Thank you very much

    Concerning

    Christian

    mediap wrote:

    Hello

    I changed the immediate execution of an insert query to see if the value of var kill_ddl is correct.

    but the rows in the ksess table looks like

    alter system kill session '% session_uid % '.

    a record for each session wheter that the checkbox is checked or not.

    is there something wrong with referncing the session_uid variable?

    Sorry, missing a setting in there. I have now fixed.

  • Dynamically add a checkbox to HGrid and accessing the controller

    I wonder if it is possible to add a column of checkboxes to a HGrid, and then access the method processFormRequest of the controller?  I would avoid the modification/extension of the page itself and or the view object and make all changes to just the extension of the controller.

    I add the boxes without problem, but I can't seem to understand how to access during an iteration through the lines of HGrid with OAHGridQueriedRowEnumerator.  In my view, that the question is because the boxes that I created are not related to the view object associated with the HGrid.  I didn't add them to the HGrid like this:

    Private Sub addCheckBoxes (OAHGridBean hGridBean,

    {OAPageContext oapagecontext)

    oapagecontext.writeDiagnostics (sModule, ' adding Checkboxes. ",")

    OAFwkConstants.STATEMENT);

    OACheckBoxBean = boxBean

    (OACheckBoxBean) createWebBean (oapagecontext, OAWebBeanConstants.CHECKBOX_BEAN,

    (NULL, "xxSelectBox");

    boxBean.setID ("xxSelectBox");

    boxBean.setUINodeName ("xxSelectBox");

    boxBean.setChecked (true);

    boxBean.setLabel ("Print");

    boxBean.setName ("xxSelectBox");

    hGridBean.addIndexedChild (0, boxBean);

    }


    But when I check the attributes of line in the method procesFormRequest of the controller, it does not attribute my newly added check boxes. Should the boxes be linked to a display object to enumerate the values? They are not related to something on the backend, they contain only the interactive user data during the presentation of the page. I have to add an attribute to the view to the HGrid for my new UIComponent? How would I do that?

    I answered my own question. The HGrid I have access has three your (or three levels). Parent, child of the Parent and child child.  For some reason, in processRequest, child to child VO had not been linked or executed. I was able to link and run, then access to VO remaining as follows:

    for (WOLParentWorkOrderVORowImpl parentRow = (WOLParentWorkOrderVORowImpl) parentVO.first ();)
    parentRow! = null;
    parentRow = (WOLParentWorkOrderVORowImpl) parentVO.next ()) {}

    Ri RowSetIterator (RowSetIterator) = parentRow.getWipEntityIdParentWorkOrderVO ();
    ViewObject childOfParentVO = ri.getRowSet () .getViewObject ();

    If (childOfParentVO.lookupAttributeDef ("xxSelectForPrint") == null) {}
    childOfParentVO.addDynamicAttribute ("xxSelectForPrint");
    }

    Boolean bExec = childOfParentVO.isExecuted ();
    If (! bExec) {}
    childOfParentVO.setWhereClauseParam (0, ");
    childOfParentVO.setWhereClauseParam (1, "");

    ...
    childOfParentVO.executeQuery ();
    }

    Lines should have child children VO
    for (WOLChildWorkOrderVORowImpl childRow = (WOLChildWorkOrderVORowImpl) childOfParentVO.first ();)
    childRow! = null;
    childRow = (WOLChildWorkOrderVORowImpl) childOfParentVO.next ()) {}
    RowSetIterator ri2 (RowSetIterator) = childRow.getWipEntityIdWOLChildWorkOrderVO ();
    ViewObject childOfChildVO = ri2.getRowSet () .getViewObject ();
    If (childOfChildVO.lookupAttributeDef ("xxSelectForPrint") == null) {}
    childOfChildVO.addDynamicAttribute ("xxSelectForPrint");
    }
    }
    }

  • dynamic action with checkboxes

    DB 11gxe and apex 4.0,

    Hi all

    I want to do,

    If the check box selected

    then

    do something; -set a value of another element, for example

    elsif unchecked

    then

    Delete the value of the item;

    end if;

    How to say (checked and unchecked) in the code?

    Newbi_egy

    Check out this demo

    On the left, the parameters of the dynamic action are listed.

    Use the condition equal to the checked valuevalue.

    Real actions are the action that will run when the check box is selected.

    The false actions will run if the check box is cleared.

    Nicolette

Maybe you are looking for

  • Ask a question

    I can't ask a question in the support communities because my computer continuously backs up automatically.  If I try to remove the automatic record or retrieve the automatic backup, once I submit my question, I get a message saying "You are not allow

  • Apple TV in France

    Hi, I would buy an apple tv in the United Kingdom, but give it as a gift to my parents who live in France... it would work? Thank you

  • Networking Social MOTOBLUR is wrong.

    I just got my phone in the mail today, and when I originally turned it, he already had a Motoblur account on it, so I did a reset of the phone together and created my own account. No problem. Once I have create my account, however, the only options I

  • HP Deskjet D4160: HP D4160 - '' filter' impossible' error message

    I got my printer unplugged for a few days.  After plugging back in, I can't print - I get this error message: ' filter ' ' failed.  The test print works.  The printer appears in printers/scanners.  What should I do?

  • Installation of Simulator PlayBook: result::failure-9?

    Hi all, I converted using the plugin Eclipse of BB android application (Version: 1.0.2.201112120946), and I try to install in the Playbook Simulator (version: 2.0.0.7109). However, during the installation process, I see the following error message: I