This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Invoke Backing Bean At Page Level  RSS feed

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know JSF is component based, but I have a situation where I am writing an application using Nagios, which is an OSS network monitoring tool. The tool monitors/notifies systems (db, ldap, mq, etc) using unique URL's.

I've written a backing bean which takes the URL parameters to decide which system to test.

The URL is:

The code in start.faces is:

Right now i'm putting the parameter into a command link that I click manually to invoke the backing bean:

While this is fine while I am developing the app, it won't work with a tool that only submits http requests.

What I'd like to do is to call the testAction() from the URL (as is shown in "TODO" above). It seems like there should be a way to invoke the testAction() method from the faces context, but I haven't been able to figure out how.

Any Ideas???
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah this feature is a pain in JSF - I get round it by creating a custom component (just a custom tag really...) and in the tag's encodeBegin method I do the stuff I need to render a reponse without the user having to click a submit button.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!