View Javadoc

1   /*
2    Wotonomy: OpenStep design patterns for pure Java applications.
3    Copyright (C) 2000 Blacksmith, Inc.
4   
5    This library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
9   
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14  
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, see http://www.gnu.org
17   */
18  
19  package net.wotonomy.web;
20  
21  import net.wotonomy.foundation.NSDictionary;
22  
23  /***
24   * This dynamic element renders only the URL of a hyperlink.
25   * Bindings are:
26   * <ul>
27   * <li>href: The URL that the hyperlink should point to.</li>
28   * <li>pageName: The name of the WOComponent that the hyperlink should point to.</li>
29   * <li>directActionName: The name of the direct action to call when the link is activated.</li>
30   * <li>actionClass: The name of the WODirectAction subclass where the direct action resides.</li>
31   * <li>action: A pointer to a method on the component that contains this element. If the link is activated,
32   *     the method will be called.
33   * <li>ref: The name of the anchor to go to inside the resulting page.</li>
34   * </ul>
35   *
36   * The href, pageName and directActionName/actionClass and name properties are mutually exclusive and you should
37   * only use at most one of them simultaneously.
38   *
39   * @author ezamudio@nasoft.com
40   * @author $Author: cgruber $
41   * @version $Revision: 905 $
42   */
43  public class WOActionURL extends WOHyperlink {
44  
45      public WOActionURL() {
46          super();
47      }
48  
49      public WOActionURL(String n, NSDictionary m, WOElement t) {
50          super(n, m, t);
51      }
52  
53      public void appendToResponse(WOResponse r, WOContext c) {
54          r.appendContentString(actionURL(c));
55      }
56  
57  }