Given this code,
<rich:dataTable id="list" value="#{testBeen.dataModel}" var="test" rows="#{testBeen.dataModel.pageSize}">
...
<h:outputText value="#{test.WEEK}" />
I need to manipulate the #{test.WEEK} and replace character ) with ], how can I do this?
I tried the following, but it does not work:
<%String a = test.WEEK; a.replace("a", "b"); %>
<%=a %>
How can I get the string from JSF and pass it back to JSF?
For this particular simple purpose, I’d just use the JSTL functions taglib. There’s a
fn:replace()function.E.g.
You should for sure never use scriptlets
<% %>in JSF pages.