[英]Dynamic fields in JSP: what is the best way?
I have an old old app that we are updating. 我有一个正在更新的旧旧应用。 It has a handful of dynamic fields that can be hidden/shown based on a value in a property file.
它具有一些动态字段,可以根据属性文件中的值进行隐藏/显示。 Custom tags were used to build the pages reading from those to know what to show.
自定义标记用于构建从那些页面读取的页面,以了解显示的内容。 What would be a better way to do this?
有什么更好的方法可以做到这一点? The field values could be moved to a database table so they could be set without redeploying the application.
字段值可以移动到数据库表中,因此可以在不重新部署应用程序的情况下进行设置。 Need something that can be used by both the client and server sides.
需要客户端和服务器端都可以使用的东西。
Storing the field values in the database sounds like a good idea. 将字段值存储在数据库中听起来是个好主意。 You could set these values in hidden input fields and use them in the client side javascirpt as well.
您可以在隐藏的输入字段中设置这些值,也可以在客户端javascirpt中使用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.