Checkbox selection

Hi All,
I am trying to read a text file and add the checkboxes dynamically to all the lines.This is working fine, but after checkbox is created I want to uncheck some prechecked checkboxes and save all the checked items in a arraylist but not able to do so because I am not able to access the checkbox array outside the createCheckBoxes function. Program can be run by calling this from a main method and behaviour can be seen. Not sure wat is going wrong??Please help me in this.Thankx a lot!
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import javax.swing.*;
import javax.swing.JCheckBox;
* @author Administrator
public class outputstep4  extends JFrame{
private JButton submit;
JCheckBox[] checkBoxes;
JPanel Q1_Panel;
//JCheckBox check1;
//private JCheckBox check;
//private ButtonListener buttonlistener;
//private checkBoxActionListener checkBoxActionListener1;
ArrayList<String> output1 = new ArrayList<String>();
public outputstep4() {
ArrayList<String> clist2 = new ArrayList<String>();
     //reading the output file of step4 i.e. step4_out
     try{
               FileReader fr = new FileReader("C:\\step4_out.txt");
               BufferedReader br = new BufferedReader(fr);
               String ch;
               while((ch = br.readLine())!=null)
                                 clist2.add(ch);
               fr.close();
               br.close();
     }catch(Exception e){ e.printStackTrace();}
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container content = getContentPane();
     Q1_Panel = new JPanel(new GridLayout());
    Q1_Panel.setPreferredSize(new Dimension(587,20));
    Q1_Panel.setOpaque(false);
createCheckBoxes(clist2, checkBoxes);
for(int t=0;t<clist2.size();t++){
System.out.println("blabalann"+checkBoxes[t]);
submit = new JButton("submit");
submit.addActionListener(new SubmitButtonListener());
    Q1_Panel.add(submit);
    content.add(Q1_Panel, BorderLayout.CENTER);
    setSize(600, 50);
    setVisible(true);
private void createCheckBoxes(ArrayList<String> clist2,JCheckBox[] checkBoxes) {
        int count1 = clist2.size();
        for(int i=0; i<count1; i++){
         String name11 = clist2.get(i);
             System.out.println("Creating checkBoxes");
             //Create checkbox
             JCheckBox check1 = new JCheckBox(name11,true);
            checkBoxes = new JCheckBox[count1];
        checkBoxes[i] = check1;
         System.out.println("testing"+checkBoxes);
Q1_Panel.add(checkBoxes[i]);
Q1_Panel.validate();
private class SubmitButtonListener implements ActionListener
public void actionPerformed(ActionEvent e)
System.out.println("blabalann"+checkBoxes[0]);
if (checkBoxes[0].isSelected())
System.out.println("blabalann");
else System.out.println("aaaaaaaaaaaa");
Edited by: apap123 on Aug 26, 2010 11:30 PM
forgot to mark it as question??                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

1. Learn how to correctly and consistently indent your code.
2. You are creating the array inside the loop, so it only ever has one non-null element.
db

Similar Messages

  • I want to sync my Voice Memos but iTunes 10.5 will not let me even with the "include voice memos" checkbox selected.

    I want to sync my Voice Memos but iTunes 10.5 will not let me even with the "include voice memos" checkbox selected. As well Ive deselected all the music in itunes so when I sync there will be none on my phone but itunes also ignores this request and puts purchased music back on. I do not have autofill selected. Also wondering where the backup of my iphone 4s is located on my hard disk. Any help greatly appreciated.

    Sorry thats itunes 11.5

  • 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.

  • Making checkbox selections/options visible on the request details and email notification details -FIM 2010 R2

    How do I make the checkbox selections made by users in FIM RCDC visible on the email notifications and on the request details on the request in the portal?
    Phina

    Congrats to Wim on a great article!
     Forefront Identity Manager Technical Guru - October 2014  
    Wim Beck
    Event Driven Scheduling of Forefront Identity Manager (FIM) using a Windows Service
    Ed Price: "Fantastic job on formatting, the code, and all the explanations! The TOC and References are a nice touch!"
    PG: "Nice innovative solution, that is a nice add-on to existing solutions. " 
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • How to identify multiple checkbox selected in JSF

    Hi All,
    My scenorio is.
    I am diplaying records on page using <h:dataTable>
    I have one column in dataTable which contains checkboxes which I displayed as,
    <h:selectBooleanCheckbox id="abc" />
    Also I have button on page.
    I want to select 2 check boxes & then click onto button then that 2 records should get deleted.
    how to identify that 2 checkbox selected ?
    can anybody help ?
    Thanks
    Sandip

    Hi BalusC
    Thanks for your reply.
    Is there any other approach to do this ?
    because as per your approach my code will not work because you are using seperate bean.
    If i try to compare your code with my code then I have to do changes in my entity bean which is not possible.
    So is there any other way ,
    If I want select more than 1 checkbox & delete those records of selected checkboxes .
    i.e. I want to find which checkboxes selected on JSP page sothat I will get those selected value on Java side & will delete that record from java side.
    Please help.
    I am not finding any solution to this.
    If any code then it will be a great help for me.
    Thanks
    Sandip

  • How can I make JSF checkboxes selected by default?

    Hi everyone,
    I have a problem in setting default value for checkboxes. I use them in a table. tableRowGroup's sourceData property is a list data provider. In the page bean I have the following code to select rows:
    private TableSelectPhaseListener tablePhaseListener = new TableSelectPhaseListener();
        public void setSelected(Object object) {
            RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
            if (rowKey != null) {
                tablePhaseListener.setSelected(rowKey, object);
        public Object getSelected(){
            RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
            return tablePhaseListener.getSelected(rowKey);
        public Object getSelectedValue() {
            RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
            return (rowKey != null) ? rowKey.getRowId() : null;
        public boolean getSelectedState() {
            RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
            return tablePhaseListener.isSelected(rowKey);
        }I received a list of objects from a service using list data provider and use checkboxes to select them. Then I get the selected checkboxes in the action method of the page bean using
    RowKey[] selectedRows = getTableRowGroup1().getSelectedRowKeys(); What I want to do is to set all the checkboxes as selected by default. Normally, this is performed by assigning the same values to selected and selectedValue properties of the checkbox component. But, in my case this is not applicable since we take advantage of getSelected() and getSelectedValue() methods in the pagebean. Properties of my checkbox component are as follows:
    <ui:checkbox binding="#{MyPage.checkBox1}"
                                                        id="checkBox1" selected="#{MyPage.selected}" selectedValue="#{MyPage.selectedValue}"/>I cannot assign same values to selected and selectedValue. Can anyone help me to make these checkboxes selected as it is rendered?

    Hi Fanado,
    In Finder, click once on an Excel document then Get Info (command i)
    Choose Open with: Numbers
    Then Change All... to make Numbers the app for all Excel documents.
    The same for Word and Powerpoint
    Regards,
    Ian.

  • Datagrid Checkbox - Select All Headerrenderer

    i have a datagrid that utilizes an itemrenderer and headerrender for the same column to have checkboxes and also a select all checkbox in the column header...as such:
    <mx:DataGrid width="100%" height="100%" id="dg" dataProvider="{employees}" sortableColumns="false"
                                draggableColumns="false">
                                <mx:columns>
                                    <mx:DataGridColumn width="30" textAlign="center">
                                        <mx:headerRenderer>
                                            <mx:Component>
                                                <mx:CheckBox/>
                                            </mx:Component>
                                        </mx:headerRenderer>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:CheckBox selected="{(data.@isSelected == 'true')?true:false}" click="{data.@isSelected = (data.@isSelected != 'true') ? 'true' : 'false';}"/>
                                            </mx:Component>
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                    <mx:DataGridColumn headerText="Item ID" dataField="@id" width="60"/>
                                    <mx:DataGridColumn headerText="Date" dataField="@date" width="85"/>
                                </mx:columns>
                            </mx:DataGrid>
    my XMLList is as follows (that populates the datagrid):
    <mx:XMLList id="employees">
            <request id="720" date="Aug 21 09" isSelected="false"/>
            <request id="721" date="Aug 21 09" isSelected="false"/>
            <request id="722" date="Aug 21 09" isSelected="false"/>
            <request id="723" date="Aug 21 09" isSelected="false"/>
    </mx:XMLList>
    Now, if I select a rows checkbox, it works fine and updates the XMLList with the new value of isSelected for that row.
    My question is this: how do I make it so that clicking on the checkbox inside the headerrenderer selects all the checkboxes in the itemrenderer?  I know that Flex doesn't build rows that are not in view yet, so what needs to happen here in order to a) select the itemrenderer checkboxes and b) update the related XMLList so all isSelected update to either true/false.
    Thanks!

    Thanks for putting me on the right track for this...quick question:
    My arrayCollection looks like this:
    [Bindable]
    private var myAC:ArrayCollection = new ArrayCollection([
        {id:1, date: 'Bob Jones', isSelected: true},
        {id:2, date: 'Jane Smith', isSelected: true},   
        {id:3, date: 'Doug Johnson', isSelected: false},
        {id:4, date: 'Bob Jones', isSelected: true},
        {id:5, date: 'Jane Smith', isSelected: true},   
        {id:6, date: 'Doug Johnson', isSelected: false},
        {id:7, date: 'Bob Jones', isSelected: true},
        {id:8, date: 'Jane Smith', isSelected: true},   
        {id:9, date: 'Doug Johnson', isSelected: false},      
    And the datagrid displays this correctly, so no problems there.
    Now, I have a function that gets called when the checkbox in the header is selected, but am stuck here as to how to update all of the isSelected values in myAC to true.
    This is what I tried with no success...any thoughts?
    public function checkAll():void {
        for(var i:int=0; i < myAC.length; i++){
            myAC.itemUpdated(myAC.getItemAt(i).isSelected, false, true);
    Thanks!

  • Calculate value based upon checkbox selection

    G'day people,
    I've got myself a bit stuck on a job I've got here, this javascript is getting the better of me.
    The idea is that this script takes the sub total, and adds a creditcard surcharge (as a percentage) based upon a checkbox selection, then spits out the value to be entered into another field.
    If anyone could have a quick look over the following and let me know where I've gone wrong, it would be appreciated.
    var subtotal = this.getField("SubTotal").value;
    var mastercardTick = this.getField("MasterCard");
    var visaTick = this.getField("Visa");
    var amexTick = this.getField("Amex");
    var surcharge = this.getField("CreditSurcharge").value;
    var creditcard = this.getField("PayCredit").value;
    if (creditcard.value === "Off") {
         event.value = 0;
    } else {
              if (mastercardTick.value === "Yes") {
                 surcharge.value= (1.2 / 100) * subtotal.value;
        } else if (visaTick.value === "Yes") {
                 surcharge.value = (1.2 / 100) * subtotal.value;
        } else if (amexTick.value === "Yes") {
                   surcharge.value = (3.75 / 100) * subtotal.value;
        } else {
              event.value = 0;

    Thanks George, I've given this a whirl and got very close... I got a NaN error, and found I was calling "SubTotal" a value twice, which was playing funny buggers!
    I've got rid of one part (the if creditcard.value === "Off") as it wasn't acting like it should. I think I had to put it in a seperate function, to be called seperately then the rest of the code... However, I need to get the job out and it wasn't crucial.
    Thanks for your help mate, appreciated.
    For anyone else that's interested, amended code is as follows:
    var subtotal = this.getField("SubTotal");
    var mastercardTick = this.getField("MasterCard");
    var visaTick = this.getField("Visa");
    var amexTick = this.getField("Amex");
    // var surcharge = this.getField("CreditSurcharge").value;
    var creditcard = this.getField("PayCredit").value;
              if (mastercardTick.value === "Yes") {
                 event.value = (1.2 / 100) * subtotal.value;
        } else if (visaTick.value === "Yes") {
                 event.value = (1.2 / 100) * subtotal.value;
        } else if (amexTick.value === "Yes") {
                   event.value = (3.75 / 100) * subtotal.value;
        } else {
              event.value = 0;
    Not the nicest, but hey, it worked.

  • How do you get  the count of number of  checkbox selected?

    hi,
    plz tell me how do you get the count of number of checkbox selected?

    Not sure what you are doing so I will attempt to answer your question. If have one question which can have multiple answers you have will recieve an array so you have to do getParameterValues("name") and move it into an array.
    If you have multiple questions and only value will be selected do a getParameter("name") on each form element.
    HTH, if not provide more detail.
    J.Clancey

  • Checkbox selection listner

    Hi All,
    I have table with every column having checkbox.For selecting any row i have arequirement that some button below the table should be enabled.Thats ehy i have written the code for the table selection listner.i have a another requirement that for the checkbox selectionlistner.but now the problem is that when i am clicking any checkbox it is selecting the rowselectionlistner automatically.So how to fix it?
    my table code is
    <af:table value="#{bindings.DelegatePageVO1.collectionModel}"
    var="row"
    rows="#{bindings.DelegatePageVO1.rangeSize}"
    emptyText="#{bindings.DelegatePageVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.DelegatePageVO1.rangeSize}"
    rowBandingInterval="0"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_DelegateToProxy.t1}"
    id="t1"
    contentDelivery="immediate" autoHeightRows="10"
    disableColumnReordering="true"
    columnResizing="disabled"
    selectionListener="#{backingBeanScope.backing_DelegateToProxy.activatebtnListner}"
    partialTriggers="::cb1"
    >
    <af:selectBooleanCheckbox value="#{row.bindings.Notification.inputValue}"
    label="#{bindings.DelegatePageVO1.hints.Notification.label}"
    required="#{bindings.DelegatePageVO1.hints.Notification.mandatory}"
    shortDesc="#{bindings.DelegatePageVO1.hints.Notification.tooltip}"
    id="it1" text=""
    valueChangeListener="#{backingBeanScope.backing_DelegateToProxy.Notification}"
    autoSubmit="true">
    <!--<af:showPopupBehavior popupId="::p5"
    triggerType="click"
    align="afterStart"/>-->
    <f:validator binding="#{row.bindings.Notification.validator}"/>
    </af:selectBooleanCheckbox>
    the backin bean for the tableselection listner is
    public void activatebtnListner(SelectionEvent selectionEvent) {
    // Add event code here...
    // Log Implementation Started
    URL url = getClass().getClassLoader().getResource("portal/log4j.properties"); PropertyConfigurator.configure(url.getPath());
    Logger Debuglog=Logger.getLogger("DebugLogger");
    Logger Infolog=Logger.getLogger("InfoLogger");
    Logger ErrorLogger=Logger.getLogger("ErrorLogger");
    Logger FatalLogger=Logger.getLogger("FatalLogger");
    // Log Implementation Ended
    Infolog.info("Class Name: "+DelegateToProxy.class.getName()+", Method Name: activatebtnListner()");
    String logedEmployee =(String)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("logedEmpNo");
    Debuglog.debug("logedEmployee: "+logedEmployee);
    ADFUtil.invokeEL("#{bindings.DelegatePageVO1.collectionModel.makeCurrent}",
    new Class[] { org.apache.myfaces.trinidad.event.SelectionEvent.class },
    new Object[] { selectionEvent });
    Row selectedRow =(Row)ADFUtil.evaluateEL("#{bindings.DelegatePageVO1Iterator.currentRow}");
    if (selectedRow != null)
    AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
    RichCommandButton applysbtn = this.getCb1();
    RichCommandButton resetbtn = this.getCb2();
    RichCommandButton viewDetailsbtn = this.getCb3();
    applysbtn.setDisabled(false);
    resetbtn.setDisabled(false);
    viewDetailsbtn.setDisabled(false);
    adfContext.addPartialTarget(cb1);
    adfContext.addPartialTarget(cb2);
    adfContext.addPartialTarget(cb3);
    FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("delToProxyEventId",
    selectedRow.getAttribute("EventId"));
    The backing bean for the checkbox selection listner is
    public void Notification(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding evtIter = bindings.findIteratorBinding("DelegatePageVO1Iterator");
    DelegatePageVORowImpl employeeEvent =(DelegatePageVORowImpl) evtIter.getCurrentRow();
    Boolean check =(Boolean)valueChangeEvent.getNewValue();
    System.out.println("check"+check);
    if( check && employeeEvent !=null){
    AdfFacesContext adfContext =AdfFacesContext.getCurrentInstance();
    adfContext.addPartialTarget(getT1());
    System.out.println("Inside if check "+check );
    FacesContext context = FacesContext.getCurrentInstance();
    UIComponent source = (UIComponent)valueChangeEvent.getSource();
    String alignId = source.getClientId(context);
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    hints.add(RichPopup.PopupHints.HintTypes.HINT_ALIGN_ID,
    cb7).add(RichPopup.PopupHints.HintTypes.HINT_LAUNCH_ID,
    cb7).add(RichPopup.PopupHints.HintTypes.HINT_ALIGN,
    RichPopup.PopupHints.AlignTypes.ALIGN_END_AFTER);
    // adfContext.addPartialTarget(p1);
    p5.show(hints);
    Thanks in Advance.

    Hi,
    Always mention your JDev version (Check out the announcement : https://forums.oracle.com/forums/ann.jspa?annID=56).
    It is expected for the row to get selected when you click on any column in the row, due to which your selection listener is getting fired. Normal behavior.
    -Arun

  • Make html:checkbox selected by default depending upon bean value --struts

    Hi all,
    I have a doubt regarding the html:checkbox .
    I have the following code in my jsp.
    I am giving it inside logic:iterate tag and fetching the value from session scope.
    <html:checkbox property ="readchk" value ="read" indexed="true" onclick="return assignme(this.value,this.checked,'s')"/>
    How to make this checkbox selected by default.
    "readchk" (bean) is in my ActionForm, it has been been assigned either
    0 or 1 .
    I want to make the checkbox selected by default if the readchk is 1
    and the checkbox not selected if the readchk value is 0.
    Could anybody please help me out in fixing this problem.
    Thanks
    Parvathi

    If u give the value for ur check box in the action form it wld be checked!!
    regards
    Shanu

  • To add new row with the checkbox selected ....

    Hi All,
    In my project I have to create a table with 2 columns, 1 column is checkbox and other column is String type. In the same JFrame one textarea and one add button should be there. When we type text in the textarea and click add button, it should add a new row in the table with the checkbox selected and the 2nd column containing the text.
    I want to use AbstractTableModel.
    Please help me to solve this issue. If you have sample code that will be more helpful.
    Thank you,
    Regards,
    mkumar

    It would be better if you extend from DefaultTableModel rather than from Abstract Table Model. That is because DefaultTableModel provides functionality to add a row. In fact, you can directly use DefaultTableModel .
    In the button's action performed,
    public void actionPerformed(ActionEvent e)
      if(e.getSource() == bAdd)
        Vector newRow = new Vector(2);
        newRow.add(new Boolean(Boolean.TRUE));
        newRow.add(" ");
        DefaultTableModel dm = (DefaultTableModel)yourTable.getModel();
        dm.addRow(newRow);
    }Note : For the above code, Initialize the JTable with a DefaultTableModel parameter than directly with Vectors/ Arrays.
    This is because when we try to cast from TableModel to DefaultTableModel as in the above code, there is a possibility of an
    Exception if the Table is not initialized without a model.
    For the CheckBox in the first column, you need to set an editor and a renderer so that you can manipulate and see your boolean values as the state of the check boxes.
      JCheckBox b = new JCheckBox();
      DefaultTableCellRenderer dr = new DefaultTableCellRenderer(b);
      DefaultTableCellEditor de = new DefaultTableCellEditor(b);
      yourTable.getColumnModel().getColumn(0).setCellEditor(de);
      yourTable.getColumnModel().getColumn(0).setCellRenderer(dr);That should do it !
    Cheers

  • Multiple checkbox selection in ALV and updating internal table

    Dear Expert,
    Can anyone tell me how to handle the multiple checkbox selection in ALV Grid report and then updating the internal table.
    I tried the option but it works only when i select only 1 row in ALV.
                    DO L_LINES TIMES.
                      read table icoas index rs_selfield-tabindex.
                      if sy-subrc = 0.
                        ICOAS-NOCHK = 'X'.
                        modify ICOAS INDEX rs_selfield-tabindex TRANSPORTING NOCHK.
                      ENDIF.
                    ENDDO.
    Requires help....
    Regards & Thanx,
    Bhupathi.

    Hi,
    Use this method to capture the check box event. Write this once you create your grid using CREATE OBJECT grid1.
    DATA:      GRID1 TYPE REF TO CL_GUI_ALV_GRID,
    CALL METHOD grid1->register_edit_event
      EXPORTING
        i_event_id = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
      EXCEPTIONS
        ERROR      = 1
        others     = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      LOOP AT T_GRIDDETAILS INTO WA_GRIDDETAILS.
        IF WA_GRIDDETAILS-CHECKBOX = 'X'.
                  "Do your operation
        ENDIF.
        CLEAR WA_GRIDDETAILS.
      ENDLOOP.

  • Please Help! Deleting multiple record by using checkbox selected

    Hello everybody,
    I am a new to JSP. I really don't know how to delete multiple record by using checkbox selected and pressing submit button.
    For example, deleting webmailbox letters using checkbox selected and delete button. The mail we checked will delete from the inbox.
    I like to use my user account deleting system of my project like above example.
    How can I do in JSP? I will very please you if you share you knowledge and code for me.
    If you have URL address, could you share me for reference?
    Please help me...
    With Thanks and Regards,
    wtdahl

    Take a look at this thread, I thing it answers your question quite good:
    http://forum.java.sun.com/thread.jsp?thread=516658&forum=45&message=2463505

  • Problem with checkbox selection in Tableview

    Hi All
    I am using table view with 8 columns - in the last 4 columns i have checkboxes for user input - i have a strange problem - when the table has multiple entries - for the last column i can only select the checkbox on line 1 - and i cannot select the checkbox on the remaining entries below - but for the other colums with checkboxes this is not the case
    The selection mode for the table is no line selection - since the table is already displayed with input enabled fields - this is to reduce the no of clicks for user
    Can anyone point out what is going wrong - how can i fix this - what i am doing wrong ?
    Thanks
    Sen

    Hi
    When i click on the checkbox for the 2nd or 3rd rows of the last column - nothing happens - the checkox is still active but nothing happens -
    this is the tableview code
    <htmlb:tableView id              = "Detail"
                     design          = "ALTERNATING"
                     headerText      = "Header Text"
                     onNavigate      = "onMyNavigate"
                     emptyTableText  = "test"
                     onRowSelection  = "onMyRowSelection"
                     fillUpEmptyRows = "false"
                     footerVisible   = "true"
                     visibleRowCount = "5"
                     table           = "<%= DETAILTAB %>"
                     iterator        = "<%= iterator %>" >
    and this is the code for the last column
    <htmlb:tableViewColumn columnName         = "OBSOFLGICON"
                               width               = "3"
                               type                = "user"
                               horizontalAlignment = "CENTER"
                               title               = "Obs" >
          <htmlb:checkbox />
        </htmlb:tableViewColumn>
    Thanks
    Sen

  • Need to add a blank row to a table when checkbox selected

    Hi ALL,
    I have a custom page having 2 check boxes and few fields , i am doing search operation by entering one checkbox checked and few other fields and data displaying in table region.
    my requirement is when i select second check box and click one button as add new row it should create a blank row in the table, means table should  availabe with a blank row so that user can insert data,
    please help me on thsi
    Thnaks

                 Hi there ,
                 If you 're working with advance table then you have an default option to create a blank row , please through topic 'add another row '
                 in jdev guide .
                 If you are working the regular table region then you might follow the below code suggested .
                 Create a new item of the type button ( not submit button ) and handle the event in PFR of your controller class
                String addRow=pageContext.getParameter(EVENT_PARAM);   //  "addRow " is an event attached to table
                if("addAnotherRow".equals(addRow))  
                      am.invokeMethod("AddRow");
              In AMimplementation class :
       public void AddRow()
        OAViewObject headerVO = (OAViewObject)getsdaPacelineWorkupHeaderUpdateVO1();
        sdaPacelineWorkupHeaderUpdateVORowImpl rowh = (sdaPacelineWorkupHeaderUpdateVORowImpl)headerVO.getCurrentRow();
        rowh.getPacelineHeaderId();
        OAViewObject lineVO = (OAViewObject)getsdaPacelineWorkupLineUpdateVO1();
        Row lineRow = lineVO.createRow();
        Row lineRo = lineVO.last();
        lineRow.setAttribute("PacelineHeaderId",rowh.getPacelineHeaderId());   
        lineRow.setNewRowState(Row.STATUS_INITIALIZED);
        lineVO.last();
        lineVO.next();
        lineVO.insertRow(lineRow);
        lineVO.setCurrentRow(lineRow);
        lineVO.setCurrentRow(lineVO.last());
      Note : Replace your vo name in place of sdaPacelineWorkupHeaderUpdateVO1()
       Please let me know if you have any questions .
      Regards ,
    Keerthi

Maybe you are looking for

  • Search function in interactive PDF

    Hi I am developping an interactive PDF and I would like to embed a search function (not the Ctrl+F option, an actual search button on each page, like on a website). Is that possible? I am curently working in InDesign CS6 Thanks Andrei

  • HD window

    When I click on the HD I get this big question mark on the left side of the window and when I click on the question mark it says the item cannot be found. Any ideas?

  • /SAPAPO/SDORDER_DEL recommendation for date

    Is there any state-of-the-art / best-practice solution how to run report /SAPAPO/SDORDER_DEL in batch processing? Especially concerning the selection variable Last Changed Before. What are your experiences, how old documents should be to be deleted w

  • Maps finds addresses in a completely different city, instead of the one I'm actually in

    Why does Maps return addresses in a completely different city, even if location services are enabled? I must manually type in the city name every time, or I usually get different cities or countries (I live in a major Canadian city). Sometimes it giv

  • Avoid compilationof java class  in oracle using load java

    we are trying to load dom4j.jar file into oracle jvm using loadjava. command: loadjava -verbose -user un/pwd:host:port:sid dom4j.jar the loadjava utility unzip the jar and loads class files one by one. most of the classes are marked as invlid. if i u