java - How to customize the query string in Primefaces -


i newbee in primefaces.

in application, there search form contains 5-10 field. implemented solution check variable null , variable have value. list of variable contains value included in sql query.

is there feasible solution in primefaces can customize query string. customize query string means query string contains variable user fills(not blank one).

this has nothing primefaces though, more java question.

just check if variables empty or not, add them query string , finaly setting string querystring. eg:

string s_query = "select * tbl1 ";  if(!(searchfield1.equals(""))) {    s_query = s_query + " searchfield1 = searchfield1"; } 

something should work


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -