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

HTML Parameters

 
Al Swensen
Greenhorn
Posts: 17
Firefox Browser jQuery PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having some trouble trying to pass parameters from an HTML file to my applet. Basically, I'm passing one parameter to the applet at the moment called "name." Depending on what that value is, different data populates a JTable. This is how I'm getting the parameter from the HTML file:

Now, everything works perfect before I JAR everything... the applets gets the parameter and populates the JTable using a method call like:

But as soon as I place everything into a JAR file, the table doesn't get populated. the parameter seems to be passed, because I had a popup window with the parameter that was passed pop up to let me know it worked. Just... the JTable doesn't seem to be populating. Of course, I also have a JMenu with several options, which when clicked on will populate the table with the appropriate data... it looks sorta like this:


All this code does is copy the values of the column name array and table data array to the one used by my table model. I can't seem to get this to work when it's been JARed though... does anyone have any ideas?
[ May 30, 2006: Message edited by: Al Swensen ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the parameter passing works whether the applet is jar'ed or not; that sounds as if the problem lies elsewhere. A few things to look into: is populateTable still being called? Does "data" have the correct value? Does "skill" have the correct value, whereever that is initialized? Are you certain that one of the 2 if-conditions is always true?
 
Al Swensen
Greenhorn
Posts: 17
Firefox Browser jQuery PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
So the parameter passing works whether the applet is jar'ed or not; that sounds as if the problem lies elsewhere. A few things to look into: is populateTable still being called? Does "data" have the correct value? Does "skill" have the correct value, whereever that is initialized? Are you certain that one of the 2 if-conditions is always true?


Oops, I mistyped part of that... the "skill" should be "data" (that's what happens when you're talking and typing at the same time! ), and there are a number of other conditions, I just posted the first ones. But yes, data should have the correct value, I'm passing my parameters in the html file like this:

So yes, it should definitely be true at some point. IT's very off, because it works perfectly before I JAR it, but it doesn't populate the table after I JAR it and run it.

Like I said, I also have a JMenu that uses the same method call that passes a value onto populateTable depending on what option is selected... that works fine. I just don't understand why it's not populating the table, it's like it's not calling the method or something when the files are JARed up.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I only just noticed that you're using "==" to compare strings - don't do that, it won't work. Use the String.equals method.
 
Al Swensen
Greenhorn
Posts: 17
Firefox Browser jQuery PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, that did it.. thanks! It was a silly mistake on my part, I should've known better than to compare Strings with "==".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic