Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Invoke Backing Bean At Page Level

 
Matt DeC
Greenhorn
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:
http://localhost:8080/start.faces?system=mysql

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???
 
Daniel Rhoades
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!