Hi Pamkaj,

 

>I have tried with ClientContext.loadFile() option, 

>passing IFileLoadHandler, and filePathName =
C:/ezlube/siteno/siteno.properties,

>when I access at client system through JNLP, a file chooser dialog is
poping up, we are not desiring any dialog for manual >selecting files, 

 

Well this is the limitation of the JNLP file service. It does not provide an
API to choose a file directly, one needs to use
FileOpenService.openFileDialog.

 

>Is there any solution, with out displaying dialog, only file content has to
be read from client side file.

 

Yes. You can create an extension (like you did) to read the property file on
the client, put its contents in a map, and send it to the server.

 

But in this case you will have to sign your client side jars so that ULC
client can access the file system on the client.

Thanks and regards,

Janak

-----------------------------------------
Janak Mulani

email: [EMAIL PROTECTED]
url:  <http://www.canoo.com> http://www.canoo.com

Beyond AJAX - Java Rich Internet Applications

 <http://www.canoo.com/ulc> http://www.canoo.com/ulc
----------------------------------------- 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pankaj Patro
Sent: Tuesday, February 19, 2008 11:54 AM
To: [email protected]
Subject: RE: [ULC-developer] Reading a .properties file from client site

 


Hi Janak,

 

I have tried with ClientContext.loadFile() option, 

passing IFileLoadHandler, and filePathName =
C:/ezlube/siteno/siteno.properties,

when I access at client system through JNLP, a file chooser dialog is poping
up, we are not desiring any dialog for manual selecting files, 

Is there any solution, with out displaying dialog, only file content has to
be read from client side file.

ClientContext.loadFile(

new IFileLoadHandler() { 

public void onSuccess(InputStream in, String filePath) { 

p = new Properties(); 

try { 

p.load(in); 

}

catch (IOException e) { 

}

// process properties 

}

public void onFailure(int reason, String description) { 

//don't do any thing

}

}, "C:/ezlube/siteno/siteno.properties");

Reply via email to