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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to