-
1. Re: a4j:support doen't work inside UIData
ilya_shaikovsky Jul 4, 2007 8:24 AM (in response to alexanderbelov)please provide page code. And libraries versions.
-
2. Re: a4j:support doen't work inside UIData
alexanderbelov Jul 4, 2007 9:07 AM (in response to alexanderbelov)I always use the latest version of ajax4jsf. But I had this problem with ajax4jsf 1.1.1 too.
There is a code:<h:form id="testForm"> <a:advancedTable value="#{simpleBean.selectItems}" var="testItem" id="testTable" styleClass="grid" selectPageMode="single" cycledCursor="false" selectMode="single"> <h:column> <h:outputText value="#{testItem.label}"/> </h:column> <h:column> <h:inputText value="#{testItem.value}"/> </h:column> <a4j:support action="#{simpleBean.simpleAction}" reRender="testForm" limitToList="true" event="rowOndblclick"/> </a:advancedTable> </h:form>
advancedTable is a UIData component with custom javascript. Event 'rowOndblclick' is fired then there is a double click on row. -
3. Re: a4j:support doen't work inside UIData
ilya_shaikovsky Jul 4, 2007 9:18 AM (in response to alexanderbelov)Please look to a4j:log to check the warnings and errors here. And use phaseTracker.jar to output the Lifecycle messages to the console.
And please do not reRender the form element. Wrap the content need to be reRendered to outputPanel and reRender the panel. -
4. Re: a4j:support doen't work inside UIData
alexanderbelov Jul 5, 2007 12:51 AM (in response to alexanderbelov)Ok, now I have phaseTracker and I can see, that all phases are going right. There are only one error in a4j:log. Ajax4jsf cannot update content of the page because where are no data in response to replase page content. I have the following response:
...<body><div xmlns:rich="http://richfaces.ajax4jsf.org/rich"></div><meta name="Ajax-Update-Ids" content="" /><span id="ajax-update-ids"><input type="hidden" name="jsf_sequence" value="1" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id1:j_id20" /></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body>
Action method is not called this way.
Code of the page:<h:form id="testForm"> <a4j:outputPanel id="testOutputPanel" layout="block"> <a:advancedTable value="#{simpleBean.selectItems}" var="testItem" id="testTable" styleClass="grid" selectPageMode="single" cycledCursor="false" selectMode="single"> <h:column> <h:outputText value="#{testItem.label}"/> </h:column> <h:column> <h:inputText value="#{testItem.value}"/> </h:column> <a4j:support action="#{simpleBean.simpleAction}" reRender="testOutputPanel" limitToList="true" event="rowOndblclick"/> </a:advancedTable> </a4j:outputPanel> </h:form>
But I see the following in script:A4J.AJAX.Submit('_viewRoot','includeStartPage:include:testForm',event,{'parameters':{'includeStartPage:include:testForm:testTable:4:j_id93':'includeStartPage:include:testForm:testTable:4:j_id93'} ,'actionUrl':'/KE/ke.jsf','affected':['testOutputPanel'] } )
It seems, that there is no full clientId for outputPanel component.
I tried to use binding it to managed bean and get it's clientId for using in reRender attribute.
This way I have the following error:
Caused by: java.lang.IllegalArgumentException: includeStartPage
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:588)
at org.ajax4jsf.framework.renderer.AjaxRendererUtils.buildEventOptions(AjaxRendererUtils.java:279)
at org.ajax4jsf.framework.renderer.AjaxRendererUtils.buildOnEvent(AjaxRendererUtils.java:171)
at org.ajax4jsf.ajax.UIAjaxSupport.getEventString(UIAjaxSupport.java:115)
at org.ajax4jsf.framework.ajax.EventValueBinding.getValue(EventValueBinding.java:92)
includeStartPage is a4j:include component.
I see that this exception is occured when attibute limitToList exists. I try to remove limitToList and reRender attributes. This way I have the same empty response as earlier.
Any ideas? -
5. Re: a4j:support doen't work inside UIData
ilya_shaikovsky Jul 5, 2007 7:26 AM (in response to alexanderbelov)could you please send me your case directly to run it on my side?
-
6. Re: a4j:support doen't work inside UIData
alexanderbelov Jul 5, 2007 10:11 AM (in response to alexanderbelov)Have you received my letter?
-
7. Re: a4j:support doen't work inside UIData
ilya_shaikovsky Jul 6, 2007 6:32 AM (in response to alexanderbelov)yes. I've answered with reply and investigate your code today. Thanks.
-
8. Re: a4j:support doen't work inside UIData
ilya_shaikovsky Jul 6, 2007 12:08 PM (in response to alexanderbelov)Ok. We've investigated your code. The problem is that support decodes wrong in your case. Explore please UIDataTable class from Rich Faces datatable project to look up the difference.
In your case support decodes ones and will not be found later. But in Rich Faces dataTable it decodes for every row. -
9. Re: a4j:support doen't work inside UIData
rsinus Jul 10, 2007 4:23 AM (in response to alexanderbelov)Thank you for your help.
-
10. Re: a4j:support doen't work inside UIData
alexanderbelov Jul 10, 2007 4:36 AM (in response to alexanderbelov)It seems a little bug. Last post is mine, but I am not "rsinus". :-)