PDA

View Full Version : Form submit causes window to open in IE



cbruno
31 Aug 2009, 10:42 PM
Hello. I created a simple form that takes username and password. Works fine in FF and Safari, but in IE 6-8, when i click a buttom to submit the form, a window opens and now Events.Submit event is fired.

Here is my code:

UserLoginForm(String url) {

setHeaderVisible(false);
setAction(url);
setBorders(false);
setWidth(485);
setFieldWidth(250);
this.setBodyBorder(false);
setLabelWidth(175);
setPadding(15);
setMethod(Method.POST);
setFrame(true);


username.setFieldLabel("Username");
username.setAllowBlank(false);
username.setName("username");
add(username);

password.setFieldLabel("Password");
password.setPassword(true);
password.setAllowBlank(false);
password.setName("password");

add(password);

Button submit = new Button("Login");

submit.addSelectionListener(new SelectionListener<ButtonEvent>() {

@Override
public void componentSelected(ButtonEvent ce) {
if(isValid()){

submit();
}

}

});

this.addButton(submit);

add(forgotpassword);

}




Any ideas what i am doing wrong?

sven
31 Aug 2009, 11:23 PM
This is already fixed in svn. The fix will be part of the next release.

cbruno
31 Aug 2009, 11:28 PM
So I paid $300 bucks for an API that cannot submit forms correctly for the most widely used browser? And I need to pay another $300 to get the fix (svn access) or just sit and wait.....why cant you release GXT 2.0.2 for something this critical? I can wait for LiveGrid but not this.

aclsoftware
3 Sep 2009, 6:32 AM
I agree.. This is a bit of a show stopper at the moment. I have actually subscribed to the SVN but cant work out how to get the fix.

Can anybody help?

Feltros
3 Sep 2009, 6:34 AM
Do you mean you don't know how to build from SVN?

Found this on google:

http://extjs.com/helpcenter/index.jsp?topic=/com.extjs.gxt.help/html/gettingstarted/svn.html

And its hardly a show stopper - just use FireFox as your development browser for the time being?

aclsoftware
3 Sep 2009, 6:41 AM
Hi Feltros..

Thanks for you rapid response.

I have got the repository locally but didnt really know how / what to build.

I was looking at using the SVN builder command line tool but didnt know what the source directory was (i am acutally new to SVN, used to CVS which isnt as feature rich).

I guess i will try the eclipse method you kindly sent to me .. but do you have any further clues in meantime..

thanks again.

Feltros
3 Sep 2009, 6:43 AM
Wish I did, I don't have access to the SVN and have never built/compiled from one either. By the looks of things that eclipse solution should build it and stick it into your project for you too so things 'should' work straight away... couldn't honestly tell you if they will though. Goodluck! :)

aclsoftware
3 Sep 2009, 6:46 AM
I've got my crash helmet on and going in..

thanks

aclsoftware
3 Sep 2009, 6:48 AM
Just noticed your other line about using Firefox as the development browser. Doesnt this mean that dont get the facility to debug the front end stuff like you do in hosted?

Feltros
3 Sep 2009, 6:52 AM
Yea I guess that wasn't a fantastic tip after all. I was assuming you had a half finished product and were doing fiddly bits and IE was buggering you over.

Out of interest what are you Method.POSTing data to (the url?)? If you have a java back end you wouldn't need to do it in this way to start with and thats what GWT is primarily geared towards. You could even put a java back end on that communicated the data over to a different url(perl, php, whatnot) and retrieved the response (effort, but a workaround for people who don't have svn).

cbruno
3 Sep 2009, 6:56 AM
Hey, aclsoftware, can you send me the current svn build when you get it working? I paid for a commercial license, just not silver support.

aclsoftware
3 Sep 2009, 6:56 AM
Here is my problem and code.

I am trying to develop a log in form but i am having trouble catching the Submit event of FormPanel.

I can handle the BeforeSubmit event but the Submit doesnt get caught.
Also its seems to spawn a new browser window.
This occurs for the hosted browser, Internet explorer 8,

