HTML / Java / GWT problem any advice folks?

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
User avatar
Darkflame
Sheepie Whore
Sheepie Whore
Posts: 18236
Joined: Mon Mar 31, 2003 11:06 am 0
Location: Not the UK

HTML / Java / GWT problem any advice folks?

Post by Darkflame »

Its probably something very obvious I'm missing here, but for some reason I just cant spot it.

As a learning exercises I'm building a little web app here;
http://www.darkflame.co.uk/JaveJunk/Dar ... taste.html

The idea is its a review database where you can compare tastes to the reviewer.
Thats not important.

What is important is it works in IE, but both Opera and Firefox have missing input boxs .
Also the drop down doesn't work in the top right.

In the middle of the grid table there should be a TextArea for input.
And under "Now, what do you think?" there should be another.

Code I'm using to create the input box's is simply;

Code: Select all

final TextArea input_words = new TextArea();
...
..
RootPanel.get("inputslot").add(input_words);
and the html;

Code: Select all

<table width="462" height="169">
		<tr height="165">
        <td align="center" style="background-color: green;" width="452" height="165" id="inputslot" height="165"></td>
	</tr>
</table>

Whats confusing is this is the exact same set up I used for my word sorting program which worked fine in both Opera & Firefox :-/
( http://www.darkflame.co.uk/JaveJunk/Wor ... dSort.html )
User avatar
moosedude
Baaaaaaa!
Baaaaaaa!
Posts: 6209
Joined: Fri Nov 19, 2004 1:19 pm 0
Location: Craggy Island
Contact:

Post by moosedude »

Have you looked at the firefox error console after you run this site? i'm getting several errors which may be related;

1) vt has no properties (line 180, from some sort of cache file?)

2) not well-formed

http://www.darkflame.co.uk/javajunk/dar ... iewers.xml
<reviewer list>------------^

3) not well-formed

http://www.darkflame.co.uk/javajunk/dar ... kflame.xml
<darkflames taste>-----------^

I'm guessing for the first one theres some sort of error in the javascript, not checking for a null property probably; or actually checking for a null value, unless done in specific way, can actually generate this error!

01000101 01000100 01000111 01000101

http://www.redbubble.com/people/fotofill/ buy my photos!
User avatar
Darkflame
Sheepie Whore
Sheepie Whore
Posts: 18236
Joined: Mon Mar 31, 2003 11:06 am 0
Location: Not the UK

Post by Darkflame »

Well, ignore the XML errors. I should just change the extension.
They are xml-ish files Im just using to store data, not realy xml formated files.

hmz..
vt has no properties (line 180, from some sort of cache file?)
Line 180 in the source is just a comment, so im guessing the cache file is something generated by the GWT.
It makes a few files when compiling, I assumed they were just backup and other random gubbings. Some of them are labeled "*cache*".
I did upload them all on the sever as I have done with all my webapps. (whatever the output from the compiler, I just upload).

This dosnt help me much because its all generated from the source.
Something must either be wrong there, or the html.

Either way its baffling, as the text box should at least appear.

Does this site give you any errors;
http://www.darkflame.co.uk/JaveJunk/Wor ... dSort.html
?
User avatar
moosedude
Baaaaaaa!
Baaaaaaa!
Posts: 6209
Joined: Fri Nov 19, 2004 1:19 pm 0
Location: Craggy Island
Contact:

Post by moosedude »

Nope, that site seems fine.

I had a closer look at the "vt" error, and when I click on it, it points to this bit of code (all appearing on the same line, 180);

Code: Select all

function ut(){}
_ = ut.prototype = new Bs();_.vs = Cs;_.i = 'com.google.gwt.user.client.ui.ComplexPanel';_.j = 12;

function lb(vt,wt){ct(vt,wt,vt.gr);}
I'm guessing its something trying to call the function lb, and vt isn't valid for whatever reason (the vt.gr being the problem)

When I look over the entire contents of this file, it is just a list of about 100 to 200 functions with two character function names, all completely meaningless to anybody who doesn't have a complier for a brain.

Theres a plug-in available for firefox, called firebug, which *might* help you track down the cause of the problem, rather than working from the bottom up, I've got it installed on my work laptop, I'll have a look tomorrow morning.

Not sure this one is going to be fixable without somebody more skilled in gwt to help!

01000101 01000100 01000111 01000101

http://www.redbubble.com/people/fotofill/ buy my photos!
User avatar
Darkflame
Sheepie Whore
Sheepie Whore
Posts: 18236
Joined: Mon Mar 31, 2003 11:06 am 0
Location: Not the UK

Post by Darkflame »

Yes thats certainly in the heart of the GWT, certainly not my code.

hmz...guess it might not have been a error on my part after all.
I'll post on the GWT forums and also try updateing to the beta of GWT4.
(I already checked the bugfixs though and nothing like this was mentioned).

