Thanks for your reply, that makes sense. But won't h:commandLink render a
link and h:commandButton render a button in the page? I don't want to
display anything on the screen. My purpose is to initiate a call from the
JSF page to a method in the backing bean when the JSF page loads. I'm
returning an empty string from the method so nothing gets printed out from
<h:outputText>.
----- Original Message -----
From: "Ken" <[EMAIL PROTECTED]>
To: "MyFaces Discussion" <[email protected]>
Sent: Wednesday, August 24, 2005 9:53 PM
Subject: Re: How to call a method in the backing bean from a JSF page
Try h:commandLink or h:commandButton.
If your method returns a string that doesn't match any navigation-rule
in your faces-confix.xml then the same page you came from will be
rendered again.
On 8/24/05, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:
Hi,
I'm wondering what's the correct way to call a method in the backing bean
from a JSF page. What I tried is to use <h:outputText
value="#{theBackingBean.theMethod}" />, the backing bean method returns
an
empty string, so nothing gets printed out in the page. Which works, but I
am
not sure this is the correct way to do it.
thanks,
Saul