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.nav;
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.UIXCommand;
34 import org.apache.myfaces.trinidad.util.ComponentUtils;
35
36 /**
37 *
38 * <html:p>
39 * The commandNavigationItem control creates a navigation item representation of a UIXCommand.
40 * The item could be rendered as a link, an option, a button, etc.
41 * This component is normally used as a stamp for a component that takes a MenuModel or
42 * XMLMenuModel object.
43 * </html:p>
44 *
45 * <h4>Events:</h4>
46 * <table border="1" width="100%" cellpadding="3" summary="">
47 * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
48 * <th align="left">Type</th>
49 * <th align="left">Phases</th>
50 * <th align="left">Description</th>
51 * </tr>
52 * <tr class="TableRowColor">
53 * <td valign="top"><code>javax.faces.event.ActionEvent</code></td>
54 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
55 * <td valign="top">Event delivered when the "action" of the component has been
56 invoked; for example, by clicking on a button. The action may result
57 in page navigation.</td>
58 * </tr>
59 * <tr class="TableRowColor">
60 * <td valign="top"><code>org.apache.myfaces.trinidad.event.ReturnEvent</code></td>
61 * <td valign="top" nowrap>Apply<br>Request<br>Values</td>
62 * <td valign="top">Event delivered when the dialog has completed successfully.</td>
63 * </tr>
64 * <tr class="TableRowColor">
65 * <td valign="top"><code>org.apache.myfaces.trinidad.event.LaunchEvent</code></td>
66 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
67 * <td valign="top">Event delivered to prompt the command to launch a dialog.</td>
68 * </tr>
69 * <tr class="TableRowColor">
70 * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
71 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
72 * <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>
73 * </tr>
74 * </table>
75 */
76 public class CoreCommandNavigationItem extends UIXCommand
77 implements ClientBehaviorHolder
78 {
79 static public final FacesBean.Type TYPE = new FacesBean.Type(
80 UIXCommand.TYPE);
81 static public final PropertyKey INLINE_STYLE_KEY =
82 TYPE.registerKey("inlineStyle", String.class);
83 static public final PropertyKey STYLE_CLASS_KEY =
84 TYPE.registerKey("styleClass", String.class);
85 static public final PropertyKey SHORT_DESC_KEY =
86 TYPE.registerKey("shortDesc", String.class);
87 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
88 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
89 static public final PropertyKey USE_WINDOW_KEY =
90 TYPE.registerKey("useWindow", Boolean.class, Boolean.FALSE);
91 static public final PropertyKey WINDOW_HEIGHT_KEY =
92 TYPE.registerKey("windowHeight", Integer.class);
93 static public final PropertyKey WINDOW_WIDTH_KEY =
94 TYPE.registerKey("windowWidth", Integer.class);
95 static public final PropertyKey ONCLICK_KEY =
96 TYPE.registerKey("onclick", String.class);
97 static public final PropertyKey ONDBLCLICK_KEY =
98 TYPE.registerKey("ondblclick", String.class);
99 static public final PropertyKey ONMOUSEDOWN_KEY =
100 TYPE.registerKey("onmousedown", String.class);
101 static public final PropertyKey ONMOUSEUP_KEY =
102 TYPE.registerKey("onmouseup", String.class);
103 static public final PropertyKey ONMOUSEOVER_KEY =
104 TYPE.registerKey("onmouseover", String.class);
105 static public final PropertyKey ONMOUSEMOVE_KEY =
106 TYPE.registerKey("onmousemove", String.class);
107 static public final PropertyKey ONMOUSEOUT_KEY =
108 TYPE.registerKey("onmouseout", String.class);
109 static public final PropertyKey ONKEYPRESS_KEY =
110 TYPE.registerKey("onkeypress", String.class);
111 static public final PropertyKey ONKEYDOWN_KEY =
112 TYPE.registerKey("onkeydown", String.class);
113 static public final PropertyKey ONKEYUP_KEY =
114 TYPE.registerKey("onkeyup", String.class);
115 static public final PropertyKey ACCESS_KEY_KEY =
116 TYPE.registerKey("accessKey", Character.class);
117 static public final PropertyKey DESTINATION_KEY =
118 TYPE.registerKey("destination", String.class);
119 static public final PropertyKey DISABLED_KEY =
120 TYPE.registerKey("disabled", Boolean.class, Boolean.FALSE);
121 static public final PropertyKey ICON_KEY =
122 TYPE.registerKey("icon", String.class);
123 static public final PropertyKey PARTIAL_SUBMIT_KEY =
124 TYPE.registerKey("partialSubmit", Boolean.class, Boolean.FALSE);
125 static public final PropertyKey SELECTED_KEY =
126 TYPE.registerKey("selected", Boolean.class, Boolean.FALSE);
127 static public final PropertyKey VISITED_KEY =
128 TYPE.registerKey("visited", Boolean.class, Boolean.FALSE);
129 static public final PropertyKey TARGET_FRAME_KEY =
130 TYPE.registerKey("targetFrame", String.class);
131 static public final PropertyKey TEXT_KEY =
132 TYPE.registerKey("text", String.class);
133
134 static public final String COMPONENT_FAMILY =
135 "org.apache.myfaces.trinidad.Command";
136 static public final String COMPONENT_TYPE =
137 "org.apache.myfaces.trinidad.CoreCommandNavigationItem";
138 // Supported client events for client behaviors:
139 private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
140 Arrays.asList(
141 "action", "click", "dblclick", "mousedown", "mouseup", "mouseover",
142 "mousemove", "mouseout", "keypress", "keydown", "keyup"
143 ));
144
145 /**
146 * Construct an instance of the CoreCommandNavigationItem.
147 */
148 public CoreCommandNavigationItem()
149 {
150 super("org.apache.myfaces.trinidad.NavigationItem");
151 }
152
153 /**
154 * Gets the CSS styles to use for this component.
155 *
156 * @return the new inlineStyle value
157 */
158 final public String getInlineStyle()
159 {
160 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
161 }
162
163 /**
164 * Sets the CSS styles to use for this component.
165 *
166 * @param inlineStyle the new inlineStyle value
167 */
168 final public void setInlineStyle(String inlineStyle)
169 {
170 setProperty(INLINE_STYLE_KEY, (inlineStyle));
171 }
172
173 /**
174 * Gets a CSS style class to use for this component.
175 *
176 * @return the new styleClass value
177 */
178 final public String getStyleClass()
179 {
180 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
181 }
182
183 /**
184 * Sets a CSS style class to use for this component.
185 *
186 * @param styleClass the new styleClass value
187 */
188 final public void setStyleClass(String styleClass)
189 {
190 setProperty(STYLE_CLASS_KEY, (styleClass));
191 }
192
193 /**
194 * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
195 *
196 * @return the new shortDesc value
197 */
198 final public String getShortDesc()
199 {
200 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
201 }
202
203 /**
204 * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
205 *
206 * @param shortDesc the new shortDesc value
207 */
208 final public void setShortDesc(String shortDesc)
209 {
210 setProperty(SHORT_DESC_KEY, (shortDesc));
211 }
212
213 /**
214 * Gets the IDs of the components that should trigger a partial update.
215 * <p>
216 * This component will listen on the trigger components. If one of the
217 * trigger components receives an event that will cause it to update
218 * in some way, this component will request to be updated too.</p>
219 * <p>
220 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
221 * </p>
222 * <p>
223 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
224 * or use multiple colons to move up through the NamingContainer. For example,
225 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
226 * ":::" will pop out of two naming containers, etc. The search for
227 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
228 * component with id = commandButton1 after popping out of two naming containers relative to this component.
229 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
230 *
231 * @return the new partialTriggers value
232 */
233 final public String[] getPartialTriggers()
234 {
235 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
236 }
237
238 /**
239 * Sets the IDs of the components that should trigger a partial update.
240 * <p>
241 * This component will listen on the trigger components. If one of the
242 * trigger components receives an event that will cause it to update
243 * in some way, this component will request to be updated too.</p>
244 * <p>
245 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
246 * </p>
247 * <p>
248 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
249 * or use multiple colons to move up through the NamingContainer. For example,
250 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
251 * ":::" will pop out of two naming containers, etc. The search for
252 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
253 * component with id = commandButton1 after popping out of two naming containers relative to this component.
254 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
255 *
256 * @param partialTriggers the new partialTriggers value
257 */
258 final public void setPartialTriggers(String[] partialTriggers)
259 {
260 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
261 }
262
263 /**
264 * Gets Indicates whether processes launched by this command should be
265 * launched in a secondary dialog window. 'useWindow' requires that the "action"
266 * attribute start with "dialog:". Set useWindow to 'false' for the outcome of
267 * the action to be targeted to the existing window.
268 *
269 * @return the new useWindow value
270 */
271 final public boolean isUseWindow()
272 {
273 return ComponentUtils.resolveBoolean(getProperty(USE_WINDOW_KEY), false);
274 }
275
276 /**
277 * Sets Indicates whether processes launched by this command should be
278 * launched in a secondary dialog window. 'useWindow' requires that the "action"
279 * attribute start with "dialog:". Set useWindow to 'false' for the outcome of
280 * the action to be targeted to the existing window.
281 *
282 * @param useWindow the new useWindow value
283 */
284 final public void setUseWindow(boolean useWindow)
285 {
286 setProperty(USE_WINDOW_KEY, useWindow ? Boolean.TRUE : Boolean.FALSE);
287 }
288
289 /**
290 * Gets Height of the window, if this command is used to launch a window.
291 *
292 * @return the new windowHeight value
293 */
294 final public int getWindowHeight()
295 {
296 return ComponentUtils.resolveInteger(getProperty(WINDOW_HEIGHT_KEY));
297 }
298
299 /**
300 * Sets Height of the window, if this command is used to launch a window.
301 *
302 * @param windowHeight the new windowHeight value
303 */
304 final public void setWindowHeight(int windowHeight)
305 {
306 setProperty(WINDOW_HEIGHT_KEY, Integer.valueOf(windowHeight));
307 }
308
309 /**
310 * Gets Width of the window, if this command is used to launch a window.
311 *
312 * @return the new windowWidth value
313 */
314 final public int getWindowWidth()
315 {
316 return ComponentUtils.resolveInteger(getProperty(WINDOW_WIDTH_KEY));
317 }
318
319 /**
320 * Sets Width of the window, if this command is used to launch a window.
321 *
322 * @param windowWidth the new windowWidth value
323 */
324 final public void setWindowWidth(int windowWidth)
325 {
326 setProperty(WINDOW_WIDTH_KEY, Integer.valueOf(windowWidth));
327 }
328
329 /**
330 * Gets an onclick Javascript handler.
331 *
332 * @return the new onclick value
333 */
334 final public String getOnclick()
335 {
336 return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
337 }
338
339 /**
340 * Sets an onclick Javascript handler.
341 *
342 * @param onclick the new onclick value
343 */
344 final public void setOnclick(String onclick)
345 {
346 setProperty(ONCLICK_KEY, (onclick));
347 }
348
349 /**
350 * Gets an ondblclick Javascript handler.
351 *
352 * @return the new ondblclick value
353 */
354 final public String getOndblclick()
355 {
356 return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
357 }
358
359 /**
360 * Sets an ondblclick Javascript handler.
361 *
362 * @param ondblclick the new ondblclick value
363 */
364 final public void setOndblclick(String ondblclick)
365 {
366 setProperty(ONDBLCLICK_KEY, (ondblclick));
367 }
368
369 /**
370 * Gets an onmousedown Javascript handler.
371 *
372 * @return the new onmousedown value
373 */
374 final public String getOnmousedown()
375 {
376 return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
377 }
378
379 /**
380 * Sets an onmousedown Javascript handler.
381 *
382 * @param onmousedown the new onmousedown value
383 */
384 final public void setOnmousedown(String onmousedown)
385 {
386 setProperty(ONMOUSEDOWN_KEY, (onmousedown));
387 }
388
389 /**
390 * Gets an onmouseup Javascript handler.
391 *
392 * @return the new onmouseup value
393 */
394 final public String getOnmouseup()
395 {
396 return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
397 }
398
399 /**
400 * Sets an onmouseup Javascript handler.
401 *
402 * @param onmouseup the new onmouseup value
403 */
404 final public void setOnmouseup(String onmouseup)
405 {
406 setProperty(ONMOUSEUP_KEY, (onmouseup));
407 }
408
409 /**
410 * Gets an onmouseover Javascript handler.
411 *
412 * @return the new onmouseover value
413 */
414 final public String getOnmouseover()
415 {
416 return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
417 }
418
419 /**
420 * Sets an onmouseover Javascript handler.
421 *
422 * @param onmouseover the new onmouseover value
423 */
424 final public void setOnmouseover(String onmouseover)
425 {
426 setProperty(ONMOUSEOVER_KEY, (onmouseover));
427 }
428
429 /**
430 * Gets an onmousemove Javascript handler.
431 *
432 * @return the new onmousemove value
433 */
434 final public String getOnmousemove()
435 {
436 return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
437 }
438
439 /**
440 * Sets an onmousemove Javascript handler.
441 *
442 * @param onmousemove the new onmousemove value
443 */
444 final public void setOnmousemove(String onmousemove)
445 {
446 setProperty(ONMOUSEMOVE_KEY, (onmousemove));
447 }
448
449 /**
450 * Gets an onmouseout Javascript handler.
451 *
452 * @return the new onmouseout value
453 */
454 final public String getOnmouseout()
455 {
456 return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
457 }
458
459 /**
460 * Sets an onmouseout Javascript handler.
461 *
462 * @param onmouseout the new onmouseout value
463 */
464 final public void setOnmouseout(String onmouseout)
465 {
466 setProperty(ONMOUSEOUT_KEY, (onmouseout));
467 }
468
469 /**
470 * Gets an onkeypress Javascript handler.
471 *
472 * @return the new onkeypress value
473 */
474 final public String getOnkeypress()
475 {
476 return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
477 }
478
479 /**
480 * Sets an onkeypress Javascript handler.
481 *
482 * @param onkeypress the new onkeypress value
483 */
484 final public void setOnkeypress(String onkeypress)
485 {
486 setProperty(ONKEYPRESS_KEY, (onkeypress));
487 }
488
489 /**
490 * Gets an onkeydown Javascript handler.
491 *
492 * @return the new onkeydown value
493 */
494 final public String getOnkeydown()
495 {
496 return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
497 }
498
499 /**
500 * Sets an onkeydown Javascript handler.
501 *
502 * @param onkeydown the new onkeydown value
503 */
504 final public void setOnkeydown(String onkeydown)
505 {
506 setProperty(ONKEYDOWN_KEY, (onkeydown));
507 }
508
509 /**
510 * Gets an onkeyup Javascript handler.
511 *
512 * @return the new onkeyup value
513 */
514 final public String getOnkeyup()
515 {
516 return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
517 }
518
519 /**
520 * Sets an onkeyup Javascript handler.
521 *
522 * @param onkeyup the new onkeyup value
523 */
524 final public void setOnkeyup(String onkeyup)
525 {
526 setProperty(ONKEYUP_KEY, (onkeyup));
527 }
528
529 /**
530 * Gets <html>
531 * Character used to gain quick access to this item.
532 * For accessibility reasons, this functionality is not supported
533 * in screen reader mode.
534 * <p>
535 * If the same access key appears in multiple locations in the
536 * same page of output, the rendering user agent will cycle among
537 * the elements accessed by the similar keys. Note that user agents
538 * are inconsistent about dealing with two links having same access
539 * key, and so the cycling behavior is dependent on what the user agent
540 * provides.
541 * </p><p>
542 * This attribute is sometimes referred to as the "mnemonic".
543 * </p><p>
544 * The character specified by this attribute
545 * <strong>must</strong> exist in the
546 * <code>text</code> attribute of this item instance.
547 * If it does not, the user will receive no visual indication of
548 * the existence of the accessKey.
549 * The easiest, and most convenient
550 * way to specify both the text and the mnemonic together is
551 * to use textAndAccessKey.
552 * </p></html>
553 *
554 * @return the new accessKey value
555 */
556 final public char getAccessKey()
557 {
558 return ComponentUtils.resolveCharacter((Character)getProperty(ACCESS_KEY_KEY));
559 }
560
561 /**
562 * Sets <html>
563 * Character used to gain quick access to this item.
564 * For accessibility reasons, this functionality is not supported
565 * in screen reader mode.
566 * <p>
567 * If the same access key appears in multiple locations in the
568 * same page of output, the rendering user agent will cycle among
569 * the elements accessed by the similar keys. Note that user agents
570 * are inconsistent about dealing with two links having same access
571 * key, and so the cycling behavior is dependent on what the user agent
572 * provides.
573 * </p><p>
574 * This attribute is sometimes referred to as the "mnemonic".
575 * </p><p>
576 * The character specified by this attribute
577 * <strong>must</strong> exist in the
578 * <code>text</code> attribute of this item instance.
579 * If it does not, the user will receive no visual indication of
580 * the existence of the accessKey.
581 * The easiest, and most convenient
582 * way to specify both the text and the mnemonic together is
583 * to use textAndAccessKey.
584 * </p></html>
585 *
586 * @param accessKey the new accessKey value
587 */
588 final public void setAccessKey(char accessKey)
589 {
590 setProperty(ACCESS_KEY_KEY, Character.valueOf(accessKey));
591 }
592
593 /**
594 * Gets The URI this component references when activated. This is an alternative to using an action.
595 *
596 * @return the new destination value
597 */
598 final public String getDestination()
599 {
600 return ComponentUtils.resolveString(getProperty(DESTINATION_KEY));
601 }
602
603 /**
604 * Sets The URI this component references when activated. This is an alternative to using an action.
605 *
606 * @param destination the new destination value
607 */
608 final public void setDestination(String destination)
609 {
610 setProperty(DESTINATION_KEY, (destination));
611 }
612
613 /**
614 * Gets If value is "true", the component becomes non-interactive. Otherwise,the default value is "false" and component assumes its expected behavior.
615 *
616 * @return the new disabled value
617 */
618 final public boolean isDisabled()
619 {
620 return ComponentUtils.resolveBoolean(getProperty(DISABLED_KEY), false);
621 }
622
623 /**
624 * Sets If value is "true", the component becomes non-interactive. Otherwise,the default value is "false" and component assumes its expected behavior.
625 *
626 * @param disabled the new disabled value
627 */
628 final public void setDisabled(boolean disabled)
629 {
630 setProperty(DISABLED_KEY, disabled ? Boolean.TRUE : Boolean.FALSE);
631 }
632
633 /**
634 * Gets a URI specifying the location of a target image.
635 *
636 * @return the new icon value
637 */
638 final public String getIcon()
639 {
640 return ComponentUtils.resolveString(getProperty(ICON_KEY));
641 }
642
643 /**
644 * Sets a URI specifying the location of a target image.
645 *
646 * @param icon the new icon value
647 */
648 final public void setIcon(String icon)
649 {
650 setProperty(ICON_KEY, (icon));
651 }
652
653 /**
654 * Gets whether the action should be done through a partial page submit
655 * or not.
656 * Default is false: no partial page submit.
657 *
658 * @return the new partialSubmit value
659 */
660 final public boolean isPartialSubmit()
661 {
662 return ComponentUtils.resolveBoolean(getProperty(PARTIAL_SUBMIT_KEY), false);
663 }
664
665 /**
666 * Sets whether the action should be done through a partial page submit
667 * or not.
668 * Default is false: no partial page submit.
669 *
670 * @param partialSubmit the new partialSubmit value
671 */
672 final public void setPartialSubmit(boolean partialSubmit)
673 {
674 setProperty(PARTIAL_SUBMIT_KEY, partialSubmit ? Boolean.TRUE : Boolean.FALSE);
675 }
676
677 /**
678 * Gets whether the item is selected.
679 *
680 * @return the new selected value
681 */
682 final public boolean isSelected()
683 {
684 return ComponentUtils.resolveBoolean(getProperty(SELECTED_KEY), false);
685 }
686
687 /**
688 * Sets whether the item is selected.
689 *
690 * @param selected the new selected value
691 */
692 final public void setSelected(boolean selected)
693 {
694 setProperty(SELECTED_KEY, selected ? Boolean.TRUE : Boolean.FALSE);
695 }
696
697 /**
698 * Gets whether the item is in visited state. Depending on
699 * the renderer the item may appear in a visited style, if true. This
700 * property is currently used only within the a train component.
701 *
702 * @return the new visited value
703 */
704 final public boolean isVisited()
705 {
706 return ComponentUtils.resolveBoolean(getProperty(VISITED_KEY), false);
707 }
708
709 /**
710 * Sets whether the item is in visited state. Depending on
711 * the renderer the item may appear in a visited style, if true. This
712 * property is currently used only within the a train component.
713 *
714 * @param visited the new visited value
715 */
716 final public void setVisited(boolean visited)
717 {
718 setProperty(VISITED_KEY, visited ? Boolean.TRUE : Boolean.FALSE);
719 }
720
721 /**
722 * Gets the target frame for the go component.
723 *
724 * @return the new targetFrame value
725 */
726 final public String getTargetFrame()
727 {
728 return ComponentUtils.resolveString(getProperty(TARGET_FRAME_KEY));
729 }
730
731 /**
732 * Sets the target frame for the go component.
733 *
734 * @param targetFrame the new targetFrame value
735 */
736 final public void setTargetFrame(String targetFrame)
737 {
738 setProperty(TARGET_FRAME_KEY, (targetFrame));
739 }
740
741 /**
742 * Gets the text of the item.
743 *
744 * @return the new text value
745 */
746 final public String getText()
747 {
748 return ComponentUtils.resolveString(getProperty(TEXT_KEY));
749 }
750
751 /**
752 * Sets the text of the item.
753 *
754 * @param text the new text value
755 */
756 final public void setText(String text)
757 {
758 setProperty(TEXT_KEY, (text));
759 }
760
761 @Override
762 public String getDefaultEventName()
763 {
764 return "click";
765 }
766
767 @Override
768 public Collection<String> getEventNames()
769 {
770 return _EVENT_NAMES;
771 }
772
773 @Override
774 public Map<String, List<ClientBehavior>> getClientBehaviors()
775 {
776 return super.getClientBehaviors();
777 }
778
779 @Override
780 public void addClientBehavior(
781 String eventName,
782 ClientBehavior behavior)
783 {
784 super.addClientBehavior(eventName, behavior);
785 }
786
787 @Override
788 public String getFamily()
789 {
790 return COMPONENT_FAMILY;
791 }
792
793 @Override
794 protected FacesBean.Type getBeanType()
795 {
796 return TYPE;
797 }
798
799 /**
800 * Construct an instance of the CoreCommandNavigationItem.
801 */
802 protected CoreCommandNavigationItem(
803 String rendererType
804 )
805 {
806 super(rendererType);
807 }
808
809 static
810 {
811 TYPE.lockAndRegister("org.apache.myfaces.trinidad.Command","org.apache.myfaces.trinidad.NavigationItem");
812 }
813 }