0 Replies Latest reply on Dec 8, 2011 1:15 PM by Rocky S

    How to know current view id from where the request came in?

    Rocky S Master

      On calling particular seam method from h:commandLink, I want to know from which view this request came in.


      I found out couple of ways to find out current view id. Well, all seem to be OK. But still I've to select one.


      1) FacesContext.getCurrentInstance().getViewRoot().getViewId();
      2) Pages.getViewId(FacesContext.getCurrentInstance())
      3) Pages.getCurrentViewId()


      I'm going with Pages.getCurrentViewId().


      Let me know guys if you have other preference and why or does not matters since all are doing the same thing only.