Ajax Refresh doesnt work

Ajax Refresh doesnt work

  
Hi,

I have link button at row level to download file. 
Button Type: Submit

On download action I am  updating some values (such as Download By, Timestamp) which need to be refreshed. 

Please help me out.

Thanks,
Poonam
Hi Poonam,

If you want to refresh a part of your screen/table, you should use a button type Ajax.
An in the action that the button "calls", there should be an Ajax Refresh to the place that you want to refresh.

I'm not sure if answered to your question, if not, let me know.

Best regards,

Rúben Gonçalves
Rúben Gonçalves wrote:
Hi Poonam,

If you want to refresh a part of your screen/table, you should use a button type Ajax.
An in the action that the button "calls", there should be an Ajax Refresh to the place that you want to refresh.

I'm not sure if answered to your question, if not, let me know.

Best regards,

Rúben Gonçalves
 
 Hi Ruben,
 I tried the option of making button type as  Ajax refresh but Following error comes: 

Server cannot set content type after HTTP headers have been sent.(refer the attachment)

but when button type is Submit above error doesn't come.

Thanks
Poonam
Hi Poonam,

There is some limitations on the logic you can have inside Screen Actions. Notice the warnings you get on Service Studio when you try some of those combinations.

On Submit methods: Ajax Refreshes don't work, but that is not important since usually the page is completly reloaded after.
On Ajax methods: you can't use Download nodes.
Also when the flow ends on a Download Node, the page is not reloaded even if the method is Submit.

A usual workaround for this problem is using the WidgetClick from RichWidgets:
  • Place another Button on the page (Submit method) that only do the download. No Ajax Refresh or changing values here.
  • Give the button a name! (For this example I'll call it WidgetClickButton)
  • On the extended properties of that button add one for style with value "display:none"
  • Then on the button you already had created, change it to Ajax method
  • In the action of that, change the Download By and Timestamps, do the Ajax Refresh and use WidgetClick for the other button that has the submit method (Use the expression editor to select the WidgetClickButton.Id)
  • Remember that this ajax action must end with an "End" node.
Regards,
João Rosado
Hi,

- You can do the updates you need before the download. Be sure you have a commit transaction after and before download.

 Correct me if im not right. You said refreshed but i think you meant "refreshed on database" instead and not the screen correct? if yes you need to make the create/updates and do a commit before download. Download widget may not do a commit transaction.




 - you can have a ajax action to do some ajax actions, then use a widget click action to click on a submit button that can be invisible with style="display:none;"

 Hope it helps,
Luis



Poonam Chauhan wrote
:
Hi,

I have link button at row level to download file. 
Button Type: Submit

On download action I am  updating some values (such as Download By, Timestamp) which need to be refreshed. 

Please help me out.

Thanks,
Poonam
 
 
Hi Luis,

Poonam was talking about refreshing the screen, since the page after a download node is not refreshed at all. Regardless of the type of metod in the button.
Also, if a flow ends on a End or a Download it does commit the transactions.


As for the second point, yes, thats what I explained :)

Regards,
João Rosado
Hello João,

When searching for a problem I saw this post and was wondering if you could explain the following:

I've indeed add a link with ajax that does something and at the end a button is clicked (trough the widgetClick action) which download something. When the items is downloaded and I want to click another item, this downloadlink for the other items do nothing.

Kind regards,
Evert
Evert -

I don't think that the Download works with Ajax.

J.Ja
Hello Justin,

Indeed the download don't work with ajax, but I've applied what João wrote, first execute ajax action and then click hidden submit button.

But found out that I have a problem with a ajax refresh on the table (when it's animation effect on none it doesn't work, but when I set it to an animation effect it does work). Already having a case with OS since they also can't reproduce it (somehow I always got this kind of problems :) ).

Kind regards,
Evert