but works in Google Chrome 2.01, Mozilla Firefox 3.5.2, Opera 10, Safari 4.0.3

My messages field displays ;BeforeSubmit;AfterSubmit in all the working browsers.

I believe i am using ExtJs GXT 2.0.1.

Here is my code:



public class ExtJsLoginForm extends LayoutContainer {
private final TextField<String> usernameDisplay;
private final TextField<String> passwordDisplay;
private final FormPanel loginFormPanel;
private final TextBox messages;

public ExtJsLoginForm() {
setLayout(new CenterLayout());

//Create a form layout
FormLayout layout = new FormLayout();
layout.setLabelWidth(75);

//create the form panel
loginFormPanel = new FormPanel();
loginFormPanel.setHeaderVisible(false);
loginFormPanel.setBodyBorder(true);
loginFormPanel.setWidth(334);
loginFormPanel.setAction("compiled/secureservices/initLogon/j_security_check");
loginFormPanel.setMethod(Method.POST);
loginFormPanel.setEncoding(Encoding.URLENCODED);

//create the log on field set
FieldSet logonFieldSet = new FieldSet();
logonFieldSet.setCollapsible(false);
logonFieldSet.setHeading("Sign in to your Application Form");
logonFieldSet.setLayout(layout);
logonFieldSet.setWidth(310);

usernameDisplay = new TextField<String>();
usernameDisplay.setAllowBlank(true);
usernameDisplay.setEmptyText("Please enter your username");
usernameDisplay.setName("j_username");
usernameDisplay.setFieldLabel("Username");

passwordDisplay = new TextField<String>();
passwordDisplay.setAllowBlank(true);
passwordDisplay.setPassword(true);
passwordDisplay.setEmptyText("Please enter your password");
passwordDisplay.setName("j_password");
passwordDisplay.setFieldLabel("Password");

//Add sign in button
Button doLoginButton = new Button("Sign in");
doLoginButton.addSelectionListener(new SelectionListener<ButtonEvent>(){
@Override
public void componentSelected(ButtonEvent ce) {
boolean valid = true;

if(usernameDisplay.getValue()==null || (usernameDisplay.getValue()!=null && usernameDisplay.getValue().equals(""))){
usernameDisplay.markInvalid("You must enter a username");
valid = false;
}

if(passwordDisplay.getValue()==null || (passwordDisplay.getValue()!=null && passwordDisplay.getValue().equals(""))){
passwordDisplay.markInvalid("You must enter a password");
valid = false;
}

if(valid){
attemptSignIn();
}
}
});
logonFieldSet.add(usernameDisplay);
logonFieldSet.add(passwordDisplay);

logonFieldSet.add(doLoginButton);

loginFormPanel.add(logonFieldSet);

loginFormPanel.addListener(Events.BeforeSubmit, new Listener<FormEvent>(){
@Override
public void handleEvent(FormEvent be) {
//This gets fired
System.out.println("Handle Before Submit");
messages.setText(messages.getText()+ ";BeforeSubmit");
}
});

loginFormPanel.addListener(Events.Submit, new Listener<FormEvent>(){
@Override
public void handleEvent(FormEvent be) {
//This NEVER gets fired
System.out.println("Handle after Submit");
messages.setText(messages.getText()+ ";AfterSubmit");
}
});
messages = new TextBox();
messages.setText("");

add(loginFormPanel);
add(messages);
}

private void attemptSignIn() {
String url = GWT.getHostPageBaseURL() + "compiled/secureservices/initLogon";
RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, url);

rb.setCallback(new RequestCallback() {
public void onResponseReceived(Request request, Response response) {
if(response.getStatusCode() ==Response.SC_OK){
loginFormPanel.submit();
} else {
//handle error with accessing the secure service
}
}

public void onError(Request request, Throwable caught) {
throw new UnsupportedOperationException("Not supported yet.");
}
});

//-------try the send---------
try {
rb.send();
} catch (RequestException ex) {
Info.display("Logging In", "Exception Caught");

}
//-----end of try send-------
}


}

sven
3 Sep 2009, 7:02 AM
This is a known issue and already fixedini SVN.

