-
1. Re: <a4j:commandLink> action is not getting called
sergeysmirnov Mar 13, 2007 11:39 PM (in response to tizi)Starts from <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" /> like it is shown here:
http://livedemo.exadel.com/a4j-repeat-rerender/
Also, if one of the parent that has rendered attribute and its value is false by default, the action should not be invoked -
2. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 1:00 AM (in response to tizi)Yes, infact it is the case that parent attribute has rendered attribute and its value is false by default. I need this logic, this block will be rendered later.
are there any workarounds? -
3. Re: <a4j:commandLink> action is not getting called
sergeysmirnov Mar 14, 2007 1:26 AM (in response to tizi)The logic is in the base UIComponent class. The decode phase is skipped if the component has rendered="false". The same for readonly and disabled attributes on the input components when they equals to false.
This is a quote from the processDecodes method:.... // Skip processing if our rendered flag is false if (!isRendered()) { return;
If you want to process the content, you need to have it true before the second phase. The session scope bean will work. However, it is pretty heavy solution.
Ajax4jsf has a special component - a4j:keepAlive. It helps to restore the request scope bean, so it is shared between the Ajax requests
If your case, it is <a4j:keepAlive beanName="processScope" />
The bean saving with keepAlive should be serializable.
BTW, your bean have #{processScope}. Does it mean it has lifecycle more then Request? -
4. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 1:37 AM (in response to tizi)do you mean rendered attribute I should set in session scope? If i use <a4j:keepalive> would it apply to my entire bean or can i refer to some specific property here?
-
5. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 1:40 AM (in response to tizi)and yes processscope has bigger lifecycle than request. This scope has made available by ADF faces.
-
6. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 1:41 AM (in response to tizi)"tizi" wrote:
and yes processscope has bigger lifecycle than request. This scope has been made available by ADF faces. -
7. Re: <a4j:commandLink> action is not getting called
sergeysmirnov Mar 14, 2007 10:44 AM (in response to tizi)No. I did not mean you should set them to session scope, because it is not only one possible option.
The explanation to where the problem is:
http://tinyurl.com/2z2ckq
If you have a processScope, that is OK to solve the problem. However, we have one more question at this point. Does the ADF process scope work during the Ajax requests. -
8. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 1:29 PM (in response to tizi)Hi,
Thanks for replying.
I put following statement at the top of the page.
<a4j:keepAlive beanName="backing_CustSearchBean" />
But now I am only able to see first page. If I click on any button, no data is being fetched.
Also my bean is in "request" scope only. ProcessScope I am using for transferring data b/w jsp and managedbean.
Can this problem be really resolved? -
9. Re: <a4j:commandLink> action is not getting called
sergeysmirnov Mar 14, 2007 1:41 PM (in response to tizi)keepAlive keeps bean alive only during the requests on the same page.
There is a nature of request scope to have a limited lifecycle. If you want to have access to the data on several pages, the request scope is not for that. It is true for both Ajax and Non-Ajax mode -
10. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 1:47 PM (in response to tizi)My application has only one page. Page is devided into 8 section which earlier use to be 8 different pages. Is there a specific place where I should place my <a4j:keepAlive>.
can this problem be resolved using any other tag like <htm:div>? Or are there any ways to manipulate rendered attribute? -
11. Re: <a4j:commandLink> action is not getting called
sergeysmirnov Mar 14, 2007 1:59 PM (in response to tizi)Sorry, it looks like I misunderstood your post.
Did you try to use session scope? (just for the testing purpose) -
12. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 2:08 PM (in response to tizi)yes I tried using session scope. But then it started messing with functionalities which were already in place.
Also I might not be related but I have following error on consol
Missing class: com.sun.facelets.FaceletViewHandler
Dependent class: org.ajax4jsf.framework.ViewHandlerWrapper
But I think it doesnt affect me anywhere. I really need to resolve this(command link action not getting called) issue soon. but it seems I dont have any way out.
If I use sessionscope for the bean I start getting "IllegalStateException"??? -
13. Re: <a4j:commandLink> action is not getting called
sergeysmirnov Mar 14, 2007 2:15 PM (in response to tizi)The alternative way is using style attribute instead of rendered attribute. I mean, render the context anyway, but set display:none to hide it on the screen. It allows to avoid the problem with code in the UIComponent
-
14. Re: <a4j:commandLink> action is not getting called
tizi Mar 14, 2007 3:13 PM (in response to tizi)Thanks Sergey, for patiently replying to my posts.
I resolved that issue by getting rid of <a4j:commandbutton> instead I used this inside my <h:datatable>:
<h:outputLabel value="#{oppList.opp_no}" style="cursor:pointer" onclick="showOppSelected('#{oppList.opp_no}')"/>
So I am getting the required functinality now.
Thanks a lot for you help! Without your pointers I would not have been able to do this.