/** * Adds a binding to the supplied parameter list that will assign the EL * expression <code>source</code> to <code>transit</code> and then * <code>transit</code> to <code>dest</code>, a classic usage of * "whole-object validation through transit". */ public static void addTransitBinding(ParameterList paramlist, String source, String transit, String dest) { paramlist.add(new UIELBinding(transit, new ELReference(source))); paramlist.add(new UIELBinding(dest, new ELReference(transit))); }
/** {@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); }
public static UIAnchor make(UIContainer parent, String ID, String initvalue, String binding) { UIAnchor togo = new UIAnchor(); if (initvalue != null) { togo.setValue(initvalue); } togo.valuebinding = ELReference.make(binding); togo.ID = ID; parent.addComponent(togo); return togo; }
public UIJointContainer evolveSelect(UISelect toevolve) { UIJointContainer joint = new UIJointContainer(toevolve.parent, toevolve.ID, COMPONENT_ID); toevolve.parent.remove(toevolve); toevolve.ID = "select"; joint.addComponent(toevolve); return joint; } }
/** * Constructs a single selection control, where the submitted values are * identical with the rendered labels */ public static UISelect make(UIContainer tofill, String ID, String[] options, String valuebinding, String initvalue) { UISelect togo = make(tofill, ID, options); UIInput selection = UIInput.make(valuebinding); if (initvalue != null) { selection.setValue(initvalue); } togo.selection = selection; return togo; }
/** * Constructs a single selection control, with labels distinct from the * submitting values. */ public static UISelect make(UIContainer tofill, String ID, String[] options, String[] labels, String valuebinding, String initvalue) { UISelect togo = make(tofill, ID, options, valuebinding, initvalue); if (labels != null) { togo.optionnames = UIOutputMany.make(labels); } return togo; }
/** * A "bare" constructor suitable for the selection member of a multiple * selection control (UIInput); */ public static UIInputMany make(String valuebinding) { UIInputMany togo = new UIInputMany(); togo.valuebinding = new ELReference(valuebinding); return togo; }
/** A constructor suitable for the value lists appearing in selection controls */ public static UIOutputMany make(String valuebinding, String resolver) { UIOutputMany togo = new UIOutputMany(); togo.valuebinding = new ELReference(valuebinding); togo.resolver = new ELReference(resolver); return togo; }
protected static UISelect make(UIContainer tofill, String ID, String[] options) { UISelect togo = new UISelect(); togo.ID = ID; togo.optionlist = togo.optionnames = UIOutputMany.make(options); tofill.addComponent(togo); RSFUtil.updateChildIDs(togo); return togo; }
public static UIOutputMultiline make(UIContainer parent, String ID, String binding, StringList value) { UIOutputMultiline togo = new UIOutputMultiline(); togo.ID = ID; togo.valuebinding = ELReference.make(binding); // note that StringList is not a UIType, and hence can never give rise // to input, and hence has no placeholder type, and hence must always // be set here. if (value != null) { togo.setValue(value); } parent.addComponent(togo); return togo; }
/** * Construct a navigation link with a bound control (e.g. UIMessage) forming * the link text. */ public static UILink make(UIContainer parent, String ID, UIBoundString linktext, String target) { UILink togo = new UILink(); togo.ID = ID; togo.target = new UIOutput(); if (target != null) { togo.target.setValue(target); } togo.linktext = linktext; parent.addComponent(togo); return togo; }
private void appendComponent(UIBound toappend, String fullID) { if (toappend != null) { if (fullID != null) { toappend.updateFullID(fullID); } worklist.add(toappend); } }
public static UIBasicListMember makeBasic(UIContainer tofill, String ID, String parentFullID, int choiceindex) { UIBasicListMember togo = new UIBasicListMember(); togo.ID = ID; togo.parentFullID = parentFullID; togo.choiceindex = choiceindex; togo.willinput = true; tofill.addComponent(togo); return togo; } }
public static UISelectChoice make(UIContainer tofill, String ID, String parentFullID, int choiceindex) { UISelectChoice togo = new UISelectChoice(); togo.ID = ID; togo.parentFullID = parentFullID; togo.choiceindex = choiceindex; togo.willinput = true; tofill.addComponent(togo); return togo; } }
public static UISelectLabel make(UIContainer tofill, String ID, String parentFullID, int choiceindex) { UISelectLabel togo = new UISelectLabel(); togo.ID = ID; togo.parentFullID = parentFullID; togo.choiceindex = choiceindex; tofill.addComponent(togo); return togo; } }
/** * A "bare" constructor suitable for the selection member of a single * selection control (UIInput); * @param valuebinding An EL reference to which the bound value is to be associated * @return The constructed UIInput control. */ public static UIInput make(String valuebinding) { UIInput togo = new UIInput(); togo.valuebinding = ELReference.make(valuebinding); return togo; }
/** Constructs a top-level message component, supporting defaultible * message fallback as in the Spring * <a href="http://www.springframework.org/docs/api/org/springframework/context/MessageSourceResolvable.html"> * MessageSourceResolvable</a> interface. * See {@link #make(UIContainer, String, String, Object[])} */ public static UIMessage make(UIContainer parent, String ID, String messagekeys[], Object[] arguments) { UIMessage togo = make(messagekeys, arguments); togo.ID = ID; parent.addComponent(togo); return togo; }
/** @see #make(UIContainer, String, String, String[]) */ public static UIInputMany make(UIContainer parent, String ID, String binding) { return make(parent, ID, binding, null); } }
/** {@see UIInternalLink#make(UIContainer, String, UIBoundString, ViewParameters) */ public static UIInternalLink make(UIContainer parent, String ID, ViewParameters viewparams) { return make(parent, ID, (UIBoundString)null, viewparams); }
public UIJointContainer evolveTextInput(UIInput toevolve) { UIJointContainer joint = new UIJointContainer(toevolve.parent, toevolve.ID, COMPONENT_ID); toevolve.parent.remove(toevolve); toevolve.ID = SEED_ID; joint.addComponent(toevolve); return joint; } }