The beans themselves are unlikely to trigger an attack, but the oil or fat used to make them may. If the toxic canola oil or other refined oils are used, then this may work as a trigger. If the beans are cooked with olive oil or butter, they may be fine. Refried beans can be very upsetting to the stomach.
Also, as it so often is the case, an attack doesn't just result from eating one meal that contains, for example, eggs which are a leading trigger of gallbladder attacks. Such a trigger brings on an attack only after a series of small, unnoticed ones over a period of time. There is a sort of buildup and it may take just a normal meal to bring on a major attack.
Re. your second question, that depends who takes does this. A pitta type, whose capacity to deal with citric acid or malic acid, sour fruits, etc. is very limited, would develop problems with that method. A Vata type, on the other hand would benfit from it. Their body type misses out on sour tasting substances and can use a lot more of them than the other body types. Pitta types have more than enough in their body. Like wild animals, our human body would naturally seek foods/nutrients that it lacks, and dislike those that is has enough of (provided our natural instinct would not be manipulated through social/ cultural consitioning).
With respect to liver cleansing, though, it is better to soften stones in preparation of a liver cleanse when the stones are coming out along with a lot of oily bile, which makes their passage out smooth and easy. You don't want to have stones come out voluntarily, for this could end up causing a gallstone attack.
When you eat fatty foods and trigger the gallbladder, you only open the gallbladder, but not the the bile ducts of the liver. Besides, the amount of bile released by the liver and gallbladder during the liver cleanse is much more than in typical fatty meal, unless you drink half a cup of olive oil with your meal. In that case, though, you would feel very sick and throw up. If you eat a very fatty meal it is likely that your stomach develops "heartburn." The liver cleanse works because you don't have any food in the stomach. You will pass the oil mixture quickly on to the small intestine, which triggers the bile and stone release. Eating fatty meals, on the other hand, take a long time to leave the stomach and are released into the small intestine in small bits and pieces, not enough to create a liver cleanse effect.
Andreas