【问题标题】:My class @Component not updated with my model我的课程@Component 没有用我的模型更新
【发布时间】:2014-02-25 04:13:09
【问题描述】:

我有一个带有“@Component”的类标记并有一个模型视图,视图中模型使用的属性不是在按钮处于活动状态时更新。

@Component
public class MyBbean extends BaseBBean<MyBbean>{
    @Autowired AnyService anyTitulos;
    private myModel model;
}

我的流程参考:

<on-start>
<evaluate result="flowScope.modelView" expression="myBbean.getModel()"/>
</on-start>
<view-state id="view" >
<transition on="action">
<evaluate  expression="myBbean.anyAction()"/>
</transition>
</view-state>

我的看法:

<!-- language: xml -->
<p:inputText id="teste1" value="#{modelView.test}"  required="true"/>  
<p:commandButton action="action" immediate="true" />

当我在模型中查找属性测试时,它是空的...

【问题讨论】:

  • 尝试删除立即属性。它也跳过了验证和更新阶段。

标签: spring primefaces spring-webflow


【解决方案1】:

我使用范围会话解决了这个问题

@Controller
@Scope("session")

【讨论】:

    猜你喜欢
    • 2013-10-12
    • 1970-01-01
    • 1970-01-01
    • 2015-06-09
    • 2023-03-13
    • 2011-11-27
    • 2014-06-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多