-
1. Re: Could s:decorate provide a component id?
luxspes Aug 15, 2008 4:22 PM (in response to amitev)Hi!
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 aninclude
directive, one already knows what it is fore because of the template="/layout/edit.xhtml", imagine if it were mandatory to add anid
to 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 id
just because QA wants it.Regards,
-
2. Re: Could s:decorate provide a component id?
chris.simons Aug 15, 2008 5:30 PM (in response to amitev)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:
- colspan
- tooltip text
- an
is applicable
boolean and analtternate text
in the case thatis applicable
is false
-
3. Re: Could s:decorate provide a component id?
amitev Aug 15, 2008 6:56 PM (in response to amitev)Here is the issue on JIRA.
-
4. Re: Could s:decorate provide a component id?
amitev Aug 15, 2008 10:29 PM (in response to amitev)Actually this isn't needed since s:decorate implements NamingContainer.
-
5. Re: Could s:decorate provide a component id?
chris.simons Aug 18, 2008 2:39 AM (in response to amitev)Adrian,
Can you please elaborate on your statement above?