Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP/JSF/Javascript popup window  RSS feed

 
Jamie Williams
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a list of categories each with 100's of associated codes. I would like to be able to click on the category as a link and have a popup window appear with all the codes for the category selected. However I have thousands of categories and one page for each isn't exactly practical! Is there some way I can call a method of a bean from the popup window with a parameter (the category name) that I can get from the request url?

I was solving this problem before by calling a JSP page by a javascript 'onclick' method which passed as parameter the list of codes to window.open. That works fine for firefox when I have 500 codes, but IE seems to have a lower limit on the length of a url or javascript method parameter or something and it doesn't work when there are lots of codes.

Can anyone help with this problem?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds like a job for AJAX.

As far as JSF components that will let you set up and go, I'm not aware of any yet, but maybe someone here knows something.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you look into an autocomplete control?

Eric
 
Jamie Williams
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
autocomplete control? can you tell me more?

AJAX is out of the question, I need a quick solution and I don't have time to learn a new technology.

All I need to do is call a bean with JSF or JSP, sending a single String parameter, but I can't see any other uses than get/set methods.

This was so easy in PHP! I really like JSF but some things just seem impossible or unnecessarily complex.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!