Search in sources :

Example 1 with ConsumableBoolean

use of org.olat.core.util.ConsumableBoolean in project OpenOLAT by OpenOLAT.

the class MessageListController method scrollTo.

public void scrollTo(MessageRef ref) {
    if (ref != null && (thread == null || !thread.getKey().equals(ref.getKey()))) {
        mainVC.contextPut("goToMessage", new ConsumableBoolean(true));
        mainVC.contextPut("goToMessageId", ref.getKey());
    }
}
Also used : ConsumableBoolean(org.olat.core.util.ConsumableBoolean)

Example 2 with ConsumableBoolean

use of org.olat.core.util.ConsumableBoolean in project OpenOLAT by OpenOLAT.

the class Render_fib method enrichInstructions.

private final void enrichInstructions(RenderInstructions ri) {
    ri.put(RenderInstructions.KEY_RENDER_CLASS, "fib");
    ri.put(RenderInstructions.KEY_FIB_ROWS, new Integer(rows));
    ri.put(RenderInstructions.KEY_FIB_COLUMNS, new Integer(columns));
    ri.put(RenderInstructions.KEY_FIB_MAXLENGTH, new Integer(maxchars));
    ri.put(RenderInstructions.KEY_FIB_MAXLENGTH, new Integer(maxchars));
    ri.put(RenderInstructions.KEY_BREAK_DELAY, new ConsumableBoolean(true));
}
Also used : ConsumableBoolean(org.olat.core.util.ConsumableBoolean)

Example 3 with ConsumableBoolean

use of org.olat.core.util.ConsumableBoolean in project openolat by klemens.

the class Render_fib method enrichInstructions.

private final void enrichInstructions(RenderInstructions ri) {
    ri.put(RenderInstructions.KEY_RENDER_CLASS, "fib");
    ri.put(RenderInstructions.KEY_FIB_ROWS, new Integer(rows));
    ri.put(RenderInstructions.KEY_FIB_COLUMNS, new Integer(columns));
    ri.put(RenderInstructions.KEY_FIB_MAXLENGTH, new Integer(maxchars));
    ri.put(RenderInstructions.KEY_FIB_MAXLENGTH, new Integer(maxchars));
    ri.put(RenderInstructions.KEY_BREAK_DELAY, new ConsumableBoolean(true));
}
Also used : ConsumableBoolean(org.olat.core.util.ConsumableBoolean)

Example 4 with ConsumableBoolean

use of org.olat.core.util.ConsumableBoolean in project openolat by klemens.

the class Mattext method renderOpenXML.

@Override
public void renderOpenXML(OpenXMLDocument document, RenderInstructions ri) {
    ConsumableBoolean br = (ConsumableBoolean) ri.get(RenderInstructions.KEY_BREAK_DELAY);
    boolean newParagraph = br == null || !br.isTrue();
    document.appendHtmlText(content, newParagraph);
}
Also used : ConsumableBoolean(org.olat.core.util.ConsumableBoolean)

Example 5 with ConsumableBoolean

use of org.olat.core.util.ConsumableBoolean in project openolat by klemens.

the class MultipleSelectionElementImpl method evalFormRequest.

@Override
public void evalFormRequest(UserRequest ureq) {
    Form form = getRootForm();
    if (isAjaxOnly()) {
        String dispatchuri = form.getRequestParameter("dispatchuri");
        if (dispatchuri != null && dispatchuri.equals(component.getFormDispatchId())) {
            String key = form.getRequestParameter("achkbox");
            String checked = form.getRequestParameter("checked");
            if ("true".equals(checked)) {
                selected.add(key);
            } else if ("false".equals(checked)) {
                selected.remove(key);
            }
        }
    } else if (isEnabled()) {
        // which one was selected?
        // selection change?
        // mark corresponding comps as dirty
        String[] reqVals = form.getRequestParameterValues(getName());
        if (reqVals == null) {
            // selection box?
            reqVals = form.getRequestParameterValues(getName() + "_SELBOX");
        }
        // 
        selected = new HashSet<>();
        if (reqVals != null) {
            for (int i = 0; i < reqVals.length; i++) {
                selected.add(reqVals[i]);
            }
        }
    }
    String dispatchuri = form.getRequestParameter("dispatchuri");
    if (dispatchuri != null && dispatchuri.equals(component.getFormDispatchId())) {
        formRequestEval = new ConsumableBoolean(true);
    }
}
Also used : ConsumableBoolean(org.olat.core.util.ConsumableBoolean) Form(org.olat.core.gui.components.form.flexible.impl.Form) HashSet(java.util.HashSet)

Aggregations

ConsumableBoolean (org.olat.core.util.ConsumableBoolean)10 HashSet (java.util.HashSet)2 Form (org.olat.core.gui.components.form.flexible.impl.Form)2