Forums Register Login
Invoke Backing Bean At Page Level
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???
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.
Bring out your dead! Or a tiny ad:
Download Free Java APIs to Work with Office Files and PDF

This thread has been viewed 886 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 12, 2018 11:21:56.