cancel
Showing results for 
Search instead for 
Did you mean: 

fileupload Resource is always null

Former Member
0 Kudos

Hi,

up front, this is a Mobile Client Application for Laptops question.

I'm trying to implement an eventHandler which uploads an image an displays it.

I used a tutorial from the sdn for netweaver 7.1.

In the context is one attribute:

1) imgResource ( FileUpload Element binded to it)

this is my event handler which is binded to the LinkToAction text to upload the image

public void onActionImageUpload(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.demo.imgupload.imguploadcomp.wdp.IPrivateImgUploadCompView.IResourceElement resourceElement )
  {
    //@@begin onActionImageUpload(ServerEvent)
	
	
	  if(resourceElement.getImgResource() != null) { 
		   // Further Logic
	 }
	
    //@@end
  }

Any Suggestions why the if is always false?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Satish Kumar,

thanks for your answer.

I'm a bit puzzled because, if I exaktly follow the tutorial, I still get null for the resourceElement.

Is there a difference between standard web dynpro and web dynpro for mobile application for laptop?

pvannest
Participant
0 Kudos

Tom,

I have exactly the same problem. Have you eventually solved this bug?

regards

former_member185086
Active Contributor
0 Kudos

Hi

Mistake which you have commited is passed the resource as parameter of the defined action . change it and take the value from context attribute and then use it

Please follow the code line given in this [thread|;

Best Regards

Satish Kumar