Java Code Examples for org.apache.wicket.markup.html.form.TextField.setOutputMarkupPlaceholderTag()

The following are Jave code examples for showing how to use setOutputMarkupPlaceholderTag() of the org.apache.wicket.markup.html.form.TextField class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: engerek   File: MultiValueChoosePanel.java   Source Code and License Vote up 4 votes
private void initLayout(final IModel<List<T>> chosenValues, final List<PrismReferenceValue> filterValues,
	final boolean required, final boolean multiselect) {

AjaxLink<String> edit = new AjaxLink<String>(ID_EDIT) {
	private static final long serialVersionUID = 1L;

	@Override
	public void onClick(AjaxRequestTarget target) {
		editValuePerformed(chosenValues.getObject(), filterValues, target, multiselect);
	}
};
edit.setOutputMarkupPlaceholderTag(true);
add(edit);

ListView<T> selectedRowsList = new ListView<T>(ID_SELECTED_ROWS, chosenValues) {

	@Override
	protected void populateItem(ListItem<T> item) {
		WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
		
		textWrapper.setOutputMarkupPlaceholderTag(true);

		TextField<String> text = new TextField<String>(ID_TEXT, createTextModel(item.getModel())); //was value
		text.add(new AjaxFormComponentUpdatingBehavior("blur") {
			private static final long serialVersionUID = 1L;

			@Override
			protected void onUpdate(AjaxRequestTarget ajaxRequestTarget) {
			}
		});
		text.setRequired(required);
		text.setEnabled(false);
		text.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(text);

		FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK, new ComponentFeedbackMessageFilter(text));
		feedback.setOutputMarkupPlaceholderTag(true);
		textWrapper.add(feedback);

        initButtons(item, item);
        
        item.add(textWrapper);
	}
};
selectedRowsList.setReuseItems(true);
add(selectedRowsList);
  }
 
Example 2
Project: engerek   File: QNameEditorPanel.java   Source Code and License Vote up 4 votes
private void initLayout(String localPartLabelKey, String localPartTooltipKey,
	String namespaceLabelKey, String namespaceTooltipKey, boolean markLocalPartAsRequired, boolean markNamespaceAsRequired){

      Label localPartLabel = new Label(ID_LOCAL_PART_LABEL, getString(localPartLabelKey));
      localPartLabel.setOutputMarkupId(true);
      localPartLabel.setOutputMarkupPlaceholderTag(true);
      add(localPartLabel);

WebMarkupContainer localPartRequired = new WebMarkupContainer(ID_LOCAL_PART_REQUIRED);
localPartRequired.setVisible(markLocalPartAsRequired);
add(localPartRequired);

      Label namespaceLabel = new Label(ID_NAMESPACE_LABEL, getString(namespaceLabelKey));
      namespaceLabel.setOutputMarkupId(true);
      namespaceLabel.setOutputMarkupPlaceholderTag(true);
      add(namespaceLabel);

WebMarkupContainer namespaceRequired = new WebMarkupContainer(ID_NAMESPACE_REQUIRED);
namespaceRequired.setVisible(markNamespaceAsRequired);
add(namespaceRequired);

TextField localPart = new TextField<>(ID_LOCAL_PART, localpartModel);
      localPart.setOutputMarkupId(true);
      localPart.setOutputMarkupPlaceholderTag(true);
      localPart.setRequired(isLocalPartRequired());
localPart.add(new UpdateBehavior());
      add(localPart);

      DropDownChoice namespace = new DropDownChoice<>(ID_NAMESPACE, namespaceModel, prepareNamespaceList());
      namespace.setOutputMarkupId(true);
      namespace.setOutputMarkupPlaceholderTag(true);
      namespace.setNullValid(false);
      namespace.setRequired(isNamespaceRequired());
namespace.add(new UpdateBehavior());
      add(namespace);

      Label localPartTooltip = new Label(ID_T_LOCAL_PART);
      localPartTooltip.add(new AttributeAppender("data-original-title", getString(localPartTooltipKey)));
      localPartTooltip.add(new InfoTooltipBehavior());
      localPartTooltip.setOutputMarkupPlaceholderTag(true);
      add(localPartTooltip);

      Label namespaceTooltip = new Label(ID_T_NAMESPACE);
      namespaceTooltip.add(new AttributeAppender("data-original-title", getString(namespaceTooltipKey)));
      namespaceTooltip.add(new InfoTooltipBehavior());
      namespaceTooltip.setOutputMarkupPlaceholderTag(true);
      add(namespaceTooltip);
  }