-
1. Re: limitToList, ajaxSingle
rschoeler Apr 16, 2009 4:54 AM (in response to nimo22)Hi nimo22, I can only answer your first question regarding ajaxSingle.
No, the whole formulardata will always be sent, but only the data of the ajaxSingle-part (or other dependencies e.g. process-Attribute, region etc.) will be processed!
A fast look at TAG-Information of some ajax-components in the online-demo has shown me, that limitToList and ajaxSingle are not required and therefore there exists no default value for them - I assume so.
And normally I would interpret your second question similar as you
regards
rschoeler -
2. Re: limitToList, ajaxSingle
ilya_shaikovsky Apr 16, 2009 6:22 AM (in response to nimo22)1) whole form submitted in any way. ajaxSingle and regions limits just processing of the component tree on the aplly/validate/update phases
2) these attributes not true by default. -
3. Re: limitToList, ajaxSingle
littlealan May 19, 2009 9:42 PM (in response to nimo22)In my app I would like to have an input form with field-by-field lost-focus validation, so i use ajaxSingle to process the target field, and limitToList to limit the message component to be re-render. e.g.:
<h:inputText value="#{dataCaptureBean.pol}" id="pol" required="true"> <a4j:support event="onblur" ajaxSingle="true" reRender="validatePol" limitToList="true"/> </h:inputText> <rich:message for="pol" id="validatePol"> <f:facet name="errorMarker"> <h:graphicImage value="/images/ajax/error.gif" /> </f:facet> </rich:message> <h:inputText value="#{dataCaptureBean.pod}" id="pod" required="true"> <a4j:support event="onblur" ajaxSingle="true" reRender="validatePod" limitToList="true"/> </h:inputText> <rich:message for="pod" id="validatePod"> <f:facet name="errorMarker"> <h:graphicImage value="/images/ajax/error.gif" /> </f:facet> </rich:message>
but there is also a common outputPanel for some framework aspect to do (e.g. performance logging), which is:<a4j:outputPanel ajaxRendered="true" id="commonOut"> <script language="javascript"> frmSessionId='<h:outputText value="#{frm_session_id}"/>'; frmServerStartTime='<h:outputText value="#{frm_server_start_time}"/>'; frmAppRef='<h:outputText value="#{frm_app_ref}"/>'; frmClientSubmitTime='<h:outputText value="#{frm_client_submit_time}"/>'; frmAction='<h:outputText value="#{frm_action}"/>'; frmServerEndTime='<h:outputText value="#{frm_server_end_time}"/>'; </script> </a4j:outputPanel>
And my question is, the limitToList flag overrides the ajaxRendered flag of the outputPanel, so that the "commonOut" panel is not re-rendered after the field validation request. But if I don't set the limitToList flag in the a4j:support component, the 2nd message component is also re-rendered even the user only tab away from 1st input field, which is quite odd. How should I make both goals work? -
4. Re: limitToList, ajaxSingle
nbelaevski May 20, 2009 5:27 AM (in response to nimo22)Add "commonOut" to re-render explicitly.
-
5. Re: limitToList, ajaxSingle
littlealan May 20, 2009 6:09 AM (in response to nimo22)um... define it explicitly works.
But the "commonOut" panel is actually defined in a common facelet template, and we do not want to expose this to the application developers and require the developers to add such id in their application JSF pages for each ajax buttons/support. (think like application code calling framework code).
So is there other way round? or the way left is only to wrap the a4j:commandButton/link/support in a custom facelet tag, and have them added the "commonOut" by default in the re-render list? -
6. Re: limitToList, ajaxSingle
ilya_shaikovsky May 20, 2009 6:18 AM (in response to nimo22)yes.. seem some custom workaround needed because limitToList defined to true attribute designed to limit reRendering to the reRender list only excluding messages(which actually designed analogous as h:message wrapped with outputPanel usage ), ajaxRendered outputPanels and etc..