• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Calling ajax

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 4
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 543
4
Netbeans IDE Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic