-
1. Re: <a4j:support with ontabenter, how to skip validation phase
ilya_shaikovsky Aug 5, 2010 6:46 AM (in response to renegritsch)In general with AjaxSingle = true only current component is processed.
But in this case you mean that tab processed with all the content? then try to use not support but jsFucntion like:
<form> <a4j:jsFunction ajaxSingle="true" event="ontabenter" action="#{tabController.setCurrentTabName}"> <f:param name="param1"> </a4j:jsFunction> <rich:tabPanel> ... <rich:tab disabled="#{not model.kfz.available}" id="ID2F0F94A0" label="Kfz" switchType="client" ontabenter="storeTab('ID58EDF4C8','ID2F0F94A0')"> ....
In that case do not forget to add code for parameter getting from requestMap in action.
-
2. Re: <a4j:support with ontabenter, how to skip validation phase
renegritsch Aug 5, 2010 7:46 AM (in response to ilya_shaikovsky)Hi,
i got it to work, but i needed to add my changeRichTab script, because otherwise the tab change is not performed
function changeRichTab(tabPanelID, tabID) {
var fullIDForTabPanel = jQuery("[id$=" + ":"+ tabPanelID + "]").attr("id");
var fullIDForTab = jQuery("[id$=" + ":" + tabID + "]").attr("id");
RichFaces.switchTab(fullIDForTabPanel, fullIDForTab, tabID);}
<rich:tabPanel id="ID58EDF4C8" switchType="client">
<rich:tab ontabenter="changeRichTab('ID58EDF4C8','ID2F0F94A0');storeTab('ID58EDF4C8','ID2F0F94A0')" disabled="#{not model.kfz.available}" id="ID2F0F94A0" label="Kfz" switchType="client">
<a4j:jsFunction name="storeTab" ajaxSingle="true" event="ontabenter" action="#{tabController.setCurrentTabName}">
<f:param name="tabpanelId"/>
<f:param name="tabId"/>
</a4j:jsFunction>But now i have another problem, as soon as call the "storeTab" function, i get the values in java and tab is switched for about 1-2sec.
but then switches back to the old tab ?!?