I understand your disappointment, and I see that the problem is more your setup / understanding in general. Nevertheless, it is quite difficult to find any real questions for an answer, maybe you can try to share your problems next time.
Here are some answers:
Why is the Detail.getComments () function not executing?
Hm maybe because it's not in a bean? I assume you are returning to detail.getContent ?
which apparently never has, according to the above logs, Detail.getContent () is called, even though it is part of the view:
Try rendered = true
@PostConstruct private void onLoad() { logger.log(level, "Detail.onLoad..{0}", getId()); }
You put a lot of logic into the getter. Try debugging with a field, not a getter ...
The value 2000 is the default, which only happens when id == null, which should never be.
It looks like private String id = null; is the perfect explanation why id will be null.
Try to keep in mind that modern frameworks like JSF, CDI, and Java EE do a lot of things behind the scenes using reflection, proxies, and interceptors. Do not rely on the classic understanding of when (and how often) a constructor is called, for example.
Again, consider moving the initialization logic away from the receiver. @PostConstruct is the place that the fathers of the Java EE-spec chose.
To be honest: nothing seems extremely wrong, but your code is a bit dirty and it is very difficult to understand and follow.
Try to remove all indirect actions like this ...
int b = Integer.parseInt(getId());
... and everything will look much better.
Oh, and is there a specific reason why you declare a fixed log level for the entire class? Try something like this
private static final Logger LOG = Logger.getLogger(Some.class); ... LOG.info("...");
Hope you get started. Feel free to post additional questions, preferably a little shorter and with single, isolated aspects to answer.