I'm developping a JSF application. My pages are JSP extension and i have some javascript scripts inside.
My situation is simple but can't solve it. I have to fill in javascript tabs thanks to values provided by my beans.
Here is my code : ( i replaced my true classes ^^)
Code:
<%@page language="java" import="com.test.Toto"%>
<jsp:useBean id="totoManager" class="com.test.TotoManager"></jsp:useBean>
...
<script type="text/javascript">
var categories;
var data;
var count;
<% for (com.test Toto: totoManager.getJokes()) { %>
categories.push(<%= toto.getCategory() %>);
data.push({
title: <%= toto.getTitle() %>,
joke:<%= toto.getText() %>
});
count++;
<% } %>
</script>
Code:
var categories = ['Poo', 'Funny', 'Toto's Mother'], var data = [{ title: 'blabla', joke: 'wonderful joke', }, { title: 'foo', joke: 'so funny', }]
So i might have a problem calling my bean !
Thanks for helping
