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




Reply via email to