jsf 2 - JSF2.x: Navigation based on list box selected items -


i need solution below scenario.

i have home page multi select list box , submit button. list box has around 5 items in future there can 50 - 100 items in list box. each selected item, should open item details screen sequentially. example if there 10 items in list box , when user selects 2nd,5th , 9th item , clicks submit should first show 2nd details page 5th , 9th page. after submitting 9th page next page should home page.

i going use jsf 2.0 or jsf 2.1 read somewhere should not use faces-config.xml in jsf 2.x not sure how implement above scenario. help.

interesting question , +1 me.

first of all, you're talking 50+ items, need 1 page capable of rendering item types.

on page list box, when form submitted can populate java.util.list item ids , set index variable 0. should proceed item rendering page. on page, should handle prerenderview event show item in list @ current index. can put event in @conversationscoped bean also. form submit action page should handled in @conversationscoped bean, action incrementing index on next page load next item shown.

edit: since want 1 jsf page per item, can adapt idea , return view ids in action.

public string submit() {     // processing logic here     // ...      // return view id of next item , increment index.     return items.get(index++).getviewid(); } 

your item class might this:

public class item {     private int id;     private string name;     private string description;     private string viewid;      // getters , setters     // ... } 

hope helps.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -