Ajax refresh error

Ajax refresh error

  

Hai,

I am creating user profile picture, I need to choose the file and upload it. Its not worked.

"Ignored Ajax Refresh
The method should be set to 'Ajax' so that Ajax Refresh elements of the 'SetAsProfile' Screen Action aren't ignored."

Its not work anybody help me

Action flow

Hello,

Have you set Ajax Submit as the Navigation Method of the Button that triggers the Ajax Refresh?

All the best

Ricardo Cruz wrote:

Hello,

Have you set Ajax Submit as the Navigation Method of the Button that triggers the Ajax Refresh?

All the best

Thank you for reply,

I have set the Submit method, Server validation


Regards,

Jeyasri


JEYASRI R wrote:

Ricardo Cruz wrote:

Hello,

Have you set Ajax Submit as the Navigation Method of the Button that triggers the Ajax Refresh?

All the best

Thank you for reply,

I have set the Submit method, Server validation


Regards,

Jeyasri


You need to set Method to 'Ajax Submit'


Hi,


Try to refresh data before Ajax refresh to the table where you put the photo:


Hope this can help you.


Best regards,

Ricardo

Ricardo Pereira wrote:

Hi,


Try to refresh data before Ajax refresh to the table where you put the photo:


Hope this can help you.


Best regards,

Ricardo

 I have attached the .oml file, I need to change the user profile picture, can you pls help

Jeyasri,

Two or three things.

1. If you set the button's method to Submit, you DON'T need to use Ajax Refresh, as the Screen Action, when finishing with an END node, the submit will re-execute the preparation and rebuild the entire screen, so, the image widget will be rebuilt. The warning is for you to notice that you have an Ajax Refresh that will be ignored.

2. You need to set your image widget to fetch the image from database, and pass the ID of the newly created record with the picture.

3. You need to give a DIFFERENT name to the file (in the image widget) every time you change the picture, or the browser cache will prevent the new image from appear.

Cheers.

Solution

Hi JEYASRI R,


Basically you have two options, both with "Set as Profile" method as Submit:

  1. You use a popup to upload the file and when saving ("Set as Profile") you notify the screen to refresh the picture.
  2. You create an web block the functionality you had in the screen and add the web block to the screen. When you press "Set as Profile" you send a notify to the screen where you update the ProfileId and refresh the web block again.

When uploading and saving a file you can't use the Ajax Submit method + Ajax refresh because you will lose the binary data. 


Best regards,

Jorge Cerveira

Solution

Eduardo Jauch wrote:

Jeyasri,

Two or three things.

1. If you set the button's method to Submit, you DON'T need to use Ajax Refresh, as the Screen Action, when finishing with an END node, the submit will re-execute the preparation and rebuild the entire screen, so, the image widget will be rebuilt. The warning is for you to notice that you have an Ajax Refresh that will be ignored.

2. You need to set your image widget to fetch the image from database, and pass the ID of the newly created record with the picture.

3. You need to give a DIFFERENT name to the file (in the image widget) every time you change the picture, or the browser cache will prevent the new image from appear.

Cheers.

Thank for your explanation, Its very useful 


Regards,

Jeyasri


Jorge Cerveira wrote:

Hi JEYASRI R,


Basically you have two options, both with "Set as Profile" method as Submit:

  1. You use a popup to upload the file and when saving ("Set as Profile") you notify the screen to refresh the picture.
  2. You create an web block the functionality you had in the screen and add the web block to the screen. When you press "Set as Profile" you send a notify to the screen where you update the ProfileId and refresh the web block again.

When uploading and saving a file you can't use the Ajax Submit method + Ajax refresh because you will lose the binary data. 


Best regards,

Jorge Cerveira


Hai jorge,

I have to set the cropper,CroppedImage set as a profile.But is is not work can you help me

Hi JEYASRI R,

I checked the demo of Cropper and it behaves like this:

  1. When you upload the image you store the image to cropper. 
  2. When you want to download the image you need to notify Cropper again, he will reply with the file that you can store or download, or both.

So if you want to change your profile picture, you probably want to save it to the DB and if you want to change it with cropper you need to load it from the DB and save it to Cropper.

After that you can follow the steps above and in the second step you can upload your profile picture instead of saving it to cropper (or save it to cropper also).


You can check the CropperDemo in the Cropper to see how it behaves.


Best Regards,

Jorge Cerveira