cancel
Showing results for 
Search instead for 
Did you mean: 

Custom JSF Dashlet strange behaviour

rhofkens
Champ in-the-making
Champ in-the-making
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"   />
      
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
No that does not sound correct. Are you sure there is nothing else calling that method or any custom client-side javascript pressing the button? We do not have any non-standard JSF techniques being used on the dashlet page - and I've not heard of this happening before. We also have some quite complex dashlets used in demos that don't have any problems.

Thanks,

Kevin

rhofkens
Champ in-the-making
Champ in-the-making
Hi Kevin,

I'll investigate this more in detail.  Good to know you only use standard JSF techniques on the dashlet page.

cheers,
Roeland.