149
Views
6
Comments
How to get rendered html of WebBlock
Application Type
Reactive
Service Studio Version
11.54.37 (Build 63002)

Hi,

We have a web block in our application, the web block is mainly used for generating dynamic reports.

It contains table with data filled by using aggregates. Our aim is to get the rendered html of the webblock without referencing to any of the UI flow. Is there any library or service to run and get html of web block or screen programmatically?.

We tried HtmlRenderer --> RenderWebBlock but we got error,

The webblock.ascx file doesn't exists. Actually it exist.




Please advice on this.

Thanks,

Arulprakash

UserImage.jpg
Alexandre Yip

Hi Arulprakash S, 

You can use en expression and change the  expression property to 'No' to render the expression as HTML

Other options 

Check this component 

https://www.outsystems.com/forge/component-overview/10187/expression

or these links

Reactive web applications - Escape Content

https://m.youtube.com/watch?v=kdm_CDaDQsY

https://itnext.io/become-an-html-hero-in-outsystems-1420828b5455

Hope that it helps you 


UserImage.jpg
Arulprakash S

Thanks,


But our case is , the above mentioned TestBlock we won't use it in any of the screen. So we need a way or library to if we give a path the library should run in background and return the executed html on demand. 


For example take UltimatePDF library https://www.outsystems.com/forums/discussion/70608/ultimate-pdf-how-to-use-ultimate-pdf/


If we pass scree path to the server method mentioned in above URL it will render the screen in background and convert as PDF. 


The same way I need to get html of web block instead of screen and get html.


We tried one library but got error HtmlRenderer --> RenderWebBlock


Thanks,


Arulprakash 

2023-04-07 07-55-02
Krushna Mantri

Hi ArulPrakash,


you can keep your web block content and then user javascript innerHTML function 

like document.getElementById('container.Id').innerHTML 


hope it helps you

Regards,

Krushna

UserImage.jpg
Arulprakash S

Thanks,

But our case is , the above mentioned TestBlock we won't use it in  any of the screen. So we need a way or library to if we give a path the library should run in background and return the executed html on demand. 

For example take UltimatePDF library https://www.outsystems.com/forums/discussion/70608/ultimate-pdf-how-to-use-ultimate-pdf/

If we pass scree path to the server method mentioned in above URL it will render the screen in background and convert as PDF. 

The same way I need to get html of web block instead of screen and get html.

We tried one library but got error HtmlRenderer --> RenderWebBlock

Thanks,

Arulprakash 





2021-09-06 15-09-53
Dorine Boudry
 
MVP

in background of what ?  

You say it's reactive, the block only exists in the browser of the end user

2019-03-14 16-24-46
Nelson Freitas

Hey Arulprakash,

did you get a solution for this eventually?

I'm kind of searching for the same thing.

We do use the HtmlRenderer --> RenderWebBlock for Web Traditional webblocks, but we want to convert everything to reactive.

Please let me know if you had anything.

Thanks,

Nelson

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.