I'm trying to implement buttons into the carousel- component.
The buttons are used for navigation, so I forcedly need for every button an unique id.
Stack Trace is trying to tell me, that my button doesn't have an id...
But I can't use a static one for every button, cause I'm iterating a list with all button details (this would resolve in a duplicate id problem)
I'm not sure why it's not working the way I tried, but I hope you can help me out.
Second problem I've come across is that I embedded the component into a modal dialog.
Now when I load the page on which the dialog can be invoked via an onclick-event,
the carousel is already visible in the center.
Do you have any suggestions how to resolve this problem?
Code: Select all
<p:carousel vertical="true" var="button" value="#{navigationBean.buttonDetailList} ">
<p:commandButton update="searchContent" actionListener="#{navigationBean.makeSelection}"
value="Agent" image="#{button.picturePath}" id="#{button.id}"
/>
</p:carousel>