01: /*
02: * Created on 13-Mar-2006
03: */
04: package uk.org.ponder.rsf.components;
05:
06: /** Implements a named navigation point in a rendered page.
07: * Peers, for example, with an HTML anchor as rendered with <a name=>.
08: * @author Antranig Basman (antranig@caret.cam.ac.uk)
09: *
10: */
11:
12: public class UIAnchor extends UIBoundString {
13: public static UIAnchor make(UIContainer parent, String ID,
14: String initvalue, String binding) {
15: UIAnchor togo = new UIAnchor();
16: if (initvalue != null) {
17: togo.setValue(initvalue);
18: }
19: togo.valuebinding = ELReference.make(binding);
20: togo.ID = ID;
21: parent.addComponent(togo);
22: return togo;
23: }
24:
25: /**
26: * Constructs an unbound text field with the specified initial value. This
27: * will not interact with the bean model in any way.
28: */
29: public static UIAnchor make(UIContainer parent, String ID,
30: String initvalue) {
31: return make(parent, ID, initvalue, null);
32: }
33:
34: /**
35: * This constructor creates an output component that will simply select a
36: * message already present in the template, free from any further interaction
37: * with the code.
38: */
39: public static UIAnchor make(UIContainer parent, String ID) {
40: return make(parent, ID, null, null);
41: }
42:
43: }
|