Yes - that would make more sense to place them on the selectItem components
themselves.  I'll have to take a look at the s:selectItem(s) tags and
modifying it when I have a free moment.

I also came across one minor change to the HtmlSelectOneRadio tag.  It adds
a FacesMessage.SEVERITY_WARN when the field is required and no value is
submitted.  It should be ERROR.

Thanks
__________________________

Shaun Thompson
State of Nebraska
Office of the CIO
Internet Development Team
[EMAIL PROTECTED]
(402)471-0665
__________________________


                                                                           
             "Mike                                                         
             Kienenberger"                                                 
             <[EMAIL PROTECTED]                                          To 
             om>                       "MyFaces Discussion"                
                                       <[email protected]>          
             08/17/2006 01:36                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: HtmlRadioRendererBase           
             Please respond to         t:selectOneRadio                    
                 "MyFaces                                                  
                Discussion"                                                
             <[EMAIL PROTECTED]                                             
                 ache.org>                                                 
                                                                           
                                                                           




In that case, the escape parameter should be on the t:selectItems and
t:selectItem component and not the selectOneRadio.

I don't know if anyone has gotten around to creating such components
yet, but it shouldn't be very difficult to do so.

I know there have been other requests for handling selectItem behavior
differently.

I just looked, and there's already an s:selectItems element you can
work with.  It doesn't support an escape value yet, but it could be
added easily enough.   Or you might find it easier to use this
component's var/value looping rather than building the labels in code.


On 8/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Mike,
>
> I already have an output label assigned to the radio tag itself.  It's
when
> I build the list of SelecItems - that textual value/label I need to be an
> html image + some text.
>
> <h:panelGrid>
>       <imscommon:label required="true" fieldID="watermarkImg" text=
> "page.label.watermarkImg"/>
>       <h:panelGroup>
>             <t:selectOneRadio escape="true" required="true" id=
> "watermarkImg" layout="spread" forceId="false" forceIdIndex="false"
>                   value="#{PermitTypeHandler.permitType.watermarkLoc}">
>                   <f:selectItems
value="#{PermitFormSupport.watermarkImg}"
> />
>             </t:selectOneRadio>
>             <t:dataTable newspaperColumns="4" var="row" value
> ="#{PermitFormSupport.watermarkImg}" rowIndexVar="index">
>                   <h:column>
>                         <t:radio for=
> ":bodyID:PermitTypeHandler:form1:watermarkImg" index="#{index}"/>
>                   </h:column>
>             </t:dataTable>
>       </h:panelGroup>
> </h:panelGrid>
>
> I'll open a JIRA ticket  for the patch.
>
> Thanks
>
>
>
> __________________________
>
> Shaun Thompson
> State of Nebraska
> Office of the CIO
> Internet Development Team
> [EMAIL PROTECTED]
> (402)471-0665
> __________________________
>
>
>
>              "Mike
>              Kienenberger"
>              <[EMAIL PROTECTED]
To
>              om>                       "MyFaces Discussion"
>                                        <[email protected]>
>              08/17/2006 11:59
cc
>              AM
>
Subject
>                                        Re: HtmlRadioRendererBase
>              Please respond to         t:selectOneRadio
>                  "MyFaces
>                 Discussion"
>              <[EMAIL PROTECTED]
>                  ache.org>
>
>
>
>
>
>
> On 8/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > 1.  It seems to ignore the escape attribute on the selectOneRadio tag.
> > I've patched the HtmlRadioRendererBase for the label as follows and it
> now
> > works.  Am I missing something?
> > Boolean escape = (Boolean)uiComponent.getAttributes().get("escape");
> >    if ((label != null) && (label.length() > 0))
> >         {
> >             writer.write(HTML.NBSP_ENTITY);
> >             if (escape != null && escape.booleanValue()) {
> >                 writer.write(label);
> >             } else {
> >                   writer.writeText(label, "value");
> >             }
> >         }
>
> I think most people use an outputLabel to add a label to the control
> -- I know I do.
>
> It probably was never implemented because of that.  Since you have a
> patch for this,  open a JIRA issue and attach your patch in the form
> of a unified diff.
>
>

Reply via email to