• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling ajax

 
Praveen Yendluri
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have requirement like closing a button of a pop should close the popup and at the same time it has to change change a property of my backing bean.

I have tried with action and "action Listener" attributes of button, but after closing popup parent page is getting refreshed. But my requirement is it should not refresh parent page, simply it should closes and changing property of backing bean.

I am trying to to do this with <f:ajax> but I dont know how to do it?

Can anyone help me in this regard please?

Thank you,
Praveen
 
Marco Phu
Greenhorn
Posts: 4
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i understand right, you want a button, and if someone clicks the button, a property of the bean should be modified without a page refresh.

Is this right?
 
Dieter Quickfend
Bartender
Posts: 543
4
Java Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to learn some JavaScript and Ajax, or have a component library do this for you. Or both .
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The initial subject of this thread may be a clue to the problem. You don't call AJAX, it calls you. At least if "you" is a Java server class/servlet/JSP/JSF.

AJAX is all about executing code on the client's browser.
 
Praveen Yendluri
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Macro,

Yes, I want a button in a popup that was generated from parent window , clicking on that button should perform two things.

1) It has to change property of my backing bean (ex: boolean flag)
2) And it should simply closes window (without refreshing parent window)

I have tried with "action" and "action Listener" attributes of button, but after closing popup parent page is getting refreshed. But my requirement is it should not refresh parent page, simply it should closes and changing property of backing bean.

Thanks,
Praveen
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic