on 06-30-2008 11:41 AM
Hi,
When i should not pass value in FileUpload ui it gives error of "Null Pointer" . But i want to put FileUpload ui as optional. Is this possible ?
Regards,
Gurprit Bhatia
Hi
if ( wdContext.current<valueNode>Element().getFileResource() != null ){
try{
// Syntax for file upload
} catch(NullPointerException e){ }
} else{
// navigate
}
Mandeep Virk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gurprit,
This is known limitation from webdynpro side. U can't handle it bcos it is handled by framework.
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I hope You are getting that exception because, when user is not giving input to the File UI Element still you are getting the context data and doing some opperation on that....
So before doing any coding on the image attributes, check for not null condition....
Like this...
if (wdContext.currentFileImageElement().getUpload() != null)
{
your coding here.....
}
else
{
....
}
Where Upload is you binary context element....
Regards,
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you want to explicitly neglect the fileupload UI element ( I suppose you are writing or getting some attributes from the FileuploadedUI element) .
You need to code those code snippets in the try catch block to by pass NullPointerException.
try{
} catch (NullPointerException e){}
I think you got the idea or else post the code
Mandeep Virk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you can put some condition, where if condition is ture activate the file upload ui element by making "enabled" property as true, otherwiese make it false.
regards,
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.