12 Replies Latest reply on Jun 3, 2009 12:26 PM by nbelaevski

    problem with not executing the action on a4j:commandLink

    derkd

      Hi all,

      I have 1 input field and 1 a4j:commandButton. Clicking on the a4j:commandButton gives me results. The results are a dataList with an a4j:repeat list beneath it. The a4j:repeat list contains a4j:commandLinks with action. When I click an a4j:commandLink the action is not exectued, if I click a second time the action is executed...
      does anybody have an idea what is going on?

      I'm using Seam 1.2.1 with richfaces 3.1.6SR1. I can't upgrade to JSF 1.2 because I'm using that crappy oracle AS (10.1.3.4) which does not support jsf 1.2

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j"
       template="../layout/layout.xhtml">
      
       <ui:define name="body">
      
       <script src="../js/opleiding.js" type="text/javascript"></script>
       <!--<script src="../js/formEnterIE.js" type="text/javascript"></script>-->
       <h:form>
       <h:panelGrid columns="1" width="100%">
      
       <h:inputText id="zoekOpleidingTref" value="#{zoekOpleidingAction.zoekTrefwoord}"
      
       style=" width : 350px;"/>
       <a4j:commandButton id="zoekTrefwoordButton" value="Zoek" action="#{zoekOpleidingAction.findOpleidingTrefwoord}"
       reRender="opleidingDataList, closedFacet, openFacet" type="submit" ignoreDupResponses="true" eventsQueue="zoekTrefwoordQueue"
       />
       <rich:messages/>
      
       <rich:dataList id="opleidingDataList" var="_opleiding" value="#{trefwoordOpleidingen}">
       <h:outputText id="opleiding">#{_opleiding.omsOpleidingsnaam}</h:outputText>
       <h:outputText value="   " />
       <a4j:commandLink id="opleidingInfolink"
       action="#{zoekOpleidingAction.retrieveTrefwoordOpleidingRelatie(_opleiding)}"
       oncomplete="Richfaces.showModalPanel('informationOpleidingPanel');" reRender="selectedOpleiding">
       <h:graphicImage id="information" style="border-width:0" value="../images/I.png" />
       </a4j:commandLink>
      
       <rich:togglePanel switchType="ajax" stateOrder="closed, meerOpties">
      
       <f:facet name="closed">
       <a4j:region id="closedFacet">
       <a4j:repeat value="#{_opleiding.opleidingsnaamGecodeerd}" var="_subOpleiding" rows="4">
       <a4j:commandLink ignoreDupResponses="true" eventsQueue="subOpleidingQueue"
       action="#{zoekOpleidingAction.retrieveOpleidingRelatieEnd(_subOpleiding, true)}"
       oncomplete="registreer('#{_opleiding.cdOpleidingsnaam}+#{_opleiding.omsOpleidingsnaam}+#{zoekOpleidingAction.opleidingDetail.opleidingNiveauBemiddeling.cdOpleidingNiveauBemiddeling}+#{_subOpleiding.cdOpleidingsnaam}+#{_subOpleiding.omsOpleidingsnaam}')">#{_subOpleiding.omsOpleidingsnaam}</a4j:commandLink>
       <h:outputText value=",  " />
       </a4j:repeat>
       <rich:toggleControl value="[ meer opties ]" />
       </a4j:region>
       </f:facet>
      
      
       <f:facet name="meerOpties">
       <a4j:region id="openFacet">
       <a4j:repeat value="#{_opleiding.opleidingsnaamGecodeerd}" var="_subOpleiding">
       <a4j:commandLink ignoreDupResponses="true" eventsQueue="subOpleidingQueue"
       action="#{zoekOpleidingAction.retrieveOpleidingRelatieEnd(_subOpleiding, true)}"
       oncomplete="registreer('#{_opleiding.cdOpleidingsnaam}+#{_opleiding.omsOpleidingsnaam}+#{zoekOpleidingAction.opleidingDetail.opleidingNiveauBemiddeling.cdOpleidingNiveauBemiddeling}+#{_subOpleiding.cdOpleidingsnaam}+#{_subOpleiding.omsOpleidingsnaam}')">#{_subOpleiding.omsOpleidingsnaam}</a4j:commandLink>
       <h:outputText value=",  " />
       </a4j:repeat>
       <rich:toggleControl value="[ minder opties ]" switchToState="closed" />
       </a4j:region>
       </f:facet>
      
      
       </rich:togglePanel>
       <br />
       <h:outputText value="#{_opleiding.korteSchetsAfgekapt}" />
       <br />
       <h:outputText value=" "/>
       <br />
      
      
       </rich:dataList>
      
       </h:panelGrid>
       </h:form>
       <a4j:include viewId="toonOpleidingInfo.xhtml" ajaxRendered="true"/>
      
       </ui:define>
      
      </ui:composition>
      




        • 1. Re: problem with not executing the action on a4j:commandLink
          ilya_shaikovsky

          could you please check http://www.jsftutorials.net/faces-config/phaseTracker.html

          output for both requests?

          • 2. Re: problem with not executing the action on a4j:commandLink
            derkd

            Hi Iyla,

            Thanks for responding. I have added the jar and below you'll see the output

            Jun 3, 2009 1:21:01 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: code-source:/D:/oracle/dukkerda/oc4j_10134/j2ee/home/applications/bocwebap
            p/boc-webapplication-web-1.0.0/WEB-INF/lib/richfaces-ui-3.1.6.SR1.jar!/META-INF/a4j.taglib.xml
            Jun 3, 2009 1:21:01 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: code-source:/D:/oracle/dukkerda/oc4j_10134/j2ee/home/applications/bocwebap
            p/boc-webapplication-web-1.0.0/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jstl-core.taglib.xml
            Jun 3, 2009 1:21:01 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: code-source:/D:/oracle/dukkerda/oc4j_10134/j2ee/home/applications/bocwebap
            p/boc-webapplication-web-1.0.0/WEB-INF/lib/jsf-facelets-1.1.12.jar!/META-INF/jsf-html.taglib.xml
            Jun 3, 2009 1:21:01 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: code-source:/D:/oracle/dukkerda/oc4j_10134/j2ee/home/applications/bocwebap
            p/boc-webapplication-web-1.0.0/WEB-INF/lib/richfaces-ui-3.1.6.SR1.jar!/META-INF/ajax4jsf.taglib.xml
            Jun 3, 2009 1:21:01 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: code-source:/D:/oracle/dukkerda/oc4j_10134/j2ee/home/applications/bocwebap
            p/boc-webapplication-web-1.0.0/WEB-INF/lib/richfaces-ui-3.1.6.SR1.jar!/META-INF/rich.taglib.xml
            Jun 3, 2009 1:21:01 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
            INFO: Added Library from: code-source:/D:/oracle/dukkerda/oc4j_10134/j2ee/home/applications/bocwebap
            p/boc-webapplication-web-1.0.0/WEB-INF/lib/jboss-seam-ui-1.2.1.GA.jar!/META-INF/seam-ui.taglib.xml
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RENDER_RESPONSE 6
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RESTORE_VIEW 1
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RESTORE_VIEW 1
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RENDER_RESPONSE 6
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RENDER_RESPONSE 6
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RESTORE_VIEW 1
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RESTORE_VIEW 1
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RENDER_RESPONSE 6
            Jun 3, 2009 1:21:03 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RENDER_RESPONSE 6
            
            webservice call...
            
            --------------------------------------
            03 Jun 2009 13:22:18,278 DEBUG BeroepAdapter:121 - trying to convert List<BeroepsnaamGecodeerd>, siz
            e: 1
            03 Jun 2009 13:22:18,293 DEBUG BeroepAdapter:328 - korteSchets.length(): 588
            03 Jun 2009 13:22:18,293 DEBUG BeroepAdapter:336 - Zweefvliegen is vliegen in een vliegtuig zonder m
            otor. Hierbij wordt gebruik gemaakt van kolommen opstijgende lucht: thermiek. De opleiding tot zweef
            vlieger wordt in de praktijk onderwezen en ondersteund...
            Jun 3, 2009 1:22:18 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER INVOKE_APPLICATION 5
            Jun 3, 2009 1:22:18 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RENDER_RESPONSE 6
            Jun 3, 2009 1:22:18 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RENDER_RESPONSE 6
            
            now clicking on the a4j:commandLink
            
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RESTORE_VIEW 1
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RESTORE_VIEW 1
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE APPLY_REQUEST_VALUES 2
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER APPLY_REQUEST_VALUES 2
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE PROCESS_VALIDATIONS 3
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER PROCESS_VALIDATIONS 3
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE UPDATE_MODEL_VALUES 4
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER UPDATE_MODEL_VALUES 4
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE INVOKE_APPLICATION 5
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER INVOKE_APPLICATION 5
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RENDER_RESPONSE 6
            Jun 3, 2009 1:22:58 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RENDER_RESPONSE 6
            
            second time clicking on that same link..
            INFO: AFTER RENDER_RESPONSE 6
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RESTORE_VIEW 1
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RESTORE_VIEW 1
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE APPLY_REQUEST_VALUES 2
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER APPLY_REQUEST_VALUES 2
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE PROCESS_VALIDATIONS 3
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER PROCESS_VALIDATIONS 3
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE UPDATE_MODEL_VALUES 4
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER UPDATE_MODEL_VALUES 4
            Jun 3, 2009 1:24:15 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE INVOKE_APPLICATION 5
            03 Jun 2009 13:24:15,587 DEBUG ZoekOpleidingAction:307 - Call to retrieveOpleidingRelatieEndpiloot z
            weefvliegtuig (vbo-cursus)
            03 Jun 2009 13:24:15,603 DEBUG ZoekOpleidingAction:247 - ToonOpleidingInfoAction: trying to invoke g
            etOpleidingRelaties on BOCwebservice...piloot zweefvliegtuig (vbo-cursus)
            Jun 3, 2009 1:24:15 PM org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
            INFO: Outbound Message
            
            webservice call
            
            03 Jun 2009 13:24:15,869 DEBUG BeroepAdapter:121 - trying to convert List<BeroepsnaamGecodeerd>, siz
            e: 1
            03 Jun 2009 13:24:15,884 DEBUG BeroepAdapter:328 - korteSchets.length(): 588
            03 Jun 2009 13:24:15,884 DEBUG BeroepAdapter:336 - Zweefvliegen is vliegen in een vliegtuig zonder m
            otor. Hierbij wordt gebruik gemaakt van kolommen opstijgende lucht: thermiek. De opleiding tot zweef
            vlieger wordt in de praktijk onderwezen en ondersteund...
            03 Jun 2009 13:24:15,884 DEBUG ZoekOpleidingAction:253 - Aantal beroepen in relatie 1
            03 Jun 2009 13:24:15,900 DEBUG ZoekOpleidingAction:254 - OpleidingRelaties in getOpleidingRelaties()
            Vlieger zweefvliegtuig (vbo-cursus)
            03 Jun 2009 13:24:15,900 DEBUG ZoekOpleidingAction:296 - ToonOpleidingInfoAction: trying to invoke g
            etOpleidingDetails on BOCwebservice...piloot zweefvliegtuig (vbo-cursus)
            Jun 3, 2009 1:24:15 PM org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
            INFO: Outbound Message
            
            another webservice call....
            
            03 Jun 2009 13:24:16,025 DEBUG ZoekOpleidingAction:312 - conversation should now be ended
            Jun 3, 2009 1:24:16 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER INVOKE_APPLICATION 5
            Jun 3, 2009 1:24:16 PM org.exadel.jsf.PhaseTracker beforePhase
            INFO: BEFORE RENDER_RESPONSE 6
            Jun 3, 2009 1:24:16 PM org.exadel.jsf.PhaseTracker afterPhase
            INFO: AFTER RENDER_RESPONSE 6
            


            • 3. Re: problem with not executing the action on a4j:commandLink
              ilya_shaikovsky

              Seems it's a bug or iteration components in 3.1.6. Could you create war sample with sources for me. I'll try to find some workaround.
              You could post this to jira.. But as you know 3.1.x branch is not officially supported(no developent in this branch).. So lets try to see if we could workaround it.

              • 4. Re: problem with not executing the action on a4j:commandLink
                derkd

                Thanks for helping me out. Is it usefull to create a jira for it if it is not going to be fixed? I think the only workaround is to retrieve all the information before rendering :( that's quite bad for the performance. I don't think the ajax way is going to work if it is a bug...

                the action class is below:

                
                package org.uwv.boc.web.app;
                
                import java.io.IOException;
                import java.io.Serializable;
                import java.util.ArrayList;
                import java.util.Iterator;
                import java.util.LinkedList;
                import java.util.List;
                import javax.faces.component.UIComponent;
                import javax.faces.component.UIViewRoot;
                import javax.faces.context.FacesContext;
                import javax.faces.event.ValueChangeEvent;
                import org.jboss.seam.ScopeType;
                import org.jboss.seam.annotations.Begin;
                import org.jboss.seam.annotations.End;
                import org.jboss.seam.annotations.In;
                import org.jboss.seam.annotations.Logger;
                import org.jboss.seam.annotations.Name;
                import org.jboss.seam.annotations.Out;
                import org.jboss.seam.annotations.Scope;
                import org.jboss.seam.annotations.datamodel.DataModel;
                import org.jboss.seam.core.FacesMessages;
                import org.jboss.seam.log.Log;
                import org.richfaces.component.html.HtmlTree;
                import org.richfaces.component.html.HtmlTreeNode;
                import org.richfaces.model.ScrollableTableDataModel.SimpleRowKey;
                import org.richfaces.model.selection.Selection;
                import org.uwv.boc.web.app.webservice.OpleidingAdapter;
                import org.uwv.boc.web.service.CdOpleidingsnaamsArray;
                
                
                @Name("zoekOpleidingAction")
                @Scope(ScopeType.CONVERSATION)
                public class ZoekOpleidingAction implements Serializable {
                
                 /**
                 *
                 */
                 private static final long serialVersionUID = -1661429427416159364L;
                
                 @Logger private Log log;
                
                 private String zoekLettercombinatie;
                 private String zoekTrefwoord;
                 private String zoekSOI;
                 @In(create = true) private OpleidingAdapter opleidingAdapter;
                
                 @DataModel(scope = ScopeType.PAGE)
                 protected List<IOpleiding> lettercombinatieOpleidingen;
                 @DataModel(scope = ScopeType.PAGE)
                 protected List<IOpleiding> trefwoordOpleidingen;
                 @DataModel(scope = ScopeType.PAGE)
                 protected List<IOpleiding> soiOpleidingen;
                 @DataModel(scope = ScopeType.PAGE)
                 private List<IOpleiding> hoofdOpleidingen;
                 private IOpleiding opleidingRelaties;
                 private List<IOpleiding> opleidingDetails;
                 private IOpleiding opleidingDetail;
                
                 @Out(required = false) private IOpleiding selectedOpleiding;
                 private boolean results = false;
                 private Selection selection;
                
                 public ZoekOpleidingAction(){
                 super();
                 }
                 public String getZoekLettercombinatie() {
                 return zoekLettercombinatie;
                 }
                
                 public void setZoekLettercombinatie(String zoekLettercombinatie) {
                 this.zoekLettercombinatie = zoekLettercombinatie;
                 }
                
                 public String getZoekTrefwoord() {
                 return zoekTrefwoord;
                 }
                
                 public void setZoekTrefwoord(String zoekTrefwoord) {
                 this.zoekTrefwoord = zoekTrefwoord;
                 }
                
                 public String getZoekSOI() {
                 return zoekSOI;
                 }
                
                 public void setZoekSOI(String zoekSOI) {
                 this.zoekSOI = zoekSOI;
                 }
                
                 public void setTrefwoordOpleidingen(List<IOpleiding> trefwoordOpleidingen) {
                 this.trefwoordOpleidingen = trefwoordOpleidingen;
                 }
                
                 public List<IOpleiding> getLettercombinatieOpleidingen() {
                 return lettercombinatieOpleidingen;
                 }
                
                 public void setLettercombinatieOpleidingen(List<IOpleiding> lettercombinatieOpleidingen) {
                 this.lettercombinatieOpleidingen = lettercombinatieOpleidingen;
                 }
                
                 public List<IOpleiding> getTrefwoordOpleidingen() {
                 return trefwoordOpleidingen;
                 }
                
                 public void setTrefwoordBeroepen(List<IOpleiding> trefwoordOpleidingen) {
                 this.trefwoordOpleidingen = trefwoordOpleidingen;
                 }
                
                 public List<IOpleiding> getOpleidingDetails() {
                 return opleidingDetails;
                 }
                
                 public void setOpleidingDetails(List<IOpleiding> opleidingDetails) {
                 this.opleidingDetails = opleidingDetails;
                 }
                
                 public IOpleiding getOpleidingDetail() {
                 return opleidingDetail;
                 }
                 public void setOpleidingDetail(IOpleiding opleidingDetail) {
                 this.opleidingDetail = opleidingDetail;
                 }
                
                 @Begin(join = true)
                 public String findOpleidingLetterCombinatie(){
                 trefwoordOpleidingen = new LinkedList<IOpleiding>();
                 zoekTrefwoord = "";
                
                 lettercombinatieOpleidingen = null;
                 if(zoekLettercombinatie != null && !zoekLettercombinatie.equals("")){
                 log.debug("Lettercombinatie: trying to invoke findOpleiding on BOCwebservice..." + zoekLettercombinatie);
                 lettercombinatieOpleidingen = opleidingAdapter.findOpleiding(zoekLettercombinatie, 1);
                
                 if(lettercombinatieOpleidingen != null && lettercombinatieOpleidingen.size() == 0){
                 log.debug("Er konden geen opleidingen worden gevonden met lettercombinatie: " + zoekLettercombinatie);
                 FacesMessages messages = FacesMessages.instance();
                 messages.clear();
                 messages.add("Er konden geen opleidingen worden gevonden!");
                 }
                
                 if(lettercombinatieOpleidingen != null && lettercombinatieOpleidingen.size()>50){
                 log.debug("found more than 50 opleidingen in findOpleidingLetterCombinatie");
                 FacesMessages messages = FacesMessages.instance();
                 messages.clear();
                 messages.add("Er zijn teveel zoekresultaten. Specificeer uw zoekopdracht!");
                 }
                 }
                
                 return "retrievedFindOpleidingLettercombinatie";
                 }
                
                 @Begin(join = true)
                 public String findOpleidingTrefwoord(){
                 trefwoordOpleidingen = new LinkedList<IOpleiding>();
                 log.debug("Trefwoord: trying to invoke findOpleiding on BOCwebservice...");
                 if(zoekTrefwoord != null && !zoekTrefwoord.equals("")){
                 hoofdOpleidingen = opleidingAdapter.findOpleiding(zoekTrefwoord, 2);
                
                 if(hoofdOpleidingen != null && hoofdOpleidingen.size() == 0){
                 log.debug("Er konden geen opleidingen worden gevonden met trefwoord: " + zoekTrefwoord);
                 FacesMessages messages = FacesMessages.instance();
                 messages.clear();
                 messages.add("Er konden geen opleidingen worden gevonden!");
                 }else{
                 for(IOpleiding hoofdOpleiding : hoofdOpleidingen){
                 log.debug("hoofdopleiding: " +hoofdOpleiding.getOmsOpleidingsnaam());
                 List<IOpleiding> opleidingRelaties = opleidingAdapter.getOpleidingRelaties(hoofdOpleiding.getCdOpleidingsnaam());
                
                 /*
                 * add all the data from this list to the trefwoordOpleidingen list.
                 */
                 trefwoordOpleidingen.addAll(opleidingRelaties);
                 }
                
                 if(hoofdOpleidingen != null && hoofdOpleidingen.size()>50){
                 log.debug("found more than 50 opleidingen in findOpleidingTrefwoord");
                 FacesMessages messages = FacesMessages.instance();
                 messages.clear();
                 messages.add("Er zijn teveel zoekresultaten. Specificeer uw zoekopdracht!");
                 }
                 }
                 }
                 return "retrievedFindBeroepTrefwoord";
                 }
                
                 @Begin(join = true)
                 public String findOpleidingSOI(){
                 trefwoordOpleidingen = new LinkedList<IOpleiding>();
                 zoekTrefwoord = "";
                
                 soiOpleidingen = null;
                 log.debug("findOpleidingSOI: trying to invoke findOpleiding on BOCwebservice...");
                 if(zoekSOI != null && !zoekSOI.equals("")){
                 soiOpleidingen = opleidingAdapter.findOpleiding(zoekSOI, 1);
                 }
                 if (soiOpleidingen != null) {
                 results = !soiOpleidingen.isEmpty();
                 }else{
                 results = false;
                 }
                
                 if(soiOpleidingen != null && soiOpleidingen.size() == 0){
                 log.debug("Er konden geen opleidingen worden gevonden met trefwoord: " + zoekSOI);
                 FacesMessages messages = FacesMessages.instance();
                 messages.clear();
                 messages.add("Er konden geen opleidingen worden gevonden!");
                 }
                
                 if(soiOpleidingen != null && soiOpleidingen.size()>50){
                 log.debug("found more than 50 opleidingen in findOpleidingTrefwoord");
                 FacesMessages messages = FacesMessages.instance();
                 messages.clear();
                 messages.add("Er zijn teveel zoekresultaten. Specificeer uw zoekopdracht!");
                 }
                
                 return "retrievedFindOpleidingSOI";
                 }
                
                 @Begin(join = true)
                 public IOpleiding retrieveOpleidingRelatie(IOpleiding opleiding){
                 selectedOpleiding = opleiding;
                 /*
                 * check if opleidingRelaties is already retrieved by the webservice
                 */
                 if(opleidingRelaties != null){
                 /*
                 * here we check if the opleiding is equal to the hoofdOpleiding
                 */
                 if(opleidingRelaties.getCdOpleidingsnaam().equals(opleiding)){
                 log.debug("opleiding: " + opleiding.getCdOpleidingsnaam() + " is equal to the hoofdOpleiding: " + opleidingRelaties.getCdOpleidingsnaam());
                 return opleidingRelaties;
                 }
                 /*
                 * here we check if the beroep is equal to the sub beroepen of the hoofdberoep
                 */
                 if(opleidingRelaties.getOpleidingsnaamGecodeerd() != null && opleidingRelaties.getOpleidingsnaamGecodeerd().size() > 0){
                 for(IOpleiding subOpleiding: opleidingRelaties.getOpleidingsnaamGecodeerd()){
                 if(subOpleiding.getCdOpleidingsnaam().equals(opleiding.getCdOpleidingsnaam())){
                 log.debug("opleiding: " + opleiding.getCdOpleidingsnaam() + " is equal to the subOpleiding: " + subOpleiding.getCdOpleidingsnaam());
                 return opleidingRelaties;
                 }
                 }
                 }
                 }
                 log.debug("ToonOpleidingInfoAction: trying to invoke getOpleidingRelaties on BOCwebservice..." + opleiding.getOmsOpleidingsnaam());
                
                 List<IOpleiding> opleidingRelatiesList = opleidingAdapter.getOpleidingRelaties(opleiding.getCdOpleidingsnaam());
                
                 Iterator<IOpleiding> iter = opleidingRelatiesList.iterator();
                 opleidingRelaties = iter.next();
                 log.debug("Aantal beroepen in relatie " + opleidingRelaties.getBeroepsnaamGecodeerd().size());
                 log.debug("OpleidingRelaties in getOpleidingRelaties()" + opleidingRelaties.getOmsOpleidingsnaam());
                
                 return opleidingRelaties;
                 }
                
                 @Begin(join = true)
                 public void retrieveOpleidingRelatie(){
                 handleSelection();
                 retrieveOpleidingRelatie(selectedOpleiding);
                 retrieveOpleidingDetails(selectedOpleiding);
                 }
                
                 @Begin(join = true)
                 public void handleSelection(){
                 log.debug("Handling selection :");
                 Iterator<Object> keys = selection.getKeys();
                 while(keys.hasNext()){
                 IOpleiding opleiding = soiOpleidingen.get(((SimpleRowKey)keys.next()).intValue());
                 selectedOpleiding = opleiding;
                 log.debug(opleiding.getOmsOpleidingsnaam());
                 }
                 }
                
                 @Begin(join = true)
                 public IOpleiding retrieveTrefwoordOpleidingRelatie(IOpleiding opleiding){
                 selectedOpleiding = opleiding;
                 IOpleiding opleidingRelatie = null;
                 for(IOpleiding trefwoordOpleiding : trefwoordOpleidingen) {
                 if(trefwoordOpleiding.equals(opleiding)) {
                 opleidingRelaties = trefwoordOpleiding;
                 }
                 }
                
                 return opleidingRelatie;
                 }
                
                 @Begin(join = true)
                 public List<IOpleiding> retrieveOpleidingDetails(IOpleiding opleiding) {
                
                // selectedOpleiding = opleiding;
                 CdOpleidingsnaamsArray cdOpleidingen = new CdOpleidingsnaamsArray();
                 cdOpleidingen.getCdOpleidingsnaam().add(opleiding.getCdOpleidingsnaam());
                 log.debug("ToonOpleidingInfoAction: trying to invoke getOpleidingDetails on BOCwebservice..." + opleiding.getOmsOpleidingsnaam());
                 opleidingDetails = (List<IOpleiding>) opleidingAdapter.getOpleidingDetails((CdOpleidingsnaamsArray) cdOpleidingen);
                 return opleidingDetails;
                 }
                 /*
                 * We created this method to force an @End to end the conversation, we couldn't directly set it to retrieveBeroepRelatie(IBeroep beroep)
                 * because the information buttons also use this method and when clicked on that button the conversation shouldn't end.
                 *
                 */
                 @End
                 public String retrieveOpleidingRelatieEnd(IOpleiding opleiding, boolean isEnd){
                 log.debug("Call to retrieveOpleidingRelatieEnd" + opleiding.getOmsOpleidingsnaam());
                 retrieveOpleidingRelatie(opleiding);
                 retrieveOpleidingDetails(opleiding);
                 if ((opleidingDetails!=null) && (opleidingDetails.size()>0)) opleidingDetail = opleidingDetails.get(0);
                 if(isEnd){
                 log.debug("conversation should now be ended");
                 return "end";
                 }else{
                 log.debug("conversation is still going");
                 return "";
                 }
                // return "end";
                 }
                
                 public List<IOpleiding> getHoofdOpleidingen() {
                 return hoofdOpleidingen;
                 }
                
                 public void setHoofdOpleidingen(List<IOpleiding> hoofdOpleidingen) {
                 this.hoofdOpleidingen = hoofdOpleidingen;
                 }
                
                 public List<IOpleiding> getSoiOpleidingen() {
                 return soiOpleidingen;
                 }
                
                 public void setSoiOpleidingen(List<IOpleiding> soiOpleidingen) {
                 this.soiOpleidingen = soiOpleidingen;
                 }
                
                 public IOpleiding getOpleidingRelaties() {
                 return opleidingRelaties;
                 }
                
                 public void setOpleidingRelaties(IOpleiding opleidingRelaties) {
                 this.opleidingRelaties = opleidingRelaties;
                 }
                
                 public IOpleiding getSelectedOpleiding() {
                 return selectedOpleiding;
                 }
                
                 public void setSelectedOpleiding(IOpleiding selectedOpleiding) {
                 this.selectedOpleiding = selectedOpleiding;
                 }
                
                 public void zoekLettercombinatieChanged(ValueChangeEvent e) {
                 zoekLettercombinatie = (String) e.getNewValue();
                 findOpleidingLetterCombinatie();
                 }
                
                 public void zoekTrefwoordChanged(ValueChangeEvent e) {
                 zoekTrefwoord = (String) e.getNewValue();
                 findOpleidingTrefwoord();
                 }
                
                 public void zoekSOIChanged(ValueChangeEvent e) {
                 zoekSOI = (String) e.getNewValue();
                 findOpleidingTrefwoord();
                 }
                
                 public Selection getSelection() {
                 return selection;
                 }
                
                 public void setSelection(Selection selection) {
                 this.selection = selection;
                 }
                
                 public String openOpleidingSOI(){
                 handleSelection();
                 if (selectedOpleiding != null)
                 log.debug("openOpleidingSOI..." + selectedOpleiding.getCdOpleidingsnaam() + " " + selectedOpleiding.getOmsOpleidingsnaam());
                 else
                 log.debug("openOpleidingSOI...null");
                 try {
                 FacesContext.getCurrentInstance().getExternalContext().redirect("index.seam?opleiding_cd="+selectedOpleiding.getCdOpleidingsnaam().toString());
                 } catch (Exception e) {
                 }
                
                 return "retrievedOpenOpleidingSOI";
                 }
                
                 public boolean isResults() {
                 return results;
                 }
                
                 public void setResults(boolean results) {
                 this.results = results;
                 }
                
                }
                


                • 5. Re: problem with not executing the action on a4j:commandLink
                  derkd

                  Ilya,

                  I just discoverd something strange. When I enter a keyword in the input field which gives me only 1 result in the datalist, the problem occurs. But if I search with a keyword which gives me more results in the dataList the problem doesn't occurs and works like expected. So it looks like it has something to do with the datalist rather than the repeat I guess??

                  • 6. Re: problem with not executing the action on a4j:commandLink
                    derkd

                    when I have 1 result and I click on the a4j:commandLink I also get an error with IE 6 which says
                    Line:67
                    Char:2
                    Error: Object doesn't support this property or method
                    Code:0

                    testing this with firebug in firefox it doesn't complain about anything but it doesn't work either.

                    • 7. Re: problem with not executing the action on a4j:commandLink
                      ilya_shaikovsky

                       

                      "derkd" wrote:
                      Ilya,

                      I just discoverd something strange. When I enter a keyword in the input field which gives me only 1 result in the datalist, the problem occurs. But if I search with a keyword which gives me more results in the dataList the problem doesn't occurs and works like expected. So it looks like it has something to do with the datalist rather than the repeat I guess??



                      Yes.. As I remember such issue was fixed for 3.2.x and higher.

                      • 8. Re: problem with not executing the action on a4j:commandLink
                        derkd

                        ohhh that's the second bug I found within 3 days :( :( :(
                        I'm stuck with oracle AS which can't handle the jsf 1.2.
                        Can I patch the code myself or is it just to much code and configuration? And where do I start looking?

                        • 9. Re: problem with not executing the action on a4j:commandLink
                          ilya_shaikovsky

                          we had many posts in our wiki about how to configure maven, download the sources and build from them.

                          check "Get Involved" section articles therehttp://www.jboss.org/community/wiki/JBossRichFaces.

                          Also 3.1.x SVN repository link : https://svn.jboss.org/repos/richfaces/branches/3.1.x

                          • 10. Re: problem with not executing the action on a4j:commandLink
                            derkd

                             

                            Yes.. As I remember such issue was fixed for 3.2.x and higher.

                            do you know the jira link for this one? I can't find it...

                            the svn for the 3.1.x branch. Is that one the same as the 3.1.6.SR1 branch or does the svn got the newest (patched) sources?


                            • 11. Re: problem with not executing the action on a4j:commandLink
                              derkd

                              it looks like it is this one: https://jira.jboss.org/jira/browse/RF-4139?page=com.atlassian.jira.ext.fisheye%3Afisheye-issuepanel

                              but the affected version is 3.2.1 and if I set switchtype to ajax I still have this issue...

                              so this workaround does not work for 3.1.6 and I can't find information on what files have been changed? can someone help me with this?

                              • 12. Re: problem with not executing the action on a4j:commandLink
                                nbelaevski

                                simpleTogglePanel and togglePanel are different components, so most likely RF-4139 isn't the reason.