What would be the equivalent of Core.getFormNames() in MX5?

Hello, I'm trying to convert an app from mx4 to mx5 and I'm working on fixing the java actions. I've used Core.getFormNames() in one and notice that this method has disappeared from Core and I cannot really find it in the docs anywhere. Any suggestions? A pointer in some direction of changes documentation mx4->mx5 would also be of help btw...
2 answers

This guide can be found at https://world.mendix.com/display/refguide5/Moving+from+4+to+5

The method you mentioned is indeed removed, it was basically an internal method to help us test a few things but we could not come up with any uses for Mendix developers and it would be nearly impossible to keep this method intact with our new code architecture. Can you tell us what you are actually using this method for?


Hi Bas,

ok, good to know. I'll have to find another way to solve my problem then I guess...

What I use the method for is the following:

I've build an xpath builder so users can build an xpath "user style", which basically means point and click instead of writing a query. This xpath is then used to show a selection based on this xpath, so users can for example get a list showing all males above 45 wearing a blue jacket on a sunday.

I use the getFormNames to iterate trough all available forms in the application and save those in an entitiy which is used to disable or enable the form for a user to choose where to open the build xpath in. I'm using this, since I cannot just shoot some xpath into a random form and build stuff on the fly (at least not that I'm aware of). The name of the form is then used to open the correct form trough a java action.

So, basically this method helps me to fetch all formnames from the application instead of typing them all in. It also helps if new forms get added which then will be automatically added to this settings entity. This prevents "forgetting" to add some form.