Im using a especial protocol (SIP) to open a softphone trough my xhtml page using something like this
<h:outputLink value="sip:123456" />
But is destroying my bean, leaving the page useless, is there a workaround for this? any ideas would be apreciated pd:i also trying with primefaces.
UPDATE
What scope is your bean?
Is a viewscope, and i dont have to pass any parameters, this is a special protocol sip: , what it does is that it opens a program called softphone
How would you do this is normal html?
I corrected the title thanks, in normal html would be something like this <a href="sip:3378984" > call </a>
When will your bean be destroyed? When the page is shown or if you click the link? But, you can't click the link because there is no content to render. How do you check the destroyed bean? Which bean?
when i hit the link it goes to my @Predestroy method, and it opens the softphone program (there is no page to show), after i hit the link the page becomes unusuable, like the links, buttons etc, wont work
i also used primefaces commandlink
<p:commandLink value="prime link" action="#{testBean.redirect()}"/>
public void redirect() throws IOException {
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
externalContext.redirect("sip:123456");
}