Search in sources :

Example 1 with HCSearchOperatorSelect

use of com.helger.pd.publisher.ui.HCSearchOperatorSelect in project phoss-directory by phax.

the class PagePublicSearchExtended method fillContent.

@Override
protected void fillContent(@Nonnull final WebPageExecutionContext aWPEC) {
    final HCNodeList aNodeList = aWPEC.getNodeList();
    final Locale aDisplayLocale = aWPEC.getDisplayLocale();
    aNodeList.addChild(info("This is a placeholder page - has no effect yet!"));
    final BootstrapViewForm aViewForm = new BootstrapViewForm();
    // Add all search fields
    for (final EPDSearchField eField : EPDSearchField.values()) {
        final HCSearchOperatorSelect aSelect = new HCSearchOperatorSelect(new RequestField(PREFIX_OPERATOR + eField.getFieldName(), ESearchOperator.EQ.getID()), eField.getDataType(), aDisplayLocale);
        final HCNodeList aCtrl = _createCtrl(eField, aDisplayLocale);
        final BootstrapRow aRow = new BootstrapRow();
        aRow.createColumn(2).addChild(aSelect);
        aRow.createColumn(10).addChild(aCtrl);
        aViewForm.addFormGroup(new BootstrapFormGroup().setLabel(eField.getDisplayText(aDisplayLocale)).setCtrl(aRow));
    }
    aNodeList.addChild(aViewForm);
}
Also used : Locale(java.util.Locale) EPDSearchField(com.helger.pd.publisher.search.EPDSearchField) HCSearchOperatorSelect(com.helger.pd.publisher.ui.HCSearchOperatorSelect) BootstrapRow(com.helger.photon.bootstrap4.grid.BootstrapRow) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapViewForm(com.helger.photon.bootstrap4.form.BootstrapViewForm) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup) RequestField(com.helger.photon.core.form.RequestField)

Aggregations

HCNodeList (com.helger.html.hc.impl.HCNodeList)1 EPDSearchField (com.helger.pd.publisher.search.EPDSearchField)1 HCSearchOperatorSelect (com.helger.pd.publisher.ui.HCSearchOperatorSelect)1 BootstrapFormGroup (com.helger.photon.bootstrap4.form.BootstrapFormGroup)1 BootstrapViewForm (com.helger.photon.bootstrap4.form.BootstrapViewForm)1 BootstrapRow (com.helger.photon.bootstrap4.grid.BootstrapRow)1 RequestField (com.helger.photon.core.form.RequestField)1 Locale (java.util.Locale)1