[ 
https://issues.apache.org/jira/browse/WW-5516?focusedWorklogId=953289&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-953289
 ]

ASF GitHub Bot logged work on WW-5516:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jan/25 09:05
            Start Date: 21/Jan/25 09:05
    Worklog Time Spent: 10m 
      Work Description: kusalk commented on code in PR #1190:
URL: https://github.com/apache/struts/pull/1190#discussion_r1923325870


##########
core/src/test/java/org/apache/struts2/components/UIBeanTagTest.java:
##########
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.struts2.components;
+
+import org.apache.struts2.ActionContext;
+import org.apache.struts2.dispatcher.DispatcherConstants;
+import org.apache.struts2.views.jsp.AbstractTagTest;
+
+import java.util.Map;
+
+import static org.apache.struts2.components.UIBean.TEMPLATE_DIR;
+import static org.apache.struts2.components.UIBean.THEME;
+
+public class UIBeanTagTest extends AbstractTagTest {
+
+    private UIBean bean;
+
+    @Override
+    public void setUp() throws Exception {
+        super.setUp();
+        bean = new UIBean(stack, request, response) {
+            @Override
+            protected String getDefaultTemplate() {
+                return null;
+            }
+        };
+    }
+
+    public void testTemplateDir_ognlExpression() {
+        bean.setTemplateDir("%{testDir}");
+        stack.push(new Object() {
+            public String getTestDir() {
+                return "testValue";
+            }
+        });
+
+        assertEquals("testValue", bean.getTemplateDir());
+    }
+
+    public void testTemplateDir_attrMapFallback() {
+        bean.setTemplateDir("%{testDir}");

Review Comment:
   Sorry that was a mistake, fixed!





Issue Time Tracking
-------------------

    Worklog Id:     (was: 953289)
    Time Spent: 40m  (was: 0.5h)

> Session theme problems after struts2 migration to 6.4.0
> -------------------------------------------------------
>
>                 Key: WW-5516
>                 URL: https://issues.apache.org/jira/browse/WW-5516
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 6.4.0, 6.6.0, 6.6.1, 6.7.0
>            Reporter: cococo42
>            Priority: Minor
>             Fix For: 6.7.1, 7.0.1
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When migrating an application from version 2.5.33 to version 6.4.0 (due to 
> the S2-067 bug), session themes in Freemarker templates stopped being 
> applied. It became necessary to add a {{theme}} attribute in the {{s:form}} 
> tags that would retrieve the value from the session.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to