Feltros
3 Sep 2009, 7:06 AM
I assume by your code that the Remote Procedure Call ability of GWT couldn't do what you require then? Hope the SVN gets working and fixes this for you.

cbruno - Are you really asking for him to circumvent the licensing system on the public forum? You could have sent him a private message if you wanted to pursue that and not potentially get both of you into trouble.
The $300 you paid is for commercial rights, for SVN access its another $300 which if its 'that' urgent, you'll just have to pay/get your company to pay. If you don't want to pay/can do without it then simply wait. I know it sounds harsh, but presumably you read the terms and conditions and knew what you were signing up for.

Sven - if you read previous comments you could have assisted by providing some help on how to build the SVN.

aclsoftware
3 Sep 2009, 7:07 AM
Hi Sven..

Its the getting it from the SVN i am struggling a bit with. My java -jar builder is failing on the trunk\com.extjs.gxt directory. the first message is
java.io.FileNotFoundException:"<my root>trunk\com.extjs.gxt\src\ext.jsb (The system cannot find the path specified)"

And i am tryin it the eclipse method but getting errors when i put a GXT SDK (1.7) on my the project build classpath.
e.g. in HtmlEditor.java i get Formatter cannot be resolved to a type

Does it specifically need to be GWT 1.5? or am i missing a trick.

Thanks in advance.

sven
3 Sep 2009, 7:09 AM
You are using the Ext JS Builder. For GXT you can simple use ant

aclsoftware
3 Sep 2009, 7:10 AM
Feltros.. you are like my big brother sticking up for me.. lol.. Agreed, sorry cbruno.. i'm new to this stuff and dont wanna get kicked off already. Sorry.

In terms of my issue. Yeah. i could probably get this working the "old fashioned" GWT way.. but i;d got it built and looking nice.. and it i read that there is a fix.. so i was soo close i could touch it... so therefore i got my company to stump up for support.

Thanks again.

aclsoftware
3 Sep 2009, 7:16 AM
Hi Sven

