isis

Apache Isis Conditional Rendering of UI elements


I am brand new to Apache Isis but was curious to know one thing. My work depends alot on filling forms but the forms should be able to handle conditional rendering of UI elements. For example a form can ask the question 'how old are you?', and if the response is above 18 years the following question is 'did you vote in the last election?' whereas if the response is below 18 years the following question is then 'are you working or studying?'. So elements rendered depend on previously answered questions, is this possible in Apache Isis?

Thanks


Solution

  • The short answer is no, not particularly easily.

    If you use an action prompt then you can easily tab through multiple fields (these being the argument values of the action) but the framework currently does not support the hiding of argument fields based on preceding fields. We have an idea of how to implement this, but it has never got particularly close to the top of the "to-do" list.

    Alternatively, you could use a view model to represent the form being filled in. Here a view model does support optional hiding of fields - this time they are properties of the view model. The caveat here though is that each property is entered individually from the next (similar to how JIRA works); the user cannot just tab through multiple properties.

    HTH