Frequently Asked MVC Queries

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

#[Informational Post]?

1) Can we Migrate a Free Form Architecture project to Kony Reference Architecture project?

Ans) A Free Form Architecture project can't be migrated/changed to Kony Reference Architecture project. A new project which is being developed from the Scratch can be mentioned as a Kony Reference Architecture Project.

2) For which MVC architecture not supported?

Ans) MVC architecture is not supported for popups, vbox forms and box templates. It is supported for Flex forms and flex container templates only.

3) An MVC form can be imported to a non-MVC project?

Ans) No , An MVC form cannot be imported to a non-MVC project.

4) Can we use Popup in MVC?

Ans) As the popup is deprecated in Kony Reference Architecture project and we are not supporting popup anymore.

In place of that, please use a flex container with higher Z-index and add the component to the Flex container and change the visibility to false.

Whenever you want to show the popup kind of thing you can change the visibility of the higher Z-index container which will act as a popup.

To use the same layout across the application, please design the above layout in a component and attach the same component where ever required across the application.

5) In MVC how view.segHome.rowTemplate Will work ?

Ans) In MVC - view.segHome.rowTemplate will actually returns a string and not an object so anything invoked on this will not work .

The solution for this is we have exposed a new event called as onViewCreated - and needs to be invoked in the template controllers to get the actual segment object and invoke the necessary actions on segment.

This is introduced by our product team in iOS plugins is 7.3.0_r30 GA. and AND-GA-7.3.0.16 plugins onward. This callback should be present in the rowTemplate controller.

Sample code :

"onViewCreated" : function()

{

this.view.setGestureRecognizer();

}

6) How to pass Data from one form to another in MVC

Ans) We can pass the light data from one form to another in the below way

var ntf = new kony.mvc.Navigation("Form1");

var myObj = {myAttribute:"Some Data"};

ntf.navigate(myObj);

The below will be called while we navigating to Form2

onNavigate : function(context)

{

alert(JSON.stringify(context));

}

Also we can use setModel and getModel API as well.

7)Can I create a form controller and form view dynamically at runtime?

Ans)Right now it is not supported

8)Can I create a non-MVC form in MVC application programmatically?

Ans) No

9)Can I use a master 2.0 in non-MVC applications?

Ans) No

10)How can I convert my existing master to new Master?

Ans) New Master is in MVC formate so we cannot conver existing master (non-mvc) to new master(MVC).

MVC FAQs to follow folks. Thanks @Audwey Ross?

Thump UP

Adding one more FAQ in MVC

11) How to change the landing form in appService callback

function appService(params) {

if(params.launchmode == 1)

{

return "frmOne";

}else {

return "frmTwo";

}

}