Ajax Refresh widget inside Table Records

Ajax Refresh widget inside Table Records

  

Hello all

Anbody knows how to ajax refresh a widget inside a table records? I can refresh the entire table. But when i pick only the widget to refresh it doesn´t work. Any idea?

Thanks

Hi Pedro,

The use case you are trying to execute should work. I have just tested out a simple table records, where I want to refresh a single button inside it, and it works.

What exactly are you experiencing? Are you refreshing the source query, in the refresh action?

Without knowing more detail, it's a bit hit and miss trying to suggest solutions for the problem.

Regards,

Paulo Tavares

Hi Paulo

I have populated the table records with a query.

But in the table records i have one input widget per row that triggers a screen action(on change) summing all the values in those input widgets and storing in a local screen variable that it´s associated with an expression also inside the table records in the last row.

When i try to update(ajax refresh) that expression it doesn´t update the value. This works only when i ajax refresh the whole table, which i am not interested.

Thanks again

Hi Pedro,

Indeed, my scenario wasn't like that, but if you could attach a sample eSpace where the designated behavior happens, we could try to look into it and see what's happening. It could either be something that has been overlooked, or a bug.

Regards,

Paulo Tavares
Hello Paulo

I have here the example you asked.

It seems Ajax Refresh only refresh the widget in the same row(expTotalLinha)  and not the widget at the end of the column(the kind of footer i created with the expression expTotalColuna). Any advice? Can i refresh the widget in the footer in the table?


Thanks again

Hi Pedro,

Download my "workaround" version and give us feedback if it work for you!

You can extend the idea to refresh more than one widget, unfortunately with JavaScript help...

Best Regards,
Rafael Pereira

Hello Rafael

It gave me an error with your eSpace

Error:

"Could not find the 'RichWidgetsExtension' extension in this server. Application runtime errors might occur."



The 5.1 version does not have RichWidgetsExtension anymore. But i added the eSpace RichWidgets but didn´t have any action called RunJavascript...

What is missing? Thanks....
Sorry, I've assumed that you already had the RichWidgetsExtension. Download, Publish and Try Again :-)

Best Regards,
Rafael Pereira
Ok i see you created a structure with the widgets id. Then added this Javascript function to the page
function RefreshTotal(obj1_name,obj1_value)
{
		document.getElementById(obj1_name).innerHTML  = obj1_value;
}


Then it´s called in RunJavascript action triggered by the Refresh Action. 

Ok it´s Javascript trick but it works.

 Thank you Rafael


Best Regards
Nice!

The "real trick" is "How to obtain and "expose" all or specific Element.Id's for JavaScript or other latter manipulation?"
You can combine this trick with other peaces of logic to solve lots of issues...

Best Regards,
Rafael Pereira