當前位置: 首頁>>代碼示例>>Java>>正文


Java ComponentTag.append方法代碼示例

本文整理匯總了Java中org.apache.wicket.markup.ComponentTag.append方法的典型用法代碼示例。如果您正苦於以下問題:Java ComponentTag.append方法的具體用法?Java ComponentTag.append怎麽用?Java ComponentTag.append使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.markup.ComponentTag的用法示例。


在下文中一共展示了ComponentTag.append方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	
	tag.setName("img");
	tag.append("class", "avatar", " ");
	tag.put("src", url);
}
 
開發者ID:jmfgdev,項目名稱:gitplex-mit,代碼行數:9,代碼來源:Avatar.java

示例2: newSortableHeader

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected WebMarkupContainer newSortableHeader(String headerId, final String property, final ISortStateLocator locator) {
    return new AjaxFallbackOrderByBorder(headerId, property, locator) {

        @Override
        protected void onSortChanged() {
            getTable().setCurrentPage(0);
        }
        
        @Override
        protected void onAjaxClick(AjaxRequestTarget target) {
        	target.add(getTable());
        }

        @Override
        public void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            ISortState sortState = locator.getSortState();
            SortOrder dir = sortState.getPropertySortOrder(property);
            String cssClass;
            if (dir == SortOrder.ASCENDING) {
                cssClass = "sortable asc";
            } else if (dir == SortOrder.DESCENDING) {
                cssClass = "sortable desc";
            } else {
                cssClass = "sortable";
            }

            if (!Strings.isEmpty(cssClass)) {
                tag.append("class", cssClass, " ");
            }
        }
    };
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:35,代碼來源:TableHeadersToolbar.java

