I'm currently creating a week-schedule (representing a company:s available consulting-times) with xhtml/EL/backing bean. By default when my page is created I send a parameter '0' that represents the current week. If I try to send '1' I get the schedule for the upcoming week etc. The expression looks like following:
<table id="tableSchedule">
<c:forEach id="forEachCall" items="#{consultation.getSchema('0')}" var="item">
<h:outputText escape="false" value="#{item}"></h:outputText>
</c:forEach>
</table>
Where the method getSchema returns a list of strings containing td and tr tags.
Now. My intention was to use jQuery to recognize a buttonclick and delete the content of the table and create a new table, in some way like this:
app = "<c:forEach items='#{consultation.getSchema('"+week+"')}' var='item'>";
app += "<h:outputText escape='false' value='#{item}'></h:outputText></c:forEach>";
$("#tableSchedule").html(app);
Where the variable week keeps track of how many weeks in the future/past should be displayed.
After a lot of googling I've realized that EL-expressions only can be executed while creating the page. Is there any method I can use to overcome this problem?
Note: this is only a very small part of my code.