Yeah weight training while dieting is definitely the way to go. Not only for health benefits, but for how you actually look, as it promotes the weight you lose to be primarily fat. Getting adequate protein while doing this is also beneficial (not sure how much, but there have been studies on this)