Hello,
in the following code example a validation error is shown in the function line. Apparently the JSTL variable ${varname} is seen as part of the function name, which of course is not allowed. Once deployed, it all works correctly, though.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<c:set var="varname" value="25" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function myfunc_${varname}(){ //Validation error shown here
alert("in myfunc_${varname}");
}
</script>
</head>
<body>
<html:button property="whatever" onclick="myfunc_${varname}();">Click Me</html:button>
</body>
</html>
This behaviour is new in ME 9.0, in version 8.6 no error was shown.
Thanks in advance,
Thomas