Open pizzi80 opened 2 years ago
and remove the f:metadata tag ?
f:metadata is a kind of special tag that we can read without parsing or processing the entire page. In a way it's like a class annotation for xml.
OK that makes sense so its sort of a performance optimization as well
It could be parsed only the first time, usually the xhtml files never changes in Production...
The specs could say that f:importConstant / f:viewAction / f:viewParam should be on the first level children of h:html to optimize the performance ...
im sure this will not improve performance ;) its just another markup style / cosmetics for the user
it's not pure "cosmetic", the final intent is to improve the api to have a less hackish templating system which will be for sure easier to understand, specially for the beginners, and to avoid that people at Omnifaces have to implement alternative solutions like o:importConstant...
Hmm, it makes indeed sense to let h:html extend from f:view/UIViewRoot. But this will be a breaking change. Wondering why this was not done from the beginning on.
As stated many times during the last 10+ years JSF is a framework generating HTML, and should not be used to generate json/xml reponse....
https://stackoverflow.com/questions/10982762/how-to-generate-json-response-from-jsf
Is this still true?
If it's true why not simply create an h:html tag which should be like f:view and remove the f:metadata tag ?
In this way it would be possible to create a template or a page in a simpler and more linear way, for example: