Example usage for org.apache.wicket.markup.html.form TextArea TextArea

List of usage examples for org.apache.wicket.markup.html.form TextArea TextArea

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.form TextArea TextArea.

Prototype

public TextArea(final String id) 

Source Link

Usage

From source file:au.org.theark.admin.web.component.function.form.DetailForm.java

License:Open Source License

public void initialiseDetailForm() {
    idTxtFld = new TextField<String>("arkFunction.id");
    idTxtFld.setEnabled(false);//from ww  w.j av  a2  s  .  com

    nameTxtFld = new TextField<String>("arkFunction.name") {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onBeforeRender() {
            super.onBeforeRender();
            setEnabled(isNew());
        }
    };

    descriptionTxtAreaFld = new TextArea<String>("arkFunction.description");

    // FunctionType selection
    initArkFunctionTypeDropDown();

    resourceKeyTxtFld = new TextField<String>("arkFunction.resourceKey") {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onBeforeRender() {
            super.onBeforeRender();
            setEnabled(isNew());
        }
    };

    attachValidators();
    addDetailFormComponents();
}

From source file:au.org.theark.admin.web.component.module.form.DetailForm.java

License:Open Source License

public void initialiseDetailForm() {
    idTxtFld = new TextField<String>("arkModule.id");
    idTxtFld.setEnabled(false);//  w  ww  .  j av a  2  s  .  c  o m

    nameTxtFld = new TextField<String>("arkModule.name") {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onBeforeRender() {
            super.onBeforeRender();
            setEnabled(isNew());
        }
    };

    descriptionTxtAreaFld = new TextArea<String>("arkModule.description");

    enabledChkBx = new CheckBox("arkModule.enabled");

    attachValidators();
    addDetailFormComponents();
}

From source file:au.org.theark.admin.web.component.role.form.DetailForm.java

License:Open Source License

public void initialiseDetailForm() {
    idTxtFld = new TextField<String>("arkRole.id");
    idTxtFld.setEnabled(false);// ww  w.  j  a v a 2 s  . c o m

    nameTxtFld = new TextField<String>("arkRole.name") {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onBeforeRender() {
            super.onBeforeRender();
            setEnabled(isNew());
        }
    };

    descriptionTxtAreaFld = new TextArea<String>("arkRole.description");

    attachValidators();
    addDetailFormComponents();
}

From source file:au.org.theark.core.web.component.customfield.form.DetailForm.java

License:Open Source License

/**
 * Call this after the constructor is finished in detail panel.
 *//*from   ww w. ja va2  s.c om*/
public void initialiseDetailForm() {
    fieldIdTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_ID);
    fieldNameTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_NAME);
    fieldNameTxtFld.add(new ArkDefaultFormFocusBehavior());
    fieldDescriptionTxtAreaFld = new TextArea<String>(Constants.FIELDVO_CUSTOMFIELD_DESCRIPTION);
    fieldLabelTxtAreaFld = new TextArea<String>(Constants.FIELDVO_CUSTOMFIELD_FIELD_LABEL);
    //fieldMissingValueTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_MISSING_VALUE);
    fieldDisplayRequiredChkBox = new CheckBox(Constants.FIELDVO_CUSTOMFIELDDISPLAY_REQUIRED);
    fieldAllowMultiselectChkBox = new CheckBox(Constants.FIELDVO_CUSTOMFIELD_ALLOW_MULTISELECT) {
        private static final long serialVersionUID = 1L;

        @Override
        public boolean isEnabled() {
            return (fieldEncodedValuesTxtFld.getModelObject() != null);
        }
    };

    if (getModelObject().isUseCustomFieldDisplay()) {
        // TODO: Have not implemented position support right now
        customFieldDisplayPositionPanel = new EmptyPanel("customFieldDisplayPositionPanel");
    } else {
        customFieldDisplayPositionPanel = new EmptyPanel("customFieldDisplayPositionPanel");
    }
    //customfield category order Number.
    customeFieldCategoryOrderNoTxtFld = new TextField<Long>(
            Constants.FIELDVO_CUSTOMFIELD_CUSTOEMFIELDCATEGORY_ORDERNUMBER);
    customeFieldCategoryOrderNoTxtFld.setOutputMarkupId(true);
    customeFieldCategoryOrderNoTxtFld.setEnabled(false);

    // Initialise Drop Down Choices
    initFieldTypeDdc();
    initCustomFieldTypeDdc();
    initCustomeFieldCategoryDdc();
    initUnitTypeDdc();

    // Min and Max Value panels rely on fieldTypeDdc being already established
    minMaxValueEntryWMC = new WebMarkupContainer("minMaxValueEntryWMC");
    minMaxValueEntryWMC.setOutputMarkupPlaceholderTag(true);
    missingValueEntryWMC = new WebMarkupContainer("missingValueEntryWMC");
    missingValueEntryWMC.setOutputMarkupPlaceholderTag(true);

    defaultValueEntryWMC = new WebMarkupContainer("defaultValueEntryWMC");
    defaultValueEntryWMC.setOutputMarkupPlaceholderTag(true);

    // unitType and encodedValues rely on fieldTypeDdc being already established
    fieldEncodedValuesTxtFld = new TextArea<String>(Constants.FIELDVO_CUSTOMFIELD_ENCODED_VALUES);
    fieldEncodedValuesTxtFld.setOutputMarkupId(true);
    fieldEncodedValuesTxtFld.add(new AjaxFormComponentUpdatingBehavior("onchange") {
        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            target.add(fieldAllowMultiselectChkBox);
        }
    });

    updateEncodedValueFld();
    updateUnitTypeDdc();

    // Have to Edit, before allowing delete
    deleteButton.setEnabled(false);

    //defaultValueTextArea = new TextArea<String>("customField.defaultValue");

    addDetailFormComponents();
    attachValidators();

    initMinMaxValuePnls();

    historyButtonPanel = new HistoryButtonPanel(this, arkCrudContainerVO.getEditButtonContainer(),
            arkCrudContainerVO.getDetailPanelFormContainer());
}

