Package com.jalios.jcms.taglib
Class LoginTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- com.jalios.jcms.taglib.LoginTag
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
public class LoginTag extends javax.servlet.jsp.tagext.TagSupport
- Author:
- Olivier Jaquemet
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
css
protected boolean
displayLogin
protected boolean
displayLogout
protected boolean
displaySuLogin
protected boolean
displaySuLogout
protected JcmsJspContext
jcmsContext
protected java.lang.String
loginIcon
protected boolean
loginIconProvided
protected java.lang.String
logoutIcon
protected boolean
logoutIconProvided
-
Constructor Summary
Constructors Constructor Description LoginTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clean()
int
doEndTag()
int
doStartTag()
java.lang.String
getCss()
java.lang.String
getLoginIcon()
java.lang.String
getLogoutIcon()
protected void
initIcons()
void
printLogin(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember, boolean displayLinkText)
Prints the login link (icon) to the given string buffer in the given userLang.void
printLoginSuMenu(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember)
Prints the su login context menu links to the given string buffer in the given userLang.
If the loggedMember has some delegation.void
printLogout(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember, boolean displayLinkText)
Prints the logout link (icon) to the given string buffer in the given userLang.void
printLogoutSuMenu(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember)
Prints the logout context menu links to the given string buffer in the given userLang.
If the current session has some su history.void
setCss(java.lang.String css)
void
setDisplayLinkText(boolean b)
void
setDisplayLogin(boolean displayLogin)
void
setDisplayLogout(boolean displayLogout)
void
setDisplaySuLogin(boolean displaySuLogin)
void
setDisplaySuLogout(boolean displaySuLogout)
void
setLoginIcon(java.lang.String customLoginIcon)
void
setLogoutIcon(java.lang.String customLogoutIcon)
-
-
-
Field Detail
-
jcmsContext
protected JcmsJspContext jcmsContext
-
loginIcon
protected java.lang.String loginIcon
-
logoutIcon
protected java.lang.String logoutIcon
-
loginIconProvided
protected boolean loginIconProvided
-
logoutIconProvided
protected boolean logoutIconProvided
-
css
protected java.lang.String css
-
displayLogin
protected boolean displayLogin
-
displayLogout
protected boolean displayLogout
-
displaySuLogin
protected boolean displaySuLogin
-
displaySuLogout
protected boolean displaySuLogout
-
-
Method Detail
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
-
doEndTag
public int doEndTag()
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.TagSupport
-
clean
public void clean()
-
initIcons
protected void initIcons()
-
setDisplayLinkText
public void setDisplayLinkText(boolean b)
-
printLogin
public void printLogin(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember, boolean displayLinkText)
Prints the login link (icon) to the given string buffer in the given userLang.- Parameters:
sb
- the StringBuffer in which HTML will be printedrequest
- current HttpServletRequestuserLang
- the userLang in which to I18N textloggedMember
- current loggedMemberdisplayLinkText
- whether the text normally used for alternative and title text of the icon should also be displayed in the generated link.
-
printLogout
public void printLogout(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember, boolean displayLinkText)
Prints the logout link (icon) to the given string buffer in the given userLang.- Parameters:
sb
- the StringBuffer in which HTML will be printedrequest
- current HttpServletRequestuserLang
- the userLang in which to I18N textloggedMember
- current loggedMemberdisplayLinkText
- whether the text normally used for alternative and title text of the icon should also be displayed in the generated link.
-
printLoginSuMenu
public void printLoginSuMenu(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember)
Prints the su login context menu links to the given string buffer in the given userLang.
If the loggedMember has some delegation.- Parameters:
sb
- the StringBuffer in which HTML will be printedrequest
- current HttpServletRequestuserLang
- the userLang in which to I18N textloggedMember
- current loggedMember
-
printLogoutSuMenu
public void printLogoutSuMenu(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember)
Prints the logout context menu links to the given string buffer in the given userLang.
If the current session has some su history.- Parameters:
sb
- the StringBuffer in which HTML will be printedrequest
- current HttpServletRequestuserLang
- the userLang in which to I18N textloggedMember
- current loggedMember
-
setLoginIcon
public void setLoginIcon(java.lang.String customLoginIcon)
-
setLogoutIcon
public void setLogoutIcon(java.lang.String customLogoutIcon)
-
getLoginIcon
public java.lang.String getLoginIcon()
-
getLogoutIcon
public java.lang.String getLogoutIcon()
-
getCss
public java.lang.String getCss()
-
setCss
public void setCss(java.lang.String css)
-
setDisplayLogin
public void setDisplayLogin(boolean displayLogin)
-
setDisplayLogout
public void setDisplayLogout(boolean displayLogout)
-
setDisplaySuLogin
public void setDisplaySuLogin(boolean displaySuLogin)
-
setDisplaySuLogout
public void setDisplaySuLogout(boolean displaySuLogout)
-
-