1
我希望能夠跟蹤用戶在特定UI表單上進行的操作。如何跟蹤對UI表單的更改?
例如 - 用戶從組合框中選取產品,填寫文本字段等。 某些字段是有條件的,這意味着只有在選擇了某些先前的選項時它們纔可見。
我希望能夠在任何特定時刻跟蹤他的選擇 - 基本上我希望報告由用戶填寫表單時所用的單個事件組成。
我想Chain of Responsibility模式的變化:
public interface Chain{
setNextChain(Chain next);
getNextChain();
setPrevChain(Chain prev);
getPrevChain();
}
public class Field implements Chain {
// All of the chaining implementation...
// All of the Action's members...
private string[] actionData;
}
public class Product extends Field{
// old Product logic integrated within the chain...
}
public class AdName extends Field{
// old Product logic integrated within the chain...
}
不知道這是否是正確的做法,並希望在設計你的看法。
我想你正在尋找Builder模式 – 2013-04-10 14:13:48