Okay, so here's the setup... I have main.xhtml file that displays four links to the user. These links are categories that determine what category is viewed on the next page. The categories are in a database, and are pulled into a List. I use this list to create the links. Note** I decided to do it this way, so when it's time to add more categories, I can update the database, and not have to create more JSF.** The problem I have is that I cannot figure out how to pass the selected category back to my Java class. Here is what I have for the links...
HTML Code:<h:form> <div id="indexRightColumn"> <ui:repeat var="category" value="#{vpsForm.category}"> <div class="categoryBox"> <h:commandLink action="#{vpsForm.findForward}"> <span class="categoryLabelText">#{category}</span> <img src="#{initParam.categoryImagePath}#{category}.png" alt="#{category}" class="categoryImage"/> </h:commandLink> </div> </ui:repeat> </div> </h:form>
I can get all the links to display and function, all I need is a way to set my selctedCategory var in my Java class so I can prepare my next page. Please note I am using JSF here and not Struts. However, if I absolutely have to use the actionForward from Struts, I guess I will. But I'd like to avoid that if at all possible...