Hi I am creating an application where for each user form elements being displayed could be different
(type of element, number of element, label of the form element, order of appearance : all these could differ from user to user).
I am fetching these user prefernece from DB.
I was hoping to implement some technique/tool/method so that I could create the JSP to be shown to the user at runtime from centralized framework
(I want to reuse the same component for creating JSP for the users).
I am thinking some XML transformation using XSLT, but not sure how to do it or whether that is the best approach.
Any suggestions?
PS : I am using Struts + Spring Framework.
After enough R&D i have come up with the following approach.
Get the user preferences in Java object(in list/map format).
This object should contain the label name, order, input type, default value etc.
Then transform this Java object to a JSON object( using any lib like GSON, Jackson etc).
Next parse this JSON object in javascript using javascript/jquery and then parse the thus formed JSON object to create the form fields(by iterating ovet the JSON object)