Thursday, 19 August 2010

IE7 stretches element around text input field

Situation description: one of the application forms has lots of input fields. They're all formatted using table. One main table has two columns, where each of them contains another table with two columns. In each row of the inner table the first cell contains field label and the second cell contains field itself. Whole table is in DIV element with width of 100%.

I received some problem reports from users that by entering large text in the input field (input type="text") of the first column, other column is moving to the left until it completely disappears. Width of the input element is set to 250px. It turns out that IE7 allows input elements to stretch according to the length of entered text. Although width is set to 250px and user sees it as 250px wide, cell is stretched as if input element wouldn't have defined width.

Solution i found is add overflow:hidden style attribute.

Wednesday, 6 January 2010

Spring 3.0

At the end of last year Spring 3.0 was released (http://blog.springsource.com/2009/12/16/spring-framework-3-0-goes-ga/). But if you're developing v1.0 portlets, then you won't be able to use it, because it REQUIRES portlet v2.0 API.

Friday, 11 September 2009

After setting up environment for developing web services, creating simple Demo service and deploying it, console gave out the following message:
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@337838
org.apache.axis2.transport.http.AxisAdminServlet
java.lang.ClassNotFoundException: org.apache.axis2.transport.http.AxisAdminServlet
...
The cause is that current WTP doesn't support Axis2 1.5 version. Currently it supports only 1.4.1 (see this discussion).

Saturday, 27 June 2009

Adding local postgres database to PgAdmin in ubuntu

Synaptic makes both (posgres & pgadmin) installations trivial. After installation you must change password of 'postgres' user:
sudo -u postgres psql postgres
ALTER USER postgres WITH PASSWORD 'secret';
\q
Now add local database in PgAdmin, which shouldn't cause any problems.

Friday, 26 June 2009

Eclipse minimal installation

Update: I've created an updated (my) version of installation of minimal versionupdated (my) version of installation of minimal version since link referred in this post is dead.

This post explains how to get minimal eclipse installation. This works great! Now i can install plugins by my choice - i don't need nor CVS, nor RST and a lot of other stuff included in JEE version.
Also new plugin installation has been improved a lot in Galileo. Eclipse keeps getting better and better. Can't wait to see other new features and improvements.

Wednesday, 3 June 2009

Maven remote archetype catalogs through proxy

Some days ago created a new maven archetype. Everything went good till i had to deploy it on our maven (Nexus) repository.
First i had to install an archetype plugin. Since i had older Nexus installation, i had to update it to 1.3.x to get that plugin working (later i came across some e-mail treads where developers agreed to create that plugin 1.2.x-compatible... later... :( ).
Finally i could see archetype-catalog.xml through my browser. But when i added it to eclipse as remote file, it gave me WARN messages saying "Error reading archetype catalog http://my.domain.com/service/local/nexus-archetype-plugin/public/archetype-catalog.xml Error transferring file". Now what?!?
It turns out that there's a bug http://jira.codehaus.org/browse/ARCHETYPE-202 - can't fetch remote archetype catalogs through proxy. And no fix versions. yet... Is this the cause?

Now i'm using workaround:
  1. downloadi XML file and save it as /home/me/.m2/archetype-catalog.xml
  2. add it to m2eclipse archetypes as local catalog
  3. repeat after catalog changes :(
Better ideas?

"mvn archetype:generate -DarchetypeCatalog=http://my.domain.com/service/local/nexus-archetype-plugin/public/archetype-catalog.xml"
But why is it working though command line?

There's still much to learn...

Friday, 24 April 2009

HIbernate equals/hashCode

Just to write this down:
When implementing equals() or hashCode() methods wich will be used in Hibernate, you should always use properties with real "business value" (keep your hands off the ID).
See also: http://www.hibernate.org/109.html