简体   繁体   English

JSP中的动态字段:最佳方法是什么?

[英]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.

相关问题 投影 JavaScript 对象字段的最佳方法是什么? - What is the best way to projecting fields of JavaScript object? 重置动态对象值的最佳方法是什么 - What is best way to reset values of a dynamic object 将动态网页存储为对象的最佳方法是什么? - What is the best way to store a dynamic webpage as an object? 将可信字段序列化为JSON对象以保存到模型的最佳方法是什么? - What is the best way to serialize contenteditable fields into a JSON object for saving to a model? 在日期字段中自动插入斜杠“/”的最佳方法是什么 - What's the best way to automatically insert slashes '/' in date fields 在多个模型字段上执行RegEx测试的最佳方法是什么? - What is the best way to perform a RegEx test over multiple model fields? 热创建动态字符串模板的最佳方法是什么 - What is to best way hot to create dynamic string template 处理 Javascript 中的可选 && 动态 function 参数的最佳方法是什么? - What's the best way of dealing with optional && dynamic function parameters in Javascript? 添加动态响应式背景图像的最佳方法是什么? - What’s the best way to add dynamic responsive background images? 检查动态网页是否已满载的最佳方法是什么? - What is the best way to check if dynamic web pages are fully loaded?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM