My question is how to declare a variable to be able to do a total sub, and then perform a counter in JSF
As you investigate, this could be done:
<ui:param name="sub" value="#{item.canProductos * item.ideProducto.preProducto}" />
<h:outputText value="#{sub}"/>
But it does not generate any results, not even an error.
After that I would need to add that variable sub
and generate a total
something like that;
<!--TOTAL DE LA COMPRA-->
<ui:param name="total" value="#{ total += sub}" />
<h:outputText value="#{total}"/>
I know that total += sub
is not correct but how could I do it?
Thank you very much.
PDT: Also try this:
(the namespace first)
xmlns:c="http://java.sun.com/jstl/core"
then
<c:set var="varName" value="#{complexModel.currencyAmount}" />
And then the calculated value will be accessible through #{varName}.
But he did not recognize the route in the project.