In this weblog, I will be discussing about how to create a simple portal eventing test page with the SAP delivered Web Dynpro application WDR_TEST_PORTAL_EVENT and a simple custom developed visual composer model. I got this idea after seeing the weblog from Thomas Jung on Combining ABAP and Visual Composer. Lets quickly see how we can test the simple portal eventing with WDA & visual composer iView
Creating the VC model for Event Trigger
You can create a simple VC model using the ABAP data service ‘BAPI_FLIGHT_GETLIST’ and then create an input and output form by dragging the input & output of the data service. As a last step, create a ‘Signal Out’ and name it as ‘Flightout’. Select the fields relevant for event parameters ( In this example, I have selected Airline-ID & Connection-ID ), while configuring the output signal.
Your VC flight model for eventing will look like below:
Save & deploy the model into portal.
Create WDA iView & Portal event page
Next step is to create a web dynpro for ABAP iView in portal for the SAP delivered WDA ‘WDR_TEST_PORTAL_EVENT_REC2’ (which is part of WDR_TEST_PORTAL_EVENT Web dynpro component). As a last step, create a page to test eventing. Add the VC flight model iView and WDA iView as a delta link into the event page like below:
Testing the iViews for Eventing
Save and test your event page
Specify the event namespace as same as the namespace defined for VC model prefix with ‘urn’ and the event name. Click on the button ‘Register Event’.
This will add and register the event in the following table:
Now go to the Visual composer iView and trigger an event by pressing the submit button.
Now can watch the table which has been registered for the event, the counter incremented by 1 and the selected event parameters with its values passed to the table like below:
If you closely look at the passed event parameters,
It has the event parameter values for the airline carrier id (AIRLINEID) & connection id (CONNECTID) from the Visual composer iView. These event parameters are the one configured in the ‘Signal Out’ of the VC model.