I fix this problem (but just for infowindow):
var myDynamicSedLayer = new esri.layers.FeatureLayer(layers.read_layer_interr_sed(),{
mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
infoTemplate: myinfotemplate.getSubFailure(),
outFields: ["*"]
});
Where myinfotemplate.getSubFailure() is a infotemplate-service where i get the infotemplates customized by me.
Example:
...
function getInfoTemplate(){
return {
getSubFailure(){
let chqSubInfoTemp= new esri.InfoTemplate();
chqSubInfoTemp.setTitle("<b>Codigo Subestación: ${ARCGIS.DBO.SED_006.codigo}</b>");
let chqSubInfoContent =
"<div style=padding-top: 10px;>ID Orden: ${ARCGIS.DBO.POWERON_ORDENES.id_orden}<br></div>"+
"<div style=display:inline-block;width:8px;></div>"+
"<div style=padding-top: 10px;>Alimentador: ${ARCGIS.DBO.SED_006.alimentador}<br></div>"+
"<div style=display:inline-block;width:8px;></div>"+
"<div style=padding-top: 10px;>Causa: ${ ARCGIS.DBO.POWERON_ORDENES.causa}<br></div>"+
"<div style=display:inline-block;width:8px;></div>"+
"<div style=padding-top: 10px;>Comentario: ${ARCGIS.DBO.POWERON_ORDENES.comentario}<br></div>";
chqSubInfoTemp.setContent(chqSubInfoContent);
return chqSubInfoTemp;
}
}
....