I am going through this item here (http://extjs.com/helpcenter/index.jsp?topic=/com.extjs.gxt.help/html/gettingstarted/setup.html) that feltros kindly found. As i say.... i am up to the point where the source in my eclipse enviroment. I have added GWT 1.7 to the build path but i am getting errors (in fact all of them are with the HTMLEditor.java file). Is GWT 1.7 SDK sufficient?

I have never used ant (probably cause my version of eclipse (Rational) does most things for me) but will suss that out once there are no errors.

Can you shed any light on them?

Thanks again in advance.

sven
3 Sep 2009, 7:17 AM
You are building from the trunk. This is based on GWT 2.

You are looking for "releases/2.0"

aclsoftware
3 Sep 2009, 7:19 AM
Ahhh.. thanks Sven,

Is this the latest and greatest version then? I will bring this into my workspace and build this then?

sven
3 Sep 2009, 7:22 AM
Yes, releases/2.0 is the latest version

Feltros
3 Sep 2009, 7:29 AM
Ant is a command line based tool where you can just say:
ant -compile
And it does everything and generates you the finished product. There should be a top level .ant text file (been a while since I used this so don't necessarily expect this to be exactly correct) which if you open will make it fairly obvious what the commands are for doing things as it'll be segregated into sections such as 'launch', 'compile' etc.
http://ant.apache.org/manual/install.html

I think what Sven is saying is don't bother with the eclipse route, (although it will prob work as well) just checkout the svn to a folder somewhere, run ant -compile and job done. If you've got the eclipse route working pretty much then go for it since you'd need to configure ant's classpath and whatnot anyway.

Like a big brother :P Love it lol. I'm probably younger than you in all likelihood though, am doing my degree. Glad to be of service.

cbruno
3 Sep 2009, 8:41 AM
Is sending me the current svn build against the rules? I paid for a faulty product, can you please help me fix it?

cbruno
3 Sep 2009, 9:03 AM
I just bought my commercial license last May. Do you think Ext JS offers refunds?

aclsoftware
3 Sep 2009, 9:15 AM
Hi Sven, Felteros

Just wanted to let you know i got it built and my issue is now resolved.

Also wanted to thank you for your time and patient in helping me get there..

onwards and upwards

cheers
acl

cbruno
3 Sep 2009, 9:39 AM
cbruno - Are you really asking for him to circumvent the licensing system on the public forum? You could have sent him a private message if you wanted to pursue that and not potentially get both of you into trouble.
The $300 you paid is for commercial rights, for SVN access its another $300 which if its 'that' urgent, you'll just have to pay/get your company to pay. If you don't want to pay/can do without it then simply wait. I know it sounds harsh, but presumably you read the terms and conditions and knew what you were signing up for.

.

Its one thing to have to wait/pay for the latest features. Its another thing to wait/pay for something that should have just worked from day 1, but is broken in the most commonly used browser. Its a form submission, not some fancy javascript fx. Why should I have to pay $300 for a presumably small fix for something that should have worked from the beginning anyway. Do you work for Microsoft?

Feltros
3 Sep 2009, 11:05 AM
GXT is by no means a finished product, nor did you pay for it. You paid for a commercial license to use it. You could have not paid for the commercial license and used it privately and found these issues first then sought a commercial license when you wanted to go further.

I've already said i'm on a degree course, thought it was pretty clear I work for no-one.

I also said if you wanted to really circumvent the rules you'd be better off doing it via PM than publically, you ignored me. Fair enough. To be frank, if ignoring the rules publically was your style I don't know why you paid the commercial license anyway. Its pretty clear by the fact Sven is ignoring you that they don't wish to get into an argument with someone who's only posts so far have been complaining about not getting his moneys worth.

Why not try and be reasonable with the EXTJS people and simply ask them for a latest build off the SVN for public download - or wait for 2.02 to come out? (And not ask us publically to circumvent the license - why would someone else who paid $300 for silver support want to lose their money/access to svn by helping you?)

Now if you don't want to go down that route i've already laid out a workaround for this problem, you can RPC call to a java back end and send the data off to anywhere you want in any way you want, then responde via RPC. This works fine and i'm sure you can live with it for the moment.

I sincerely hope you don't contact colleagues in your office in this manner, or I doubt you'll be needing that commercial license for very long. Thanks for the personal attack anyway.

aclsoftware - good stuff :) glad it worked.

cbruno
3 Sep 2009, 11:32 AM
GXT is by no means a finished product, nor did you pay for it. You paid for a commercial license to use it.
Well form submissions should work...not much to ask...
I paid for it, I paid to use it...semantics, this forum isnt a legal forum.




I also said if you wanted to really circumvent the rules you'd be better off doing it via PM than publically, you ignored me.
I dont want to circumvent rules, I just want the code I paid to used to be fixed. I paid to use GXT commercially, so Im not really into stealing intellectual property. Just want the fix.






Why not try and be reasonable with the EXTJS people and simply ask them for a latest build off the SVN for public download - or wait for 2.02 to come out? (And not ask us publically to circumvent the license - why would someone else who paid $300 for silver support want to lose their money/access to svn by helping you?)

ExtJS needs to follow the Google mantra - "Dont be evil". There are plenty of other benefits included in silver support, svn access is just one. I dont need all the support, just a fix of a pretty nasty bug. The unevil thing to do is let your users have access to a working version of the software as soon as it is available. How does helping me solve my problem diminish anyone else? What ExtJS needs to do is introduce SVN access by itself for a reasonable price.



I sincerely hope you don't contact colleagues in your office in this manner, or I doubt you'll be needing that commercial license for very long. Thanks for the personal attack anyway.


All i asked was do you work for Microsoft? If anything, as hard as it is to get a job at MS, this is a compliment. Don't be so sensitive.

Feltros
3 Sep 2009, 1:31 PM
Its quite simple, i've offered help in multiple ways and you still continue to complain as opposed to doing anything constructive. If you are blind to the advice, thats your problem.

I really can't be bothered to continue attempting to assist you if your point now rests on the basis that EXTJS are being 'evil' because they won't do what you want. You seem to be a person who is getting more hung up on complaining about the problem than even attempting to get a solution. Again I would point you towards the fact I have laid out several ways in which you could get a solution, and this will be my last post on the issue.

If you want to 'have the last word', feel free :P

cbruno
3 Sep 2009, 1:37 PM
I just want things to work. Ive fixed my app using raw GWT an XMLHTTPRequest-but when you pay for something, you expect it to work. RPC is not an option,not using a Java backend.
BTW, why not just response with, "yeah it sucks a commercial licensee cant get svn access to patch bugs". If there are enough people that voice this opinion, maybe Ext would change its policy.

googelybear
1 Oct 2009, 5:49 AM
I'm also struggling with this issue. Is there already a date set for the next gxt release that will include this patch?

edit: just saw that 2.0.2 has already been released. Unfortunately the link to the CHANGELOG is broken: http://www.extjs.com/products/extgwt/CHANGES_extgwt-2.0.2.html

Arno.Nyhm
1 Oct 2009, 7:05 AM
with a little guessing:

http://www.extjs.com/products/gxt/CHANGES_extgwt-2.0.2.html

but its not so nice readable... a <pre>xx</pre> is missing around the info... reading the source of the page is better...

googelybear
2 Oct 2009, 4:36 AM
first of all: thanks for providing this bug fix release, there seems to be a lot of fixes in it!

Unfortunately it breaks my entire application, there is an exception thrown when it renders the login dialog:


2009-10-02 12:00:26,839 [FATAL] Uncaught Exception:
java.lang.NullPointerException:
null
at com.extjs.gxt.ui.client.widget.form.TextField.onRender(TextField.java:470)
....


The source of this error is the following line in my code:


userNameField.render(RootPanel.get("login-field").getElement());


so the gxt text field is rendered into an html <input> element, this will allow browsers to store the credentials for a user (which does not work if you use gxt fields only).

is this a regression bug?

sven
2 Oct 2009, 4:47 AM
You cannot render anything into an input element. An input element cannot have children.

googelybear
2 Oct 2009, 5:17 AM
sorry, sorry, sorry,....I simplified it too much. Actually I do the following (and the same for the password field):


userNameField = new TextField<String>() {
@Override
protected void onRender(Element target, int index) {
if (el() == null) {
setElement(Document.get().getElementById("frontendcode-login-username"));
}
super.onRender(target, index);
}
};
...
userNameField.render(RootPanel.get("frontendcode-login-index").getElement());
ComponentHelper.doAttach(userNameField);
and the html looks like this:


<form id="frontendcode-login-index" action="javascript:__do_login()">
<input id="frontendcode-login-username" type="text" size=10>
<input id="frontendcode-login-password" type="password" size=10>
<input id="frontendcode-login-button" class="login-item login-button" type="submit" value="">
</form>
I am aware that this is ugly but was unable to come up with a nicer solution that works with the browser "remember password" functionality. If someone knows a nicer - and working ;-) - I would appreciate if you let me know it.

