No, they're not the same problem by the sound of it, though it could be. What you seem to be describing on your beans are leafminers, which are the larvae from eggs laid inside the leaf by a female fly that looks greyish in appearance. As the eggs hatch, the larvae then tunnel their way through the leaf, eating as they go. As this is is an edible crop, you don't want to be using true chemical insecticides, so something like neem oil would likely be the safest and most effective treatment. More info in the link below, which gives information on control of this problem, with an image of leafminer damage on a leaf;- I know it mentions houseplants, but the information is still appropriate. You may have different types of leafminer where you are - even so, neem is probably the way to go for both whitefly and leafminers.