簡體   English   中英

使用ajax commandButton的RichFaces問題

[英]RichFaces problem with ajax commandButton

嗨,我有一個問題<a4j:commandButton>我按下它之后由於某種原因這個頁面上的所有按鈕都在改變他們的風格

任何建議都會很有意義我已經上傳了一個視頻,顯示我的問題@ 0:10秒http://www.screencast.com/users/Schyzotrop/folders/Jing/media/b54aece2-4a97-45dc-99eb-76a7fbe29002 謝謝

        <a4j:form id="form" ajaxSubmit="true">
            <a4j:commandButton id="butNC" limitToList="true" action="#{category.createSetup}" value="New Category" />
            <a4j:commandButton reRender="catDataScroller" onclick=""></a4j:commandButton>
            <rich:dataTable id="categoryList" value="#{category.categoryItems}"
                            var="item" rows="10" width="100%">
                <f:facet name="header">
                    <h:outputText value="Listing Category Items" />
                </f:facet>
                <rich:column width="10%" style="text-align:center">
                    <f:facet name="header">
                        <h:outputText value="Name" />
                    </f:facet>
                    <h:outputText value="#{item.name}" />
                </rich:column>
                <rich:column width="75%">
                    <f:facet name="header">
                        <h:outputText value="Description"/>
                    </f:facet>
                    <h:outputText value="#{item.description}"/>
                </rich:column>
                <rich:column style="text-align:center">
                    <f:facet name="header">
                        <h:outputText value="Actions"/>
                    </f:facet>
                    <a4j:commandButton value="Show" action="#{category.detailSetup}">
                        <f:param name="jsfcrud.currentCategory" value="#{jsfcrud_class['classes.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][category.converter].jsfcrud_invoke}"/>
                    </a4j:commandButton>
                    <h:outputText value=" "/>
                    <a4j:commandButton value="Edit" action="#{category.editSetup}">
                        <f:param name="jsfcrud.currentCategory" value="#{jsfcrud_class['classes.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][category.converter].jsfcrud_invoke}"/>
                    </a4j:commandButton>
                    <h:outputText value=" "/>
                    <a4j:commandButton value="Destroy" limitToList="true" action="#{category.destroy}" type="submit">
                        <%--<f:param name="jsfcrud.currentCategory" value="#{jsfcrud_class['classes.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][category.converter].jsfcrud_invoke}"/>--%>
                        <h:outputText value="#{item.categoryID}"/>
                        <h:outputText value=" #{jsfcrud_class['classes.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][category.converter].jsfcrud_invoke}"/>
                        <f:param name="catID" value="#{item.categoryID}"/>
                    </a4j:commandButton>
                </rich:column>
            </rich:dataTable>
            <rich:spacer height="30" />
            <rich:datascroller id="catDataScroller" for="categoryList" maxPages="10"/>
            <rich:messages style="color:red"></rich:messages>
        </a4j:form>

在加載rich:dataTable時,它只是分配a4j:commandButton的默認styleClass,但是當你點擊設置為默認css樣式的所有按鈕時。 您沒有提到a4j:commmandButton的styleClass屬性。

例如,以此為例。

<a4j:commandButton value="Confirm" styleClass="buttonstyle prisefont15" style="width:100px; height:30px; cursor:pointer;" action="#{DraftZoneBean.confirmAction}" immediate="true" reRender="draftzoneForm">
                                                                </a4j:commandButton>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM