Self-localization of Bose-Einstein condensates in optical lattices via boundary dissipation.