styleClass should probably be set to nil if length is 0.