I just want to say that adding labels to all controls on the page just because it is a requirement by the QA team is the kind of thing that makes me really sad... it is just silly... the kind of stuff QA asks without understanding its real purpose.
I think labeling stuff you actually interact with is very important, without that it becomes really hard to know what are you getting from
Label234.getText(), but <s:decorate> is like an
includedirective, one already knows what it is fore because of the template="/layout/edit.xhtml", imagine if it were mandatory to add an
idto every import declaration in a .java (I hope you agree that would be silly):
import java.lang.* id=foundation java stuff import javax.sql.* id=sql extensions for java
I even think that adding it as a comment would be a bad idea, the name of the package should be self explaining, if it is not, then what should be fixed is the name of the package, in the case of s:decorate the name of the template should be carefully selected, so that is really clear what it is for, but there is no need to add an
artificial idjust because QA wants it.
As far as I know, and we are using s:decorate, there is no way to automatically introspect the ID of the component that is including the s:decorate template.
However, we are doing much the same thing as you are by supplying various ui:params that can provide useful information for the purposes of s:decorate. I think you are going about this in the right way. Perhaps you could add a feature request in JIRA for the Seam team to enhance the decorate template with some new capabilities. For now, however, the ability of s:decorate to automatically detect JSF validation errors is quite a boon.
A few that we are including, for example:
- tooltip text
is applicableboolean and an
altternate textin the case that
is applicableis false
Actually this isn't needed since s:decorate implements NamingContainer.
Can you please elaborate on your statement above?