Java Code Examples for org.apache.wicket.markup.ComponentTag#setName()

The following examples show how to use org.apache.wicket.markup.ComponentTag#setName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VizigatorLinkFunctionBoxPanel.java    From ontopia with Apache License 2.0 6 votes vote down vote up
@Override
protected Component getLink(String id) {
  PageParameters pageParameters = new PageParameters();
  pageParameters.put("topicMapId", getTopicMapId());
  pageParameters.put("topicId", getTopicId());
  
  return new BookmarkablePageLink<Page>(id, VizigatorPage.class, pageParameters) {
    @Override
    protected void onComponentTag(ComponentTag tag) {
      tag.setName("a");
      //tag.put("target", "_blank");
      super.onComponentTag(tag);
    }
    @Override
    protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
      replaceComponentTagBody(markupStream, openTag, new ResourceModel("vizigator.text2").getObject().toString());
    }
  };
}
 
Example 2
Source File: SimpleLink.java    From nextreports-server with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	tag.setName("a");  
	tag.put("href", url);
       tag.put("class", "link");
       if (openUrlInNewWindow) {
		tag.put("target", "_blank");
	}
}
 
Example 3
Source File: ButtonFunctionBoxPanel.java    From ontopia with Apache License 2.0 5 votes vote down vote up
protected Component getButton(String id) {

    AjaxLink<Object> button = new AjaxLink<Object>(id) {

      @Override
      protected void onComponentTag(ComponentTag tag) {
        tag.setName("input");
        tag.put("type", "button");
        tag.put("value", getButtonLabel().getObject().toString());
        super.onComponentTag(tag);
      }

      @Override
      public void onClick(AjaxRequestTarget target) {
        ButtonFunctionBoxPanel.this.onClick(target);
      }
    };

    List<IBehavior> behaviors = getButtonBehaviors();
    if (behaviors != null) {
      Iterator<IBehavior> it = behaviors.iterator();
      while (it.hasNext()) {
        button.add(it.next());
      }
    }
    return button;
  }
 
Example 4
Source File: FieldInstanceTextArea.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("textarea");
  tag.put("cols", cols);
  tag.put("rows", rows);
  super.onComponentTag(tag);
}
 
Example 5
Source File: FieldInstanceNumberField.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("input");
  tag.put("type", "text");
  tag.put("size", cols);
  super.onComponentTag(tag);
}
 
Example 6
Source File: FieldInstanceDateTimeField.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("input");
  tag.put("type", "text");
  tag.put("size", cols);
  super.onComponentTag(tag);
}
 
Example 7
Source File: FieldInstanceDateField.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("input");
  tag.put("type", "text");
  tag.put("size", cols);
  super.onComponentTag(tag);
}
 
Example 8
Source File: AjaxOntopolyTextField.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("input");
  tag.put("type", "text");
  tag.put("size", (cols != null ? cols : new ResourceModel("textfield.default.size").getObject().toString()));
  super.onComponentTag(tag);
}
 
Example 9
Source File: ProjectAvatarLink.java    From onedev with MIT License 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	configure();
	if (!isEnabled())
		tag.setName("span");
	tag.put("title", tooltip);
}
 
Example 10
Source File: FieldInstanceTextField.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("input");
  tag.put("type", "text");
  tag.put("size", cols);
  super.onComponentTag(tag);
}
 
Example 11
Source File: VizigatorPage.java    From ontopia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("param");
  tag.put("name", getName());
  tag.put("value", getValue());
  super.onComponentTag(tag);
}
 
Example 12
Source File: BranchLink.java    From onedev with MIT License 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	configure();
	if (!isEnabled())
		tag.setName("span");
}
 
Example 13
Source File: UserAvatar.java    From onedev with MIT License 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	
	tag.setName("img");
	tag.put("src", url);
}
 
Example 14
Source File: ProjectAvatar.java    From onedev with MIT License 5 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	
	tag.setName("img");
	tag.append("class", "project-avatar", " ");
	tag.put("src", url);
}
 
Example 15
Source File: AjaxOntopolyDropDownChoice.java    From ontopia with Apache License 2.0 4 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("select");
  super.onComponentTag(tag);
}
 
Example 16
Source File: OntopolyBookmarkablePageLink.java    From ontopia with Apache License 2.0 4 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("a");
  super.onComponentTag(tag);
}
 
Example 17
Source File: TopicLink.java    From ontopia with Apache License 2.0 4 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
  tag.setName("a");
  super.onComponentTag(tag);
}
 
Example 18
Source File: PersonIdentPanel.java    From onedev with MIT License 4 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	tag.setName("a");
}
 
Example 19
Source File: UserIdentPanel.java    From onedev with MIT License 4 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	tag.setName("a");
}
 
Example 20
Source File: JobDefLink.java    From onedev with MIT License 4 votes vote down vote up
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	if (!isEnabled())
		tag.setName("span");
}