95
Views
6
Comments
Display a list[Name,Id ] of  all web blocks available in main content
Question
Application Type
Reactive

Hi Team ,

I want to list out all the available web blocks(organized in any manner  )   in main content at runtime  as below ,

If  checkbox is selected then no print class should be applied to that specific block .

Please suggest any possible solution , we can use only JS and no JQ.

Thanks,

Santosh

2022-08-03 04-32-50
Ravi Punjwani

Hi Santosh.

Your requirements are not yet clear. I didn't understand about WebBlock1 and WebBlock2 options.

From the table it seems you've:

  • A list of records
  • 1st column is some content in each row
  • 2nd column has a checkbox for each row

Selecting some checkboxes and pressing some imaginary button. On click, it should print something. What you want to print? The contents on the left column cell? If they selected two checkboxes, then two web blocks printed in one print sheet?

Kindly provide more information on what are you trying to achieve.

Are you trying to implement something like this? https://www.outsystems.com/forge/component-overview/13380/printout-library

2020-05-21 04-56-19
Santosh Chanveer

Hi Ravi ,

Thanks for your reply , the first column(Name ) will have names of all the web blocks  available in main content  and DoPrint column will have checkboxes where if I select    checkbox  in first row that will apply Print class to first web block .



Thanks,

Santosh

2022-08-03 04-32-50
Ravi Punjwani

Hi Santosh,

From my understanding, it is not a big deal to fix this. On click of Print button, you need to go through all checkbox and find which ones are selected. Then based on the selected list, add a class name to specific UI containers on your web page. With adding that class name on the containers, you can then do whatever custom CSS you need for printing them. Then add a small javascript to actually do print.

Please share your current OML file so I can suggest the modificaitons you need to make on it. Share it here even if it's not working completely, so I can explain you without architecting a whole new app with all best practices.

Small issues like these can be more explanable if someone suggest you only specific things to change in your app, rather than sending you a brand new app to refer and understand.


2020-05-21 04-56-19
Santosh Chanveer

Hi Ravi,

I am blocked on creating generic layout for printable  web blocks  and not able to get the list as mentioned above .

Please check the OML .

ListPageSections.oml
2018-08-27 08-29-35
Fábio Vaz
ListPageSections.oml
2020-05-21 04-56-19
Santosh Chanveer

Hey Vaz ,

Thanks for your help . Can we create a layout for blocks in such a way that , we never need to use ,  "div[data-block^=SampleData]" 

for(let i=0; i < names.length; i++){  const record = {     name: names[i].id  }  records.push(record)

I tried same approach in past .The problem with this code is it works fine in POC . But if I integrate it in environment where we have security integrated. ID will be empty at run time .

SO we need layout for each web block , where it will have block data as well as Name/ ID bound to it at design time .

Thanks, 

Santosh 

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