示例3: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(Component component, ComponentTag tag) {
	// Si on a une behavior Select2, le select ne sera pas affiché : on conserve l'attribut disabled pour que Select2 s'y retrouve
	if (component.getBehaviors(Select2Behavior.class).isEmpty()) {
		tag.remove("disabled"); // Empêche bootstrap-tooltip de fonctionner
	}
	tag.append("class", "disabled disabled-with-tooltip", " ");
	tag.put("title", tooltipModel.getObject());
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:10,代碼來源:TooltipAndCssClassWhenDisabledBehavior.java

示例4: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(ComponentTag openTag) {
	super.onComponentTag(openTag);
	if (isEnabled()) {
		openTag.append("class", enabledClassName, " ");
	} else {
		openTag.append("class", disabledClassName, " ");
	}
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:10,代碼來源:EnabledContainer.java

示例5: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(final ComponentTag tag) {
	Boolean value = getValue();
	
	if (value != null && value) {
		tag.append(CLASS_ATTRIBUTE, trueIconClassModel != null ? trueIconClassModel.getObject() : null, CLASS_SEPARATOR);
	} else if (showFalseIcon) {
		tag.append(CLASS_ATTRIBUTE, falseIconClassModel != null ? falseIconClassModel.getObject() : null, CLASS_SEPARATOR);
	}
	super.onComponentTag(tag);
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:12,代碼來源:BooleanGlyphicon.java

示例6: disableLink

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void disableLink(final ComponentTag tag) {
    if (isBootstrapButtonStyle(tag)) {
        tag.setName("button");
        tag.put("type", "button");
        tag.append("class", "btn-disabled", " ");
    }
    super.disableLink(tag);
    tag.setName("a"); //for bootstrap it should be a and not span
}
 
開發者ID:subes,項目名稱:invesdwin-nowicket,代碼行數:11,代碼來源:AModelAjaxFallbackLink.java

示例7: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag aTag)
{
    super.onComponentTag(aTag);
    
    final SourceListView curationViewItem = getModelObject();
    
    // Is in focus?
    if (curationViewItem.getSentenceNumber() == state.getFocusUnitIndex()) {
        aTag.append("class", "current", " ");
    }
    
    // Agree or disagree?
    String cC = curationViewItem.getSentenceState().getValue();
    if (cC != null) {
        aTag.append("class", "disagree", " ");
    }
    else {
        aTag.append("class", "agree", " ");
    }
    
    // In range or not?
    if (curationViewItem.getSentenceNumber() >= fSn
            && curationViewItem.getSentenceNumber() <= lSn) {
        aTag.append("class", "in-range", " ");
    }
    else {
        aTag.append("class", "out-range", " ");
    }
}
 
開發者ID:webanno,項目名稱:webanno,代碼行數:31,代碼來源:CurationPanel.java

示例8: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(Component component, ComponentTag tag) {
    tag.append("class", "tree-theme-basic", " ");
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:5,代碼來源:TreeThemeBasic.java

示例9: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	tag.append("class", "bpmn", " ");
}
 
開發者ID:OrienteerBAP,項目名稱:wicket-bpmn-io,代碼行數:6,代碼來源:AbstractBpmnIoPanel.java

示例10: EditablePanelDate

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
public EditablePanelDate(String id, IModel inputModel, final NodeModel nodeModel, final TreeNode node, final boolean startDate)
{
	super(id);

	if (startDate && nodeModel.getNodeShoppingPeriodStartDate() != null) {
		dateTextField = DateFormatterUtil.format(nodeModel.getNodeShoppingPeriodStartDate(), DATEPICKER_FORMAT, getSession().getLocale());
	}
	if (!startDate && nodeModel.getShoppingPeriodEndDate() != null) {
		dateTextField = DateFormatterUtil.format(nodeModel.getNodeShoppingPeriodEndDate(), DATEPICKER_FORMAT, getSession().getLocale());
	}

	final TextField date = new TextField<String>("dateTextField", new PropertyModel<String>(this, "dateTextField")){
		@Override
		public boolean isVisible() {
			return nodeModel.isDirectAccess() && nodeModel.getNodeShoppingPeriodAdmin();
		}
		@Override
		protected void onComponentTag(ComponentTag tag) {
			super.onComponentTag(tag);
			tag.append("size", "8", "");
			tag.append("readonly", "readonly", "");
			tag.append("class", "formInputField", " ");
			tag.append("class", "datePicker", " ");
		}
	};
	String dateInputId = ((startDate) ? "dateTextFieldStart_" : "dateTextFieldEnd_") + nodeModel.getNodeId();
	date.setMarkupId(dateInputId);

	final HiddenField hiddenInput = new HiddenField<String>("hiddenDateTextField", new PropertyModel<String>(this, "hiddenDateTextField"));
	String hiddenInputId = String.format((startDate) ? HIDDEN_START_ISO8601 : HIDDEN_END_ISO8601, nodeModel.getNodeId());
	hiddenInput.setMarkupId(hiddenInputId);
	hiddenInput.add(new AjaxFormComponentUpdatingBehavior("onchange")
	{
		@Override
		protected void onUpdate(AjaxRequestTarget target)
		{
			if (DateFormatterUtil.isValidISODate(hiddenDateTextField) && hiddenDateTextField != null){
				Date hiddenDate = DateFormatterUtil.parseISODate(hiddenDateTextField);
				if(startDate){
					nodeModel.setShoppingPeriodStartDate(hiddenDate);
					dateTextField = DateFormatterUtil.format(hiddenDate, DATEPICKER_FORMAT, getSession().getLocale());
				}else{
					nodeModel.setShoppingPeriodEndDate(hiddenDate);
					dateTextField = DateFormatterUtil.format(hiddenDate, DATEPICKER_FORMAT, getSession().getLocale());
				}

				//In order for the models to refresh, you have to call "expand" or "collapse" then "updateTree",
				//since I don't want to expand or collapse, I just call whichever one the node is already
				//Refreshing the tree will update all the models and information (like role) will be generated onClick
				if(((BaseTreePage)target.getPage()).getTree().getTreeState().isNodeExpanded(node)){
					((BaseTreePage)target.getPage()).getTree().getTreeState().expandNode(node);
				}else{
					((BaseTreePage)target.getPage()).getTree().getTreeState().collapseNode(node);
				}
				((BaseTreePage)target.getPage()).getTree().updateTree(target);
				target.focusComponent(hiddenInput);
			}
		}

	});
	add(date);
	add(hiddenInput);
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:64,代碼來源:EditablePanelDate.java

示例11: onComponentTag

import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(Component component, ComponentTag tag) {
	tag.append("class", "tree-theme-uqasar", " ");
}
 
開發者ID:U-QASAR,項目名稱:u-qasar.platform,代碼行數:5,代碼來源:UQasarTreeTheme.java


注:本文中的org.apache.wicket.markup.ComponentTag.append方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。