Thursday, June 10, 2010

jQuery calendar IE 7



I was trying to use the jQuery calendar datepicker (http://docs.jquery.com/UI/Datepicker) and I've had it working before on another project (on all browsers including IE 7), but in the current project I'm working on, sometimes the arrows (Next, prev) to move to the next and previous month don't work correctly in IE7. In firefox, opera, safari, IE8 it works fine. What's worse, it also worked fine in IE 7 on the previous project. So how was this project different?

I had noticed that the global CSS property position was set to relative as follows:

* {
    position: relative;
}

 To get it working, I did an override on the global property as follows:
* {
    position: static;
}

That got the arrows in the calendars working again

Monday, June 7, 2010

HibernateException "The class has no identifier property"

I got the above error when updating an existing record loaded from the database and not when inserting new records.

The hbm.xml file showed the following:


        <id column="user_id" type="java.lang.Long">
            <generator class="foreign">
                <param name="property">user</param>
            </generator>
        </id>

I added the name attribute in the id element, and that resolved the issue:


        <id name="id" column="user_id" type="java.lang.Long">
            <generator class="foreign">
                <param name="property">user</param>
            </generator>
        </id>