-
1. Re: #{..} is not allowed in template text
kalomo Feb 1, 2010 9:58 AM (in response to kalomo)does anybody know a solution to the problem? -
2. Re: #{..} is not allowed in template text
kalomo Feb 2, 2010 3:53 AM (in response to kalomo)ok, maybe some code can help. This is my jsp testpage for the workaround.
This part produces the error: (/test.jsp(25,3) #{...} is not allowed in template text)
<script>
#{rich:component('calendar')}.customExpand=customExpand;
</script>Parsing the onchange attribute wich also includes the rich:component call seems to work.
Does anyone have an idea why the script part couldn't be parsed?
Thanx
<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>test</title>
</head>
<body>
<f:view><style>
.rich-calendar-input,.rich-calendar-button {
display: none;
}
</style>
<a4j:loadScript src="/scripts/calendarUtils.js"></a4j:loadScript>
<rich:calendar id="calendar"
onchanged="#{rich:component('calendar')}.customInput.value=
event.rich.component.getSelectedDateString();" />
<script>
#{rich:component('calendar')}.customExpand=customExpand;
</script></f:view>
</body>
</html>