aspose file tools*
The moose likes JSF and the fly likes Calling ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Calling ajax " Watch "Calling ajax " New topic
Author

Calling ajax

Praveen Yendluri
Ranch Hand

Joined: Apr 13, 2011
Posts: 34
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

Joined: Jul 08, 2011
Posts: 4

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

Joined: Aug 06, 2010
Posts: 543
    
    4

You'll need to learn some JavaScript and Ajax, or have a component library do this for you. Or both .


Oracle Certified Professional: Java SE 6 Programmer && Oracle Certified Expert: (JEE 6 Web Component Developer && JEE 6 EJB Developer)
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

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

Joined: Apr 13, 2011
Posts: 34
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling ajax