• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Selecting check box list does not work

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends: Very new with java, struts etc. I have a JSP page that has a header with 5 columns. 1st column is a check box. Under the header, i am filling rows from table(spring, sruts, maven etc). when we select the 1st heaer item(the check box), it chekcs all the check box under this column. Say for a certain case, I got 15 rows. I checked the header check and it shows that 15 rows have been selected. I am showing only 10 rows per page. But it correctly shows that 15 items have been selected.
There is an "Export" button at the bottom of the 1st page. I am supposed to export all 15 pages in another page when selecting "select all'. But surprisingly, when I open the next page, it shows that 10 items have been selected. That means, only that items that were visible on the 1st page not all actual 15 selected items. By clicking the "Export" button I am calling another JSP with the parameter of the "$selectedlist". I debuged and founf that this parameter has 10 rows not 15.

Why the parameter having only 10 rows as shown on the 1st page and not all 15 rows? Please give me some heads up. Is it a bug from struts in case of selecting checkbox and showing few rows--not all rows.

Thanks Syed
 
Bartender
Posts: 9586
13
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really can't tell what is going on from the description you have given. Since you have so many moving parts (spring, struts, maven, etc.) it looks like you have an application someone else has written and you don't understand how it works. You've left some parts out as well, since Struts doesn't have a built-in table component or the "$" notation, I assume you have some jQuery or other libraries in play as well.
My advice is as follows: start as simple as possible. Perhaps a static JSP page that lists a number of documents. Once you've got that working, add a single feature, like a checkbox for each to select a subset. Once that feature is working, add another. This way, when you have a problem, you will have a working version you can revert to as well as a good idea as to where the issue is. You can concentrate on the one part that is giving you trouble rather than looking at a dozen different parts and assuming it's a bug somewhere in the mix.
Finally, if you do need our help, have a look at our FAQ, HowToAskQuestionsOnJavaRanch. The better question you ask, the more help we can give.
 
Brock syed
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe: Thanks. In the Jscript, I have bPaginate to shows 10 rows per page. I set it to false. Then I click my 'Select all' Check box, it select all rows. I can view all my rows(12) in 1 page. Which is fine. So when I am clicking to export, it shows the correct number of rows to export(=12). But if I set bPaginate to true, it shows 10 rows in 1 page and rest 2 rows in the next page. If I select my 'Select all' Check box, it select all rows. Thats good. But when I am clicking my export button, it shows only 10mrows from the viewed 1st page not the other 2 rows. In simple,
(a) I am opening a Export page with 10 rows when bPaginate=true even though I have selected all rows. I need all rows to display.
(b) I am opening a Export page with all 12 rows when bPaginate=false even though I have selected all rows.

 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!