Package org.apache.wicket.markup.html.form

Examples of org.apache.wicket.markup.html.form.FormComponentLabel


    protected FormComponentLabel createFormComponentLabel() {
        final String name = getModel().getName();
        select2Field.setLabel(Model.of(name));

        final FormComponentLabel labelIfRegular = new FormComponentLabel(ID_SCALAR_IF_REGULAR, select2Field);

        final String describedAs = getModel().getDescribedAs();
        if(describedAs != null) {
            labelIfRegular.add(new AttributeModifier("title", Model.of(describedAs)));
        }

        final Label scalarName = new Label(ID_SCALAR_NAME, getRendering().getLabelCaption(select2Field));
        labelIfRegular.add(scalarName);
        labelIfRegular.add(select2Field);

        return labelIfRegular;
    }
View Full Code Here


        textField.setOutputMarkupId(true);

        addStandardSemantics();
        addSemantics();

        final FormComponentLabel labelIfRegular = createFormComponentLabel();
        addOrReplace(labelIfRegular);
        if(getModel().isRequired()) {
            labelIfRegular.add(new CssClassAppender("mandatory"));
        }

        final String describedAs = getModel().getDescribedAs();
        if(describedAs != null) {
            labelIfRegular.add(new AttributeModifier("title", Model.of(describedAs)));
        }
       
        addFeedbackTo(labelIfRegular, textField);
        addAdditionalLinksTo(labelIfRegular);
       
View Full Code Here

    private FormComponentLabel createFormComponentLabel() {
        final AbstractTextComponent<T> textField = getTextField();
        final String name = getModel().getName();
        textField.setLabel(Model.of(name));
       
        final FormComponentLabel scalarNameAndValue = new FormComponentLabel(ID_SCALAR_IF_REGULAR, textField);
       
        scalarNameAndValue.add(textField);

        final Label scalarName = new Label(ID_SCALAR_NAME, getRendering().getLabelCaption(textField));
       
        scalarNameAndValue.add(scalarName);

        return scalarNameAndValue;
    }
View Full Code Here

        entityLink = (EntityLink) getComponentFactoryRegistry().createComponent(ComponentType.ENTITY_LINK, getModel());

        entityLink.setOutputMarkupId(true);
        entityLink.setLabel(Model.of(name));

        final FormComponentLabel labelIfRegular = new FormComponentLabel(ID_SCALAR_IF_REGULAR, entityLink);

        labelIfRegular.add(entityLink);
        final Label scalarName = new Label(ID_SCALAR_NAME, getFormat().getLabelCaption(entityLink));
        labelIfRegular.add(scalarName);

        addOrReplace(labelIfRegular);

        addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, entityLink));
View Full Code Here

        textField.setOutputMarkupId(true);

        addStandardSemantics();
        addSemantics();

        final FormComponentLabel labelIfRegular = createFormComponentLabel();
        addOrReplace(labelIfRegular);

        addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, textField));
        return labelIfRegular;
    }
View Full Code Here

    private FormComponentLabel createFormComponentLabel() {
        final TextField<T> textField = getTextField();
        final String name = getModel().getName();
        textField.setLabel(Model.of(name));

        final FormComponentLabel scalarNameAndValue = new FormComponentLabel(ID_SCALAR_IF_REGULAR, textField);

        scalarNameAndValue.add(textField);

        final Label scalarName = new Label(ID_SCALAR_NAME, getFormat().getLabelCaption(textField));
        scalarNameAndValue.add(scalarName);

        return scalarNameAndValue;
    }
View Full Code Here

        checkBox = createCheckBox(ID_SCALAR_VALUE);

        checkBox.setLabel(Model.of(name));

        final FormComponentLabel labelIfRegular = new FormComponentLabel(ID_SCALAR_IF_REGULAR, checkBox);
        labelIfRegular.add(checkBox);

        final Label scalarName = new Label(ID_SCALAR_NAME, getFormat().getLabelCaption(checkBox));
        labelIfRegular.add(scalarName);

        addOrReplace(labelIfRegular);
        addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, checkBox));

        return labelIfRegular;
View Full Code Here

        valueField = createDropDownChoices(choicesMementos, modelObject);

        addStandardSemantics();
        // addSemantics();

        final FormComponentLabel labelIfRegular = createFormComponentLabel();
        addOrReplace(labelIfRegular);

        addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, valueField));
        return labelIfRegular;
    }
View Full Code Here

    protected FormComponentLabel createFormComponentLabel() {
        final String name = getModel().getName();
        valueField.setLabel(Model.of(name));

        final FormComponentLabel scalarNameAndValue = new FormComponentLabel(ID_SCALAR_IF_REGULAR, valueField);

        final Label scalarName = new Label(ID_SCALAR_NAME, getFormat().getLabelCaption(valueField));
        scalarNameAndValue.add(scalarName);
        scalarNameAndValue.add(valueField);

        // scalarNameAndValue.add(dropDownChoicesForValueMementos);

        return scalarNameAndValue;
    }
View Full Code Here

        entityLink = (EntityLink) getComponentFactoryRegistry().createComponent(ComponentType.ENTITY_LINK, getModel());

        entityLink.setOutputMarkupId(true);
        entityLink.setLabel(Model.of(name));

        final FormComponentLabel labelIfRegular = new FormComponentLabel(ID_SCALAR_IF_REGULAR, entityLink);

        labelIfRegular.add(entityLink);
        final Label scalarName = new Label(ID_SCALAR_NAME, getFormat().getLabelCaption(entityLink));
        labelIfRegular.add(scalarName);

        addOrReplace(labelIfRegular);

        addOrReplace(new ComponentFeedbackPanel(ID_FEEDBACK, entityLink));
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.FormComponentLabel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.