Editing selcted checkboxes in JSF when using h:dataTable

I have a few records coming in from the Database which are displayed with checkboxes . The JSP code for them is as follows
<h:dataTable value="#{InvestigationDefendantView.investDefsFindingsModel}" var="def" border="0" >
<h:column>
<h:selectManyCheckbox value="#{InvestigationDefendantView.addtype1}" disabled="false">
<f:selectItem itemValue="Current" itemLabel="Current"/>
<f:selectItem itemValue="Mailing" itemLabel="Mailing"/>
<f:selectItem itemValue="Posible" itemLabel="Posible"/>
<j4j:idProxy id="DefAddTypeProxy"/>
</h:selectManyCheckbox>
</h:column>
</h:dataTable>***********************************************8
The View class has this get method
======================================
public String[] getAddtype1()
Logger.info(this, "addtype testing", this.faddType.size());
if (this.faddType.size() > 0 )
ArrayList<String> alcb = new ArrayList<String>();
for (int i = 0; i < this.faddType.size(); i++)
alcb.add(this.faddType.get(i));
String[] tempArr = new String[alcb.size()];
for (int i = 0; i < alcb.size(); i++)
tempArr[i] = alcb.get(i).intern();
return tempArr;
return new String[0];
}===========================================================
Now when i edit , It shows all the checkBoxes for a perticuler type (e.g. current ) selected even if one of them was selected while adding the record since the h:datatable runs a loop for all the records in a row and my getaddtype1 shows gets called every time and the value faddType.size() is reset every time this method is called .
What i want to do is show only those records checked which were selected while adding . please help me in solving the issue

