Topbar Question

Locked
robert.bruguera
Posts: 7
Joined: 07 Sep 2015, 18:35

06 Oct 2015, 04:46

Hello, I'm trying to use this link to kill a session but it runs every time the page is load. Is there another way?

I tried it this two ways

Code: Select all

<li><a href="#{controller.killSession()}"  ><span class="Red"><i class="icon-vpn_key Fs30 DispBlock"></i> Logout</span></a></li>

Code: Select all

<li><a href="" onclick="#{controller.killSession()}" ><span class="Red"><i class="icon-vpn_key Fs30 DispBlock"></i> Logout</span></a></li>
Thanks

User avatar
aragorn
Posts: 3641
Joined: 29 Jun 2013, 12:38

06 Oct 2015, 12:18

I think you can use jsf:action with JSF2.2 in your xhtml.

Code: Select all

<li>
   <a jsf:action="#{mySession.logout}" ..><i class="fa fa-sign-out"></i> Logout</a>
</li>
More information is at;

http://www.oracle.com/technetwork/artic ... 27136.html
http://www.beyondjava.net/blog/jsf-2-2- ... eat-sheet/

robert.bruguera
Posts: 7
Joined: 07 Sep 2015, 18:35

07 Oct 2015, 03:21

@aragorn. Thank you, that did it.

User avatar
aragorn
Posts: 3641
Joined: 29 Jun 2013, 12:38

07 Oct 2015, 20:27

Glad to hear, thanks ;)

Locked

Return to “Modena”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests