xlamn
xlamn

Reputation: 21

Click on Growl with link

I'm using jsf and Primefaces and I need some help. I built in my project a IdleMonitor. It will trigger after the timeout a growl and I want to build in a clickable link. But my problem is that I can't add html code into the bean and didn't find anything about actions after clicking on the growl.

enter image description here

    public void onActive() {

      String link = "<a href=\"http://abcd.efg.com\" target=\"_blank\">http://abcd.efg.com</a>";

      FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Deine Session ist abgelaufen", link));
}

xhtml:

<h:form>
        <prime:growl id="messages" showDetail="true" sticky="true" redisplay="false" escape="false"/>
                <prime:idleMonitor timeout="5000">
                    <prime:ajax event="idle" listener="#{idleMonitorView.onActive}" update="messages" />
                    <prime:ajax event="active" listener="#{idleMonitorView.onActive}" update="messages"/>
                </prime:idleMonitor>         
    </h:form>

Upvotes: 0

Views: 374

Answers (0)

Related Questions