[ https://issues.apache.org/jira/browse/WW-5516?focusedWorklogId=953108&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-953108 ]
ASF GitHub Bot logged work on WW-5516: -------------------------------------- Author: ASF GitHub Bot Created on: 20/Jan/25 07:09 Start Date: 20/Jan/25 07:09 Worklog Time Spent: 10m Work Description: lukaszlenart commented on code in PR #1190: URL: https://github.com/apache/struts/pull/1190#discussion_r1921891441 ########## 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: Doesn't this test depend on the `testTemplateDir_ognlExpression`? Issue Time Tracking ------------------- Worklog Id: (was: 953108) Time Spent: 0.5h (was: 20m) > 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: 0.5h > 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)