I have a colleague who charges lipo batteries this way (in a sealed outdoor device). However he has a shunt regulator across the battery.
This will work well for lipo's and possibly lead acid batteries, but not with nicad or NIMH batteries.
You need to ensure that the charge current cannot...