Doubt regarding downoad button

I saw the beIow quesiton from a sampIe paper(answer+expIantion is aIso given)
1.PIease heIp me understand the question

2.ExpIantion made me more confused.when screen action is submit ,wiI the ajax refresh be ignored.


QuestionThe 'DownIoad ' button has the 'Submit Method' property equaI to 'Submit'.When the user triggers the execution of the button

Answer :he sytem wiII downIoad the fiIe.

ExpIanation : As the current caII to screen action is submit,Ajax refresh wiII be ignored and the downIoad wiII proceed as expected.


Solution

Hi Remya,

What they mean is the following. If you have a button on your screen and the Method property of the button is set to 'Submit'.

If you would have any Ajax Refresh element in your Destination screen action (in this case 'DownloadPDF' action), the Ajax Refresh element (refresh DigitalSignatureContainer) will be ignored since the Method property of the button is set to 'Submit' and NOT to 'Ajax Submit'.

However, in this case the Method property of the button needs to be set to 'Submit' since we want to download a file. The download will not work if the Method is set to 'Ajax Submit'.



Conclusion: we cannot both refresh an element in the screen and download a file at the same time by clicking on the same button.

Hope it makes sense to you now.

Regards,

Nordin

Solution

Nordin Ahdi wrote:

Hi Remya,

What they mean is the following. If you have a button on your screen and the Method property of the button is set to 'Submit'.

If you would have any Ajax Refresh element in your Destination screen action (in this case 'DownloadPDF' action), the Ajax Refresh element (refresh DigitalSignatureContainer) will be ignored since the Method property of the button is set to 'Submit' and NOT to 'Ajax Submit'.

However, in this case the Method property of the button needs to be set to 'Submit' since we want to download a file. The download will not work if the Method is set to 'Ajax Submit'.



Conclusion: we cannot both refresh an element in the screen and download a file at the same time by clicking on the same button.

Hope it makes sense to you now.

Regards,

Nordin

To complement the information of Nordin, there is a workaround that is to have a button with Ajax refresh method to refresh the component you need and inside of the Action flow call another button that has the method set to submit, this one need to have display none to not show in the screen and the logic to download will be inside its action flow,

Basically is one button to refresh and anther to download

Best regards

Carlos Lessa