You need to bind the input values of each row to the row object behind the 'var' attribute of the h:dataTable.
Also see this article how to use datatables: [http://balusc.blogspot.com/2006/06/using-datatables.html].

Similar Messages

  • How can I show only text edits and not text formatting when using print comments summary?

    Acrobat 9.3.0 for Mac.
    Here is the scenario: I used the Compare command to see the changes between 2 PDFs. The resulting file some edits are inserts and some are deletions. I want to print a comments summary only showing the text edits. In the Compare Option pane, I select Text and deselect Images, Annotations, Formatting, Headers/Footers, and Backgrounds. Now on the screen I see inserts are highlighted in blue and deletions are marked with sort of a caret and vertical bar symbol. So all looks good at this point. However, when I show the Comments List, I see addtional comments that indicate "Replace - The following text attributes were changed: fill color." Those comments do not appear in the page view unless I check the Formatting check box to show them. With Formatting unchecked, I print a comments summary and all of the "Replace - Fill Color" comments" appear on the resulting comments summary.
    I only want to show text edits, not text formatting changes. So questions are:
    1. Why, when the Formatting checkbox is unchecked, do the text formatting comments still appear in the comments list when they do not appear on the page display.
    2. How can I print only the text content edits and not show the text formatting changes when using Print Comments Summary.

    Hi,
    You can set ExecuteWithParams as default activity in the task flow then method activity to return total no of rows passing to Router activity if your method has value 0 then call Create insert operation else do directly to page.
    Following idea could be your task flow
    Execute With param (default) > SetCurrentRowWithKey > GetTotalNoOfRows (VOImpl Method)
    |
    v
    Router
    1. If pageFlowScope outcome is 0 then call CreateInsert > MyPage
    2. if pageFlowScope outcome > 0 then MyPage
    hope it helps,
    Zeeshan

  • HTML signatures distorted inside the Signatures and Stationery window preview/edit field, but display fine when used

    I created an HTML signature and imported it into Outlook 2010/2013 by placing the .htm file into my %APPDATA%\Microsoft\Signatures folder. The signature looks and works great, however the signature looks distorted / severely squished in width when attempting
    to view the signature in the Signatures and Stationery window within Outlook. What would be causing this? Is this a common issue when using .htm signatures?
    It isn't too big of an issue as the signatures do work as expected when in normal use, however some users would like to tweak theirs using Outlook's built in editor and are not currently able to.

    In my experience at least, that's a normal behaviour. The editor isn't fully WYSIWYG so if you do anything complicated in there it won't always give an accurate representation of what will eventually be output when you insert it into a message. I've seen
    the same thing with signatures copied from elsewhere, displaying fine in the email but not in the editor, so it's not restricted to imported .htm files.

  • Checkbox appears readonly when using selectbooleancheckbox

    I am using selectbooleancheckbox type to render checkbox on a table column for transient parameter of type boolean in my VO..but when I execute the page, I am getting checkboxes are readonly in all rows of the table. If anybody has encountered such problem before, can you tell me whats the possible soln for this?

    Hi John,
    Me too is facing the same issue. I verified my VO and it has the updatable flag set to "Always".
    Please let me know how to make the bound boolean check box as editable.
    Thanks
    Rathnam

  • Problem with checkbox in JTable when using MyTableModel

    Hi all,
    I have been trawling these message boards for days looking for the answer to my question but have not had any success.
    I am extending AbstractTabel model to create MyTableModel which returns a vector containing the results of a MySql query. One column in this query returns a "0" or "1" which I then store as the boolean value into the vector so that it is rendered as a checkbox on the screen.
    I have also overridden the setValueAt method. THe problem is that when I attempt to check the box in the table, the checkbox isn't actually checking.
    Do I need to implement some sort of listener which picks up the user clicking the box and refresh the model?
    Here is my model code:
    public class MyTableModel extends AbstractTableModel {
        private Vector v = null;
        int listId;
        MyTableModel(int listId){
            this.listId = listId;
            v = new ListItemManagement().getFullList(listId);
       public Class getColumnClass(int c) {
            switch(c) {
                case 6:
                    return Boolean.class;
                default:
                    return Object.class;
        public String getColumnName(int colIndex){
            return ((String[])v.get(0))[colIndex];
        public int getColumnCount() {
            return ((String[])v.get(0)).length;
        public int getRowCount() {
            return (v.size() - 1);
        public Object getValueAt(int rowIndex, int colIndex) {
            return ((Object[])v.get(rowIndex + 1))[colIndex];
        public void setValueAt(Object aValue, int rowIndex, int colIndex) {
            System.out.println("Value: " + String.valueOf(aValue));
            Object row[] = (Object[]) v.elementAt(rowIndex);
            if(colIndex<6){
                row[colIndex] = (String)aValue;
            else{
                row[colIndex] = (Boolean)aValue;
            v.setElementAt(row, rowIndex);
            fireTableCellUpdated(rowIndex, colIndex);
        public boolean isCellEditable(int row, int col) {
            //Note that the data/cell address is constant,
            //no matter where the cell appears onscreen.
            return ! (col < 6);
        }Here is the getFullList function which returns the vector:
                rs = stmt.executeQuery();
                ResultSetMetaData colData = rs.getMetaData();
                int columnCount = colData.getColumnCount();
                String[] columnNames = new String[columnCount];
                for (int i = 0; i < columnCount; i++){
                    columnNames[i] = colData.getColumnName(i + 1);
                Vector v = new Vector();
                v.add(columnNames);
                while (rs.next()){
                    Object[] values = new Object[columnCount];
                    for (int i = 0; i < (columnCount-1); i++){
                        values[i] = rs.getString(i + 1);
                    int sel = rs.getInt("selected");
                    System.out.println(sel);;
                    if(sel==0){
                        values[columnCount-1]=new Boolean(false);
                    else if (sel==1)
                        values[columnCount-1]=new Boolean(true);
                    v.add(values);
                rs.close();
                stmt.close();
                return v;

    Thanks for the replies, much appreciated.
    I've looked at the Swing jtable tutorial and added a TableModelListener and have managed to achieve the desired results but for one thing.
    When I attempt to check the box on the first row of the jTable I get a runtime error:
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayStoreException: java.lang.Boolean
    at project.MyTableModel.setValueAt(MyTableModel.java:65)
    I have been playing around with the setValueAt method and it is in my original post. Here is how it currently looks:
        public void setValueAt(Object aValue, int rowIndex, int colIndex) {
            System.out.println("Value: " + String.valueOf(aValue));
            Object row[] = (Object[]) v.elementAt(rowIndex);
            if(colIndex<6){
                row[colIndex] = (String)aValue;
            else{
                    if(getValueAt(rowIndex,colIndex).toString()=="true"){
                    row[6] = new Boolean(false);
                else{
                    row[6] = new Boolean(true);
            v.setElementAt(row, rowIndex);
            fireTableCellUpdated(rowIndex, colIndex);
        }

  • HOW TO ADD GROUP BY CLAUSE WHEN USING Jbo:Datatable

    Would like to know if there are any provisions for adding a Group by clause so the data shown using DataTable Component cn be grouped.
    eg:
    Currently using DataTable component shows data as shown below.
    Dept Name
    10 ABC
    10 DEF
    10 PQR
    20 XYZ
    20 QQQ
    Can this be done as shown bewlow
    Dept Name
    10 ABC
    DEF
    PQR
    20 XYZ
    QQQ
    Thanks

    Hi Sashi,
    For a bc4j view object, the shape of the result set needs to be consistent. So, there can not be a groupby directly in the result set.
    However, that does not prevent you from inserting a calculated column that performs a similar calculation.
    Another mechanism might be to consider a master detail arrangement of the views where the master contains an aggregation of data from its children. You are then free to access and display this data as you choose.
    Hope this helps,
    Pete

  • How do you add a new thumbnail to a slide show when using in-browser editing?

    how do you add a new thumbnail to a slide show when using in-browser editing?

    At this moment you can’t add pictures to a slideshow. You only can replace them.

  • How do I manage Lightroom photos when using 2 computers, keeping all edits made on either one?

    Based on http://forums.adobe.com/thread/1308132?tstart=0 I decided to add each question seperately:
    Hello, I'm quite interested in buying Lightroom 5.2. I tried the RC which ran out now. Yet, I have a several questions that I can't really find good conclusive answers to, that I'd like to get answered before buying LR. Please don't write maybe like this or that (assumptions), since I don't want to start my whole workflow and then realize that I have to change everything around, so please answer, if you know for sure that something works and you are, preferably, using that method too.
    This is the biggest question, where I mainly want a conclusive answer:  How do I manage Lightroom photos when using 2 computers, keeping all edits made on either one of them, using the same photos for editing. I won't use DNG. Details: I mainly use my older MacBook Pro, but would like to be able to use my PC as it's way better (Specs: i5 2500K, 16GB RAM, SSD, USB3, nVidia GTX 560 TI etc.). I have 2 external HDs that I could use, one for Backup and one for the actual Photos/Edits. I'll probably need to use it as my internal HDs are quite full, and I can't just delete stuff or move it to an (Developer programs, Lossless music, etc.).
    Based on this, how do I back up the whole thing e.g. Photos folder (all photos and edits, and preferably presets too)?

    I believe it should be possible to work cross-platform without having to relink files each time, or without having to keep exporting/importing the catalog, by keeping the single catalog and the image library on the one external drive which is then switched between systems as needed.
    Obvious first requirement is an external drive that is formatted in such a way (e.g FAT32) that it can be used on both platforms in read/write mode. Given that, if the catalog AND the images parent folder are both established at the same level in one overall parent folder, then it should be possible to take advatage of Lightroom's ability to use relative paths rather than absolute paths to detect the images, no matter if the drive is named (Mac) or lettered (PC). This is how "export as Catalog" works, i.e. it creates a "package", aka a parent folder, containing the catalog and a replica of the exported images folder hierarchy alongside the catalog. Take that "package" to another system (same OS or not) and "it just works" even if the drive letter is different or the OS is different....because the relative path from catalog to images is still the same.
    I haven't tested this cross-platform (though I have between different PC systems with different drive letters) so for me it's still just a theory, but there may be others who have done this successfully.

  • Adobe flash CS6 crashes when using the type tool or Editing word all the time... please help!

    Adobe flash CS6 crashes when using the type tool or Editing word all the time... please help!

    Nobody can tell you anything without proper system info or other technical details. The standard answer with all text issues simply is, that you have a "bad font" on your system and need to get rid of it.
    Mylenium

  • Using Lightroom 5.5 and Photoshop CC2014. Images no longer open in Photoshop when using "edit in" command. Photoshop opens but no image when trying to move between LR and PS. Any suggestions?

    Using Lightroom 5.5 and Photoshop CC2014. Images no longer open in Photoshop when using "edit in" command. Photoshop opens but no image when trying to move between LR and PS. Any suggestions?

    1. You have allowed Apple to auto-upgrade your Mac
    Turn off auto-update here:
    Menu > Apple > System Preferences > App Store
    2. The Icons on your dock are Aliases not real apps
    They point to where the apps really are which is:
    For Pages 5.2.2 in your Applications folder
    For Pages '09 in your Applications/iWork folder
    3. You are alternately opening documents randomly with either version of Pages
    Both Pages have the same file extension .pages and there is no certainty as to which version opens them when you double click on a file.
    right click on the file and choose which version you want to open it
    4. Pages '09 can not open Pages 5 files
    Pages 5 can not open Pages '08 files, and will convert and change Pages '09 and Word files.
    It will also auto save opened files into its own format.
    You can export these back to Pages '09 if you need to:
    Menu > File > Export > Pages '09
    5. Yes Pages 5.2.2 is a marked downgrade
    Pages 5.2.2 has a few improvements but has had over 110 features removed and is buggy.
    Sooner or later you will not be able to open a file or have it damaged in some way and it has a complex obscure file format largely incompatible with everything else, so you will not be able to rescue the contents of your file. If Pages or some third party server/eMail don't trash your file, eventually Apple will do it for you as it did when it released Pages 5 last September. I recommend using Pages '09 for the time being whilst you look for viable alternatives, some are here already and some are on the way.
    For further information about what has happened:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=0882463378700 abf43a0f2433506bbbc&mforum=iworktipsntrick
    Peter

  • I am in the process of trying to transfer my iTunes library from one computer to another. Some of the music/film info has been edited (by me) in my library (using get info). When put onto new computer the info has gone back to before i edited it.. Help!?

    I am in the process of trying to transfer my iTunes library from one computer to another. Some of the music/film info has been edited (by me) in my library (using get info). When put onto new computer (following apple's instructions- using an external hard drive) the info has gone back to how it was before i edited it.. Help!?

    Hello,
    I would recommend taking a look at the article below for more information about migrating your iTunes library.
    iTunes for Windows: Moving your iTunes Media folder
    http://support.apple.com/kb/ht1364
    -Griff W.

  • When attempting to use Lightroom external editor program to edit a photo in Photoshop Elements 10, the photo does not open / appear on photoshop elements screen.  I don't have any problem with this when using Photoshop Elements 6 or Photoshop CS.  I'm usi

    When attempting to use Lightroom external editor program to edit a photo in Photoshop Elements 10, the photo does not open / appear on photoshop elements screen.  I don't have any problem with this when using Photoshop Elements 6 or Photoshop CS.  I'm using a Mac with Mountain Lion OS.  Any solutions?

    Adobe now hides the editor - what looks like it is not - you want the editor hidden in the support folder - see http://forums.adobe.com/message/3955558#3955558 for details
    LN

  • Lightroom 5.2 freezes when using the spot edit tool with Wacom Intuos 5

    Hi,
       I've been using Photoshop 6.x with my Intuos 5 for almost a year and it's been great.  I recently purchased Lightroom 5.2 only to discover that when I use the spot edit tool that it freezes when i use this tool as a brush.  It starts off smooth, but after brushing across my area i want to clone/heal, Lightroom seems to freeze up, and the spot edit tool is unusable.  I can lift my pen off the tablet and a few seconds later Lightroom comes back, but the tablet is basically unusable to me.  The mouse works perfectly fine.
      I've read other posts at the end of last year '12, that walks through some regedits and disabling some other tablet functions, but none of those work for me.  Any suggestions would be appreciated.
    Thanks Ed
    Lightroom version: 5.2 [922700]
    Operating system: Windows 7 Ultimate Edition
    Version: 6.1 [7601]
    Application architecture: x64
    System architecture: x64
    Logical processor count: 8
    Processor speed: 2.7 GHz
    Built-in memory: 16375.0 MB
    Real memory available to Lightroom: 16375.0 MB
    Real memory used by Lightroom: 429.4 MB (2.6%)
    Virtual memory used by Lightroom: 403.7 MB
    Memory cache size: 300.8 MB
    Maximum thread count used by Camera Raw: 4
    System DPI setting: 144 DPI
    Desktop composition enabled: No
    Displays: 1) 1920x1200
    Adapter #1: Vendor : 1002
              Device : 9498
              Subsystem : 16031462
              Revision : 0
              Video Memory : 1005
    AudioDeviceIOBlockSize: 1024
    AudioDeviceName: Speakers (Realtek High Definition Audio)
    AudioDeviceNumberOfChannels: 2
    AudioDeviceSampleRate: 44100
    Build: LR5x20
    CardID: 38040
    Direct2DEnabled: false
    GPUDevice: D3D
    MaxTexture2DSize: 8192
    OGLEnabled: true
    Renderer: ATI Radeon HD 4600 Series
    ShaderModel: 10.1
    Vendor: AMD
    VendorID: 4098
    Version: 1002:9498:16031462:0000

    I solved my own issue.  I saw an article @ http://www.lightroomforums.net/showthread.php?19694-Spot-removal-tool-doesn-t-work-with-Wa com-Intuos-5-in-LR-5 that solved my issue.
    Step 1:
    Walcom Tablet Properties
    Step 2:
    Click on Customize and change the default line graph from this:
    Step 3:
    To this
    Step 4:
    Click OK.
    After that, my spot edit tool stopped freezing in LR 5.2 while i was using my intuos 5 pen.
    Prior to doing this, I also did the procedure listed here:  http://forum.wacom.eu/viewtopic.php?f=10&t=8036
    So it's possible that both need to be done in order for the freezing to stop.  I hope this can help others.

  • My pdf reezes when I click on COMMENT. I am trying to get at the tools to edit a pdf. If I use the tools from the toolbar, there is no issue, but once I click COMMENT, the document freezes and I have to open Task Manager to crash it. This started in the l

    Sorry, I am new to the type of problem-solution process and I do not know how to edit my first statement. My true statement is below:
    My pdf freezes when I click on COMMENT. I am trying to get at the tools to edit a pdf. If I use the tools from the toolbar, there is no issue, but once I click COMMENT, the document freezes and I have to open Task Manager to crash it. This started in the last seven days (3.31.15).

    I answered your questions below, BUT while I was searching for properties, I found the REPAIR ACROBAT INSTALLATION feature, did the repair and (Voila!) the issue was resolved!
    Thanks for making me search for information.
    Karen
    I am using Acrobat XI Pro, version 11.0.10.32.
    I did not create the file I was working in during the freezes, so I tried a PDF that I created with Adobe and it also freezes when I click on COMMENT. I did discover that the COMMENTS plug-in is loaded. (see image
    I have used COMMENT for years without this issue occurring. It started in the last 2 weeks.
    I could not find Properties under the file menu, but found a security setting in Preferences under the Edit menu. It did not have a way to allow/disallow COMMENT.

  • When i put in a compact flash card iphoto automaticaly comes up to import my photos. I have to exit out of iphoto to use the editing softwear that i prefer to use every time. It is very annoying. How do i prevent this from happening?

    When i put in a compact flash card iphoto automaticaly comes up to import my photos. I have to exit out of iphoto to use the editing softwear that i prefer to use every time. It is very annoying. How do i prevent this from happening? I have looked in system prefereces....maybe i am over looking something, Thanks

    iPhoto Menu -> Preferences -> General -> Connecting Camera opens.... And select your preferred app.
    You can also make the same choice in the Image Capture (in your Applications Folder) and Aperture preferences.
    Regards
    TD

Maybe you are looking for

  • Variable name not coming in the alert message

    Hi All, Reference with blog <u>/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step My problem is alert message not showing the variables value.Alert will generated properly but variable like "SXMS_ERROR_CAT, SXMS_ERROR_CODE" not showing

  • Unable to contact Primary Server

    Neither of my Macbook Pros can access the Primary Server this morning - 10.33 BST.

  • Yosemite: Mail folders moved and messages disappear

    OS X 10.10.1 on a Mac Mini 2.6 GHz, 8gb RAM, 1tb HD, Gmail setup as IMAP in Mail, personal mail folders sorted alphabetically Intermittently while moving Inbox messages to personal folders, or opening messages in personal folders, the folders will dr

  • Bold lines in Mail Body

    Hi experts, I am reading the standard text using read_text (FM) and sending a mail . For this I have used SO_NEW_DOCUMENT_ATT_SEND_API1. Out of 50 lines I need some line to be BOLD. Can anyone help me in solving this issue? Thanks in Advance, Harsha.

  • How to install windows on macbook pro me294 using downloaded drivers?

    Recently I bought a MBP and I'am going to install windows on it because of my job. I have a problem with bootcamp assistant: I have downloaded the bootcamp drivers but when I am creating the setup disk it automatically chooses to download the drivers