CreamTec
September 07, 2010, 04:00:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
AjaxSwing 3.1.0 is available for download!
AjaxSwing 3.0.6 is available for download!
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Browser Layout Problem  (Read 626 times)
Support Team
Administrator
Hero Member
*****
Posts: 881



View Profile
« Reply #15 on: March 04, 2010, 12:08:51 PM »

Great job - contrags!

Where you copy, if at all, your XML and TXT files depends on how your Java code reads them. If you read them from CLASSPATH they need to be inside jars, or in wcapps/lib/classes. If you read from the file system, it doesn't matter where they are as long as your code know where to find it. Both have nothing to do with AjaxSwing.
Logged
antoine
Newbie
*
Posts: 14


View Profile
« Reply #16 on: March 04, 2010, 02:48:54 PM »

All of these XML and TXT files are already in the AjaxSwing directory, but what I'm wondering is whether I have to add them when running the AppWizard. That is, do I add the path to these XML files the same way I added the application classpath for the .CLASS files eg:"C:\AjaxSwing3.0.2\wcapps\lib\classes\classname"
Logged
Support Team
Administrator
Hero Member
*****
Posts: 881



View Profile
« Reply #17 on: March 05, 2010, 08:47:06 AM »

No
Logged
antoine
Newbie
*
Posts: 14


View Profile
« Reply #18 on: March 08, 2010, 06:55:21 PM »

My entire app is working fine with AjaxSwing! Hasn't been an easy process, but wow this is amazing! Thanks a lot and keep up the great work Smiley

However, one last little bug. I added a login to my swing app, and upon running the login page in AjaxSwing, it doesn't appear to be reading the XML file that contains the password; thus not allowing the login. It should be working, so I am not sure what the issue is. Does Ajaxswing not permit such I/O processing?

Please see the snippets below. Full java file is attached. Note: the XML file "<user>.xml" is located in the folder "AjaxSwing/wcapps/res/"


                   
Code:
[tt][tt]String user = username.getText();  // Grab user name from text field
                   String fileName = "res/"+user+".xml";  // Process into a file name

                    if ( (name.equalsIgnoreCase("password")) && (password.getText().equals(value))) {
                            EE4913App.launch2();
                            this.setVisible(false);
                    }

                 catch (FileNotFoundException e) {
                   // could not find user
wronguser.setText("** WRONG USER **");
}[/tt][/tt]
Logged
Support Team
Administrator
Hero Member
*****
Posts: 881



View Profile
« Reply #19 on: March 08, 2010, 09:28:51 PM »

AjaxSwing doesn't block any IO processing, so you probably should debug your code and see what's going on. Adding logging would help too. Sorry, we are very busy so we can't look into your code.
Logged
antoine
Newbie
*
Posts: 14


View Profile
« Reply #20 on: March 08, 2010, 09:35:35 PM »

I understand you're busy.

But the login works fine as a java swing app, but for some reason, not in Ajax.

It's the exact same code that processes the login, so it should work. Seems like AjaxSwing is not locating the XML file that's needed to verify username and password, although the code properly references the file (which is located in the Ajaxswing directory).
Logged
antoine
Newbie
*
Posts: 14


View Profile
« Reply #21 on: March 23, 2010, 05:43:27 PM »

Quick question about multithreading in Ajaxswing:

Your tutorial here (http://creamtec.com/products/ajaxswing/doc/multithreading.html) says to use this line: "import com.creamtec.ajaxswing.AjaxSwingManager;" to import the AjaxSwing Manager.

However, in Netbeans, my code throws an error: "package com.creamtec.ajaxswing.AjaxSwingManager does not exist."

Is there a library or something that I need to add for this package to work? Please let me know what I need to do! Thanks Smiley

Logged
Support Team
Administrator
Hero Member
*****
Posts: 881



View Profile
« Reply #22 on: March 23, 2010, 07:35:50 PM »

AjaxSwingManager class is in ajaxswing.jar. Make sure you add this jar to your NetBeans project.
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!