Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retrieving parameter names

 
Johannes Postma
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to retrieve the parameter names in the applet. Is there some way to do this?
 
Rob Spoor
Sheriff
Pie
Posts: 20751
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what getParameterInfo() is meant for. However, most (casual) programmers do not override this method, so you can't rely on it.

Basically, it's all about how the person who created the applet has documented it.


Offtopic: getAppletInfo() and getParameterInfo() should have been abstract methods, and (J)Applet abstract classes. How often do you use a default (J)Applet instead of a subclass anyway?
[ November 10, 2005: Message edited by: Rob Spoor ]
 
Johannes Postma
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that getParameterInfo() will do the job. I want to retrieve the parameters dynamicly. The applet doesn't know anything about the parameters not even the parameterNames. I want some method like getParameterNames().
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can use LiveConnect (a big if), you can get at the DOM of the web page, and get the parameter names through the applet tag.

I think getParameterInfo was meant for the browser to call, so that it could show the creator of the web page what parameters to put into it. The HotJava browser used to do something along those lines. (There are similar methods for servlets, also universally ignored, only honored by Suns JavaWebServer.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic