New function 'getBehaviorByType'. 'retrieveDirecSubTemplate' now public.

Made retrieveDirecSubTemplate public. Added function to get the behavior attribute of a widget by its type (e.g. InputFiled) recursively in a specified context.