Is there a way for a web block to know what Screen it is on?

Is there a way for a web block to know what Screen it is on?

  

Is there a way for a web block to know what Screen it is on?

For this use case I have a component that displays information related to several different pages. When you click on different parts of the Web block, it will bring you to each of those pages. This can all be handled in the web block.

HOWEVER, if you click on one of the parts of the web block while on that specific page, I want it to send a notify back to that page causing a specific Ajax refresh, as opposed to navigating to that page from itself.

Is there a way for the Web block to figure out its current page and then decide whether to Navigate or Notify?

Thanks

Solution

Hi Jordan,


You can always make have an input parameter on the webblock and pass a string with the name of the screen, i think it would resolve your problem.


Hope it helps.

Solution

That would definitely work! I ended up deciding that this would be sort of backwards to the idea of web blocks considering they are supposed to be independent of the logic of the containing screens, so instead I'm just using a notify on all of them and passing back what was clicked and letting the page decide what to do with that information.