Search in sources :

Example 11 with StateMapped

use of org.olat.core.id.context.StateMapped in project openolat by klemens.

the class OrdersSearchForm method setStateEntry.

public boolean setStateEntry(StateEntry state) {
    boolean changed = false;
    if (state instanceof StateMapped) {
        StateMapped map = (StateMapped) state;
        String refNo = map.getDelegate().get("refNo");
        if (StringHelper.containsNonWhitespace(refNo)) {
            refNoEl.setValue(refNo);
            changed = true;
        }
        String fromStr = map.getDelegate().get("from");
        if (StringHelper.containsNonWhitespace(fromStr)) {
            fromEl.setValue(fromStr);
            changed = true;
        }
        String toStr = map.getDelegate().get("to");
        if (StringHelper.containsNonWhitespace(toStr)) {
            toEl.setValue(toStr);
            changed = true;
        }
    }
    return changed;
}
Also used : StateMapped(org.olat.core.id.context.StateMapped)

Example 12 with StateMapped

use of org.olat.core.id.context.StateMapped in project openolat by klemens.

the class UsermanagerUserSearchForm method getStateEntry.

protected StateMapped getStateEntry() {
    StateMapped state = new StateMapped();
    if (items != null) {
        for (Map.Entry<String, FormItem> itemEntry : items.entrySet()) {
            String key = itemEntry.getKey();
            FormItem f = itemEntry.getValue();
            if (f instanceof TextElement) {
                state.getDelegate().put(key, ((TextElement) f).getValue());
            }
        }
    }
    if (auth.isMultiselect()) {
    // auth.
    }
    if (roles.isMultiselect()) {
    // 
    }
    if (status.isOneSelected()) {
    // 
    }
    return state;
}
Also used : TextElement(org.olat.core.gui.components.form.flexible.elements.TextElement) FormItem(org.olat.core.gui.components.form.flexible.FormItem) StateMapped(org.olat.core.id.context.StateMapped) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

StateMapped (org.olat.core.id.context.StateMapped)12 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 SingleIdentityChosenEvent (org.olat.basesecurity.events.SingleIdentityChosenEvent)2 FormItem (org.olat.core.gui.components.form.flexible.FormItem)2 TextElement (org.olat.core.gui.components.form.flexible.elements.TextElement)2 Identity (org.olat.core.id.Identity)2 ContextEntry (org.olat.core.id.context.ContextEntry)2 PaypalTransaction (org.olat.resource.accesscontrol.provider.paypal.model.PaypalTransaction)2