The incomparable Chris Hadfield did a related experiment on the ISS using water on a cloth. You can see that the water does not fly off the cloth.
To simplify the experiment consider water on a flat surface:
The air/water interface has an energy per unit area, so increasing the area of the air/water interface takes energy. This is also true for the water/substrate interface, and the question is which interface has the higher energy.
If the air/water surface energy is greater than the water/substrate surface energy then the drop tends to spread out, as shown on the left, and the water sticks to the surface even in zero-g. If the water/substrate surface energy is greater than the air/water surface energy then the drop tends to ball up as shownon the right. If the water/substrate energy is high enough, e.g. for water on PTFE, then the drop will ball up completely and in zero-g it would detach from the surface and float off.
If you'd like to make this more quantitative the Wikipedia article on contact angles explains how the contact angle is related to the interfacial tensions. Once the contact angle has increased to around 180º the water will float off the surface in zero-g.
For water in a container like a glass there are extra complications. For the water to leave the glass air has to flow round the water and into the bottom of the glass. This means that even in a glass made of PTFE the water would flow out only slowly. The other factor is that a mass of water won't move anywhere unless you apply some force to it. So even in a PTFE glass the water won't flow out if unless you apply some force to the glass. The water wouldn't just flow out of the glass of its own accord.
Finally, all the above applies only in an atmosphere e.g. in the ISS. If you put a glass of water in a vacuum the water will start boiling and will rapidly fly out of the container regardless of what the container is made from.