简体   繁体   English

JSF:使用嵌套对象支持Bean?

[英]JSF: Backing Beans with nested objects?

JSF 1.1 , using a backing bean with a nested objects inside I can read all properties of the nested object. JSF 1.1 ,通过在内部使用带有嵌套对象的支持bean,我可以读取嵌套对象的所有属性。

For example assuming a backing bean named "foo" with a nested object "bar" can I set/write via h:form all the properties of foo.bar? 例如,假设具有嵌套对象“ bar”的支持bean“ foo”,我可以通过h:form设置/写入foo.bar的所有属性吗?

I mean something like this: 我的意思是这样的:

f:view
            h:form
            h:inputText value="#{myBean.mySelectedReport.someProp}" /

and this in the backing bean: 并在后备bean中:

public SomeObject getMySelectedReport() {...}

but when I sent it to the correct backing bean it doesn't store the value of the someProp value 但是当我将其发送到正确的后备bean时,它不存储someProp值的值

很好,我可以自己解决 :如果对其他有相同问题的用户有用,则问题是“ from-view-id”上的JSF 1.1通配符,例如“ / ajax / uiChannel *”仅匹配没有任何查询参数都放入“ from url”中,只有这个“ /ajax/uiChannel.jsp?*”和“ / ajax / uiChannel *?*”通配符似乎有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM