If the Israelis pull out of the West Bank, then can the border between Israel and the West Bank be sealed and made uncrossable?
If so, then I would think that the obvious solution is to pull out of the West Bank and then seal the border. Once sealed, the Palestinians and Israelis could go their own separate ways: the Palestinians would no longer have occupation to beef about, and the Israelis would basically be free of Palestinians who enter Israel to blow up car bombs and the like. (Incidentally, I would think that the same solution would apply to Gaza)
As to the hard line Jewish settlers in West Bank (who are, in my opinion, one of the principal root causes of the present hostilities) would either have to pull out and resettle in Israel or else be left to their own devices.