sven
2 Oct 2009, 5:18 AM
The TextField has two elements now due to a couple of issues in IE.

It has a wrapfield around it and the input within. You need to first create a DIV and than simple add the input as children.

googelybear
5 Oct 2009, 12:06 AM
Hi sven,
Thanks for your instructions. I adjusted the markup as you proposed, but unfortunately I still got the same NPE (TextField.input is null). Looking at the code it is apparent to me that the input field will never be set unless it is assigned in onRender:


if (el() == null) {
setElement(DOM.createDiv(), target, index);
getElement().appendChild(password ? DOM.createInputPassword() : DOM.createInputText());
input = el().firstChild();
}
...


In my special case though I want to use the existing html structure which is already created and set via setElement (see code above). Is there any way around this?

sven
5 Oct 2009, 12:08 AM
I suggest to post the complete class and the complete stacktrace. without any informations it is impossible to say

googelybear
5 Oct 2009, 1:08 AM
ok (just thought to focus on the important pieces not to blow up this post unnecessarily, but maybe I was not clear enough, in that case I want to apologize for creating confusion). So this is from the class LoginView:


private void initializeLoginStructure() {

/* Initialize static ui structure */
/* add username field */
userNameField = new TextField<String>() {
@Override
protected void onRender(Element target, int index) {
if (el() == null) {
setElement(Document.get().getElementById("frontendcode-login-username"));
}
super.onRender(target, index); // FIXME This results in an NPE
}
};
userNameField.setMinLength(Constants.USERNAME_LENGTH_MIN);
userNameField.setEmptyText("enter username");
userNameField.addStyleName("login-field");
userNameField.render(RootPanel.get("frontendcode-login-index").getElement());
ComponentHelper.doAttach(userNameField);and here's the stacktrace:

2009-10-05 10:58:36,815 [FATAL] Uncaught Exception:
java.lang.NullPointerException:
null
at com.extjs.gxt.ui.client.widget.form.TextField.onRender(TextField.java:470)
at tigr.client.mvc.login.LoginView$1.onRender(LoginView.java:134)
at com.extjs.gxt.ui.client.widget.Component.render(Component.java:930)
at com.extjs.gxt.ui.client.widget.Component.render(Component.java:893)
at tigr.client.mvc.login.LoginView.initializeLoginStructure(LoginView.java:141)
at tigr.client.mvc.login.LoginView.initUi(LoginView.java:112)
at tigr.client.mvc.login.LoginView.handleEvent(LoginView.java:67)
at com.extjs.gxt.ui.client.mvc.Controller.forwardToView(Controller.java:89)
at tigr.client.mvc.login.LoginController.onInit(LoginController.java:77)
at tigr.client.mvc.login.LoginController.handleEvent(LoginController.java:53)
... more stuff from the init sequence...


and the modified html markup from above:


<form id="frontendcode-login-index" action="javascript:__do_login()">
<div id="frontendcode-login-username"><input type="text" size=10></div>
<div id="frontendcode-login-password"><input type="password" size=10></div>
<input id="frontendcode-login-button" class="login-item login-button" type="submit" value="">
</form>

sven
5 Oct 2009, 1:10 AM
I meant your already edited class and the new stacktrace. In which linenumber does your already adjusted code brakes?



protected void onRender(Element target, int index) {
if (el() == null) {
setElement(Document.get().getElementById("frontendcode-login-username"));
input = el();
}
super.onRender(target, index); // FIXME This results in an NPE
}


You need to assign the input element.

micgala
5 Oct 2009, 1:12 AM
Hi.

Since this is very, very problematic, Sven, can you please tell us a workaround for fixing this on gxt 2.0.1?

Is it too complicated to provide a workaround?

Hope this can happen.

Regards,
Michel.

sven
5 Oct 2009, 1:14 AM
Override createFrame in FormPanel with the code of GXT 2.0.0 and recompile your app.

googelybear
5 Oct 2009, 1:18 AM
that's exactly the problem - I cannot assign input (it's protected and there is no setter available).

