本文整理匯總了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);
}
示例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, " ");
}
}
};
}
示例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());
}
示例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, " ");
}
}
示例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);
}
示例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
}
示例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", " ");
}
}
示例8: onComponentTag
import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(Component component, ComponentTag tag) {
tag.append("class", "tree-theme-basic", " ");
}
示例9: onComponentTag
import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.append("class", "bpmn", " ");
}
示例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);
}
示例11: onComponentTag
import org.apache.wicket.markup.ComponentTag; //導入方法依賴的package包/類
@Override
public void onComponentTag(Component component, ComponentTag tag) {
tag.append("class", "tree-theme-uqasar", " ");
}