You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Danny Robinson <da...@gmail.com> on 2006/12/02 01:54:13 UTC

inputDate should not render icon if 'chooseId' specified.

The current <tr:inputDate> implementation always renders an icon immediately
following the input field.  However, if you specify a <tr:chooseDate> to
render the calendar in-page, it shouldn't render the icon.  A simple patch
to SimpleInputDateRenderer fixes this (below).

If there's support for this, I'll submit a JIRA issue.

Danny

PATCH to
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleInputDateRenderer

  @Override
  protected void renderAfterTextField(
    FacesContext context,
    RenderingContext arc,
    UIComponent component,
    FacesBean bean) throws IOException
  {
      // Only render the icon if chooseId is not specified.
      if (_getChooseId(arc) == null)
          super.renderAfterTextField(context, arc, component, bean);
  }



-- 
Chordiant Software Inc.
www.chordiant.com

Re: inputDate should not render icon if 'chooseId' specified.

Posted by Jeanne Waldman <je...@oracle.com>.
I think you should send this to the dev list, not the user list.

+1. This sounds like good logic to me.

- Jeanne


Danny Robinson wrote:

> The current <tr:inputDate> implementation always renders an icon 
> immediately
> following the input field.  However, if you specify a <tr:chooseDate> to
> render the calendar in-page, it shouldn't render the icon.  A simple 
> patch
> to SimpleInputDateRenderer fixes this (below).
>
> If there's support for this, I'll submit a JIRA issue.
>
> Danny
>
> PATCH to
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleInputDateRenderer 
>
>
>  @Override
>  protected void renderAfterTextField(
>    FacesContext context,
>    RenderingContext arc,
>    UIComponent component,
>    FacesBean bean) throws IOException
>  {
>      // Only render the icon if chooseId is not specified.
>      if (_getChooseId(arc) == null)
>          super.renderAfterTextField(context, arc, component, bean);
>  }
>
>
>


Re: inputDate should not render icon if 'chooseId' specified.

Posted by Danny Robinson <da...@gmail.com>.
By the way, this fix will cause CoreRenderKitTest to fail, so will require
an update to the expected output for this component.  Sorry - I'm not yet
familiar enough to do this.

Thanks,

Danny

On 12/1/06, Danny Robinson <da...@gmail.com> wrote:
>
> The current <tr:inputDate> implementation always renders an icon
> immediately following the input field.  However, if you specify a
> <tr:chooseDate> to render the calendar in-page, it shouldn't render the
> icon.  A simple patch to SimpleInputDateRenderer fixes this (below).
>
> If there's support for this, I'll submit a JIRA issue.
>
> Danny
>
> PATCH to
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleInputDateRenderer
>
>   @Override
>   protected void renderAfterTextField(
>     FacesContext context,
>     RenderingContext arc,
>     UIComponent component,
>     FacesBean bean) throws IOException
>   {
>       // Only render the icon if chooseId is not specified.
>       if (_getChooseId(arc) == null)
>           super.renderAfterTextField(context, arc, component, bean);
>   }
>
>
>
> --
> Chordiant Software Inc.
> www.chordiant.com




-- 
Chordiant Software Inc.
www.chordiant.com