diff -r 54c612612c69 -r 7725a79416f3 src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt --- a/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt Sun Aug 01 18:14:36 2021 +0200 +++ b/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt Sun Aug 01 18:56:28 2021 +0200 @@ -28,6 +28,7 @@ import de.uapcore.lightpit.dao.DataAccessObject import de.uapcore.lightpit.viewmodel.NavMenu import de.uapcore.lightpit.viewmodel.View +import java.util.* import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse import javax.servlet.http.HttpSession @@ -57,6 +58,17 @@ } /** + * The name of the content page. + * + * @see Constants#REQ_ATTR_CONTENT_PAGE + */ + var pageTitle = "" + set(value) { + field = value + request.setAttribute(Constants.REQ_ATTR_PAGE_TITLE, value) + } + + /** * A list of additional style sheets. * * @see Constants#REQ_ATTR_STYLESHEET @@ -149,6 +161,8 @@ contentPage = Constants.JSP_COMMIT_SUCCESSFUL render() } + + fun i18n(key: String) = ResourceBundle.getBundle("localization/strings", response.locale).getString(key) } /**