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).
PS : I am using Struts + Spring Framework.
A way of doing this would be to create distinct groups/names for the different user experience and map this in your user preference table. In your action class fetch this value, set it as request parameter and forward the control to the JSP, where suitably using the conditional tags, create form elements based on the user group name.
SCJP 1.6,Preparing (Tryin to prepare) for scwcd
Joined: Sep 14, 2011
My question is related only to the rendering part of the form elements.
I dont want to use conditional tags and render the elements.Because this rule is followed for several pages in my application. I want to have centeralized mechanism for this,
I am working on some thing similar situation, what we are doing is we have made one addition property for user which is called Role, and it is stored in DB there can be various roles for users,
so when you create user you assign him a role now there is 1 more transit Entity which assigns action to certain roles and you can use interceptor to check action against role from data base.
like wise you can customize your pages to be displayed to user depending on user's Role