i have a working <p:button> that invokes a method inside a managed bean as follows:
        <h:form id="loginForm">
                <p:button value="Facebook Connect"
                    href="#{loginPageCode.facebookUrlAuth}" />
                <br />
                <h:outputText value="#{loginPageCode.userFromSession}"/>
        </h:form>
and i decided to replace it with a link, so i did the following:
      <h:form id="loginForm">
        <h:commandLink action="#{loginPageCode.getFacebookUrlAuth}"
            value="#{loginPageCode.userFromSession}" />
    </h:form>
but unfortunately the <h:commandLink> doesn't invoke the method but i don't know why?
Note: the method inside the managed bean returns a URL to a servlet, so the commandLink have to call these servlet when its clicked using the URL returned>
 
     
     
    