-
1. Re: seam 1.2.1GA - belowField / description facet
pmuir Jul 13, 2007 11:10 AM (in response to tynor)Thats a bug in the docs. Please follow what this http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/validation.html says and ignore the JSF Controls chapter for that control.
-
2. Re: seam 1.2.1GA - belowField / description facet
tynor Jul 13, 2007 11:22 AM (in response to tynor)Thanks Pete. However the doc you point to does not talk about any sort of annotation that would seem to correspond to the apparently unusable "belowField" or "description" facets. I see only <ui:define name="label">. Perhaps you are implying that we should use something like <ui:define name="belowField"> ?
Can you post an example of the recommended way to do a belowField or description annotation?
Thanks! -
3. Re: seam 1.2.1GA - belowField / description facet
tynor Jul 14, 2007 2:05 PM (in response to tynor)Following up to my only question, I think Pete was trying to tell us that belowField and description facets simply don't work any more. I see they are used in the ui example (via <ui:define name="description"), but when I deploy that example, those extra annotations ("Enter your name as it appears on your passport") are not displayed when I deploy via Seam 1.2.1-GA and JBoss 4.0.5.
-
4. Re: seam 1.2.1GA - belowField / description facet
pmuir Jul 14, 2007 4:19 PM (in response to tynor)Sorry, I lost the net yesterday. We had those facets in CVS, but removed in favour of the enhanced s:decorate and forgot to update the docs. If there was a bug in ui example - sorry :( Anyway, the booking example has it correct.
-
5. Re: seam 1.2.1GA - belowField / description facet
tynor Jul 14, 2007 4:27 PM (in response to tynor)OK. I hate to be a pest, but I've looked through all uses of s:decorate in the 1.2.1-GA booking demo, and don't see any that set anything other than <ui:define name="label"> and input widgets. Nothing that looks analogous to a belowField comment. Can you be more specific?
Thanks! -
6. Re: seam 1.2.1GA - belowField / description facet
pmuir Jul 14, 2007 4:34 PM (in response to tynor)The ui example in Seam2 does this with divs and css. Basically, the idea of s:decorate is to allow you to design your own template for this
<s:decorate template="decorateField.xhtml"> <ui:define name="label">Age</ui:define> <ui:define name="description">The age list is an array of primitives</ui:define> <h:selectOneMenu value="#{person.age}"> <s:selectItems value="#{ages}" var="age" label="#{age}" /> <f:converter converterId="ageConverter" /> </h:selectOneMenu> </s:decorate>
<div class="entry"> <s:label styleClass="label #{invalid?'errors':''}"> <ui:insert name="label"/> <s:span styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="input #{invalid?'errors':''}"> <s:validateAll> <ui:insert/> </s:validateAll> </span> <div> <s:message styleClass="error errors"/> </div> <div class="description"><ui:insert name="description" /></div> </div>
-
7. Re: seam 1.2.1GA - belowField / description facet
pmuir Jul 14, 2007 4:35 PM (in response to tynor)Btw, you are not being a pest at all, you are asking clear questions and providing the necessary information to allow people to ask answer your question in each post which is lovely :)
-
8. Re: seam 1.2.1GA - belowField / description facet
tynor Jul 14, 2007 4:48 PM (in response to tynor)Thanks Pete. The underlying confusion (for me at least) is that the 1.2.1 seam-gen generated layout/edit.xhtml used by the forms it generated does not in fact have <ui:insert> for these belowField/definition annotations as in your example above. I'll add some and go on my merry way.
Cheers!