On 8/31/07, Andrew Robinson (JIRA) <dev@myfaces.apache.org> wrote:
>
> [
> https://issues.apache.org/jira/browse/TRINIDAD-653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
>
> Andrew Robinson resolved TRINIDAD-653.
> --------------------------------------
>
> Resolution: Fixed
> Fix Version/s: 1.0.3-core
>
> Committed revision 571586.
>
> > PanelLabelAndMessageRenderer shouldn't need the "for" given to detect what
> it is for
> >
> ------------------------------------------------------------------------------------
> >
> > Key: TRINIDAD-653
> > URL: https://issues.apache.org/jira/browse/TRINIDAD-653
> > Project: MyFaces Trinidad
> > Issue Type: Improvement
> > Affects Versions: 1.0.2-core
> > Reporter: Andrew Robinson
> > Assignee: Andrew Robinson
> > Fix For: 1.0.3-core
> >
> >
> > Since CorePanelLabelAndMessage will usually be used having the first child
> component as the input, the renderer should be able to determine the "for"
> attribute value without it being specified. Here is code that can be used in
> the PanelLabelAndMessageRenderer:
> > @Override
> > protected String getLabelFor(FacesContext context, RenderingContext arc,
> > UIComponent component, FacesBean bean)
> > {
> > String forValue = getFor(bean);
> > String val = MessageUtils.getClientIdFor(context, component,
> forValue);
> > if (val == null)
> > {
> > if (component.getChildCount() > 0)
> > {
> > UIComponent firstChild =
> (UIComponent)component.getChildren().get(0);
> > if (firstChild instanceof EditableValueHolder)
> > {
> > val = firstChild.getClientId(context);
> > }
> > }
> > }
> > return val;
> > }
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>