public void modifyAttributes(UIDecorator decoratoro, String tagname, Map tomodify) { UITooltipDecorator decorator = (UITooltipDecorator) decoratoro; tomodify.put("title", decorator.text.getValue()); }
public static UIComponent resolveListMember(View view, UIBasicListMember torendero) { UIComponent parent = view.getComponent(torendero.parentFullID); UIBoundList boundlist = parent instanceof UISelect? ((UISelect) parent).optionnames : (UIBoundList)parent; String[] valuelist = boundlist.getValue(); // Reference off the end of an array is not an error - it may be being dynamically expanded String value = torendero.choiceindex < valuelist.length ? valuelist[torendero.choiceindex] : ""; String submittingname = boundlist.submittingname; UIBoundString togo = new UIBoundString(); togo.setValue(value); if (torendero.willinput) { togo.submittingname = submittingname; togo.willinput = true; } return togo; }
toprocess.target.setValue(viewstatehandler .getFullURL(toprocess.viewparams)); String target = toprocess.target.getValue(); if (target == null || UITypes.isPlaceholder(target)) { throw new IllegalArgumentException("UIInternalLink with fullID " + " discovered with neither ViewParameters nor URL"); toprocess.target.setValue(inturlrewriter.rewriteRenderURL(target));
/** {@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 UITooltipDecorator(String text) { this.text = new UIBoundString(text); }
/** * Construct a navigation link. * * @param parent Container to which the link is to be added. * @param ID RSF ID of this link. * @param text Text to be rendered for this link. * @param target See {@link #target} */ public static UILink make(UIContainer parent, String ID, String linktext, String target) { UIBoundString linktextnew = null; if (linktext != null) { linktextnew = new UIOutput(); linktextnew.setValue(linktext); } return make(parent, ID, linktextnew, target); }
public UIAlternativeTextDecorator(String text) { this.text = new UIBoundString(text); }
public void modifyAttributes(UIDecorator decoratoro, String tagname, Map tomodify) { UIAlternativeTextDecorator decorator = (UIAlternativeTextDecorator) decoratoro; tomodify.put("alt", decorator.text.getValue()); }
/** Creates a selection control without a value binding, either * non-submitting, or suitable for use in a GET form */ public static UISelect make(UIContainer tofill, String ID, String[] values, String[] labels, String value, boolean willinput) { UISelect togo = new UISelect(); togo.optionlist = new UIOutputMany(); togo.ID = ID; togo.optionlist.setValue(values); togo.optionnames = new UIBoundList(); togo.optionnames.setValue(labels); togo.selection = new UIBoundString(); if (value != null) { ((UIBoundString) togo.selection).setValue(value); } togo.selection.willinput = willinput; tofill.addComponent(togo); RSFUtil.updateChildIDs(togo); return togo; }
/** Creates a command link which will initiate a non-idempotent request * (action cycle) to handle the command. * @param parent The parent component to which this action link will be added * as a child. * @param text The text that will be rendered to the user on this component. * @param methodbinding An RSF EL expression representing the action to be * triggered when the user activates this link. */ public static UICommand make(UIContainer parent, String ID, String text, String methodbinding) { UIBoundString commandtext = null; if (text != null) { commandtext = new UIOutput(); commandtext.setValue(text); } return make(parent, ID, commandtext, methodbinding); }
public static StringSet computeSelectionSet(UIBound selection) { StringSet togo = new StringSet(); if (selection instanceof UIBoundList) { togo.addAll(((UIBoundList) selection).getValue()); } else if (selection instanceof UIBoundString) { togo.add(((UIBoundString) selection).getValue()); } 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; }
"dynamic-list-input-row:", Integer.toString(i)); UIBasicListMember.makeBasic(row, "input", toevolve.getFullID(), i); UIOutput.make(row, "remove", removelabel.getValue(), removelabel.valuebinding == null ? null : removelabel.valuebinding.value); UIOutput.make(core, "add-row", addlabel.getValue(), addlabel.valuebinding == null ? null : addlabel.valuebinding.value);
/** 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 */
"dynamic-list-input-row:", Integer.toString(i)); UIBasicListMember.makeBasic(row, "input", toevolve.getFullID(), i); UIOutput.make(row, "remove", removelabel.getValue(), removelabel.valuebinding == null ? null : removelabel.valuebinding.value); UIOutput.make(core, "add-row", addlabel.getValue(), addlabel.valuebinding == null ? null : addlabel.valuebinding.value);
String value = ((UIBoundString) torender).getValue(); if ("textarea".equals(tagname)) { if (UITypes.isPlaceholder(value) && torender.willinput) { String target = torender.target.getValue(); if (UITypes.isPlaceholder(target)) { target = (String) attrcopy.get(attrname); : torender.linktext.getValue(); if (value == null) { trc.replaceAttributesOpen(); : torender.commandtext.getValue(); boolean isbutton = "button".equals(tagname); if (text != null && !isbutton) { attrcopy.put("value", torender.commandtext.getValue()); text = null; rendered = ((UIBoundString)(torender.markup)).getValue();