myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <werner.p...@gmail.com>
Subject Re: Missing/changed methods after migrating to MyFaces 1.2.8
Date Wed, 07 Apr 2010 07:42:22 GMT
Am 06.04.10 13:19, schrieb Seema Mani:
>
> hi,
>
> I'm facing a few issues after migrating to MyFaces 1.2.8 from MyFaces 1.1.7
>
> 1. In my custom tag handler class, extending HtmlMessageTag, there were
> calls to setStringProperty method in the superclass. But these methods are
> not existing now
> 2. In my custom tag handler class, extending HtmlCommandButtonTag, there
> were calls to the setDisabled method, which had String argument. This method
> now takes ValueExpression as the argument. But the values to be passed are
> static like "true" and "false"
>
> Please advise on how these can be resolved.
>
> Thanks,
> Seema
My guess is,this is due to the change to the unified el and a later JSP 
version, the taglib tld file defines the type of the attribute.
(see the corresponding tld file in the sources for the example to the 
HtmlMessageTag)

The entire direct conversion aspect via setStringProperty etc... is not 
needed anymore



from the tld
  <attribute>
          <description><![CDATA[Specifies whether the detailed 
information from the message should be shown.
Default to true.]]></description>
          <name>showDetail</name>
          <deferred-value>
              <type>boolean</type>
          </deferred-value>
       </attribute>


from the tag handler

  private ValueExpression _showDetail;

     public void setShowDetail(ValueExpression showDetail)
     {
         _showDetail = showDetail;
     }

   protected void setProperties(UIComponent component)
     {
         if (!(component instanceof 
javax.faces.component.html.HtmlMessage ))
         {
             throw new IllegalArgumentException("Component "+
                 component.getClass().getName() +" is no 
javax.faces.component.html.HtmlMessage");
         }

         javax.faces.component.html.HtmlMessage comp = 
(javax.faces.component.html.HtmlMessage) component;

         super.setProperties(component);


          if (_showDetail != null)
         {
             comp.setValueExpression("showDetail", _showDetail);
         }

due to the incoming parameters being of type value expression and having 
the type information already inside.

Not quite the area of my expertise but I hope I got it right.
Problem with setStringValue etc... generally is that this are methods 
which were implementation specific (part of myfaces not the jsf api), 
and bound to change if the el system itself was moved over to a more 
global scope which happened between 1.1 and 1.2.


Werner





Mime
View raw message