From source file:au.org.theark.core.web.component.customfield.form.SearchForm.java

License:Open Source License

public void initialiseFieldForm() {
    fieldIdTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_ID);
    fieldNameTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_NAME);
    fieldDescriptionTxtAreaFld = new TextArea<String>(Constants.FIELDVO_CUSTOMFIELD_DESCRIPTION);
    panelCustomUnitTypeDropDown = new WebMarkupContainer("panelCustomUnitTypeDropDown");
    panelCustomUnitTypeDropDown.setOutputMarkupId(true);
    panelCustomUnitTypeText = new WebMarkupContainer("panelCustomUnitTypeText");
    panelCustomUnitTypeText.setOutputMarkupId(true);
    fieldUnitsTxtFld = new AutoCompleteTextField<String>(Constants.FIELDVO_CUSTOMFIELD_UNIT_TYPE + ".name") {
        @Override/* w  ww.  j a v a2  s .c  o  m*/
        protected Iterator getChoices(String input) {
            UnitType unitTypeCriteria = new UnitType();
            unitTypeCriteria.setName(input);
            unitTypeCriteria.setArkFunction(cpModel.getObject().getCustomField().getArkFunction());
            return iArkCommonService.getUnitTypeNames(unitTypeCriteria, 10).iterator();
        }
    };

    fieldUnitsInTextTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_UNIT_TYPE_TXT);
    fieldMinValueTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_MIN_VALUE);
    fieldMaxValueTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_MAX_VALUE);
    initCustomFieldTypeDdc();

    //customfield category order Number.
    customeFieldCategoryOrderNoTxtFld = new TextField<Long>(
            Constants.FIELDVO_CUSTOMFIELD_CUSTOEMFIELDCATEGORY_ORDERNUMBER);
    customeFieldCategoryOrderNoTxtFld.setOutputMarkupId(true);
    customeFieldCategoryOrderNoTxtFld.setEnabled(false);

    initCustomeFieldCategoryDdc();
    initFieldTypeDdc();
    addFieldComponents();
}

From source file:au.org.theark.core.web.component.customfieldcategory.form.DetailForm.java

License:Open Source License

/**
 * Call this after the constructor is finished
 *///from  w  ww  . j av  a  2s  .c o m
public void initialiseDetailForm() {
    categoryIdTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_ID);
    categoryNameTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_NAME);
    categoryNameTxtFld.add(new ArkDefaultFormFocusBehavior());
    categoryDescriptionTxtAreaFld = new TextArea<String>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_DESCRIPTION);
    categoryOrderNoTxtFld = new TextField<Long>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_ORDERNUMBER);

    initCustomFieldTypeDdc();
    initParentCategoryDdc();
    deleteButton.setEnabled(false);

    //defaultValueTextArea = new TextArea<String>("customField.defaultValue");

    addDetailFormComponents();
    attachValidators();

    historyButtonPanel = new HistoryButtonPanel(this, arkCrudContainerVO.getEditButtonContainer(),
            arkCrudContainerVO.getDetailPanelFormContainer());
}

