TableSorter class never ever calls getModelToView()

I am using TableSorter class to sort tables. There is a piece of optimization code that never gets called: getModelToView(). For that method to be called a check is performed (modelToView != null). But modelToView is assigned inside that method! This causes a single cell update to trigger fireTableDataChanged(). Is that a known bug? Is there a fix?

I see what you mean.. you're right, it seems like modelToView will always be null.
I found another bug.. when mouse is clicked on the tableheader area where it doesn't have any column (when table is stretched it can have no column there) , columnModel.getColumnIndexAtX(e.getX()) returns -1, and if the check there is not added, then get a runtime out-of-bounds exception on the following line columnModel.getColumn(viewColumn).getModelIndex() because viewColumn is set to -1. See the code snippet below:
public void mouseClicked(MouseEvent e) {
            JTableHeader h = (JTableHeader) e.getSource();
            TableColumnModel columnModel = h.getColumnModel();
            int viewColumn = columnModel.getColumnIndexAtX(e.getX());
            if(viewColumn == -1) {  // added!
                return;
            int column = columnModel.getColumn(viewColumn).getModelIndex();

Similar Messages

  • Setter never get called in selectManyCheckbox!!

    Hello
    I posted a topic about selectManyCheckbox / selectItems , but I didnt receive any reply , so
    I reviewed earlier threads talking about the same problem:
    * setter method NOT CALLED* for selectManyCheckbox :
    http://forum.java.sun.com/thread.jsp?forum=427&thread=398097
    " ....My page is rendered with all of the correct checkboxes I require.
    One for each object in the problemOptions list.
    Once I check the boxes I want and submit the form,
    I am losing my choices when I come back to the same page.
    I noticed that I never see my setter being called.... "
    http://forum.java.sun.com/thread.jsp?forum=427&thread=401926
    "..if one ore more items are selected, ..... ,
    after it called the getter 3 times and the setter not at all.
    there is no error message and no stack in any of the logs...."
    this is sample of my JSP/backing bean :
    JSP :
      <h:selectManyCheckbox  id="foodType" value="#{productBean.foodType}">
            <f:selectItems value="#{productBean.foodTypes}" />
      </h:selectManyCheckbox>
    Backing bean class ProductBean :
      private ArrayList foodType = new ArrayList();
      private ArrayList foodTypes = new ArrayList();
    public ProductBean()  {
        foodTypes.add(new SelectItem("Sweet","Dweet label","Sweets"));
        foodTypes.add(new SelectItem("desert","Desert label","Deserts"));     
        foodTypes.add(new SelectItem("seeFood","SeeFood label","SeeFoods"));   
      public Object[] getFoodType() {
          try {
            return foodType.toArray(); }
          catch (Exception ex) { return null;  }
      public void setFoodType(Object[] newFoodType) {
        // NEVER GET CALLED !!!
        int len=0;
        if (null == newFoodType || ( len = newFoodType.length)==0 ) {    return; }
        foodType.clear();
        foodType = new ArrayList(len);
        for ( int i=0;i<len;i++) {   foodType.add(newFoodType); }
    public ArrayList getFoodTypes() {
    return this.foodTypes;
    public void setFoodTypes(ArrayList foodTypes) {
    this.foodTypes = foodTypes;
    what am I doing wrong ? , I'm really stuck , what may be the reason for JSF not to call setter for setFoodType??
    I saw a reply for Adam.winner stating that it is not suitable to use Object[] type as setter argument ,
    and to use String[] instead, but this was in EA4 .
    is this still applicable for JSF 1.0 FR ?
    I appreciate any help
    -- Erich

    The data type of the SelectItem itemValue properties must be the same basic type (primitive or the corresponding boxed type) as the data type of the UISelectMany/UISelectOne value.
    In this example, the SelectItem itemValue properties are of type String, but the UISelectMany value is of type Object. Change it to String, and it should work.

  • Is there any way I can recover deleted pictures from Camera Roll and iCloud? Please please help me. All of my precious pictures are gone that I can never EVER get back. I dont have any iCloud or Camera Roll backup; and my PC can't download more software.

    Hi everyone! I'm in need of extreme help. You see, today, two months ago I went out of the country from the United States of America. I took about 1500 pictures ONLY on my iPod touch. When I returned to the United States to my home, I accidentally deleted a little more than 100 pictures. Then, thinking I could get ALL of the pictures back at once, I restored my iPod touch from an iCloud backup I had a couple of days before. Instead of getting all of my pics back, they all got erased. The pictures that I did delete were deleted from Camera Roll AND Photo Stream (iCloud). Then, I was only able to get about 500 pictures back from iCloud. So about 1000 are still gone. When i did the restore, I thought all my pictures would be there, but they weren't and I couldn't possibly figure out why; because a restore from iTunes or iCloud is supposed to restore your device to the settings of the time you backed up your device. All of my other settings were just the way they were supposed tone for the time being, all except my pictures, which contained not one picture in any folder. So EVERYTHING from Cameta Roll was gone, and only about 500 pictures survived. I kept retoring and restoring, hoping they would come back but unfortunately they didn't. Then one time a restored again, I saw all of them back!! But then, within a blink of an eye, they disappeared as soon as I tapped on one picture. Then, I knew they were still in reach, but I just had to find them. Where could those 1000 pictures go? I looked up how to recover deleted photos, but I have to install a software. My computer CANNOT possibly take anymore software on it, my PC is very sensitive and I cannot delete anything off of it. Please please help me. What can I do to get my pictures back? They are memories that I can never EVER EVER get back. Thank you so much.

    Please please help me, if you know how.

  • How to find out which class/method is calling System.gc

    Hi
    I am seeing frequent FULL GC and not able to locate which particular class/method is calling the System.gc(). I have disabled it using -XX:DisableExplicitGC and performance issues have been resolved. Also, I noticed that it does not happen periodically, so it is not RMI GC. How to find out who exactly is doing this? Does any of of the profilers like Optimizeit/Jprobe help find out this.
    Thanks

    Hi
    I am seeing frequent FULL GC This is because you are creating and destroying objects VERY frequently. Try to look at your design and see where you can reuse objects (i.e. object pooling) if possible, that is if this is adversely affecting performance.
    and not able to locate
    which particular class/method is calling the
    System.gc(). Classes don't call GC. The VM handles that automagically.
    I have disabled it using
    -XX:DisableExplicitGC and performance issues have
    been resolved. Also, I noticed that it does not
    happen periodically, so it is not RMI GC. How to find
    out who exactly is doing this? Does any of of the
    profilers like Optimizeit/Jprobe help find out this.OptimizeIt will tell you everything you need to know. However, NetBeans offers a free profiler now!

  • Can we query more than one class in a call to .tmib

    Hi,
    i am creating a utility to monitor the applications at run time using mib.any
    body have an idea if we can query more than one class in one call to .tmib.
    thanks
    roopesh

    That would be an interesting enhancement, perhaps using Embedded FML to
    pack multiple MIB requests into one buffer.
    Product Management makes all decisions about major enhancements, and it
    is based on customer need, so that's where the requests should go.
         Scott Orshan
    roopesh wrote:
    >
    yes.
    i am trying to devlop a utility which can monitor
    applications at runtime.i wanted to make as less the
    no of calls to tmib as possible but one class does
    not give all the information so i need to query
    more than one.
    anyways thanks for the reply.
    "MS" <[email protected]> wrote:
    Hi,
    Are you trying to write a Tuxedo app health-check monitor utility.
    A tuxedo client can make different calls to .TMIB service for different
    classes.
    I don't think we can query more than one class in a single call.
    Are you looking for something else??/
    HTH
    regards
    MS

  • Why ipad or ipad mini has no calling facility when wifi cellular is mentioned in specifications and also why do they never provide calling facility for their tablets?

    wifi+cellualr is clearly mentioned in ipad n ipad mini then why is there no calling facility?why does apple never provide calling facilities like other company tabs?

    A.P.D wrote:
    stedman1:yeah i know that.my question is why doesn't it provide?i mean cellular means it should be having calling facilities right?and if it doesn't have and will never have calling facility then why add cellular in specifications.i mean it's just confusing and i guess i'm not the only person to ask this question,m i?
    The term cellular means cellular data only, there has never been a telephone capability built in to the iPad WiFi+cellular models.
    You must arrange cellular data coverage with your cellular carrier or another cellular carrier to use the cellular data capability of the iPad.

  • How to change of Messge classe assigned to Call point?

    Dear friends
    I have defined one validation, in line item call point - 2, I have defined one message class. Now I want to change the message class assigned to call point 2 ie. line item.
    Please help me how to change the message class.
    Thanks in advance.
    Regards
    Kiran A

    hi
    Message class cannot be changed ... As message class is for one particular submodule
    eg: message class for account receivable /account payable
    message class for asset accounting.
    So if you have created a validation you might have created for account receivable so message class for account receivable would be displayed by default you cannot change it to message class for asset accouting . you have option for changing message no but not message class.

  • How to use TableSorter class with DefaultTableModel

    Hi Friends
    Please tell me how to use TableSorter Class which is in the Java. Tutorials with DefaultTableModel.
    i saw in a thread there it was given that we have to pass the DefaultTableModel to the TableSorter Class.
    I tried to use like that. But i am getting Error Like Exception occurred during event dispatching:
    I am posting the part of Code where i use the DefaultTableModel
         private void displayavailablity(String selectedAuthor)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        String bname,bauthor,bcategory,bref1,bavail,bid;
                        int bref,mid,num;
                        rs = st.executeQuery("SELECT BId,BName,BAuthorName,BAuthorandPublisher,BCat FROM Books where BAuthorandPublisher='" +selectedAuthor+"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"NUMBER","BOOK NAME","AUTHOR","CODE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        TableSorter sorter = new TableSorter((DefaultTableModel)table.getModel());
                        rs.close();
                   catch(SQLException ex)
                        System.out.println("ERROR IS HERE");
                        ex.printStackTrace();
         }Please help me on this issue Otherwise Please give me some Sample coding to implement this sorting. with DefaultTableModel
    Thank you for your service
    Cheers
    Jofin

    I don't know about any TableSorter class, but I suppose you mean javax.swing.table.TableRowSorter.
    The TableRowSorter is to be attached to the JTable, not to the data model. Here's a cut'n'paste from the last time I used it:
    RowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel);
    myTable.setRowSorter(sorter);
    And heres from the JDK1.6 documentation:
    TableModel myModel = createMyTableModel();
    JTable table = new JTable(myModel);
    table.setRowSorter(new TableRowSorter(myModel));
    Check out http://java.sun.com/javase/6/docs/api/javax/swing/table/TableRowSorter.html. I find it to be good documentation.

  • How to preent the Super.doDML of EOImpl Class from being called?

    Hi,
    I am working on an ADF BC application, I ahve created an insert fomr that has two different View Objects based on two different entity objects.
    These two View Objects are in master detail format,
    What I want to do is call the super.doDML for the master and there only I do the insert in the detail VO also?
    But, the problem is everytime I try to access do so the entries in the master are done successfully but for the detail VO both the custom code as well as the super.doDML are getting called?
    Is there a way I can prevent the default super.doDML in the EOImpl class from getting called in case of insert operation?
    If somebody has any idea please help!!
    Thanks & Regards,
    Raksha

    Just overwrite the doDML method for the EO you want and use a condition to figure out if the DML is an insert command.
    Something like this:
    37.2.2 Forcing an Update DML Operation Instead of a Delete
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcadveo.htm#sthref2899
    Also, if what you are trying to do is control the order of posting the inserts see this:
    37.8 Controlling Entity Posting Order to Avoid Constraint Violations
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcadveo.htm#CEGJAFCF

  • Constructor of derived-class has to call constructor  of super-class?

    In java, constructor of derived-class has to call constructor of super-class? there is no way to omit this step?

    Correct. If you do not explicitly call the constructor, a call to the no-arg c'tor, super(), is automatically inserted.
    It would be a mess to have it any other way. You'd be creating objects that are not completely initialized. They'd be in an invalid state.
    Constructor rules:
    1) Every class has at least one ctor.
    1.1) If you do not define an explicit constructor for your class, the compiler provides a implicit constructor that takes no args and simply calls super().
    1.2) If you do define one or more explicit constructors, regardless of whether they take args, then the compiler no longer provides the implicit no-arg ctor. In this case, you must explicitly define a public MyClass() {...} if you want one.
    1.3) Constructors are not inherited.
    2) The first statement in the body of any ctor is either a call to a superclass ctor super(...) or a call to another ctor of this class this(...) 2.1) If you do not explicitly put a call to super(...) or this(...) as the first statement in a ctor that you define, then the compiler implicitly inserts a call to super's no-arg ctor super() as the first call. The implicitly called ctor is always super's no-arg ctor, regardless of whether the currently running ctor takes args.
    2.2) There is always exactly one call to either super(...) or this(...) in each constructor, and it is always the first call. You can't put in more than one, and if you put one in, the compiler's implicitly provided one is removed.

  • IPad 3 freezes after upgrade to 8.0.  Never ever had a problem with 7, at all.  want to throw the stupid thing out.

    After upgrading from 7 to 8 my iPad 3 will freeze using email, safari, games.  I never ever had a problem before this upgrade.  Have done all the temporary suggestions but nothing is a permanent and will come right back.  I am so sorry that I upgraded, can not go back.  I really want to thank the IOS guys for screwing everything up.  Seems like old times with the Microsoft Tech guys.  I have no problem with my iPhone 6 Plus phone.

    It seems to be caused by roboform 7.5.1. I upgraded to the latest version of robo and it's working now. Sorry mozilla, not your fault.. very frustrated.

  • Implementation of TableSorter class partially successful

    Greetings, esteemed experts.
    I have successfully applied the TableSorter class to my table, and sorting occurs correctly in runtime. The sort is performed in ascending order, which matches the clients' requirement. However, the tooltip text for the sort icon (up/down arrows) remains as 'not sorted', and clicking the icon multiple times does not result in the sort toggling between ascending and descending directions.
    All the articles and posts I have read regarding the TableSorter class seem to indicate that this is not consistent with its design.
    Any wisdom to share?

    Sorting was not being invoked properly because the field that is being sorted is a time field. The string comparison collator class could not sort the values, so the TableSorter.class Comparator method was modified to parse out hour and minute values. Fortunately, for our application, no other columns in the table have the 'sortable' requirement, so we could customize the class file for the project without impacting any other functionality.

  • GetGroupMembersInternal method never been called

    Hello,
    Regard to my custom realm, I notice that my getGroupMembersInternal method
    has never been called although I set weblogic.security.groupCacheTTL=1.
    I'm sure I implemented my group by subclassing from FlatGroup and implement
    necessary methods for it and it works fine for authentication and
    authorization. But it can't use group member refresh feature 'cos
    getGroupMembersInternal method never been called.
    Could you tell me what I've done wrong ?
    I uses WLS 5.1 with service pack 3 on Win2K. Do I need the new patch ??
    Thanks in advance,
    Siros

    "Benny" <[email protected]> wrote:
    I have resolved my problem , It was a spelling mistake for the method name !!!!
    Now the method is getting called and all the group members are loading , I use
    secure way as my ldap security store .
    Benny
    >
    Hi ,
    I have similar problem , I am using weblogic server6.0sp1
    , wrote a customRealm as per documentation provided in weblogic site
    , I can see
    users and groups in the console , because
    getGroupmembersInternal never been executed group members are not loading
    with
    the group name , could any one post an explanation
    Thanks
    Benny
    "Siros Supavita" <[email protected]> wrote:
    Hello,
    Regard to my custom realm, I notice that my getGroupMembersInternalmethod
    has never been called although I set weblogic.security.groupCacheTTL=1.
    I'm sure I implemented my group by subclassing from FlatGroup and implement
    necessary methods for it and it works fine for authentication and
    authorization. But it can't use group member refresh feature 'cos
    getGroupMembersInternal method never been called.
    Could you tell me what I've done wrong ?
    I uses WLS 5.1 with service pack 3 on Win2K. Do I need the new patch
    Thanks in advance,
    Siros

  • Last version of class file not called by Tomcat

    Hi,
    I'm a beginner in JSP/Tomcat.
    I would like to include as much java code as possible inside java classes and just call java methods from my JSP pages.
    For instance in project PCliente I've created the Java class
    /u5/web/jakarta-tomcat-4.1.27/webapps/ROOT/WEB-INF/classes/PCliente.java
    The class compiles successfully into PCliente.class which is stored in the same directory as the source.
    The first time I call the class from my JSP page it runs OK.
    The jsp page is in
    /u5/web/jakarta-tomcat-4.1.27/webapps/ROOT/pcliente/resultados.jsp.
    After I make some changes in PCliente.java, compile it, and run again the class from the JSP page, it doesn't get the last version of PCliente.class but a previous version. Also, I ignore where this previous version is kept (I assume Tomcat keeps a backup !? Where ?).
    Can someone please tell me what am I (or Tomcat or both) doing wrong ?
    I still have a serious handicap with Tomcat's configuration. A simple hint regarding this problem would be very apreciated.
    I'm using Tomcat 4.1.27 and J2SDK 1.3.1_9 installed in a Solaris environment.
    Thanks for your help,
    Miguel

    Hi,
    It sounds like your hitting the good ole rule that you need to restart the web application server (sometimes just a refresh will work, depends on the app server) when deploying new/updated classes.
    In short, if you restart Tomcat it should use the newer class...
    dapanther...

  • I've never EVER visited sexually oriented websites, but when I'm using firefox this keeps popping up BRONTOK.A[10] -- Hentikan kebobrokan di negeri ini -- 1. Penjarakan Koruptor, Penyelundup, Tukang Suap, & Bandar NARKOBA ( Send to "NUSAKAMBANGAN")

    I HAVE NEVER EVER VISITED SEXUAL WEBSITES - EVER!
    Now for some VERY STRANGE REASON ONLY when I use the browser Firefox I keep getting this pop-up:
    BRONTOK.A[10]
    -- Hentikan kebobrokan di negeri ini --
    1. Penjarakan Koruptor, Penyelundup, Tukang Suap, & Bandar NARKOBA
    ( Send to "NUSAKAMBANGAN")
    2. Stop Free Sex, Aborsi, & Prostitusi
    ( Go To HELL )
    3. Stop pencemaran lingkungan, pembakaran hutan & perburuan liar.
    4. SAY NO TO DRUGS !!!
    -- KIAMAT SUDAH DEKAT --
    Terinspirasi oleh:
    Elang Brontok (Spizaetus Cirrhatus) yang hampir punah
    [ By: HVM31 ]
    -- JowoBot #VM Community --
    === Akan Kubuat Mereka (VM lokal yg cengeng & bodoh) Terkapar !!! ===
    When I use the Internet Explorer I DON'T GET THIS POP-UP!
    == This happened ==
    Every time Firefox opened
    == ABOUT A WEEK AGO

    Your issue may be caused by Malware. You can run and update the following '''free''' anti virus software:
    1. Malwarebytes (Free version) - http://www.malwarebytes.org
    2. Spybot Search & Destroy - http://www.safer-networking.org
    3.Spyware Terminator - http://www.spywareterminator.com
    In addition, there are a number of forums you can use to help get rid of your infection. These include:
    *[http://www.bleepingcomputer.com/forums/ Bleeping Computer]
    *[http://forums.spybot.info/ Safer-Networking Forums]
    *[http://www.spywarewarrior.com/index.php Spyware Warrior Forums]
    *[http://www.spywarewarrior.com/index.php SpywareInfo Forums]

Maybe you are looking for

  • Query database fields are the same character but not in the same order

    Hello Oracle WIZ ! I have a simple question regarding perhaps a function. I have a columns in a database with data the could have been transpose meaning the keyer might have entered. 1234 and someone else could have come in and put 2134. the characte

  • Problem on interactive report

    hi all i generated basick list, from dat list,(2 or more recods) i want to read some records to display in secondary list. howz it possible. i am using read statement,but?

  • Family iCloud account

    Hi, Hoping someone can help...  in the day of family mobile me i created my kids email accounts. Then migrated them to the icloud platform. They have since both forgotten their passwords and I need to retrieve some of their emails. They have also cha

  • Will google input tool work in adobe story

    i want to buy story and i have question will google input tool work in adobe story.

  • Vista SP1, ALchemy1.0.0.3 and Warcraft III

    when update to Vista SP,if i make ALchemy.0.0.3 for Warcraft III enabled, the game can't open.but work fine in Vista RTM. sorry for my english.