The code from post #37 (http://www.extjs.com/forum/showthread.php?p=393962#post393962) is a snippet from the first few lines of TextField.onRender
(note to self: I should label my code snippets more clearly)

sven
5 Oct 2009, 1:21 AM
that's exactly the problem - I cannot assign input (it's protected and there is no setter available).

Exactly, it is protected. That is why you can access it when extending it. You just cant access it from the outside.

googelybear
5 Oct 2009, 2:28 AM
ah yes..you are completely right of course...so stupid, must be a case of the Mondays ;-)

What's the easiest way of creating an El instance from a com.google.gwt.dom.client.Element? (I'm not so familiar with the gwt internals)

sven
5 Oct 2009, 2:29 AM
El e = new El(element);

googelybear
5 Oct 2009, 4:05 AM
that was my first guess but it seems there are 2 Element classes:
The before mentioned com.google.gwt.dom.client.Element and com.google.gwt.user.client.Element (which is a subclass of the first one and is empty). Document.get().getElementById(id) returns the first one (from the dom package) which is not compatible with the second one expected from the El(element) constructor.

sven
5 Oct 2009, 4:10 AM
You can cast it. Its a JSO.





El e = new El((com.google.gwt.user.client.Element) element.cast());

micgala
5 Oct 2009, 4:25 AM
Override createFrame in FormPanel with the code of GXT 2.0.0 and recompile your app.

