problem with not executing the action on a4j:commandLink
derkd Jun 3, 2009 6:26 AMHi 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>