View Javadoc

1   // WARNING: This file was automatically generated. Do not edit it directly,
2   //          or you will lose your changes.
3   
4   /*
5    * Licensed to the Apache Software Foundation (ASF) under one
6    * or more contributor license agreements.  See the NOTICE file
7    * distributed with this work for additional information
8    * regarding copyright ownership.  The ASF licenses this file
9    * to you under the Apache License, Version 2.0 (the
10   * "License"); you may not use this file except in compliance
11   * with the License.  You may obtain a copy of the License at
12   *
13   *   http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing,
16   * software distributed under the License is distributed on an
17   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18   * KIND, either express or implied.  See the License for the
19   * specific language governing permissions and limitations
20   * under the License.
21  */
22  package org.apache.myfaces.trinidad.component.core.data;
23  
24  import java.util.Arrays;
25  import java.util.Collection;
26  import java.util.Collections;
27  import java.util.List;
28  import java.util.Map;
29  import javax.faces.component.behavior.ClientBehavior;
30  import javax.faces.component.behavior.ClientBehaviorHolder;
31  import org.apache.myfaces.trinidad.bean.FacesBean;
32  import org.apache.myfaces.trinidad.bean.PropertyKey;
33  import org.apache.myfaces.trinidad.component.UIXColumn;
34  import org.apache.myfaces.trinidad.util.ComponentUtils;
35  
36  /**
37   *
38   * <P>
39   *             The immediate children of a Table component must all be
40   *             <code>&lt;tr:column&gt;</code> components. Each visible Trinidad Column
41   *             component creates a separate column in the Table.
42   *           </P>
43   *           <P>
44   *             Use the &quot;header&quot; facet on a Column to create the column header.
45   *             The following example creates a two-column table with the column headers -
46   *             &quot;Firstname&quot; and &quot;Lastname&quot;:
47   *           </P>
48   *           <pre>
49   *   &lt;tr:table&gt;
50   *     &lt;tr:column&gt;
51   *       &lt;f:facet name="header"&gt;
52   *         &lt;tr:outputText value="Firstname"/&gt;
53   *       &lt;/f:facet&gt;
54   *       ...
55   *     &lt;/tr:column&gt;
56   *     &lt;tr:column&gt;
57   *       &lt;f:facet name="header"&gt;
58   *         &lt;tr:outputText value="Lastname"/&gt;
59   *       &lt;/f:facet&gt;
60   *       ...
61   *     &lt;/tr:column&gt;
62   *   &lt;/tr:table&gt;
63   *           </pre>
64   *           <P>
65   *             The child components of each Column display the data for each row in
66   *             that column. The Column does not create child components per row;
67   *             instead, each child is repeatedly rendered (stamped) once per
68   *             row. Because of this stamping behavior, only certain types of
69   *             components are supported as children inside a Column. Supported
70   *             components include all components with no behavior and most
71   *             components that implement the EditableValueHolder or ActionSource
72   *             interfaces.
73   *           </P>
74   *           <P>
75   *             As each row is stamped, the data for the current row ( see
76   *             <code>getRowData()</code> on the Table)
77   *             is copied into an EL reachable property.
78   *             The name of this property is defined by the <code>var</code>
79   *             property on the Table. Once the Table has completed rendering, this
80   *             property is removed (or reverted back to its previous value). In
81   *             the following example, the data for each row is placed under the EL
82   *             property &quot;row&quot;. Each Column displays the data for each row by getting
83   *             further properties from the &quot;row&quot; property:
84   *           </P>
85   *           <pre>
86   *   &lt;tr:table var="row" value="#{myBean.employees}"&gt;
87   *     &lt;tr:column&gt;
88   *       &lt;tr:outputText value="#{row.firstname}"/&gt;
89   *     &lt;/tr:column&gt;
90   *     &lt;tr:column&gt;
91   *       tr:outputText value="#{row.lastname}"/&gt;
92   *     &lt;/tr:column&gt;
93   *   &lt;/tr:table&gt;
94   *           </pre>
95   * 
96   *           <section name="Formatting">
97   *             <p>
98   *               The Column component supports the following attributes related to
99   *               formatting:
100  *               <dl>
101  *                 <dt>align</dt>
102  * 
103  *                 <dd>The type of alignment to use for this column. This
104  *                 atribute controls left/start, right/end, or center justification of the
105  *                 column data.
106  *                 </dd>
107  * 
108  *                 <dt>width</dt>
109  *                 <dd>The width of this column.
110  *                 </dd>
111  * 
112  *                 <dt>noWrap</dt>
113  *                 <dd>Controls whether long lines of text in the column data should
114  *                 be wrapped.</dd>
115  * 
116  *                 <dt>headerNoWrap</dt>
117  *                 <dd>Controls whether long lines of text in the column header should
118  *                   be wrapped.</dd>
119  * 
120  *                 <dt>separateRows</dt> <dd>Controls whether each child of this
121  *                 column should be rendered in separate cells, or inside the same
122  *                 cell.</dd>
123  *               </dl>
124  *             </p>
125  *           </section>
126  * 
127  *           <section name="Sorting">
128  *             <P>
129  *               In order to make this Column sortable, set the &quot;sortable&quot;
130  *               property to true and set &quot;sortProperty&quot; to the name of the
131  *               model that this column will sort.  Sorting can be programatically
132  *               turned on with the <code>setSortCritiera()</code> method on the\
133  *               table.
134  *             </P>
135  *           </section>
136  * 
137  *           <section name="Column Groups">
138  *             <P>
139  *               <code>&lt;tr:column&gt; </code> tags can be nested to produce
140  *               groups of columns. The header of a column group spans across
141  *               all the columns it contains. The following example creates
142  *               a column group that has the header &quot;Name&quot; and contains
143  *               two sub columns with headers &quot;First&quot; and &quot;Last&quot;:
144  *             </P>
145  *           <pre>
146  *   &lt;tr:table var="row" value="#{myBean.employees}"&gt;
147  *     &lt;tr:column&gt;
148  *       &lt;f:facet name="header"&gt;
149  *         &lt;tr:outputText value="Name"/&gt;
150  *       &lt;/f:facet&gt;
151  *       &lt;tr:column&gt;
152  *         &lt;f:facet name="header"&gt;
153  *           &lt;tr:outputText value="First"/&gt;
154  *         &lt;/f:facet&gt;
155  *         &lt;tr:outputText value="#{row.firstname}"/&gt;
156  *       &lt;/tr:column&gt;
157  *       &lt;tr:column&gt;
158  *         &lt;f:facet name="header"&gt;
159  *           &lt;tr:outputText value="Last"/&gt;
160  *         &lt;/f:facet&gt;
161  *         tr:outputText value="#{row.lastname}"/&gt;
162  *       &lt;/tr:column&gt;
163  *     &lt;/tr:column&gt;
164  *   &lt;/tr:table&gt;
165  *           </pre>
166  *           </section>
167  *
168  * <h4>Events:</h4>
169  * <table border="1" width="100%" cellpadding="3" summary="">
170  * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
171  * <th align="left">Type</th>
172  * <th align="left">Phases</th>
173  * <th align="left">Description</th>
174  * </tr>
175  * <tr class="TableRowColor">
176  * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
177  * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
178  * <td valign="top">Event delivered to describe an attribute change.  Attribute change events are not delivered for any programmatic change to a property.  They are only delivered when a renderer changes a property without the application's specific request.  An example of an attribute change event might include the width of a column that supported client-side resizing.</td>
179  * </tr>
180  * </table>
181  */
182 public class CoreColumn extends UIXColumn
183                         implements ClientBehaviorHolder
184 {
185   static public final String ALIGN_START = "start";
186   static public final String ALIGN_END = "end";
187   static public final String ALIGN_CENTER = "center";
188   static public final String ALIGN_LEFT = "left";
189   static public final String ALIGN_RIGHT = "right";
190   static public final String DEFAULT_SORT_ORDER_ASCENDING = "ascending";
191   static public final String DEFAULT_SORT_ORDER_DESCENDING = "descending";
192   static public final FacesBean.Type TYPE = new FacesBean.Type(
193     UIXColumn.TYPE);
194   static public final PropertyKey INLINE_STYLE_KEY =
195     TYPE.registerKey("inlineStyle", String.class);
196   static public final PropertyKey STYLE_CLASS_KEY =
197     TYPE.registerKey("styleClass", String.class);
198   static public final PropertyKey SHORT_DESC_KEY =
199     TYPE.registerKey("shortDesc", String.class);
200   static public final PropertyKey PARTIAL_TRIGGERS_KEY =
201     TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
202   static public final PropertyKey ONCLICK_KEY =
203     TYPE.registerKey("onclick", String.class);
204   static public final PropertyKey ONDBLCLICK_KEY =
205     TYPE.registerKey("ondblclick", String.class);
206   static public final PropertyKey ONMOUSEDOWN_KEY =
207     TYPE.registerKey("onmousedown", String.class);
208   static public final PropertyKey ONMOUSEUP_KEY =
209     TYPE.registerKey("onmouseup", String.class);
210   static public final PropertyKey ONMOUSEOVER_KEY =
211     TYPE.registerKey("onmouseover", String.class);
212   static public final PropertyKey ONMOUSEMOVE_KEY =
213     TYPE.registerKey("onmousemove", String.class);
214   static public final PropertyKey ONMOUSEOUT_KEY =
215     TYPE.registerKey("onmouseout", String.class);
216   static public final PropertyKey ONKEYPRESS_KEY =
217     TYPE.registerKey("onkeypress", String.class);
218   static public final PropertyKey ONKEYDOWN_KEY =
219     TYPE.registerKey("onkeydown", String.class);
220   static public final PropertyKey ONKEYUP_KEY =
221     TYPE.registerKey("onkeyup", String.class);
222   static public final PropertyKey ALIGN_KEY =
223     TYPE.registerKey("align", String.class, "start");
224   static public final PropertyKey DEFAULT_SORT_ORDER_KEY =
225     TYPE.registerKey("defaultSortOrder", String.class, "ascending");
226   static public final PropertyKey WIDTH_KEY =
227     TYPE.registerKey("width", String.class);
228   static public final PropertyKey HEADER_TEXT_KEY =
229     TYPE.registerKey("headerText", String.class);
230   static public final PropertyKey NO_WRAP_KEY =
231     TYPE.registerKey("noWrap", Boolean.class, Boolean.FALSE);
232   static public final PropertyKey HEADER_NO_WRAP_KEY =
233     TYPE.registerKey("headerNoWrap", Boolean.class, Boolean.FALSE);
234   static public final PropertyKey SORTABLE_KEY =
235     TYPE.registerKey("sortable", Boolean.class, Boolean.FALSE);
236   static public final PropertyKey SEPARATE_ROWS_KEY =
237     TYPE.registerKey("separateRows", Boolean.class, Boolean.FALSE);
238   static public final PropertyKey ROW_HEADER_KEY =
239     TYPE.registerKey("rowHeader", Boolean.class, Boolean.FALSE);
240 
241   static public final String COMPONENT_FAMILY =
242     "org.apache.myfaces.trinidad.Column";
243   static public final String COMPONENT_TYPE =
244     "org.apache.myfaces.trinidad.CoreColumn";
245   // Supported client events for client behaviors:
246   private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
247     Arrays.asList(
248       "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove",
249       "mouseout", "keypress", "keydown", "keyup"
250     ));
251 
252   /**
253    * Construct an instance of the CoreColumn.
254    */
255   public CoreColumn()
256   {
257     super("org.apache.myfaces.trinidad.Column");
258   }
259 
260   /**
261    * Gets the CSS styles to use for this component.
262    *
263    * @return  the new inlineStyle value
264    */
265   final public String getInlineStyle()
266   {
267     return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
268   }
269 
270   /**
271    * Sets the CSS styles to use for this component.
272    * 
273    * @param inlineStyle  the new inlineStyle value
274    */
275   final public void setInlineStyle(String inlineStyle)
276   {
277     setProperty(INLINE_STYLE_KEY, (inlineStyle));
278   }
279 
280   /**
281    * Gets a CSS style class to use for this component.
282    *
283    * @return  the new styleClass value
284    */
285   final public String getStyleClass()
286   {
287     return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
288   }
289 
290   /**
291    * Sets a CSS style class to use for this component.
292    * 
293    * @param styleClass  the new styleClass value
294    */
295   final public void setStyleClass(String styleClass)
296   {
297     setProperty(STYLE_CLASS_KEY, (styleClass));
298   }
299 
300   /**
301    * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
302    *
303    * @return  the new shortDesc value
304    */
305   final public String getShortDesc()
306   {
307     return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
308   }
309 
310   /**
311    * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
312    * 
313    * @param shortDesc  the new shortDesc value
314    */
315   final public void setShortDesc(String shortDesc)
316   {
317     setProperty(SHORT_DESC_KEY, (shortDesc));
318   }
319 
320   /**
321    * Gets the IDs of the components that should trigger a partial update.
322    *         <p>
323    *         This component will listen on the trigger components. If one of the
324    *         trigger components receives an event that will cause it to update
325    *         in some way, this component will request to be updated too.</p>
326    *         <p>
327    *         Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
328    *         </p>
329    *         <p>
330    *         Identifiers must account for NamingContainers.  You can use a single colon to start the search from the root,
331    *         or use multiple colons to move up through the NamingContainer. For example,
332    *         "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), 
333    *         ":::" will pop out of two naming containers, etc. The search for
334    *         the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the 
335    *         component with id = commandButton1 after popping out of two naming containers relative to this component.
336    *         To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
337    *
338    * @return  the new partialTriggers value
339    */
340   final public String[] getPartialTriggers()
341   {
342     return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
343   }
344 
345   /**
346    * Sets the IDs of the components that should trigger a partial update.
347    *         <p>
348    *         This component will listen on the trigger components. If one of the
349    *         trigger components receives an event that will cause it to update
350    *         in some way, this component will request to be updated too.</p>
351    *         <p>
352    *         Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
353    *         </p>
354    *         <p>
355    *         Identifiers must account for NamingContainers.  You can use a single colon to start the search from the root,
356    *         or use multiple colons to move up through the NamingContainer. For example,
357    *         "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), 
358    *         ":::" will pop out of two naming containers, etc. The search for
359    *         the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the 
360    *         component with id = commandButton1 after popping out of two naming containers relative to this component.
361    *         To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
362    * 
363    * @param partialTriggers  the new partialTriggers value
364    */
365   final public void setPartialTriggers(String[] partialTriggers)
366   {
367     setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
368   }
369 
370   /**
371    * Gets an onclick Javascript handler.
372    *
373    * @return  the new onclick value
374    */
375   final public String getOnclick()
376   {
377     return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
378   }
379 
380   /**
381    * Sets an onclick Javascript handler.
382    * 
383    * @param onclick  the new onclick value
384    */
385   final public void setOnclick(String onclick)
386   {
387     setProperty(ONCLICK_KEY, (onclick));
388   }
389 
390   /**
391    * Gets an ondblclick Javascript handler.
392    *
393    * @return  the new ondblclick value
394    */
395   final public String getOndblclick()
396   {
397     return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
398   }
399 
400   /**
401    * Sets an ondblclick Javascript handler.
402    * 
403    * @param ondblclick  the new ondblclick value
404    */
405   final public void setOndblclick(String ondblclick)
406   {
407     setProperty(ONDBLCLICK_KEY, (ondblclick));
408   }
409 
410   /**
411    * Gets an onmousedown Javascript handler.
412    *
413    * @return  the new onmousedown value
414    */
415   final public String getOnmousedown()
416   {
417     return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
418   }
419 
420   /**
421    * Sets an onmousedown Javascript handler.
422    * 
423    * @param onmousedown  the new onmousedown value
424    */
425   final public void setOnmousedown(String onmousedown)
426   {
427     setProperty(ONMOUSEDOWN_KEY, (onmousedown));
428   }
429 
430   /**
431    * Gets an onmouseup Javascript handler.
432    *
433    * @return  the new onmouseup value
434    */
435   final public String getOnmouseup()
436   {
437     return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
438   }
439 
440   /**
441    * Sets an onmouseup Javascript handler.
442    * 
443    * @param onmouseup  the new onmouseup value
444    */
445   final public void setOnmouseup(String onmouseup)
446   {
447     setProperty(ONMOUSEUP_KEY, (onmouseup));
448   }
449 
450   /**
451    * Gets an onmouseover Javascript handler.
452    *
453    * @return  the new onmouseover value
454    */
455   final public String getOnmouseover()
456   {
457     return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
458   }
459 
460   /**
461    * Sets an onmouseover Javascript handler.
462    * 
463    * @param onmouseover  the new onmouseover value
464    */
465   final public void setOnmouseover(String onmouseover)
466   {
467     setProperty(ONMOUSEOVER_KEY, (onmouseover));
468   }
469 
470   /**
471    * Gets an onmousemove Javascript handler.
472    *
473    * @return  the new onmousemove value
474    */
475   final public String getOnmousemove()
476   {
477     return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
478   }
479 
480   /**
481    * Sets an onmousemove Javascript handler.
482    * 
483    * @param onmousemove  the new onmousemove value
484    */
485   final public void setOnmousemove(String onmousemove)
486   {
487     setProperty(ONMOUSEMOVE_KEY, (onmousemove));
488   }
489 
490   /**
491    * Gets an onmouseout Javascript handler.
492    *
493    * @return  the new onmouseout value
494    */
495   final public String getOnmouseout()
496   {
497     return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
498   }
499 
500   /**
501    * Sets an onmouseout Javascript handler.
502    * 
503    * @param onmouseout  the new onmouseout value
504    */
505   final public void setOnmouseout(String onmouseout)
506   {
507     setProperty(ONMOUSEOUT_KEY, (onmouseout));
508   }
509 
510   /**
511    * Gets an onkeypress Javascript handler.
512    *
513    * @return  the new onkeypress value
514    */
515   final public String getOnkeypress()
516   {
517     return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
518   }
519 
520   /**
521    * Sets an onkeypress Javascript handler.
522    * 
523    * @param onkeypress  the new onkeypress value
524    */
525   final public void setOnkeypress(String onkeypress)
526   {
527     setProperty(ONKEYPRESS_KEY, (onkeypress));
528   }
529 
530   /**
531    * Gets an onkeydown Javascript handler.
532    *
533    * @return  the new onkeydown value
534    */
535   final public String getOnkeydown()
536   {
537     return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
538   }
539 
540   /**
541    * Sets an onkeydown Javascript handler.
542    * 
543    * @param onkeydown  the new onkeydown value
544    */
545   final public void setOnkeydown(String onkeydown)
546   {
547     setProperty(ONKEYDOWN_KEY, (onkeydown));
548   }
549 
550   /**
551    * Gets an onkeyup Javascript handler.
552    *
553    * @return  the new onkeyup value
554    */
555   final public String getOnkeyup()
556   {
557     return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
558   }
559 
560   /**
561    * Sets an onkeyup Javascript handler.
562    * 
563    * @param onkeyup  the new onkeyup value
564    */
565   final public void setOnkeyup(String onkeyup)
566   {
567     setProperty(ONKEYUP_KEY, (onkeyup));
568   }
569 
570   /**
571    * Gets The alignment for this column. The legal values are "start", "end" and "center", for left-justified, right-justified, and center-justified respectively in LTR display. The default value is "start".
572    *
573    * @return  the new align value
574    */
575   final public String getAlign()
576   {
577     return ComponentUtils.resolveString(getProperty(ALIGN_KEY), "start");
578   }
579 
580   /**
581    * Sets The alignment for this column. The legal values are "start", "end" and "center", for left-justified, right-justified, and center-justified respectively in LTR display. The default value is "start".
582    * 
583    * @param align  the new align value
584    */
585   final public void setAlign(String align)
586   {
587     setProperty(ALIGN_KEY, (align));
588   }
589 
590   /**
591    * Gets The default sort order of the column. The legal values are "ascending" or "descending" for ascending sorting or descending sorting on a first click respectively. The default value is "ascending".
592    *
593    * @return  the new defaultSortOrder value
594    */
595   final public String getDefaultSortOrder()
596   {
597     return ComponentUtils.resolveString(getProperty(DEFAULT_SORT_ORDER_KEY), "ascending");
598   }
599 
600   /**
601    * Sets The default sort order of the column. The legal values are "ascending" or "descending" for ascending sorting or descending sorting on a first click respectively. The default value is "ascending".
602    * 
603    * @param defaultSortOrder  the new defaultSortOrder value
604    */
605   final public void setDefaultSortOrder(String defaultSortOrder)
606   {
607     setProperty(DEFAULT_SORT_ORDER_KEY, (defaultSortOrder));
608   }
609 
610   /**
611    * Gets the preferred width of this column, e.g., "30%", "100px".
612    *
613    * @return  the new width value
614    */
615   final public String getWidth()
616   {
617     return ComponentUtils.resolveString(getProperty(WIDTH_KEY));
618   }
619 
620   /**
621    * Sets the preferred width of this column, e.g., "30%", "100px".
622    * 
623    * @param width  the new width value
624    */
625   final public void setWidth(String width)
626   {
627     setProperty(WIDTH_KEY, (width));
628   }
629 
630   /**
631    * Gets text to display in the header of the column.  This is a convenience that generates output equivalent to adding a "header" facet containing an outputText.
632    *
633    * @return  the new headerText value
634    */
635   final public String getHeaderText()
636   {
637     return ComponentUtils.resolveString(getProperty(HEADER_TEXT_KEY));
638   }
639 
640   /**
641    * Sets text to display in the header of the column.  This is a convenience that generates output equivalent to adding a "header" facet containing an outputText.
642    * 
643    * @param headerText  the new headerText value
644    */
645   final public void setHeaderText(String headerText)
646   {
647     setProperty(HEADER_TEXT_KEY, (headerText));
648   }
649 
650   /**
651    * Gets whether or not the column contents should be allowed to wrap
652    *
653    * @return  the new noWrap value
654    */
655   final public boolean isNoWrap()
656   {
657     return ComponentUtils.resolveBoolean(getProperty(NO_WRAP_KEY), false);
658   }
659 
660   /**
661    * Sets whether or not the column contents should be allowed to wrap
662    * 
663    * @param noWrap  the new noWrap value
664    */
665   final public void setNoWrap(boolean noWrap)
666   {
667     setProperty(NO_WRAP_KEY, noWrap ? Boolean.TRUE : Boolean.FALSE);
668   }
669 
670   /**
671    * Gets whether or not the column header
672    * should be allowed to wrap
673    *
674    * @return  the new headerNoWrap value
675    */
676   final public boolean isHeaderNoWrap()
677   {
678     return ComponentUtils.resolveBoolean(getProperty(HEADER_NO_WRAP_KEY), false);
679   }
680 
681   /**
682    * Sets whether or not the column header
683    * should be allowed to wrap
684    * 
685    * @param headerNoWrap  the new headerNoWrap value
686    */
687   final public void setHeaderNoWrap(boolean headerNoWrap)
688   {
689     setProperty(HEADER_NO_WRAP_KEY, headerNoWrap ? Boolean.TRUE : Boolean.FALSE);
690   }
691 
692   /**
693    * Gets <html>whether or not the column is sortable. A sortable column has a clickable header that (when clicked) sorts the table by that column's property. Note that in order for a column to be sortable, this attribute must be set to "true" and the underlying model must support sorting by this column's property. <p> This column's "sortProperty" attribute must be set if sorting is desired.</p></html>
694    *
695    * @return  the new sortable value
696    */
697   final public boolean isSortable()
698   {
699     return ComponentUtils.resolveBoolean(getProperty(SORTABLE_KEY), false);
700   }
701 
702   /**
703    * Sets <html>whether or not the column is sortable. A sortable column has a clickable header that (when clicked) sorts the table by that column's property. Note that in order for a column to be sortable, this attribute must be set to "true" and the underlying model must support sorting by this column's property. <p> This column's "sortProperty" attribute must be set if sorting is desired.</p></html>
704    * 
705    * @param sortable  the new sortable value
706    */
707   final public void setSortable(boolean sortable)
708   {
709     setProperty(SORTABLE_KEY, sortable ? Boolean.TRUE : Boolean.FALSE);
710   }
711 
712   /**
713    * Gets whether or not the children of this column should be rendered on separate rows. Setting this attribute to true will cause each child to render in its own row. Setting this to false will cause all the children to be rendered in one cell, which will rowSpan across the rows of the Columns whose children are rendered on separate rows.
714    *
715    * @return  the new separateRows value
716    */
717   final public boolean isSeparateRows()
718   {
719     return ComponentUtils.resolveBoolean(getProperty(SEPARATE_ROWS_KEY), false);
720   }
721 
722   /**
723    * Sets whether or not the children of this column should be rendered on separate rows. Setting this attribute to true will cause each child to render in its own row. Setting this to false will cause all the children to be rendered in one cell, which will rowSpan across the rows of the Columns whose children are rendered on separate rows.
724    * 
725    * @param separateRows  the new separateRows value
726    */
727   final public void setSeparateRows(boolean separateRows)
728   {
729     setProperty(SEPARATE_ROWS_KEY, separateRows ? Boolean.TRUE : Boolean.FALSE);
730   }
731 
732   /**
733    * Gets Whether or not this column is a row header column.
734    *
735    * @return  the new rowHeader value
736    */
737   final public boolean isRowHeader()
738   {
739     return ComponentUtils.resolveBoolean(getProperty(ROW_HEADER_KEY), false);
740   }
741 
742   /**
743    * Sets Whether or not this column is a row header column.
744    * 
745    * @param rowHeader  the new rowHeader value
746    */
747   final public void setRowHeader(boolean rowHeader)
748   {
749     setProperty(ROW_HEADER_KEY, rowHeader ? Boolean.TRUE : Boolean.FALSE);
750   }
751 
752   @Override
753   public String getDefaultEventName()
754   {
755     return "click";
756   }
757 
758   @Override
759   public Collection<String> getEventNames()
760   {
761     return _EVENT_NAMES;
762   }
763 
764   @Override
765   public Map<String, List<ClientBehavior>> getClientBehaviors()
766   {
767     return super.getClientBehaviors();
768   }
769 
770   @Override
771   public void addClientBehavior(
772     String         eventName,
773     ClientBehavior behavior)
774   {
775     super.addClientBehavior(eventName, behavior);
776   }
777 
778   @Override
779   public String getFamily()
780   {
781     return COMPONENT_FAMILY;
782   }
783 
784   @Override
785   protected FacesBean.Type getBeanType()
786   {
787     return TYPE;
788   }
789 
790   /**
791    * Construct an instance of the CoreColumn.
792    */
793   protected CoreColumn(
794     String rendererType
795     )
796   {
797     super(rendererType);
798   }
799 
800   static
801   {
802     TYPE.lockAndRegister("org.apache.myfaces.trinidad.Column","org.apache.myfaces.trinidad.Column");
803   }
804 }