📄 componentdefinition.html
字号:
<PRE>
private <A HREF="../../../../org/apache/struts/tiles/Controller.html">Controller</A> <B>controllerInstance</B></PRE>
<DL>
<DD>Controller associated to Definition. Lazy creation : only on first request</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="ComponentDefinition()"><!-- --></A><H3>
ComponentDefinition</H3>
<PRE>
public <B>ComponentDefinition</B>()</PRE>
<DL>
<DD>Constructor.</DL>
<HR>
<A NAME="ComponentDefinition(org.apache.struts.tiles.ComponentDefinition)"><!-- --></A><H3>
ComponentDefinition</H3>
<PRE>
public <B>ComponentDefinition</B>(<A HREF="../../../../org/apache/struts/tiles/ComponentDefinition.html">ComponentDefinition</A> definition)</PRE>
<DL>
<DD>Copy Constructor. Create a new definition initialized with parent definition. Do a shallow copy : attributes are shared between copies, but not the Map containing attributes.</DL>
<HR>
<A NAME="ComponentDefinition(org.apache.struts.tiles.xmlDefinition.XmlDefinition)"><!-- --></A><H3>
ComponentDefinition</H3>
<PRE>
public <B>ComponentDefinition</B>(<A HREF="../../../../org/apache/struts/tiles/xmlDefinition/XmlDefinition.html">XmlDefinition</A> definition)</PRE>
<DL>
<DD>Constructor. Create a new definition initialized from a RawDefinition. Raw definitions are used to read definition from a data source (xml file, db, ...). A RawDefinition mainly contains properties of type String, while Definition contains more complex type (ex : Controller). Do a shallow copy : attributes are shared between objects, but not the Map containing attributes. OO Design issues : Actually RawDefinition (XmlDefinition) extends ComponentDefinition. This must not be the case. I have do it because I am lazy.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.InstantiationException</CODE> - if an error occur while instanciating Controller : (classname can't be instanciated, Illegal access with instanciated class, Error while instanciating class, classname can't be instanciated.</DL>
</DD>
</DL>
<HR>
<A NAME="ComponentDefinition(java.lang.String, java.lang.String, java.util.Map)"><!-- --></A><H3>
ComponentDefinition</H3>
<PRE>
public <B>ComponentDefinition</B>(java.lang.String name, java.lang.String path, java.util.Map attributes)</PRE>
<DL>
<DD>Constructor.</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public java.lang.String <B>getName</B>()</PRE>
<DL>
<DD>Access method for the name property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current value of the name property</DL>
</DD>
</DL>
<HR>
<A NAME="setName(java.lang.String)"><!-- --></A><H3>
setName</H3>
<PRE>
public void <B>setName</B>(java.lang.String aName)</PRE>
<DL>
<DD>Sets the value of the name property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>aName</CODE> - the new value of the name property</DL>
</DD>
</DL>
<HR>
<A NAME="getPage()"><!-- --></A><H3>
getPage</H3>
<PRE>
public java.lang.String <B>getPage</B>()</PRE>
<DL>
<DD>Access method for the path property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The current value of the path property.</DL>
</DD>
</DL>
<HR>
<A NAME="setPage(java.lang.String)"><!-- --></A><H3>
setPage</H3>
<PRE>
public void <B>setPage</B>(java.lang.String page)</PRE>
<DL>
<DD>Sets the value of the path property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>page</CODE> - the new value of the path property</DL>
</DD>
</DL>
<HR>
<A NAME="getPath()"><!-- --></A><H3>
getPath</H3>
<PRE>
public java.lang.String <B>getPath</B>()</PRE>
<DL>
<DD>Access method for the path property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current value of the path property</DL>
</DD>
</DL>
<HR>
<A NAME="setPath(java.lang.String)"><!-- --></A><H3>
setPath</H3>
<PRE>
public void <B>setPath</B>(java.lang.String aPath)</PRE>
<DL>
<DD>Sets the value of the path property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>aPath</CODE> - the new value of the path property</DL>
</DD>
</DL>
<HR>
<A NAME="getTemplate()"><!-- --></A><H3>
getTemplate</H3>
<PRE>
public java.lang.String <B>getTemplate</B>()</PRE>
<DL>
<DD>Access method for the template property. Same as getPath()<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current value of the template property</DL>
</DD>
</DL>
<HR>
<A NAME="setTemplate(java.lang.String)"><!-- --></A><H3>
setTemplate</H3>
<PRE>
public void <B>setTemplate</B>(java.lang.String template)</PRE>
<DL>
<DD>Sets the value of the template property. Same as setPath()<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>template</CODE> - the new value of the path property</DL>
</DD>
</DL>
<HR>
<A NAME="getRole()"><!-- --></A><H3>
getRole</H3>
<PRE>
public java.lang.String <B>getRole</B>()</PRE>
<DL>
<DD>Access method for the role property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current value of the role property</DL>
</DD>
</DL>
<HR>
<A NAME="setRole(java.lang.String)"><!-- --></A><H3>
setRole</H3>
<PRE>
public void <B>setRole</B>(java.lang.String role)</PRE>
<DL>
<DD>Sets the value of the role property.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>role</CODE> - the new value of the path property</DL>
</DD>
</DL>
<HR>
<A NAME="getAttributes()"><!-- --></A><H3>
getAttributes</H3>
<PRE>
public java.util.Map <B>getAttributes</B>()</PRE>
<DL>
<DD>Access method for the attributes property. If there is no attributes, return an empty map.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the current value of the attributes property</DL>
</DD>
</DL>
<HR>
<A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
public java.lang.Object <B>getAttribute</B>(java.lang.String key)</PRE>
<DL>
<DD>Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>requested attribute or null if not found</DL>
</DD>
</DL>
<HR>
<A NAME="putAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>
putAttribute</H3>
<PRE>
public void <B>putAttribute</B>(java.lang.String key, java.lang.Object value)</PRE>
<DL>
<DD>Put a new attribute in this component<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - String key for attribute<DD><CODE>value</CODE> - Attibute value.</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.lang.Object)"><!-- --></A><H3>
put</H3>
<PRE>
public void <B>put</B>(java.lang.String name, java.lang.Object content)</PRE>
<DL>
<DD>Put an attribute in component / template definition. Attribute can be used as content for tag get.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - Attribute name<DD><CODE>content</CODE> - Attribute value</DL>
</DD>
</DL>
<HR>
<A NAME="put(java.lang.String, java.lang.Object, boolean)"><!-- --></A><H3>
put</H3>
<PRE>
public void <B>put</B>(java.lang.String name, java.lang.Object content, boolean direct)</PRE>
<DL>
<DD>Put an attribute in template definition. Attribute can be used as content for tag get.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - Attribute name<DD><CODE>content</CODE> - Attribute value 锟
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -