&& (facetComponent instanceof AbstractUICommand || facetComponent instanceof UIForm)) {
if (commandMap == null) {
commandMap = new CommandMap();
}
final String key = entry.getKey();
commandMap.addCommand(key, new Command(facesContext, entry.getValue(), id));
}
}
if (commandMap != null) {
writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(commandMap), true);
}