• 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

Calling a backing bean function when inputtext value changes

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Platform:RSA 7.0
Using IBM-JSF Implementation ( JSF 1.1)
Uses Extended ibm jsf components

Problem:I need to call a managed bean action() when input box event changes ,I need to output a text based on some business logic.
Tag I am working with:<hx:ajaxRefreshSubmit>

Currently I know a method to call setter method of property i want to change,but my aim is to call an arbitary function in my managed bean,so us to update the output text.Input box has an hx:behaviour attached to it.And output box is inside a panelbox(for ajax updates enabling).
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You cannot call an arbitrary method in a JSF backing bean from a web client, because the architecture doesn't support it. JSF web pages aren't some sort of magic, they're HTML, transferred via HTTP and subject to the restrictions of HTTP. The server-side framework is designed to respond to the HTTP requests in a certain way and according to a specific request lifecycle desfinition.

However, you can do an awful lot within that framework. While the only logic methods you can invoke are listeners and action processors, you can specify what parts of the client page will be sampled and updated when a server method is invoked. I've done some pretty powerful things with just basic property mutations and action methods.

I don't know anything about how IBM manages this capability, but the RichFaces tag framework makes it quite easy, so I know it can be done. Like I said, I've done it. I could definitely do what you're trying to do.
 
Dishpal Bhaluja
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim the problem is that IBM RSA 7.0 is not supporting RichFaces

So inorder to call ajax functions.

I should use javascript.Which is the best implementation for an ajax call in jsf without this richfaces.
Anyway ,now its cleart that i should implement it using javascript and phase listners.Or is there any other way,something like DWR and all.

Lead me through this
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic