1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
5
<!-- Generated by javadoc on Fri Aug 22 03:43:59 EDT 2003 -->
7
ComponentContext (Apache Struts API Documentation)
9
<META NAME="keywords" CONTENT="org.apache.struts.tiles.ComponentContext,ComponentContext class">
10
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
15
parent.document.title="ComponentContext (Apache Struts API Documentation)";
18
<BODY BGCOLOR="white" onload="asd();">
20
<!-- ========== START OF NAVBAR ========== -->
21
<A NAME="navbar_top"><!-- --></A>
22
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
24
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
25
<A NAME="navbar_top_firstrow"><!-- --></A>
26
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
27
<TR ALIGN="center" VALIGN="top">
28
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
29
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
30
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
31
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ComponentContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
32
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
33
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
34
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
35
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
39
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
45
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
46
<A HREF="../../../../org/apache/struts/tiles/ActionController.html"><B>PREV CLASS</B></A>
47
<A HREF="../../../../org/apache/struts/tiles/ComponentDefinition.html"><B>NEXT CLASS</B></A></FONT></TD>
48
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
49
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
50
<A HREF="ComponentContext.html" TARGET="_top"><B>NO FRAMES</B></A>
55
document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
60
<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
65
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
66
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
67
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
68
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
71
<!-- =========== END OF NAVBAR =========== -->
74
<!-- ======== START OF CLASS DATA ======== -->
77
org.apache.struts.tiles</FONT>
79
Class ComponentContext</H2>
83
+--<B>org.apache.struts.tiles.ComponentContext</B>
86
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
90
<DT>public class <B>ComponentContext</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL>
98
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html" TARGET="org.apache.struts.tiles.ComponentContext">Serialized Form</A></DL>
102
<!-- ======== NESTED CLASS SUMMARY ======== -->
105
<!-- =========== FIELD SUMMARY =========== -->
107
<A NAME="field_summary"><!-- --></A>
108
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
109
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
110
<TD COLSPAN=2><FONT SIZE="+2">
111
<B>Field Summary</B></FONT></TD>
113
<TR BGCOLOR="white" CLASS="TableRowColor">
114
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
115
<CODE>private java.util.Map</CODE></FONT></TD>
116
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#attributes">attributes</A></B></CODE>
119
Component attributes.</TD>
121
<TR BGCOLOR="white" CLASS="TableRowColor">
122
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
123
<CODE>private static java.util.Iterator</CODE></FONT></TD>
124
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#EMPTY_ITERATOR">EMPTY_ITERATOR</A></B></CODE>
127
EmptyIterator over component attributes.</TD>
131
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
133
<A NAME="constructor_summary"><!-- --></A>
134
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
135
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
136
<TD COLSPAN=2><FONT SIZE="+2">
137
<B>Constructor Summary</B></FONT></TD>
139
<TR BGCOLOR="white" CLASS="TableRowColor">
140
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#ComponentContext()">ComponentContext</A></B>()</CODE>
143
Constructor.</TD>
145
<TR BGCOLOR="white" CLASS="TableRowColor">
146
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#ComponentContext(org.apache.struts.tiles.ComponentDefinition)">ComponentContext</A></B>(<A HREF="../../../../org/apache/struts/tiles/ComponentDefinition.html">ComponentDefinition</A> instance)</CODE>
149
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#ComponentContext(java.util.Map)"><CODE>ComponentContext(Map attributes)</CODE></A> instead.</I></TD>
151
<TR BGCOLOR="white" CLASS="TableRowColor">
152
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#ComponentContext(java.util.Map)">ComponentContext</A></B>(java.util.Map attributes)</CODE>
155
Constructor.</TD>
159
<!-- ========== METHOD SUMMARY =========== -->
161
<A NAME="method_summary"><!-- --></A>
162
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
163
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
164
<TD COLSPAN=2><FONT SIZE="+2">
165
<B>Method Summary</B></FONT></TD>
167
<TR BGCOLOR="white" CLASS="TableRowColor">
168
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
169
<CODE> void</CODE></FONT></TD>
170
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#addAll(java.util.Map)">addAll</A></B>(java.util.Map newAttributes)</CODE>
173
Add all attributes to this context.</TD>
175
<TR BGCOLOR="white" CLASS="TableRowColor">
176
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177
<CODE> void</CODE></FONT></TD>
178
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#addMissing(java.util.Map)">addMissing</A></B>(java.util.Map defaultAttributes)</CODE>
181
Add all missing attributes to this context.</TD>
183
<TR BGCOLOR="white" CLASS="TableRowColor">
184
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185
<CODE> java.lang.Object</CODE></FONT></TD>
186
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#findAttribute(java.lang.String, javax.servlet.jsp.PageContext)">findAttribute</A></B>(java.lang.String beanName,
187
javax.servlet.jsp.PageContext pageContext)</CODE>
190
Find object in one of the contexts.</TD>
192
<TR BGCOLOR="white" CLASS="TableRowColor">
193
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194
<CODE> java.lang.Object</CODE></FONT></TD>
195
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#getAttribute(java.lang.String)">getAttribute</A></B>(java.lang.String name)</CODE>
198
Get an attribute from context.</TD>
200
<TR BGCOLOR="white" CLASS="TableRowColor">
201
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202
<CODE> java.lang.Object</CODE></FONT></TD>
203
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#getAttribute(java.lang.String, int, javax.servlet.jsp.PageContext)">getAttribute</A></B>(java.lang.String beanName,
205
javax.servlet.jsp.PageContext pageContext)</CODE>
208
Get object from requested context.</TD>
210
<TR BGCOLOR="white" CLASS="TableRowColor">
211
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212
<CODE> java.util.Iterator</CODE></FONT></TD>
213
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#getAttributeNames()">getAttributeNames</A></B>()</CODE>
216
Get names of all attributes.</TD>
218
<TR BGCOLOR="white" CLASS="TableRowColor">
219
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
220
<CODE>static <A HREF="../../../../org/apache/struts/tiles/ComponentContext.html">ComponentContext</A></CODE></FONT></TD>
221
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#getContext(javax.servlet.ServletRequest)">getContext</A></B>(javax.servlet.ServletRequest request)</CODE>
224
Get component context from request.</TD>
226
<TR BGCOLOR="white" CLASS="TableRowColor">
227
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228
<CODE> void</CODE></FONT></TD>
229
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#putAttribute(java.lang.String, java.lang.Object)">putAttribute</A></B>(java.lang.String name,
230
java.lang.Object value)</CODE>
233
Put a new attribute to context.</TD>
235
<TR BGCOLOR="white" CLASS="TableRowColor">
236
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237
<CODE>static void</CODE></FONT></TD>
238
<TD><CODE><B><A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#setContext(org.apache.struts.tiles.ComponentContext, javax.servlet.ServletRequest)">setContext</A></B>(<A HREF="../../../../org/apache/struts/tiles/ComponentContext.html">ComponentContext</A> context,
239
javax.servlet.ServletRequest request)</CODE>
242
Store component context into request.</TD>
245
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
246
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
247
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
248
<TD><B>Methods inherited from class java.lang.Object</B></TD>
250
<TR BGCOLOR="white" CLASS="TableRowColor">
251
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
257
<!-- ============ FIELD DETAIL =========== -->
259
<A NAME="field_detail"><!-- --></A>
260
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
261
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
262
<TD COLSPAN=1><FONT SIZE="+2">
263
<B>Field Detail</B></FONT></TD>
267
<A NAME="attributes"><!-- --></A><H3>
270
private java.util.Map <B>attributes</B></PRE>
272
<DD>Component attributes.
279
<A NAME="EMPTY_ITERATOR"><!-- --></A><H3>
282
private static java.util.Iterator <B>EMPTY_ITERATOR</B></PRE>
284
<DD>EmptyIterator over component attributes.
290
<!-- ========= CONSTRUCTOR DETAIL ======== -->
292
<A NAME="constructor_detail"><!-- --></A>
293
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
294
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
295
<TD COLSPAN=1><FONT SIZE="+2">
296
<B>Constructor Detail</B></FONT></TD>
300
<A NAME="ComponentContext()"><!-- --></A><H3>
301
ComponentContext</H3>
303
public <B>ComponentContext</B>()</PRE>
310
<A NAME="ComponentContext(org.apache.struts.tiles.ComponentDefinition)"><!-- --></A><H3>
311
ComponentContext</H3>
313
public <B>ComponentContext</B>(<A HREF="../../../../org/apache/struts/tiles/ComponentDefinition.html">ComponentDefinition</A> instance)</PRE>
315
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/struts/tiles/ComponentContext.html#ComponentContext(java.util.Map)"><CODE>ComponentContext(Map attributes)</CODE></A> instead.</I>
322
<A NAME="ComponentContext(java.util.Map)"><!-- --></A><H3>
323
ComponentContext</H3>
325
public <B>ComponentContext</B>(java.util.Map attributes)</PRE>
328
Create a context and set specified attributes.
330
<DT><B>Parameters:</B><DD><CODE>attributes</CODE> - Attributes to initialize context.</DL>
332
<!-- ============ METHOD DETAIL ========== -->
334
<A NAME="method_detail"><!-- --></A>
335
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
336
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
337
<TD COLSPAN=1><FONT SIZE="+2">
338
<B>Method Detail</B></FONT></TD>
342
<A NAME="addAll(java.util.Map)"><!-- --></A><H3>
345
public void <B>addAll</B>(java.util.Map newAttributes)</PRE>
347
<DD>Add all attributes to this context.
348
Copies all of the mappings from the specified attribute map to this context.
349
New attribute mappings will replace any mappings that this context had for any of the keys
350
currently in the specified attribute map.
356
<DT><B>Parameters:</B><DD><CODE>newAttributes</CODE> - Attributes to add.</DL>
361
<A NAME="addMissing(java.util.Map)"><!-- --></A><H3>
364
public void <B>addMissing</B>(java.util.Map defaultAttributes)</PRE>
366
<DD>Add all missing attributes to this context.
367
Copies all of the mappings from the specified attributes map to this context.
368
New attribute mappings will be added only if they don't already exist in
375
<DT><B>Parameters:</B><DD><CODE>defaultAttributes</CODE> - Attributes to add.</DL>
380
<A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>
383
public java.lang.Object <B>getAttribute</B>(java.lang.String name)</PRE>
385
<DD>Get an attribute from context.
391
<DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the attribute.
392
<DT><B>Returns:</B><DD><{Object}></DL>
397
<A NAME="getAttributeNames()"><!-- --></A><H3>
398
getAttributeNames</H3>
400
public java.util.Iterator <B>getAttributeNames</B>()</PRE>
402
<DD>Get names of all attributes.
409
<DT><B>Returns:</B><DD><{Object}></DL>
414
<A NAME="putAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>
417
public void <B>putAttribute</B>(java.lang.String name,
418
java.lang.Object value)</PRE>
420
<DD>Put a new attribute to context.
426
<DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the attribute.<DD><CODE>value</CODE> - Value of the attribute.</DL>
431
<A NAME="findAttribute(java.lang.String, javax.servlet.jsp.PageContext)"><!-- --></A><H3>
434
public java.lang.Object <B>findAttribute</B>(java.lang.String beanName,
435
javax.servlet.jsp.PageContext pageContext)</PRE>
437
<DD>Find object in one of the contexts.
438
Order : component then pageContext.findAttribute()
444
<DT><B>Parameters:</B><DD><CODE>beanName</CODE> - Name of the bean to find.<DD><CODE>pageContext</CODE> - Page context.
445
<DT><B>Returns:</B><DD>Requested bean or <code>null</code> if not found.</DL>
450
<A NAME="getAttribute(java.lang.String, int, javax.servlet.jsp.PageContext)"><!-- --></A><H3>
453
public java.lang.Object <B>getAttribute</B>(java.lang.String beanName,
455
javax.servlet.jsp.PageContext pageContext)</PRE>
457
<DD>Get object from requested context.
458
Context can be 'component'.
464
<DT><B>Parameters:</B><DD><CODE>beanName</CODE> - Name of the bean to find.<DD><CODE>scope</CODE> - Search scope (see <CODE>PageContext</CODE>).<DD><CODE>pageContext</CODE> - Page context.
465
<DT><B>Returns:</B><DD>requested bean or <code>null</code> if not found.</DL>
470
<A NAME="getContext(javax.servlet.ServletRequest)"><!-- --></A><H3>
473
public static <A HREF="../../../../org/apache/struts/tiles/ComponentContext.html">ComponentContext</A> <B>getContext</B>(javax.servlet.ServletRequest request)</PRE>
475
<DD>Get component context from request.
481
<DT><B>Parameters:</B><DD><CODE>request</CODE> - ServletRequest.
482
<DT><B>Returns:</B><DD>ComponentContext</DL>
487
<A NAME="setContext(org.apache.struts.tiles.ComponentContext, javax.servlet.ServletRequest)"><!-- --></A><H3>
490
public static void <B>setContext</B>(<A HREF="../../../../org/apache/struts/tiles/ComponentContext.html">ComponentContext</A> context,
491
javax.servlet.ServletRequest request)</PRE>
493
<DD>Store component context into request.
499
<DT><B>Parameters:</B><DD><CODE>context</CODE> - ComponentContext to store.<DD><CODE>request</CODE> - Request to store ComponentContext.</DL>
502
<!-- ========= END OF CLASS DATA ========= -->
505
<!-- ========== START OF NAVBAR ========== -->
506
<A NAME="navbar_bottom"><!-- --></A>
507
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
509
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
510
<A NAME="navbar_bottom_firstrow"><!-- --></A>
511
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
512
<TR ALIGN="center" VALIGN="top">
513
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
514
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
515
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
516
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ComponentContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
517
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
518
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
519
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
520
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
524
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
530
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
531
<A HREF="../../../../org/apache/struts/tiles/ActionController.html"><B>PREV CLASS</B></A>
532
<A HREF="../../../../org/apache/struts/tiles/ComponentDefinition.html"><B>NEXT CLASS</B></A></FONT></TD>
533
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
534
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
535
<A HREF="ComponentContext.html" TARGET="_top"><B>NO FRAMES</B></A>
540
document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
545
<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
550
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
551
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
552
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
553
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
556
<!-- =========== END OF NAVBAR =========== -->
559
Copyright � 2000-2003 - Apache Software Foundation