For those in need, this is a way to fix 2.0.1.



public class FixedFormPanel extends FormPanel {

@Override
protected void onAttach() {
super.onAttach();
Element iFrame = getIFrameElement();
Element fixedIFrame = createFixedFrame();

FormPanelImpl impl = getImpl();
impl.unhookEvents(iFrame, getLayoutTarget().dom);
XDOM.getBody().removeChild(iFrame);

XDOM.getBody().appendChild(fixedIFrame);
impl.hookEvents(fixedIFrame, getLayoutTarget().dom, this);

setIFrameElement(fixedIFrame);
}

private Element createFixedFrame() {
Element dummy = DOM.createDiv();
DOM.setInnerHTML(dummy, "<iframe src=\"javascript:''\" name='" + getFrameName()
+ "' style='position:absolute;width:0;height:0;border:0'>");

return DOM.getFirstChild(dummy);
}

private native String getFrameName() /*-{
return this.@com.extjs.gxt.ui.client.widget.form.FormPanel::frameName;
}-*/;

private native Element getIFrameElement() /*-{
return this.@com.extjs.gxt.ui.client.widget.form.FormPanel::iframe;
}-*/;

private native void setIFrameElement(Element fixedIFrame) /*-{
this.@com.extjs.gxt.ui.client.widget.form.FormPanel::iframe = fixedIFrame;
}-*/;

private native FormPanelImpl getImpl() /*-{
return @com.extjs.gxt.ui.client.widget.form.FormPanel::impl;
}-*/;

}
Frankly, this is a serious issue to be left unreleased to everyone issue.
Everyone with uses Form submit on IE, will suffer from this issue...

I am hoping you guys look back into the decision of making builds reserved only to subscribers. This is so crazy... I guess this is the first I see something like this in a java library, and all my years working with Java.

EDIT: it was wrong... now it works.

Regards,
Michel.

googelybear
5 Oct 2009, 5:08 AM
sven: great it seems to work now, thank you very much for having patience with me ;)

btw. it seems that Component.addStyleName(myStyle) is broken. Consider the following code:

newAccountLink = new Html("First-time User?");
newAccountLink.setId("newAccountButton");
newAccountLink.setStyleName("login-label");
newAccountLink.addStyleName("login-link");the resulting style should be: "login-label login-link" but inspection in firebug shows just "login-label" (I didn't change any bit in the implementation, with 2.0.1 it worked fine).

Further investigation shows that the new implementation of addStyleName uses the styleNames attribute instead of the cls attribute which was used previously in addStyleNames. However setStyleName uses the cls attribute (gxt 2.0.1 and 2.0.2) which seems to be used when the component is rendered in the browser.

sven
5 Oct 2009, 5:12 AM
setStyleName was corrected in 2.0.2. However i just added one more fix to also fix the code you just gave.

googelybear
5 Oct 2009, 6:33 AM
"corrected"? to my eyes Component.setStyleName looks exactly the same in 2.0.1 and 2.0.2 (addStyleName is - as I posted - different)... but anyway, in that case I'll have to stick with 2.0.1 and use the fix from micgala to fix the FormPanel issue until a new version is released which includes both.

micgala
5 Oct 2009, 7:09 AM
Please notice that I have updated that fix.

Regards,
Michel.

googelybear
5 Oct 2009, 7:20 AM
good timing...just tried the old version and found out that it doesn't work ;-) Will try the new one now.

googelybear
5 Oct 2009, 7:57 AM
the new fix works fine for me (tested on ie7, ie8 and FF/safari). Thanks a lot!

micgala
5 Oct 2009, 11:40 AM
I'm glad it could help you.

I am still facing problems with file upload...
It doesn't open a new window, but IE6 does not upload the file.

Instead, I got a file and, in the contents of the uploaded file, I got only the path of the file in the client machine... very strange.

Did someone have this before?