Platform
Learn
Community
Support
Sign up
or
Log in
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Beta
Learn
Training
Documentation
Evaluation Guide
Community
Jobs
Home
Forums
Forge
Ideas
Badges
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Pre Sales Demos
Sign up
or
Log in
Home
Jobs
Forums
Forge
Ideas
Members
Badges
Community
›
Ideas
›
Make screen action an input parameter type
Advanced Search
3
Followers
3
Likes
Make screen action an input parameter type
Joris van Geffen
Joris van Geffen
Web developer
at
NetMatch
+ 1
#3 237
in Community Rank
Frontend
On our radar
When a web block has multiple elements which normally trigger a screen action, externally assigning a different screen action to these elements can be don't in a nice way.
The elements themselves should trigger a notify event with a message which indicates the element which was triggered. Then it is up to the consumer to create a screen action in which the message is used to determine which action flow to follow.
As an example, say a web block was created in which there is a save and cancel button. The consumer of this web block creates a screen action in which handles the notify event. Within the screen action an if statement is placed to check if the message of the notify event was save or cancel. Then the true or false flow will actually handle both flows within the same screen action.
It is my opinion that it would be nicer to have input parameters of the type screen action in which you can assign a reference to an external screen action. That way the consumer can create screen actions for a specific purpose which get triggered within the web block.
Following the example above, it would mean that the web block gets 2 input parameters of the type screen action; SaveAction and CancelAction. The consumer defines 2 screen actions; SaveScreenAction and CancelScreenAction and assigns them to the matching parameters. Then the save and cancel buttons within the web block can trigger these screen actions.
The advantage of this is that it becomes possible to create more generic web blocks which act more like native controls where it is possible to reference a screen action like a button control.
Created on 17 Nov 2015
Comments (4
)
Kilian Hekhuis
18 Nov 2015
Kilian Hekhuis
Functional Specialist
at
MAIN Energie
+ 10
#5
in Community Rank
You mean call-backs. I'm not sure whether I would be in favour of that, apart from the fact that technically it's not trivial, as in the context of the web block, those actions (and their context) do not exist.
Joris van Geffen
19 Nov 2015
Joris van Geffen
Web developer
at
NetMatch
+ 1
#3 237
in Community Rank
The alternative is to have more custom events instead of just one notification event. In that way it is also possible to bind to a specific event without the need to analyse a string value just to see what happened.
The current way of working requires insight into the web block one is consuming, which is something you don't want to bother other developers with. in my opinion a web block should be self contained and clearly understandable without the need to dive into it so determine how it can be used.
J.
19 Nov 2015
J.
Outsystem MVP, Outsystems Expert developer, Senior consultant
at
CoolProfs
+ 11
#9
in Community Rank
isn't that the job of the develope of the webblock itself?
Kilian Hekhuis
19 Nov 2015
Kilian Hekhuis
Functional Specialist
at
MAIN Energie
+ 10
#5
in Community Rank
Well, that depends on the type of web block you have. If you always have a Save and a Cancel button, you may put them in a web block (being standard UI elements etc.). But to handle them, it would be nice if you could, from the web block, trigger Screen Actions in the consuming screen. Currently you're stuck with a single OnNotify.
views
438
Followers
3
Loading...
Loading
(hidden) New Badge Popup