* * *
and plan "B", is to listen on on fieldbuilder "load" event
if ($display)
{
(function()
{
$evt.addEventHandler($display, "start", Extension$onDisplayStartedReadonly);
function Extension$onDisplayStartedReadonly()
{
$evt.removeEventHandler($display, "start", Extension$onDisplayStartedReadonly);
var view = $display.getView();
if (view && Tridion.OO.implementsInterface(view, "Tridion.Cme.Views.Component"))
{
var fieldBuilder = view.properties.controls.fieldBuilder;
$evt.addEventHandler(fieldBuilder, "load", Extension$onDisplayStartedReadonly$_collectProperties);
}
};
function Extension$onDisplayStartedReadonly$_collectProperties(event)
{
var fieldBuilder = event && event.source;
if (fieldBuilder)
{
var fieldsContainer = fieldBuilder.properties.input;
var fieldsNode = fieldsContainer.getElement();
var control = null;
$j(fieldsNode).children().each(function (index, elm)
{
var cntrl = $j('div.input', elm)[0].control;
console.log('fieldname=' + cntrl.getFieldName());
});
}
};
})();
}