As correctly handle the event, if a lot of conditions and information is subject to change?
There is a task to write a calculator the final price. Displays a tree list price and when you select a particular item (checkbox or radio) final price varies. But in some positions when the choice should happen any unique event for example, the entire calculator is reset and selectable 3 position. Or other event which you want. The problem is that each item has its own id and it turns out I have to constantly watch what id to specific id to generate an event affecting other items with defined id-mi. That is just a very hard peg.
There is a solution - when filling out the price for a specific item to specify a callback function that will be executed when clicked. But I would like to hear other implementation.