Reactive UI

0
Looking to develop something like this: Where the +/- will interactively add/delete a row. Also want to add additional option for another group of conditions with an AND or OR condition between them. The dropdowns need to be data driven. Need to offer flexible logic like: If ------- and ------------- or- ----------- and ------ then   Is this something I should even attempt in Mendix? If so, architecture hints would be greatly appreciated.    
asked
1 answers
1

Yes it can be done but it is not easy. First you have to use MxModelreflection. Because from there you can let your front end users pick an entity and thus can show them the attributes of that entity. Then based on the type of attribute you can give him other options because a text can have other options then integers or enumerations.

Then you need to create an entity that holds the data for each line. You need to make a reference to the module reflection module so you can store which entity and attribute is chosen.

The harder part is modeling out all the options and doing the actual retrieves of the objects. Because from the reference you know the entity but to do the actual retrieve you need to create an XPath or OQL query. You would need to create a JAVA action for that where you can pass a Mendix object and all the other parameters for the XPath so you can build the XPath string to execute in JAVA.

So yes it is doable but not an easy feat.

Regards,

Ronald

 

answered