Anyway, thanks.
User avatar
teamonkey
Sheepie Whore
Sheepie Whore
Posts: 12082
Joined: Thu Jun 13, 2002 1:07 am 0
XBL Gamertag: itsthetaste
PSN: teamonkey_ca
Contact:

Post by teamonkey »

Firebug says this in the traceback:

Code: Select all

iu has no properties
lb(*null*, Object zr=div.gwt-Label)CEEFACE9611C20BA9... (line 185)
n(Object ob=Object)CEEFACE9611C20BA9... (line 16)
nL()CEEFACE9611C20BA9... (line 412)
gwtOnLoad(*null*, "com.darkflame.darkstaste")CEEFACE9611C20BA9... (line 413)
run()gwt.js (line 295)
__gwt_latchAndLaunch()gwt.js (line 538)
[Break on this error] _ = hu.prototype = new ot();_.it = pt;_.i = 'com.google.gwt.user.client.ui.Compl...
I've put my own stars around the *null* because that's what's being flagged up. Moosedude already listed the offending line 185 - the error happens at the lb(vt,wt) bit - the first parameter passed in is *null* according to Firebug.

I don't know anything about GWT, but check gwtOnLoad()?
User avatar
Darkflame
Sheepie Whore
Sheepie Whore
Posts: 18236
Joined: Mon Mar 31, 2003 11:06 am 0
Location: Not the UK

Post by Darkflame »

No help on the gwt forums as yet, but I think I tracked down whats causing the problem on one site but not the other;

When the tables are themselves placed on a grid, it works!
When they are not on a grid, it doesn't.

Weird eh?
User avatar
IanJ
Baa!
Baa!
Posts: 40
Joined: Wed Apr 11, 2007 6:36 pm 0
Location: Devon. UK

Post by IanJ »

Hi DFlame,

Could you send me a zip of the source code, if poss.. done tons of java
and v interested in gwt... i could setup a test db, and have a look :)

cheers
Ian.
User avatar
IanJ
Baa!
Baa!
Posts: 40
Joined: Wed Apr 11, 2007 6:36 pm 0
Location: Devon. UK

Post by IanJ »

Darkflame wrote:Does this site give you any errors;
http://www.darkflame.co.uk/JaveJunk/Wor ... dSort.html
No errors in IE7 / Firefox. AlphaBeta sorted fine. Although Sort reverse had no effect. (Same as alphabeta)
Ian.
User avatar
Darkflame
Sheepie Whore
Sheepie Whore
Posts: 18236
Joined: Mon Mar 31, 2003 11:06 am 0
Location: Not the UK

Post by Darkflame »

I updated it on a grid and it works fine;
http://www.darkflame.co.uk/JaveJunk/Dar ... taste.html
IanJ wrote:
Darkflame wrote:Does this site give you any errors;
http://www.darkflame.co.uk/JaveJunk/Wor ... dSort.html
No errors in IE7 / Firefox. AlphaBeta sorted fine. Although Sort reverse had no effect. (Same as alphabeta)
okdokie.

Hi DFlame,

Could you send me a zip of the source code, if poss.. done tons of java
and v interested in gwt... i could setup a test db, and have a look

cheers
Sure.
Its very messy, probably all sorts of bad coding over it as I only been coding java 2 weeks;
http://www.darkflame.co.uk/JaveJunk/Dar ... nghtml.zip
That html is the same one online, so it should work.
You will need GWT, of course;
http://code.google.com/webtoolkit/



However, being an idiot, I didnt keep the html where it wasnt working >_<

So not sure really if any help is any use now.
Shame as I'm still quite curious what was causing it.
I might try reproducing the unworking html tommorow :p
User avatar
IanJ
Baa!
Baa!
Posts: 40
Joined: Wed Apr 11, 2007 6:36 pm 0
Location: Devon. UK

Post by IanJ »

ok cool, will have a gander tomorrow...
Ian.
User avatar
moosedude
Baaaaaaa!
Baaaaaaa!
Posts: 6209
Joined: Fri Nov 19, 2004 1:19 pm 0
Location: Craggy Island
Contact:

Post by moosedude »

I've had a longer look at this GWT, I'm suitable impressed at the examples!

MS have come up with a Ajax toolkit which hasn't excatly stunned me yet (although it is integrated with .NET) - this could be a pleasant alternative.

01000101 01000100 01000111 01000101

http://www.redbubble.com/people/fotofill/ buy my photos!
User avatar
Darkflame
Sheepie Whore
Sheepie Whore
Posts: 18236
Joined: Mon Mar 31, 2003 11:06 am 0
Location: Not the UK

Post by Darkflame »

moosedude wrote:I've had a longer look at this GWT, I'm suitable impressed at the examples!

MS have come up with a Ajax toolkit which hasn't excatly stunned me yet (although it is integrated with .NET) - this could be a pleasant alternative.
oh, yes, my expirence so far with GWT is its lovely.
Post Reply