Problem in Setting value in cells of jTable

I am trying to set values in the table by editing the cells, the problem is that once i enter some values in the cells and hit enter or click on next cell it gives an exception of stack overflow, i tried tracing i am getting all the values of the particular row and colums and the value which is entered,
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
Object[] row = (Object[]) data.get(rowIndex);
row[columnIndex] = aValue;
super.fireTableCellUpdated(rowIndex, columnIndex);
but it is not executing the super.fireTableCellUpdated() function.
i will be thankful if you provide me with the solution for the above problem or provide me any other way.
Thank's in Advance.

Use the DefaultTableModel, then you don't have to write custom code for the setValueAt() method.
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

Similar Messages

  • Problem in setting the background color of jtable with Nimbus

    Hi
    I have created a java swing application. In which I am using JTable.
    When creating a simple JTable and displaying with Nimbus, the row background color alternates between white and a light blue-grey.
    I want the table with single colour. Only the first column should be grey colour and other should be white.
    I used this code to set the background and foreground colour.
    public Component prepareRenderer
        (TableCellRenderer renderer, int index_row, int index_col){      
                Component objComponent = super.prepareRenderer(renderer, index_row, index_col);         
                Color objGreyColour = new Color(240,240,240);
                Color objWhiteColour = new Color(255,255,255);
                if(index_col == 0){
                    objComponent.setBackground(objGreyColour);
                    objComponent.setFont(new java.awt.Font(CommonClass.getFontName(),java.awt.Font.BOLD, CommonClass.getFontSize()));
                    objComponent.setForeground(Color.BLACK);
                }else{               
                    setSelectionBackground(Color.BLUE);
                    objComponent.setBackground(objWhiteColour);
                    objComponent.setForeground(Color.BLACK);
                return objComponent;
            } Look wise it is fine but when i try to select the cell it is not highlighting the cell and also i m not able to select multiple cell with ctrl key.
    Any help would be appreciated
    Thanks
    Sonal

    Hello,
    1) if you want better help soone,r please post an SSCCE (http://sscce.org) instead of a code extract.
    2) selection highlighting is lost because your code... doesn't handle selection. To take selection into account, you can use <tt>if (super.isRowselected(index_row)) {...}</TT>.
    Regards,
    J.

  • Problem adding action event to cells in JTable

    hi frends i m developing file transfer client server.My client GUI contains JTable in which it displays directory and file in the current directory.Now i want to display files under the directory when i double click on the directory bt it doesnt happen though i hav applied event to the cell.My code is as below:
    The FileTransfer.java cotains code for table as::
    File dir=new File(".");
    localTable=new JTable(new FileTableModel(dir));
    localTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    localTable.getColumnModel().getColumn(0).setCellRenderer(new FileTableCellRenderer());
    The file FileTableModel.java is
    public class FileTableModel extends AbstractTableModel {
    private File dir;
    private File[] list;
    private String[] columnNames = new String[] {
         "Name", "Size", "last modified"};
    public FileTableModel(File dir) {
    setDirectory(dir);
    public void setDirectory(File dir) {
    this.dir = dir;
    list = dir.listFiles();
    public int getRowCount() {
    return list.length;
    public int getColumnCount() {
    return 3;
    public String getColumnName(int col) {
         return columnNames[col];
    public Object getValueAt(int row, int col) {
    switch(col) {
    case 0:
    return list[row];
    case 1:
    return list[row].isDirectory()?"Dir":(list[row].length()+"");
    case 2:
    return new Date(list[row].lastModified());
    default:
    return null;
    public Class getColumnClass(int col) {
    switch (col) {
    case 0:
    return File.class;
    case 1:
    return String.class;
    case 2:
    return Date.class;
    default:
    return null;
    and FileTableCellTandrer.java is
    public class FileTableCellRenderer implements TableCellRenderer {
         public FileTableCellRenderer(){
    public Component getTableCellRendererComponent(final JTable table,final Object value,
    boolean isSelected, boolean hasFocus, int row, int column) {
    JTextField fileField = new JTextField(((File)value).getName());
    Color normalBackground = Color.white;
    Color selectedBackground = Color.gray;
    Color focusBackground = Color.green;
    fileField.setBackground(normalBackground);
    if (isSelected) {
    fileField.setBackground(selectedBackground);
    if (hasFocus) {
    fileField.setBackground(focusBackground);
    fileField.setEnabled(false);
    if (((File)value).isDirectory()) {
         fileField.setEnabled(true);
         System.out.println("Inside isDirectory");
    fileField.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent ae) {
              ((FileTableModel)table.getModel()).setDirectory((File)value);
              ((AbstractTableModel)table.getModel()).fireTableDataChanged();
    return fileField;
    so plz help me out.Is there any change needed in my code of FileTableCellRenderer thn tell me.

    Make the cells non-editable then use a MouseListener on the table and handle the double click.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • Problems of setting values% with 2 decimal places in any graphics. What sho

    Guys, I have the xcelsius 2008 and can not make it work chart with values % and 2 decimal places. Already set up everything that I know the spreadsheet and graphics.
    Someone knows what can I do?
    Thanks Anderson - Sao Paulo - Brazil.

    Hi Anderson,
    To get values in % and upto two decimal, follow the below steps:
    Go to Chart properties-> Appearences Tab-> Text tab.
    Select the "Vertical Axis Labels" and go to the Number format present below in the window.
    Change the format to "Percentage" and set decimal places to "2".
    This should work.
    Please revert incase you have any queries.
    Thanks,
    Amit Mathur.

  • Convert positive to negative value in cells?

    Hi,
    Can't seem to find this anywhere and Mr Google is starting to refer me to Excel pages, so thought I'd try here - pretty simple, I just want to convert a set of positive values to negative. Is that possible?
    Thanks,
    osu

    If your values are stored in cells of column B, in an other column, say, column C
    in cell C2, enter the formula :
    =ABS(B2)
    then apply Fill Down
    If you don't want to use an auxiliary column, use an AppleScript like this one.
    --[SCRIPT cellstoabs]
    Enregistrer le script en tant que Script : cellstoabs.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Sélectionner un bloc de cellules.
    Aller au menu Scripts , choisir Numbers puis choisir cellstoabs
    Le script remplace sur place les valeurs négatives par leur valeur absolue.
    --=====
    L'aide du Finder explique:
    L'Utilitaire AppleScript permet d'activer le Menu des scripts :
    Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case "Afficher le menu des scripts dans la barre de menus".
    Sous 10.6.x,
    aller dans le panneau "Général" du dialogue Préférences de l'Éditeur Applescript
    puis cocher la case "Afficher le menu des scripts dans la barre des menus".
    --=====
    Save the script as a Script: cellstoabs.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Select a range of cells.
    Go to the Scripts Menu, choose Numbers, then choose "cellstoabs"
    The script replace the negative values by there ABSolute value.
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2010/10/21
    --=====
    property liste_valeurs : {}
    --=====
    on run
    local dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2, liste_valeurs, c, cc, r, une_valeur
    set {dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
    tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
    if rowNum2 = rowNum1 then set rowNum2 to count of rows
    set my liste_valeurs to value of cells rowNum1 thru rowNum2 of columns colNum1 thru colNum2
    repeat with c from colNum1 to colNum2
    tell column c
    set cc to c + 1 - colNum1
    repeat with r from rowNum1 to rowNum2
    set une_valeur to item (r + 1 - rowNum1) of item cc of my liste_valeurs
    if une_valeur < 0 then set value of cell r to -une_valeur
    end repeat
    end tell
    end repeat
    end tell
    set my liste_valeurs to {}
    end run
    --=====
    set {rowNum1, colNum1, rowNum2, colNum2} to my getCellsAddresses(dname,s_name,t_name,arange)
    on getCellsAddresses(d_Name, s_Name, t_Name, r_Name)
    local two_Names, row_Num1, col_Num1, row_Num2, col_Num2
    tell application "Numbers"
    set d_Name to name of document d_Name (* useful if we passed a number *)
    tell document d_Name
    set s_Name to name of sheet s_Name (* useful if we passed a number *)
    tell sheet s_Name
    set t_Name to name of table t_Name (* useful if we passed a number *)
    end tell -- sheet
    end tell -- document
    end tell -- Numbers
    if r_Name contains ":" then
    set two_Names to my decoupe(r_Name, ":")
    set {row_Num1, col_Num1} to my decipher(d_Name, s_Name, t_Name, item 1 of two_Names)
    if item 2 of two_Names = item 1 of two_Names then
    set {row_Num2, col_Num2} to {row_Num1, col_Num1}
    else
    set {row_Num2, col_Num2} to my decipher(d_Name, s_Name, t_Name, item 2 of two_Names)
    end if
    else
    set {row_Num1, col_Num1} to my decipher(d_Name, s_Name, t_Name, r_Name)
    set {row_Num2, col_Num2} to {row_Num1, col_Num1}
    end if -- r_Name contains…
    return {row_Num1, col_Num1, row_Num2, col_Num2}
    end getCellsAddresses
    --=====
    set { dName, sName, tName, rname, rowNum1, colNum1, rowNum2, colNum2} to my getSelParams()
    on getSelParams()
    local r_Name, t_Name, s_Name, d_Name
    set {d_Name, s_Name, t_Name, r_Name} to my getSelection()
    if r_Name is missing value then
    if my parleAnglais() then
    error "No selected cells"
    else
    error "Il n'y a pas de cellule sélectionnée !"
    end if
    end if
    return {d_Name, s_Name, t_Name, r_Name} & my getCellsAddresses(d_Name, s_Name, t_Name, r_Name)
    end getSelParams
    --=====
    set {rowNumber, columnNumber} to my decipher(docName,sheetName,tableName,cellRef)
    apply to named row or named column !
    on decipher(d, s, t, n)
    tell application "Numbers" to tell document d to tell sheet s to tell table t to ¬
    return {address of row of cell n, address of column of cell n}
    end decipher
    --=====
    set { d_Name, s_Name, t_Name, r_Name} to my getSelection()
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
    tell application "Numbers" to tell document 1
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    try
    (selection range of table y) as text
    on error errMsg number errNum
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
    return {theDoc, theSheet, theTable, theRange}
    end try
    end repeat -- y
    end if -- x>0
    end tell -- sheet
    end repeat -- i
    end tell -- document
    return {missing value, missing value, missing value, missing value}
    end getSelection
    --=====
    on parleAnglais()
    local z
    try
    tell application "Numbers" to set z to localized string "Cancel"
    on error
    set z to "Cancel"
    end try
    return (z is not "Annuler")
    end parleAnglais
    --=====
    on decoupe(t, d)
    local oTIDs, l
    set oTIDs to AppleScript's text item delimiters
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to oTIDs
    return l
    end decoupe
    --=====
    --[/SCRIPT]
    Yvan KOENIG (VALLAURIS, France) jeudi 21 octobre 2010 09:38:59

  • Setting value in a cell in JTable where editor for cell is a JComboBox

    Hi,
    I have a column in a JTable where it holds a comboBox . As the comboBox has different
    values depending on the row I've a cell editor for each row. That's fine. My problem is that one of the
    values on the comboBox launches a dialog where the user selects a new value to add to the comboBox.
    The comboBox gets updated with this new value and I call setValueAt on the table. Both get updated
    but the cell doesn't display the new value added in the JTable. I click it and the comboBox has the
    value and I've to select it to get it displayed in the cell.
    Here's the code for updating the tableModel -
    public void updateCellDetails(String value, int row)
    JComboBox combo = (JComboBox) rowEditor.getTableCellEditorComponent(
                        this,
                        value,
                        true,
                        row,
                        4);
    if (combo != null)
    combo.insertItemAt(value, combo.getItemCount() - 1);
    combo.setSelectedItem(value);
    rowEditor.setEditorAt(row, new DefaultCellEditor(combo));
    MyTableModel tableModel = (MyTableModel) getModel();
    tableModel.setValueAt(value, row, 4);
    Thanks

    Not sure if this'll help, but did you ever fire an editing-stopped event? If such an event is never fired, then editing-cancelled will be fired when you lose focus from the editor and the original value will be restored.

  • Problem with select all cells in JTable

    Hi guys! I get some problem about selecting all cells in JTable. I tried to used two methods:
    1> table.selectAll()2> changeSelection(firstcell, lastcell,false,true)
    firstcell:[0,0], lastcell[rowcount-1,colcount-1]
    Result: only the first row selected when i use both methods.
    Note: i set up the selection model as following:
    this.dataSheet.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
                    this.dataSheet.setCellSelectionEnabled(true);
                    this.dataSheet.setRowSelectionAllowed(true);
                    this.dataSheet.setColumnSelectionAllowed(true);Thanks !

    What selection properity should be changed in order to enable selectAll() method work properly? Is there Any constraints? Here is the TableModel I am using. And i set up selection mode use the following code:
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    table.setCellSelectionEnabled(true);
    table.setRowSelectionAllowed(true);
    table.setColumnSelectionAllowed(true);
    import java.util.Vector;
    import javax.swing.table.*;
    import javax.swing.JTable;
    public class DataSheetModel extends AbstractTableModel{
              private Vector data = new Vector();//Store data
              private Vector columnNames = new Vector();//Store head
              public DataSheetModel(){}
              public DataSheetModel(Vector headVector, Vector dataVector){
                   if(headVector != null) this.columnNames = headVector;
                   if(dataVector != null) this.data = dataVector;
              public int getColumnCount(){
                   return columnNames.size()+1;
              public int getRowCount(){
                   return data.size()+1;
              public String getColumnName(int col){
                   if(col==0) return "";
                   else return (String)columnNames.get(col-1);
              public Object getValueAt(int row, int col){
                   if(col==0) {
                        if(row != data.size()) return String.valueOf(row);
                        else return "*";
                   else{
                        if(row != data.size()){
                             Vector rowVector = (Vector)data.elementAt(row);
                             return rowVector.elementAt(col-1);
                        }else return null;
              public void setValueAt(Object value, int row, int col){
                   if(row != this.data.size()){
                        Vector rowVector = (Vector)data.elementAt(row);
                        rowVector.set(col-1,value);
                        this.data.set(row,rowVector);
                        this.fireTableDataChanged();
                   }else{
                        Vector rowVector = new Vector();
                        for(int i=0; i<this.getColumnCount()-1; i++) rowVector.add(null);
                        rowVector.set(col-1,value);
                        this.data.add(rowVector);
                        this.fireTableDataChanged();
              public Class getColumnClass(int c){
                   return getValueAt(0,c).getClass();
              public boolean isCellEditable(int row, int col){
                   if(col == 0) return false;
                   else return true;
              public void setDataVector(Vector head, Vector data){
                   if(head != null) this.columnNames = head;
                   if(data != null) this.data = data;
    }

  • Getting Problem in retrieving values from JTable

    Hi Guys,
    Suppose i clicked in cell in a table to edit it and done some entry in it and without leaving that cell ( means focus is on that cell only) i clicked one button.
    button prints table data on console.
    now problem is the value in focused cell is coming as null or wht i previously return.
    that means unless i m not leaving a cell the Jtable is not taking that value.
    how could i overcome this problem
    thanks in advance

    Use this:table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);The editor will be closed as soon as the table loses focus.

  • Set value to system matrix (38) cell

    Hello,
    Thanks for your reply.
    I need to set value for some UDF on a system matrix (38). Crurrently ,I use following code:
    public void SetValue(string columnUniqueId, int matrixRowIndex, string value);
    (I'm using the coresuite framwork)
    The coresponding way in SDK would be:
    oMatrix.Columns.Item("columnUniqueId").Cells.Item("matrixRowIndex").Specific.value = "value"
    This works but when I have more than 10 UDF to fill together, the performance is bad. It takes nearly 3-4 seconds to load one item(row).
    Is there any fast way to set the value? Or is there any other suggestion how to do it?

    No, the problem is not by loading of UDFs by a existing document.
    But when you create a new document and you add a new postion to the document by choosing an item. Then our AddOn copies the UDF values from the item master data into the corresponding UDFs in the postion. At this moment I have to write them manually.
    The best would be when the UDFs in the Item Master Data would be autiomatically created also  in the postion of documents. Because in this way they would be automatically loaded by SBO itself.
    I think SBO has a mistake in its design by here.

  • Setting Focus to a particular cell in JTable

    Hi, can i know how to set the focus to a particular cell in JTable.
    Say I have a table with 2 rows and 10 columns. The focus now is at position (1, 9) which is the last cell in the table. But I want to set the focus to (1, 3). How can i achieve this ? Pls help. Thanks

    OK. It's partially working. The right methods to use are setRowSelectionInterval and setColumnSelectionInterval. Jeanette was right. Mine didn't work because of a thread issue. I put the those two methods in a block such as:
    SwingUtilities.invokeLater(new Runnable(){
    public void run()
    table.setRowSelectionInterval(tblLineItem.getRowCount()-1,
    table.getRowCount()-1);
    table.setColumnSelectionInterval(0,0);
    Then it worked.
    But after I finished editing the first cell of the newly created row and press ENTER, the selection went back to the cell that's next to the originally editing cell on the first(old) row, instead of staying at the current row and going to the second cell.
    Can anybody shed a light on what I'm missing?

  • Setting alignment of cell content in jtable??

    hi,
    does anybody know how i can set the content of my jTable cells to the center of each cell. thanx, mischa.

    Did you search the forum???
    Using keywords "+jtable +center" would be a good place to start.

  • Problem While Defining  "VALUE SET"

    Dear All,
    I am finding problems while defining "Value Set".
    I wanted to select "DISTINCT" Column from a particular Table.
    It is not allowing me to select distinct Column.
    Is there any other alternative ??

    Hi Tarak,
    Create a view selecting distinct values and then use this view as a table in your value set.
    Vishal

  • Set default cell on JTable

    How do I set the default cell on my JTable to be the first cell? Everytime my table gets the TAB or SHIFT-TAB key event, the last cell added to the table gets focus. Is there any way that I can change this to force cell(0,0) to always get focus on receiving the TAB or SHIFT-TAB key?

    TableColumn tc = table.getColumnModel().getColumn(0);
    tc.setMaxWidth(25);
    [\code]                                                                                                                                                                               

  • Problem in  set and get values in h:selectBooleanCheckbox with h:datatabel

    hello friends,
    Please help me any one...i need urgent.........................
    My jsf page:
    <h:panelGroup>
                                  <h:panelGrid columns="6">
                                  <h:dataTable border="2" value="#{planGroup.screenFlowValues}" var="result" bgcolor="#F1F1F1" cellpadding="2" cellspacing="1">
                                  <h:column id="col1">
                                       <f:facet name="header">
                                       <h:outputLabel id="lblchange" value="Select" />
                                       </f:facet>
                                       <h:selectBooleanCheckbox id="chkid" value="#{planGroup.chkValue}">
                                       </h:selectBooleanCheckbox>
                                       </h:column>
                                            <h:column id="column1">
                                                 <f:facet name="header">
                                                      <h:outputText value="Plan Group ID"></h:outputText>
                                                 </f:facet>
                                                 <h:outputText value="#{result.planGroupId}"></h:outputText>
                                                 <h:inputHidden id="planGroupList" value="#{result.planGroupId}" />
                                            </h:column>
                                            <h:column id="column2">
                                                 <f:facet name="header">
                                                      <h:outputText value="Plan ID"></h:outputText>
                                                 </f:facet>
                                                 <h:outputText value="#{result.planId}" converter="plantext"></h:outputText>
                                            </h:column>
                                            <h:column id="column3">
                                                 <f:facet name="header">
                                                      <h:outputText value="Group Description"></h:outputText>
                                                 </f:facet>
                                                 <h:outputText value="#{result.groupDesc}"></h:outputText>
                                            </h:column>
                                            <h:column id="column4">
                                                 <f:facet name="header">
                                                      <h:outputText value="Row Status"></h:outputText>
                                                 </f:facet>
                                                 <h:outputText value="#{result.rowStatus}"></h:outputText>
                                            </h:column>
                                            <h:column id="column5">
                                            <f:facet name="header">
                                                 <h:outputText value="Modifiy"></h:outputText>
                                                 </f:facet>
                                                 <h:commandLink id="link1" value="Edit" action="#{planGroup.ModifiyMemberrecord}" immediate="true"/>
                                                 </h:column>
                                                 </h:dataTable>
                                            </h:panelGrid>
                                            </h:panelGroup>
    Here in this jsf page.......
    1.value="#{planGroup.screenFlowValues}"--is Datamodel
    2.For me page is displaying.How to set value to the check box and multiple selection of checkbox..when i click delete button ,
    i have to delete selected rows from datamodel.how to do that what are all the changes i have to.Because boolean checkbox return only true false value.
    3.by using h:datatabel i can do that ya..
    My bean:
    public class PlanGroupBean {
         private String planGroupID;
         private String planID;
         private String groupDesc;
         private String rowStatus;
         private static Log log = LogFactory.getLog(PlanGroup.class);
         private static DataModel screenFlowValues;
         private String hideWindows;
         private String hiddenValue;
         private boolean chkValue;
         public List getProdlis() {
                   return prodlis;
              public void setProdlis(List prodlis) {
                   this.prodlis = prodlis;
         public List getData() {
              return data;
         public void setData(List data) {
              this.data = data;
         public boolean isChkValue() {
              //System.out.println("CHECKED--CHK-value:"+chkValue);
              return chkValue;
         public void setChkValue(boolean chkValue) {
              this.chkValue = chkValue;
         public void setPlanGroupID(String planGroupID) {
              this.planGroupID = planGroupID;
         public String getPlanGroupID() {
              return this.planGroupID;
         public void setPlanID(String planID) {
              this.planID = planID;
         public String getPlanID() {
              return this.planID;
         public void setGroupDesc(String groupDesc) {
              this.groupDesc = groupDesc;
         public String getGroupDesc() {
              return this.groupDesc;
         public void setRowStatus(String rowStatus) {
              this.rowStatus = rowStatus;
         public String getRowStatus() {
              return this.rowStatus;
         public String getHiddenValue() {
              screenFlowValues = new ListDataModel(ServiceDao.execute().fetchPlanGroupDisp());
              return hiddenValue;
         public void setHiddenValue(String hiddenValue) {
              this.hiddenValue = hiddenValue;
         public void setHideWindows(String hideWindows) {
              this.hideWindows = hideWindows;
         public String getHideWindows() {
              return this.hideWindows;
         public DataModel getScreenFlowValues() {
              return screenFlowValues;
         public void setScreenFlowValues(DataModel screenFlowValues) {
              PlanGroupBean.screenFlowValues = screenFlowValues;
    public String deleteMemberrecord()
    please help me how to set value to the check box and while clicking delete button i have to know what are all the checkbox selected..........
    regards,
    siva

    Attach the boolean property to the row object. If it is true, then the row object was selected. You can also attach it to a Map<RowObjectId, Boolean> and then delete rows by RowObjectId which are true. You may find this article useful, it contains code examples: [http://balusc.blogspot.com/2006/06/using-datatables.html#SelectMultipleRows].

  • Cascading LOVs (APEX 4.1) problem, using in report does not set values

    Hi,
    i am using APEX 4.1.0.00.32 and i have a simple report as
    SQL:*
    SELECT * from region
    WHERE region like '%'||P3_REGION||'%'
    and country like '%'||P3_COUNTRY||'%'
    and city like '%'||P3_CITY||'%'
    Items:*
    P3_REGION:
    select distinct region as d, region as r from region
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    P3_COUNTRY:
    select distinct country as d, country as r from region where region = :P3_REGION
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    Cascading LOV Parent Item(s): P3_REGION
    P3_CITY:
    +select distinct city as d, city as r from region where country = :P3_COUNTRY
    Display Null value: YES
    Null display value: - select -
    Null return value: +0+
    Cascading LOV Parent Item(s): P3_COUNTRY
    The LOVs work fine and the correct values are displayed if cascading through them
    So in the last step i want to filter the report with the values that were selected in the lovs. And this i get not working.
    I tried to add a button with SUBMIT of the page. After choosing values in all LOVs and clicking the SUBMIT button the page submits, alle LOVs are cleared (with value - select -) and the report shows all rows.
    I tried to change the button to "redirect to Page 3" and setting the values P3_REGION, P3_COUNTRY, P3_CITY to &P3_REGION., &P3_COUNTRY., &P3_CITY. but without success.
    I tried to use the setting "Page Action when Value Changed" to "Submit" and/or "Redirect and set value" for all Item LOVs and/or only the last item LOV, but then the cascade of the LOVs does not work properly and the report does not change too.
    I am confused as i don´t know what i can do until now. I think this should be an easy requirement to limit/filter the report with values in the LOVs.
    Furthermore it should be possible to choose only the region LOV and then limit the report with that region (without choosing country and city)
    Thanks in advance!

    Hi Dan,
    thank you for your answer. I have the solution now from Kleber_M, this works.
    Dan McGhan wrote:
    1. Use bind variables in my query. It would look something like:
    SELECT *
    FROM region
    WHERE region LIKE '%'|| :P3_REGION ||'%'
    AND country LIKE '%'|| :P3_COUNTRY ||'%'
    AND city LIKE '%'|| :P3_CITY ||'%'
    This was only a mistake when writing the post, i forgot the colon. I use bind variables of course.
    2. Make sure you have a comma separated list of item names that the report depends on beneath the SQL Query where it says Page Items to Submit. This will make sure that the value of those items on the page are bound into session state prior to the query executing.I tried this, too, but without success...
    3. Use Dynamic Actions to perform the refresh action when any of the three items changes. This would be both more performant and a better experience for the end user than a full page refresh.How can i do this. This sounds good, because when refreshing the page often some items oder actions are done that i don´t want to.
    Regards,
    Matze

Maybe you are looking for

  • Poor Quality Stills on DVD

    Forgive this old favourite. I've gone through lots of past threads and still would like some help please. I've also posted the same question on the FCP forum as I am not sure in which application the solution lies. I am making a 04'00" film in FCP fr

  • How to set text in a TextArea

    I have tried to find ways around this, but i must set text into a panel. but there is no .setText(), like there is for text fields. So how would i set text into a TextArea? BTW: what i am trying to do is be able to constatly add things without replac

  • Error while trying to open the same JSP page.

    Hi partners, After solving some issues with JSP deployment, we are getting another error message. This is when we try to open the same JSP page at the same time. 500 Internal Server Error javax.servlet.jsp.JspException: oracle.express.idl.util.OlapiE

  • Selected Items

    I tried using UIManager.put("Menu.highlight", Color.ORANGE);but the color of my JMenu when selected is still purple. What should I do??? Thanks!!!

  • Loop or cycle in spaces

    In linux, you can loop/cycle through your spaces, so if you're, for instance, on desktop 4/4, you can move to the desktop 1/4 if you continue cycling, rather than moving back 2 spaces. Is there any way to do this in Lion?