You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Don Brown (JIRA)" <ji...@apache.org> on 2007/12/11 02:39:33 UTC

[jira] Updated: (WW-2366) UIBean and "#attr.theme" conflicts with el scoped variables w/ same name

     [ https://issues.apache.org/struts/browse/WW-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-2366:
--------------------------

    Assignee:     (was: Don Brown)

> UIBean and "#attr.theme" conflicts with el scoped variables w/ same name
> ------------------------------------------------------------------------
>
>                 Key: WW-2366
>                 URL: https://issues.apache.org/struts/browse/WW-2366
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>            Reporter: Bob Tiernay
>
> In org.apache.struts2.components.UIBean the following lines:
> 573            // If theme set is not explicitly given,
> 574            // try to find attribute which states the theme set to use
> 575            if ((theme == null) || (theme.equals(""))) {
> 576                theme = (String) stack.findValue("#attr.theme");
> 577            }
> Cause problems if the following jsp snippet exists above a UIBean extended tag in the current page:
> <s:set name="theme" value="theme" scope="page" />
> This causes a class cast exception if the type of the page scoped variable is not a string.
> The proposed fix would be either:
> 1. Perform an instanceof check to ensure that the value is a string (better)
> 2. avoid #attr.theme altogether and use another entry in the value stack (best)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.