From source file:au.org.theark.core.web.component.customfieldcategory.form.SearchForm.java

License:Open Source License

public void initialiseFieldForm() {
    categoryIdTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_ID);
    categoryNameTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_NAME);
    categoryDescriptionTxtAreaFld = new TextArea<String>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_DESCRIPTION);
    initCustomFieldTypeDdc();/* w ww  .j a  v  a  2s.  c  o  m*/
    initParentCategoryDdc();
    categoryOrderNoTxtFld = new TextField<Long>(Constants.FIELDVO_CUSTOMFIELDCATEGORY_ORDERNUMBER);
    addFieldComponents();
    addValidators();
}

From source file:au.org.theark.lims.web.component.barcodelabel.form.DetailForm.java

License:Open Source License

public void initialiseDetailForm() {
    idTxtFld = new TextField<Long>("id");
    nameTxtFld = new TextField<String>("name");
    nameTxtFld.setEnabled(false);//www. j av a 2  s  . c o m
    descriptionTxtArea = new TextArea<String>("description");
    versionTxtFld = new TextField<Number>("version");

    barcodeLabelTemplateLbl = new Label("barcodeLabelTemplateLbl", "Clone from Barcode Label Template:") {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onBeforeRender() {
            super.onBeforeRender();
            this.setVisible(isNew());
        }
    };

    initStudyDdc();
    initBarcodeLabelTemplateDdc();

    barcodeLabelDataPanel = new EmptyPanel("barcodeLabelDataPanel");
    exampleBarcodeDataFile = new TextArea<String>("exampleBarcodeDataFile", new Model<String>(""));
    exampleBarcodeDataFile.setEnabled(false);
    exampleBarcodeDataFile.setVisible(isNew());

    addDetailFormComponents();
    attachValidators();
}

From source file:au.org.theark.lims.web.component.barcodelabel.form.SearchForm.java

License:Open Source License

protected void initialiseSearchForm() {
    idTxtFld = new TextField<Long>("id");
    initialiseStudyDdc();//  w  w w . ja va 2 s  .  co  m
    nameTxtFld = new TextField<String>("name");
    descriptionTxtArea = new TextArea<String>("description");
    addSearchComponentsToForm();
}

From source file:au.org.theark.lims.web.component.barcodelabeldata.BarcodeLabelDataPanel.java

License:Open Source License

@SuppressWarnings("unchecked")
public void initialisePanel() {

    labelPrefixTxtFld = new TextArea<String>("labelPrefix");
    labelSuffixTxtFld = new TextArea<String>("labelSuffix");
    labelPrefixTxtFld.setRequired(true)/* ww  w . java 2  s .c om*/
            .setLabel(new StringResourceModel("error.labelPrefix.required", this, new Model<String>("Prefix")));
    labelSuffixTxtFld.setRequired(true)
            .setLabel(new StringResourceModel("error.labelSuffix.required", this, new Model<String>("Suffix")));

    final AbstractListEditor<BarcodeLabelData> listEditor = new AbstractListEditor<BarcodeLabelData>(
            "barcodeLabelData", new PropertyModel(this, "barcodeLabel.barcodeLabelData")) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onPopulateItem(ListItem<BarcodeLabelData> item) {
            item.setModel(new CompoundPropertyModel<BarcodeLabelData>(item.getModel()));
            item.add(new TextField<String>("id").setEnabled(false));
            item.add(new TextField<String>("command"));
            item.add(new TextField<String>("xCoord"));
            item.add(new TextField<String>("yCoord"));
            item.add(new TextField<String>("p1"));
            item.add(new TextField<String>("p2"));
            item.add(new TextField<String>("p3"));
            item.add(new TextField<String>("p4"));
            item.add(new TextField<String>("p5"));
            item.add(new TextField<String>("p6"));
            item.add(new TextField<String>("p7"));
            item.add(new TextField<String>("p8"));
            item.add(new TextField<String>("data"));
        }
    };

    addOrReplace(labelPrefixTxtFld);
    addOrReplace(listEditor);
    addOrReplace(labelSuffixTxtFld);
}