未调用操作方法
我在使用
的表单中遇到
和
问题> 如果我删除
,该操作会正常触发,但 pickList 需要在那里。
这是一个已知问题吗?如果是,是否有解决方法?
这就是代码的样子
<rich:modalPanel id="editAlbumPanel" width="580" height="255">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Edit Album #{mainBean.album.title}" styleClass="modal_header_txt" />
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<a4j:commandButton id="closeEditAlbum" image="images/close.png"
onclick="Richfaces.hideModalPanel('editAlbumPanel');" />
</h:panelGroup>
</f:facet>
<h:form id="editAlbumForm">
<h:panelGrid columns="2">
<h:outputText value="Genres" styleClass="descript"/>
<rich:pickList value="#{mainBean.selectedGenres}" copyControlLabel="Add"
fastMoveControlsVisible="false">
<f:selectItems value="#{mainBean.genreSelect}"/>
</rich:pickList>
<h:outputText value="Explicit Lyrics: " styleClass="descript"/>
<h:selectBooleanCheckbox styleClass="spacer" value="#{mainBean.album.explicitLyrics}"/>
</h:panelGrid>
<div align="right">
<a4j:commandButton value="Apply Changes" action="#{mainBean.editAlbumA}"
oncomplete="Richfaces.hideModalPanel('editAlbumPanel');"/>
<h:commandButton value="Cancel" styleClass="spacer" onclick="Richfaces.hideModalPanel('editAlbumPanel');"/>
</div>
</h:form>
</rich:modalPanel>
编辑额外信息
当且仅当选择列表的右侧为空(即用户不选择任何选项)时,才会调用操作方法
I am having an issue with <h:commandButton>
and <a4j:commandButton>
in a form with a <rich:pickList>
the action fires fine if I remove the <rich:pickList>
but the pickList needs to be there.
Is this a known issue and if so is there a work around for it?
This is what the code looks like
<rich:modalPanel id="editAlbumPanel" width="580" height="255">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Edit Album #{mainBean.album.title}" styleClass="modal_header_txt" />
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<a4j:commandButton id="closeEditAlbum" image="images/close.png"
onclick="Richfaces.hideModalPanel('editAlbumPanel');" />
</h:panelGroup>
</f:facet>
<h:form id="editAlbumForm">
<h:panelGrid columns="2">
<h:outputText value="Genres" styleClass="descript"/>
<rich:pickList value="#{mainBean.selectedGenres}" copyControlLabel="Add"
fastMoveControlsVisible="false">
<f:selectItems value="#{mainBean.genreSelect}"/>
</rich:pickList>
<h:outputText value="Explicit Lyrics: " styleClass="descript"/>
<h:selectBooleanCheckbox styleClass="spacer" value="#{mainBean.album.explicitLyrics}"/>
</h:panelGrid>
<div align="right">
<a4j:commandButton value="Apply Changes" action="#{mainBean.editAlbumA}"
oncomplete="Richfaces.hideModalPanel('editAlbumPanel');"/>
<h:commandButton value="Cancel" styleClass="spacer" onclick="Richfaces.hideModalPanel('editAlbumPanel');"/>
</div>
</h:form>
</rich:modalPanel>
EDIT Extra Information
The action method is called if and only if the right hand side of the pick list is empty, aka the user selects no options
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决方案,结果发现我在选择项中传递了一个 int 而不是 String
I have found the solution, turns out I was passing in an int instead of a String in the select item