-
1. Re: how to fire an event on completion of another event
nbelaevski Jun 4, 2009 6:17 AM (in response to ashutoshdeora)Hi,
What events do you mean? -
2. Re: how to fire an event on completion of another event
ashutoshdeora Jun 4, 2009 6:35 AM (in response to ashutoshdeora)what i want to say is that when i click a button a method(METHOD A) will be called in the session bean it will populate the <rich:datatable>
the moment the population is complete another method(METHOD B) will be called.
can this be done please tell me
i cant use javascript and i cannot do anything on the page that it will call that method
basically you can say that after the population METHOD B will be fired. -
3. Re: how to fire an event on completion of another event
ilya_shaikovsky Jun 4, 2009 6:41 AM (in response to ashutoshdeora)Still can't understand why you need two requests. What in your case can't be done within separate request?
-
4. Re: how to fire an event on completion of another event
panky_p Jun 4, 2009 6:54 AM (in response to ashutoshdeora)I guess if you need to call two request you can try making use of actionListener, but the Method B should of void type.
<a4j:commandButton action="METHOD A" actionListener="METHOD B" ></a4j:commandButton>
OR you can try making use of a4j:support. -
5. Re: how to fire an event on completion of another event
ashutoshdeora Jun 4, 2009 7:02 AM (in response to ashutoshdeora)basically when METHOD A will be invoked a list will be populated in rich:datatable METHOD A will return small list when the list will be on c=screen the METHOD B will be invoked and it will populate the detalied list of the data
since the data will be huge so it will take a time to get populated
thats why i want to do this
please is this possible -
6. Re: how to fire an event on completion of another event
ashutoshdeora Jun 4, 2009 7:05 AM (in response to ashutoshdeora)dear panky_p
i have to call METHID B when METHOD A have finished its work
but still i will try your suggestion
about a4j
please tell what to use
i used a4j:support
but no result -
7. Re: how to fire an event on completion of another event
nbelaevski Jun 4, 2009 7:20 AM (in response to ashutoshdeora)Call method b just from the method calling method a.
-
8. Re: how to fire an event on completion of another event
panky_p Jun 4, 2009 7:22 AM (in response to ashutoshdeora)I think you can try
<a4j:commandButton action="METHOD A"> <a4j:support event="oncomplete" action="METHOD B" /> </a4j:commandButton>
I am not sure whether it will work as you expect but you can give it one try. -
9. Re: how to fire an event on completion of another event
ilya_shaikovsky Jun 4, 2009 7:24 AM (in response to ashutoshdeora)"panky_p" wrote:
I think you can try<a4j:commandButton action="METHOD A"> <a4j:support event="oncomplete" action="METHOD B" /> </a4j:commandButton>
I am not sure whether it will work as you expect but you can give it one try.
It will works as he asked. But for such cases I wanted him to check if he really need two requests fired. -
10. Re: how to fire an event on completion of another event
ashutoshdeora Jun 4, 2009 7:46 AM (in response to ashutoshdeora)panky_p
i have tried <h:commandButton action="METHOD A"> <a4j:support event="oncomplete" action="METHOD B" /> </h:commandButton>
but the
<a4j:support event="oncomplete" action="METHOD B" />
is not called
please suggest something else if u can -
11. Re: how to fire an event on completion of another event
ashutoshdeora Jun 4, 2009 7:55 AM (in response to ashutoshdeora)ilya,
i think you didnt get it still
i have 2 database queryMETHOD A(){ QUERY 1 - it will fetch small amount of data - i put this data in rich:datatable (TABLE 1) }
METHOD B(){ QUERY 2 - it will fetch huge amount of data (it will take some time to do it) i will put this data also in rich:datatable (TABLE 1) }
i have only one click to perform this
condition:- i can click only once
i have to complete method A then only i can execute METHOD B
i cannot call method B in Method A
now can you give me any idea for this -
12. Re: how to fire an event on completion of another event
panky_p Jun 4, 2009 8:05 AM (in response to ashutoshdeora)<a4j:support event="oncomplete" action="METHOD B" />
if it is working then I am not sure about any clean way to achieve the way you expect result, I think you will need to take help of javascript with a4j:jsFunction -
13. Re: how to fire an event on completion of another event
nbelaevski Jun 4, 2009 8:52 AM (in response to ashutoshdeora)"ashutoshdeora" wrote:
ilya,
i think you didnt get it still
i have 2 database queryMETHOD A(){ QUERY 1 - it will fetch small amount of data - i put this data in rich:datatable (TABLE 1) }
METHOD B(){ QUERY 2 - it will fetch huge amount of data (it will take some time to do it) i will put this data also in rich:datatable (TABLE 1) }
i have only one click to perform this
condition:- i can click only once
i have to complete method A then only i can execute METHOD B
i cannot call method B in Method A
now can you give me any idea for this
Why not use rich:scrollableDataTable for this? -
14. Re: how to fire an event on completion of another event
ashutoshdeora Jun 5, 2009 12:25 AM (in response to ashutoshdeora)thanks for suggestion
but i cant use rich:scrollableDataTable
due to some dependencies i cant use rich:scrollableDataTable at this moment
but in future i might be able to use rich:scrollableDataTable
but in present situation i cant
please suggest something else