com.mslinn.JBrowCaps
Class JBrowCapsTagExtraInfo
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagExtraInfo
|
+--com.mslinn.JBrowCaps.JBrowCapsTagExtraInfo
- public class JBrowCapsTagExtraInfo
- extends TagExtraInfo
This class is only called at translation time and for page validation. The translation time call
is the important one.
Sample usage:
<jbc:useCss cssFile='<%=getServletContext().getRealPath("EN.css")%>'
stylesheet="url" // url points to the same stylesheet file as specified for cssFile
strict="false" // optional
declare="h1, h2" // optional
debug="true" /> // optional
This class reads the stylesheet pointed to by cssFile
and parses the selector names out,
then uses the selector names to define scripting variables in the calling JSP. Because each
selector results in three scripting variables, and because not every JSP requires access to every
selector, the JSP author has the ability to request that only a subset of the selectors be returned via
the declare
attribute. If declare
is not specified, all selectors are
defined.
The debug
attribute is interpreted as a boolean that controls debug output.
Efficiency would be improved if pageContext
could be passed in to this class via the
getVariableInfo()
method from a runtime evaluated parameter, unfortunately there appears
to be a TomCat bug that prevents this.
If it were possible, the method would check the application scope to see if the parsed stylesheet bean
was already stored, otherwise it would parse the stylesheet and store the results as an application
scope bean.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JBrowCapsTagExtraInfo
public JBrowCapsTagExtraInfo()
getVariableInfo
public VariableInfo[] getVariableInfo(TagData data)
- Called at translation time by jasper.
- Overrides:
getVariableInfo
in class TagExtraInfo
replaceAll
public static String replaceAll(String s,
String oldStr,
String newStr)
Substitute newStr for oldStr in s.
Written 2001 by Mike Slinn. All rights reserved.
4230 Wooster Ave, San Mateo, CA 94403.
Tel: 650-571-8436 www.mslinn.com