/** {@see UIInternalLink#make(UIContainer, String, UIBoundString, ViewParameters) */ public static UIInternalLink make(UIContainer parent, String ID, ViewParameters viewparams) { return make(parent, ID, (UIBoundString)null, viewparams); }
/** * @param parent The parent container to which this link is to be added * @param ID The (RSF) ID to be given to this linke * @param linktext The text which is to be attached to this link (if left <code>null</code>, * the tag peering with this component may contain further markup in the template) * @param viewparams The {@link ViewParameters} specifying the target view for this link. * @return The constructed internal link */ public static UIInternalLink make(UIContainer parent, String ID, UIBoundString linktext, ViewParameters viewparams) { UIInternalLink togo = new UIInternalLink(); togo.ID = ID; togo.linktext = linktext; togo.viewparams = viewparams.copyBase(); parent.addComponent(togo); return togo; }
/** Create a link which, while internal, does not participate in the * ViewParameters system. This is largely useful for unmanaged environments * such as SpringMVC/Cocoon. Cannot be named "make" to avoid clashing with * UILink through ridiculous Java semantics on static methods. */ public static UIInternalLink makeURL(UIContainer parent, String ID, String target) { UIInternalLink togo = new UIInternalLink(); togo.ID = ID; togo.target = new UIOutput(); if (target != null) { togo.target.setValue(target); } parent.addComponent(togo); return togo; } /** ViewParameters representing the navigation target of this link control */
/** {@see UIInternalLink#make(UIContainer, String, UIBoundString, ViewParameters) */ public static UIInternalLink make(UIContainer parent, String ID, String text, ViewParameters viewparams) { UIBoundString linktext = null; if (text != null) { linktext = new UIOutput(); linktext.setValue(text); } return make(parent, ID, linktext, viewparams); }