Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 加载页面后,是否可以更新模型的属性?_Java_Spring_Spring Mvc_Model View Controller_Model - Fatal编程技术网

Java 加载页面后,是否可以更新模型的属性?

Java 加载页面后,是否可以更新模型的属性?,java,spring,spring-mvc,model-view-controller,model,Java,Spring,Spring Mvc,Model View Controller,Model,我正在使用springmvc进行项目。我是springmvc的新用户。我只是想澄清我的概念——“在页面加载后更新模型对象的属性”。为了简单起见,我没有从我的项目中添加代码。请考虑代码片段。我有一个类'FeatureProfileModel.java',其中有一个变量/属性'dynamicVars'- public class FeatureProfileModel{ List<DynamicVar> dynamicVars; } 公共类功能配置文件模型{ 列出动态增值税; }

我正在使用
springmvc
进行项目。我是
springmvc
的新用户。我只是想澄清我的概念——“在页面加载后更新模型对象的属性”。为了简单起见,我没有从我的项目中添加代码。请考虑代码片段。我有一个类
'FeatureProfileModel.java'
,其中有一个变量/属性
'dynamicVars'
-

public class FeatureProfileModel{
 List<DynamicVar> dynamicVars;
}  
公共类功能配置文件模型{
列出动态增值税;
}  

'FeatureProfileModel'
对象与jsp-
'featureProfile.jsp'
作为模型绑定。加载
'featureProfile.jsp'
页面时,
'dynamicVars'
为空。单击链接后将生成此
'dynamicVars'
。是否可以在加载页面后更新此“dynamicVars”。请注意,我不想在点击事件后重新加载页面,我只想更新模型
'FeatureProfileModel'

不要在标题中包含“春天”之类的内容。这就是标记的作用。@Razib sowmhow只需加载jsp的特定div/或部分,隔离jsp或启动ajax调用,从服务器获取响应数据,设置html。