-
1. Re: AjaxCommandLink not working
sergeysmirnov Jul 18, 2007 1:21 AM (in response to technocrat)post the code snippet, please. Still not enough into to suggest.
-
2. Re: AjaxCommandLink not working
technocrat Jul 18, 2007 1:55 AM (in response to technocrat)This is the code snippet from the dialog.jsp.We are adding a link dynamically to div depending on the fieldType attribute using
component.getChildren().add() method.This is done in the renderer of the div.
Here a commandLink is added to the div membshpNumText on clicking which the decode is not invoked.
But the decode of the link go is called without any problem.
Only the link added dynamically has the problem.
But if i change the rendered attribute of the dialog to '#{true}' its working.<a4j:outputPanel id="addMemberPanel"> <i:dialog id="addMemberDialog" rendered="#{addMemberPageBean.showAddMemberDialog}"> <i:div id="membshpNumText" fieldType="MEMBER"> <h:inputText id="mem1" value="#addMemberToAccountPageBean.membershipNumber}" required="true" /> </i:div> <a4j:commandLink id="go" action="#{addMemberPageBean.retrieveMemberDetails}" value="#{screenMsgs.go}" /> .......... </i:dialog> </a4j:outputPanel>
-
3. Re: AjaxCommandLink not working
technocrat Jul 18, 2007 7:33 AM (in response to technocrat)It seems the decode of the components added through component.getChildren().add() is not getting invoked,if the addition happens in an ajax request...
am I missing anything ? -
4. Re: AjaxCommandLink not working
sergeysmirnov Jul 18, 2007 10:44 AM (in response to technocrat)'rendered' attribute of the outputPanel might be the culprit. If it equals flase at the beginning of the decode phase, the decode of it's content will not be decoded.
What is the scope of the addMemberPageBean? -
5. Re: AjaxCommandLink not working
technocrat Jul 18, 2007 11:19 PM (in response to technocrat)'rendered' attribute of the outputPanel might be the culprit. If it equals flase at the beginning of the decode phase, the decode of it's content will not be decoded.
When i debugged the code rendered is true and decoding is happening.But all children except the link got decoded.When i gave a log to check the children, the link was not there in the list.
The scope of my page bean is session -
6. Re: AjaxCommandLink not working
sergeysmirnov Jul 19, 2007 2:09 PM (in response to technocrat)did you explicitly assign id for the dynamically created link? If not, you should.
-
7. Re: AjaxCommandLink not working
technocrat Jul 20, 2007 12:38 AM (in response to technocrat)I got my mistake... I was adding the component in the render phase ...but the state saving happens before that...
Now i changed it and its working fine..
One question ...
Why the state saving happens before rendering is complete ?
Thanks for your replies...
Balu