• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Control the execution order in jsf

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I build a table with several rows. And put a commandlink in each row.

What I want is:

Step1:

if the lick is clicked, an action binded to a method in the bean is fired, meanwhile the id of the row is passed as param, so some information could be retrieved from DB according to the id and then stored in the bean.

Step2:

Then model panel(from RichFaces) can display the data I just retrieved from DB.



But the fact is that. Step1 does not execute before step 2. So if I clicked the link, data retrieved when the last time the link is clicked is displayed. So, data of the current row is not displayed, the data of last clicked row is displayed.



Could some body tell me if there any mechanism to control this?

Or could I realize my goal in other ways? Now I can only click the link, fire the action, get the data, and show the data in a new page, which is not good, I want to stay in the same page.

And for some reason, I can not get the data in advance when the table is built, I have to query DB to get it dynamically.



Thank you very much!!
 
Ziyang Zhang
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got an answer!!!

This blog helped me. Although the solution in the blog did not work for me, I get a workable solution from the comments.

http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/displaying-and-rerendering-a-richfaces-modalpanel-from-a-commandlink.html/comment-page-1#comment-74749



Here is a my piece of workable code. Ask me if you have any questions!!!

 
Did you just should on me? You should read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic