select menu problem

Hi can anyone tell me whats wrong with this:

I have select menu in my jsp as follows:

<select name="selectRowCount" size="1" onchange="document.forms['search'].submit()" >

<option value="/devices/search.faces?rowsPerPage=5">5</option>

<option value="/devices/search.faces?rowsPerPage=10">10</option>

<option value="/devices/search.faces?rowsPerPage=25">25</option>

<option value="/devices/search.faces?rowsPerPage=50">50</option>

<option value="/devices/search.faces?rowsPerPage=0" selected="selected">All</option>

</select>

and in the backing bean i have:

publicint getRowsPerPage(){

return rowsPerPage;

}

publicvoid setRowsPerPage(int rowsPerPage ){

this.rowsPerPage = rowsPerPage;}

what am i missing. i just need to set the value i select into the backing bean

[1465 byte] By [JoSeF_Qa] at [2007-10-2 12:12:05]
# 1

Lets say you select "10"

The javascript event submits the form with the following parameter:

selectRowCount = "/devices/search.faces?rowsPerPage=10"

It doesn't go to the url in the value specified (unless you do something with that parameter elsewhere)

What URL is the form submitting to?

What I think it should be is:

<select name="rowsPerPage" size="1" onchange="document.forms['search'].submit()" >

<option value="5">5</option>

<option value="10">10</option>

<option value="25">25</option>

<option value="50">50</option>

<option value="0" selected="selected">All</option>

</select>

evnafetsa at 2007-7-13 8:54:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...