2009-12-14 2 views
3

Привет У меня есть проблема с <a4j:commandButton> после я нажимаю его по какой-то причине все кнопки на этой странице меняют свой стильRichFaces проблема с Ajax CommandButton

любые предложения будут очень appretiated я загрузил видео, которое показывает моя проблема @ 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> 
+0

какая версия richfaces? – Bozho

+0

Я думаю, что это 3.3.0 , добавляя скриншот библиотек ... http://screencast.com/t/NmZiZjY3ZGM – Schyzotrop

+0

Вы пытались указать «a4j: region» вокруг элементов, которые вы хотите повторно отобразить на ajax action? –

ответ

0

о загрузке богатых: DataTable он просто присваивает по умолчанию styleClass в a4j из: совместное mmandButton, но когда вы нажимаете на все кнопки, установленные по умолчанию для стилей CSS. Вы не упомянули атрибут styleClass для a4j: commmandButton.

Например, возьмите это в качестве примера.

<a4j:commandButton value="Confirm" styleClass="buttonstyle prisefont15" style="width:100px; height:30px; cursor:pointer;" action="#{DraftZoneBean.confirmAction}" immediate="true" reRender="draftzoneForm"> 
                   </a4j:commandButton> 
Смежные вопросы