Listbox and mutli-selection in JSP page
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   HELIGON_Sandra
Posted On:   Tuesday, January 14, 2003 04:32 AM

I have to design a web page that contains the following parameters: - general parameters (date, type, etc) - a list of records. the number of records is not defined, the user can add/delete/modify record. If the number of records exceeds the control size (3 elements for example) we want to activate a scrollbar. Is it possible to display a scrollbar associated to a table with HTML ? do we have to use only pagination ? My second problem is the following: in order to minimize the call to the web server, we offer to the client to select multiple record in the list. Is the multi-rows selection with the mouse available with HTML ? for the moment we have chosen to add in the table a check-box column, is it    More>>

I have to design a web page that contains the following
parameters:

- general parameters (date, type, etc)
- a list of records. the number of records is not defined,
the user can add/delete/modify record. If the number of records exceeds the control size (3 elements for example) we want to activate a scrollbar.
Is it possible to display a scrollbar associated to a table with HTML ? do we have to use only pagination ?

My second problem is the following: in order to minimize the call to the web server, we offer to the client to select multiple record in the list.
Is the multi-rows selection with the mouse available with HTML ? for the moment we have chosen to add in the table a check-box column, is it the best solution ?

Thanks a lot in advance

   <<Less

Re: Listbox and mutli-selection in JSP page

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, January 14, 2003 07:16 AM

I think to have a scrollbar appear when needed (if the content exceeds the available screen size of the object), in the client HTML code, for the object (a div, table, etc.) use the "overflow" style attribute, and set it to "auto".



...

Re: Listbox and mutli-selection in JSP page

Posted By:   HELIGON_Sandra  
Posted On:   Tuesday, January 14, 2003 04:54 AM

Thanks a lot for your response, do you have an example of the
tag with table ?
Thanks a lot in advance.

Re: Listbox and mutli-selection in JSP page

Posted By:   HELIGON_Sandra  
Posted On:   Tuesday, January 14, 2003 04:54 AM

Thanks a lot for your response, do you have an example of the
tag with table ?
Thanks a lot in advance.

Re: Listbox and mutli-selection in JSP page

Posted By:   Stephen_McConnell  
Posted On:   Tuesday, January 14, 2003 04:48 AM

Yes, the multi-row selection is available in HTML. In the "select" tag, you use the multiple attribute.




You would select the multiple items with the mouse by pressing the Ctrl key as you select items.


In the request object, you would retrieve the multiple selection values by using:



String[] values = request.getParameterValues("myselectbox");


in the JSP or servlet that is the target of the Form Submit.


As for scrolling a table, I have used the

tag. You need to wrap your table in another table or td element with a fixed height and width. Then, the div tags wrap that table. I think that will allow you to scroll the table as it grows past the size of the surrounding area. Be advised that not all browsers support this. I know IE 6.0 does, but I'm not sure about NS 4.7 and below.


Hope this helps.


Stephen McConnell