Class SocialConnectedTag

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

    public class SocialConnectedTag
    extends BaseSocialConnectedTag
    JSP Tag to return true/false if you're connected to a provider. Sample usages in JSP: Include at top of JSP: <%@ taglib prefix="social" uri="http://org.springframework/social" %> <social:connected provider="facebook"> [ show some FB profile info ] </social:connected> OR another usage, more suitable for if you need to toggle on a page a connect check or multiple checks need to be made: <c:set var="connectedToFB" value="false"/> <social:connected provider="facebook"> <c:set var="connectedToFB" value="true"/> [ Show Disconnect link ] </social:connected> <c:if test="${!connectedToFB}"> [ Show Connect Button/link/form ] </c:if> Note: You could use social:notConnected tag in place of using c:if and having to set the page scoped connectedToFB var, but it's a bit more efficient to not have to make the FB connection more than once on page
    Author:
    Rick Reumann, Craig Walls
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag

        logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Detail

      • SocialConnectedTag

        public SocialConnectedTag()
    • Method Detail

      • doStartTagInternal

        protected int doStartTagInternal()
                                  throws Exception
        Specified by:
        doStartTagInternal in class org.springframework.web.servlet.tags.RequestContextAwareTag
        Throws:
        Exception