FeedbackHelper.addOpenFormFeedback to show page into JAVA action - Mendix Forum

FeedbackHelper.addOpenFormFeedback to show page into JAVA action

1

Dears,

Im trying to create java action to show page in mendix using string page name and mendix object, i'll use it to show page dynamically, after cheking google, i'll use (FeedbackHelper.addOpenFormFeedback) to show page, but it does not work, is there's a way to implement this ?

 

asked
1 answers
1

A java action that opens a page dynamically can be achieved by the following:

Create a java action with a typeparameter and 2 input parameters:

  1. String (will contain the form name)
  2. Object (will contain the object to be opened)

 

The with this java code, simple test code, you can open a form dynamically:

		// BEGIN USER CODE
		List<IMendixIdentifier> idList = new ArrayList<IMendixIdentifier>();
		FeedbackHelper.addOpenFormFeedback(getContext(), formName, IFeedback.FormTarget.CONTENT, Parameter.getId(),idList);
		return true;
		// END USER CODE

Make sure to set the string correctly in the input, in my test I use the page testrecord_NewEdit from the MyFirstModule module then the string should read: 'myfirstmodule/testrecord_NewEdit'

More work will be needed to create a production proof solution, but this should help you in getting started.

answered