You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "dion gillard (JIRA)" <co...@jakarta.apache.org> on 2005/01/04 08:29:18 UTC

[jira] Created: (JELLY-185) type attribute for any layout other than FillLayout doesn't work in the SWT tag library.

type attribute for any layout other than FillLayout doesn't work in the SWT tag library.
----------------------------------------------------------------------------------------

         Key: JELLY-185
         URL: http://issues.apache.org/jira/browse/JELLY-185
     Project: jelly
        Type: Bug
  Components: taglib.swt  
    Reporter: dion gillard


-- Moved from Bugzilla 30402 --

When trying to set the type of the rowLayout tag to "horizontal", it wouldn't 
take. Looking at the source, the convertvalue() method in LayoutTag.java is 
too restrictive in the if clause. Instead of:

if( bean instanceof FillLayout <snip>

it should read:

if( bean instanceof Layout <snip>

Here's the full corrected method:

protected Object convertValue(Object bean, String name, Object value)
        throws JellyTagException {

        if (bean instanceof Layout
            && name.equals("type")
            && value instanceof String) {
            int style = SwtHelper.parseStyle(SWT.class, (String) value);
            return new Integer(style);
        }
        return super.convertValue(bean, name, value);
    }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org