AnsweredAssumed Answered

Custom JSF Dashlet strange behaviour

Question asked by rhofkens on Dec 13, 2006
Latest reply on Dec 14, 2006 by rhofkens
Hello,

I've created a JSF dashlet with a custom bean.  Everything is working fine, except that the actionlistener on my commandbutton is fired automatically as soon as the "My alfresco" dashboard is loaded. (the logs show that the releaseSelectedDocs method is executed)

Is this normal in the JSF request cycle?

My dashlet JSP code:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>


<h:dataTable
   value="#{ReleaseDocsBean.releaseDocs}"
   var="ditdoc"
   rowClasses="recordSetRow, RecordSetRowAlt"
   headerClass="recordSetHeader">
   
   <!– Document Selection column –>
   <h:column>
      <f:facet name="header">
         <h:outputText value="Auswählen" />
      </f:facet>
      <h:selectBooleanCheckbox value="#{ditdoc.isMarkedForRelease}" />
   </h:column>
   
   <!– Document Name columns –>
   <h:column>
      <f:facet name="header">
         <h:outputText value="Dokumentname" />
      </f:facet>
      <h:outputText value="#{ditdoc.fileName}" />
   </h:column>

</h:dataTable>
<h:commandButton
      actionListener="#{ReleaseDocsBean.releaseSelectedDocs}"
      action="#{ReleaseDocsBean.doAction}"
      value="Ausgewählte Dokumente freigeben und publizieren"   />
      

Outcomes