Creating another property is the last option but it does not make sense to hold account number in one property and hold masked property in other. it would be great if you might have written any such control which you can provide me.
It might be convenient to use one of the declarative rules for this purpose. Good student question: When is a declare-onchange better than a declare-expression ?
Anyway, the idea is, you have an account-mask property that is related to the account-actual property via a declarative rule, such that every time the account-actual property is changed, the account-mask property automatically changes appropriately.