List of usage examples for org.apache.wicket.markup.html.form TextField TextField
public TextField(final String id)
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 www.j ava 2s . co m*/ 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.function.form.SearchForm.java
License:Open Source License
protected void initialiseSearchForm() { idTxtFld = new TextField<String>("arkFunction.id"); nameTxtFld = new TextField<String>("arkFunction.name"); // Type selection initArkFunctionTypeDropDown();/*from ww w . java 2 s.co m*/ }
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);/*from ww w .j av a 2 s .co 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.module.form.SearchForm.java
License:Open Source License
protected void initialiseSearchForm() { idTxtFld = new TextField<String>("arkModule.id"); nameTxtFld = new TextField<String>("arkModule.name"); }
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);//w ww. ja 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.admin.web.component.role.form.SearchForm.java
License:Open Source License
protected void initialiseSearchForm() { idTxtFld = new TextField<String>("arkRole.id"); nameTxtFld = new TextField<String>("arkRole.name"); }
From source file:au.org.theark.core.web.component.customfield.form.DetailForm.java
License:Open Source License
private void customFieldCategoryChangeEvent(AjaxRequestTarget target) { cpModel.getObject().getCustomField().setCustomFieldCategory(customeFieldCategoryDdc.getModelObject()); orderNumberPanel.remove(customeFieldCategoryOrderNoTxtFld); customeFieldCategoryOrderNoTxtFld = new TextField<Long>( Constants.FIELDVO_CUSTOMFIELD_CUSTOEMFIELDCATEGORY_ORDERNUMBER); customeFieldCategoryOrderNoTxtFld.setOutputMarkupId(true); customeFieldCategoryOrderNoTxtFld.setEnabled(false); orderNumberPanel.add(customeFieldCategoryOrderNoTxtFld); target.add(customeFieldCategoryOrderNoTxtFld); target.add(orderNumberPanel);//from w ww. j av a 2s . c o m }
From source file:au.org.theark.core.web.component.customfield.form.DetailForm.java
License:Open Source License
/** * initialise unit types.//from w w w .ja va2 s . c o m */ private void initUnitTypeDdc() { UnitType unitTypeCriteria = new UnitType(); unitTypeCriteria.setArkFunction(cpModel.getObject().getCustomField().getArkFunction()); List<UnitType> unitTypeList = iArkCommonService.getUnitTypes(unitTypeCriteria); // assumes that if the unit.name will appear within the unit.description ChoiceRenderer unitTypeRenderer = new ChoiceRenderer(Constants.UNITTYPE_NAME, Constants.UNITTYPE_ID); fieldUnitTypeDdc = new DropDownChoice<UnitType>(Constants.FIELDVO_CUSTOMFIELD_UNIT_TYPE, unitTypeList, unitTypeRenderer); fieldUnitTypeDdc.setOutputMarkupId(true); // unitTypeDdc can be enabled/disabled fieldUnitTypeDdc.setNullValid(true); // null is ok for units //Add the Unit type text. fieldUnitTypeTxtFld = new TextField<String>(Constants.FIELDVO_CUSTOMFIELD_UNIT_TYPE_TXT); fieldUnitTypeTxtFld.setOutputMarkupId(true); }
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 w ww . ja va2 s.co m*/ 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 w w . j a v a 2 s . com 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(); }