Since the JSP is generating the HTML for those rows, it should be able to generate a div for each of them. It's just a matter of programming, isn't it? Doesn't matter if there's one row or 30 or 150.
posted 12 years ago
Yes, but I was under the impression that a jsp page that gets too big may have trouble compiling. So, I thought having one pop up that all of the rows could use would keep the jsp much smaller than having one div per row.
I've used popup windows in programming web applications, and have found that as long as your popup window is triggered by some action of the user such as clicking on a link, most popup blockers won't interfere. They will interfere if there is some sort of automatic process that opens up a popup when the page is loaded or in some other way that was not directly initiated by the user.
However, I wouldn't worry about hitting the upper size limit on your JSP just based on the hidden divs unless your page is otherwise very large or complex. [ September 05, 2007: Message edited by: Merrill Higginson ]
Thanks so much for everyone's input. I would like to stick with the div method since I have it working, I just keep worrying that at some point I am going to tip the scales with this big JSP file.
It is definately the most complex jsp I have ever had to write. The file kim.jsp compiles to kim_jsp.java 505KB, and kim_jsp.class 236 KB. This seems very big to me but the page does render fine and behave fine, so guess it is OK. I thought I had read someplace that a compiled jsp shouldn't exceed 64 KB. Have you heard this or do I have the number wrong ?
It's definitely true that there's an upper limit to the size of a Java class (which is what you end up with after you compile your JSP). I'm not sure of the nature of that limit.
However if you have a loop in your JSP, that just compiles to a loop in the Java class. It doesn't matter how many times the loop is executed when you run the JSP. (If that was a factor in your concern.)
But complexity is a problem in itself, even if it does compile successfully. JSPs are hard to read at the best of times. It's not easy to break up a JSP into modules, but could you for example write a custom tag to do things that appear repetitively in your JSP code? I don't believe that would reduce the size of the compiled class, but it would reduce the complexity of the code.