Also, you can compile in PRETTY mode using the Google Eclipse Plugin by
following the steps below:
1) While your project is open, click on the "Run..." drop-down arrow to open
the list of run configurations.

2) Select "Run Configurations..."

2) In the Run Configuration dialog, select your project's Web Application
launch configuration.

3) Navigate to the GWT tab

4) Select the "Pretty" option from the Output style drop-down box.

5) When you hit "Compile/Browse" on your next hosted mode launch, the
generated output will be human-readable JavaScript. This will either give us
more hints in the generated error message, or will work in Firefox 3, in
which case there may be something to investigate on the GWT side of things.

Hope that helps,
-Sumit Chandel

On Tue, Jun 2, 2009 at 2:08 PM, Sumit Chandel <[email protected]>wrote:

> Hi Adrian,
> There's nothing immediately obvious to me with the code snippet you posted.
> The dialog box should come up normally.
>
> Could you try compiling your application in PRETTY mode and seeing if the
> error still occurs when loading your application in Firefox?
>
> Also, did this occur when hitting "Compile/Browse" from hosted mode, or did
> you compile your application yourself and deploy it on a web server and
> experience this issue while in web mode?
>
> Hopefully the answers to these questions will help us get a step further in
> solving the issue you're experiencing.
>
> Cheers,
> -Sumit Chandel
>
>
> On Sat, May 30, 2009 at 8:08 PM, Adrian <[email protected]>wrote:
>
>>
>> Hello,
>>
>> I am new to GWT and currently have it running in Eclipse 3.4 with the
>> GWT plugin:http://code.google.com/appengine/docs/java/tools/
>> eclipse.html<http://code.google.com/appengine/docs/java/tools/%0Aeclipse.html>
>>
>> I seem to have everything running fine in the Hosted Browser (and even
>> IE for that matter) but I cannot figure out what is wrong when I try
>> to run the same app in Firefox. Here are a few snippets of my code:
>>
>> The program has a login page that authenticates a user and returns the
>> user ID if successful.
>>
>> Here is the EventHandler class that is in use for the textfield and
>> also button on the login form.
>>
>>                // Create a handler for the sendButton and nameField
>>                class MyHandler implements ClickHandler, KeyUpHandler {
>>                        public void onClick(ClickEvent event) {
>>                                sendNameToServer();
>>                        }
>>                        public void onKeyUp(KeyUpEvent event) {
>>                                if (event.getNativeKeyCode() ==
>> KeyCodes.KEY_ENTER) {
>>                                        sendNameToServer();
>>                                }
>>                        }
>>                        private void sendNameToServer() {
>>                                sendButton.setEnabled(false);
>>                                String textToServer = nameField.getText();
>>                                textToServerLabel.setText(textToServer);
>>                                serverResponseLabel.setText("");
>>                                authService.adminLogin(textToServer,new
>> AsyncCallback<Integer>() {
>>
>>
>>                                public void onFailure(Throwable caught) {
>>                                                                // Show the
>> RPC error message to the user
>>
>>  dialogBox.setText("Admin Login - Failure");
>>
>>  serverResponseLabel.addStyleName("serverResponseLabelError");
>>
>>  serverResponseLabel.setHTML(SERVER_ERROR);
>>
>>  dialogBox.center();
>>
>>  closeButton.setFocus(true);
>>                                }
>>
>>                                public void onSuccess(Integer result) {
>>                                        loginUpdate(result);
>>
>>                                        }
>>                                });
>>                        }
>>                }
>>
>> Login Update does the following:
>>
>> private void loginUpdate(Integer result) {
>>                //need to authenticate
>>                dialogBox.setText("Admin Login");
>>
>>  serverResponseLabel.removeStyleName("serverResponseLabelError");
>>                serverResponseLabel.setHTML("results - "+result);
>>                dialogBox.center();
>>                closeButton.setFocus(true);
>>
>>                try{
>>                        if(result!=null&&result==1){
>>                                //successful login
>>
>>  RootPanel.get("loginForm").setVisible(false);
>>
>>                                // Create table for stock data.
>>                            twebFlexTable.setText(0, 0, "Title");
>>                            twebFlexTable.setText(0, 1, "Date");
>>                            twebFlexTable.setText(0, 2, "Host(s)");
>>                            twebFlexTable.setText(0, 3, "Options");
>>                            // Add styles to elements in the stock list
>> table.
>>                            twebFlexTable.setCellPadding(6);
>>
>>                            twebFlexTable.getRowFormatter().addStyleName(0,
>> "twebListHeader");
>>                            twebFlexTable.addStyleName("twebList");
>>
>>                            twebFlexTable.getCellFormatter().setWidth(0, 0,
>> "35%");
>>                            twebFlexTable.getCellFormatter().setWidth(0, 1,
>> "15%");
>>                            twebFlexTable.getCellFormatter().setWidth(0, 2,
>> "35%");
>>                            twebFlexTable.getCellFormatter().setWidth(0, 3,
>> "15%");
>>
>>  twebFlexTable.getCellFormatter().setHorizontalAlignment(0, 3,
>> VerticalPanel.ALIGN_CENTER);
>>
>>                            mainPanel = new VerticalPanel();
>>                            mainPanel.add(twebFlexTable);
>>
>>                            // Associate the Main panel with the HTML host
>> page.
>>                            RootPanel.get("twebList").add(mainPanel);
>>                            RootPanel.get("twebList").setVisible(true);
>>
>>                            refreshTwebList("upcoming");
>>
>>                        }
>>                        else if(result!=null&&result==2){
>>                                //need to authenticate
>>                                dialogBox.setText("Admin Login - Failed");
>>
>>  serverResponseLabel.removeStyleName("serverResponseLabelError");
>>                                serverResponseLabel.setHTML("You need to
>> authenticate your Twitter
>> account to carry on.");
>>                                dialogBox.center();
>>                                closeButton.setFocus(true);
>>
>>                                // TODO hide login and show authenticate
>> button with external link
>> to page
>>
>>                        }
>>                        else if(result!=null&&result==-1){
>>                                //failed
>>                                dialogBox.setText("Admin Login - Failed");
>>
>>  serverResponseLabel.removeStyleName("serverResponseLabelError");
>>                                serverResponseLabel.setHTML("Failed login,
>> please close this box
>> and try again.");
>>                                dialogBox.center();
>>                                closeButton.setFocus(true);
>>                        }
>>                }
>>                catch(Exception ex){
>>                        System.out.println("ex:"+ex);
>>
>>                }
>>        }
>>
>> The javascript error that appears in Firefox when the loginUpdate
>> method is called (after the Dialog pops up) is:
>>
>> Error: a is null
>> Source File:
>> http://localhost:8080/twebinaradminapp/BCBCE299998ADB375DCDDA5F63B9DE2D.cache.html
>> Line: 548
>>
>> I've been trying to figure this out for a few days now and cannot
>> continue on without figuring out this issue. Does anyone have any idea
>> on where I should look or how to approach fixing this error and why
>> it's only happening in Firefox & Chrome?
>>
>> If I can't get this setup soon I'll have to move away from GWT and
>> look for another solution. Any help would be greatly appreciated.
>> Thank you.
>>
>> -- Adrian
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to