我有一张<a:commandLink>
的表格会打开<rich:modalPanel>
,其中包含所选项目的其他信息。它可以在点击commandLink时使用reRendering modalPanel的内部<a:outputPanel>
。现在问题是我的所有facelets成为reRender之后的常用输入项(即简单选择而不是组合框)。有没有办法让服务器将ui信息添加到reRendered结果?
UPD 我在日志中看到以下消息
10:55:30,483 INFO [facelet] Facelet [/account/registration.xhtml]修改了@ 10:55:30 AM,刷新组件应用@ 10:54:36 AM
UPD2 只有替换常用select的组件才会出现此问题,例如selectOneMenu或selectonelistbox。
代码示例:
<rich:modalPanel id="fieldPropertiesPanel" >
<f:facet name="header">
<h:outputText value="Customize Field" />
</f:facet>
<f:facet name="controls">
<h:outputLink value="#"
onclick="#{rich:component('fieldPropertiesPanel')}.hide(); return false;">
X
</h:outputLink>
</f:facet>
<rich:panel id="fieldPropertiesContent">
<s:decorate styleClass="itemType" template="/layout/edit.xhtml">
<h:selectOneMenu value="#{accountHome.currFieldType}">
<s:selectItems itemLabel="#{fieldType}" itemValue="#{fieldType}"
label="#{messages['ProjectFieldType_enum.'.concat(fieldType)]}"
value="#{accountHome.projectFieldTypes}" var="fieldType" />
</h:selectOneMenu>
</s:decorate>
</rich:panel>
</rich:modalPanel>
和调用commandLink
<a:commandLink value="Edit" oncomplete="Richfaces.showModalPanel('fieldPropertiesPanel');"
reRender="fieldPropertiesContent" />