jsf - Icefaces Actionlistener Pass Parameter To Another Page -


i have have icefaces datatable , when user clicks row, pass row's value page. value row's 1 column primary key. planning use

how can this?

thanks

*follow up**

kindly suggest approach following right passing paramter icefaces datatable page.

i have following in jsf page

<h:commandlink actionlistener="#{bean.setselecteditem}"> 

and in bean of setselecteditem(actionevent event) method have following code

 selectedrows.put(datatable.getrowindex(), true);    (selectedrows of map<integer, boolean> selectedrows = new hashmap<integer, boolean>();  list<class> selectitems = new arraylist<class>();              (int index = 0; index < datalist.size(); index++) {                                 if (isselectedrow(index)) {                     selectitems.add(datalist.get(index));                 }             }             newbean.method(selectitems);             selectitems.clear();             selectedrows.clear(); 

correct me if doing anthing wrong above.

thanks

either bind table component uidata property in backing bean

<h:datatable binding="#{bean.table}"> 

with

private uidata table; 

or bind table value datamodel property in backing bean

<h:datatable value="#{bean.model}"> 

with

private datamodel model; 

either way, offer getrowdata() method gives row during bean action method uicommand component been clicked/pressed.

<h:commandlink action="#{bean.view}"> 

with

public string view() {     object rowdata = table.getrowdata(); // or model.getrowdata();     return "otherpage"; } 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -