I have a problem with nested ui:repeat.
I have the next code:
<h:form>
<ui:repeat var="cartItem" value="#{shoppingCartBean.shoppingCartElements}">
... //cartItem info
<h:commandButton>
<f:ajax listener="#{shoppingCartBean.changePortabilityEvent(cartItem)}"/>
</h:commandButton>
<ui:repeat var="discount" value="#{shoppingCartBean.getItemDiscounts(cartItem)}">
... //discounts info
</ui:repeat>
</ui:repeat>
<h:form>
Well, when I click on the button, is like the ajax POST call is fired but the page is processed and the cartItem is null when the button is pressed, so it generates a NullPointerException.
My bean (shoppingCartBean) is SessionScope.
Any idea why?
Thanks in advance.