Minecraft wiki entry for Furniture, associated text: Place a dispenser and on top, put an iron block. Then, place an iron door in front of it, and put a button or lever on the iron block. Then just fill the dispenser.