繁体   English   中英

当使用RichFaces 4.2.0在JSF中的rich:popupPanel中嵌套时,rich:editor标记不起作用

[英]rich:editor tag not working when is nested inside rich:popupPanel in JSF with RichFaces 4.2.0

我正在尝试使用rich:popupPanel中的rich:editor从数据表更新博客文章。 我正在使用RichFaces 4.2.0。 如果我将编辑器标签带到popupPanel之外,则只能在内部时才能正常工作。 有人遇到这个问题吗?

我的代码是这样的:

<h:form id="form">

        <rich:dataTable value="#{managePosts.allBlogPosts}" var="post" id="manage_posts_data_table" 
                        styleClass="manage_posts_table" rows="15">
            <f:facet name="noData">                 
               Nothing found
            </f:facet>
           ...
            <rich:column width="70px">
                <h:link outcome="userViewPost.jsf">
                    <f:param name="post_id" value="#{post.id}" />
                    <h:graphicImage library="images" name="posts/manage/view.png" />
                </h:link>                   
                <a4j:commandLink render="editGrid" execute="@this"
                    oncomplete="#{rich:component('editPane')}.show()">
                    <h:graphicImage library="images" name="posts/manage/update.png" />
                    <f:setPropertyActionListener target="#{managePosts.editedPost}" value="#{post}" />
                </a4j:commandLink>

            </rich:column>       
        </rich:dataTable>

        <rich:popupPanel header="#{msg.edit_selected_post}" id="editPane" width="685" height="600" modal="true">                    

                <h:outputLabel value="#{msg.title}: " styleClass="form_labels" />
                <h:inputText id="update_post_title" value="#{managePosts.editedPost.title}" required="true"
                    requiredMessage="#{msg.empty_field_err}" size="103">
                    <f:validateLength minimum="6" maximum="128"/>
                </h:inputText>

                <h:outputLabel value="" />
                <rich:message for="update_post_title" />
                <h:outputLabel value="" />

                <h:outputLabel value="#{msg.content}: " styleClass="form_labels" />
                <rich:editor id="editor" toolbar="custom" skin="kama" required="true" requiredMessage="#{msg.empty_field_err}"
                        value="#{managePosts.editedPost.content}" width="530" height="300">
                    <f:facet name="config">
                    toolbar_custom:
                        [
                            { name: 'document', items : [ 'NewPage','Preview' ] },
                            { name: 'clip#{managePosts.editedPost.title}board', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
                            { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','Scayt' ] },
                            { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] }, '/',
                            { name: 'styles', items : [ 'Styles','Format' ] },
                            { name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
                            { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote' ] },
                            { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
                            { name: 'tools', items : [ 'Maximize','-','About' ] }
                        ]
                    </f:facet>
                </rich:editor>

                <h:outputLabel value="" />
                <rich:message for="editor" />
                <h:outputLabel value="" />

            <a4j:commandButton value="Cancel" onclick="#{rich:component('editPane')}.hide(); return false;" />
        </rich:popupPanel>

    </h:form>

先感谢您!

该错误是众所周知的。

编辑器超出了表单标签。

问题

暂无
暂无

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

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