How do they manage to not charge the batteries in the air? Sounds weird, no batteries will maintain it's power level even if they are not used. When i drive my car, I use the battery to start the engine, and the battery is charged constantly from there on, even if it is not used for anything.
Generally speaking the a/c will be on some sort of AC power long before it gets airborne. Either ground power or APU will be AC supply. If the a/c was powered up from 'dead' then the battery will be recharged by one of those sources probably hours before the engines are even started.
The 787 (and other a/c) will have a rather more sophisticated charging system than your car.