本文整理匯總了Java中org.apache.wicket.markup.html.form.DropDownChoice.getModelObject方法的典型用法代碼示例。如果您正苦於以下問題:Java DropDownChoice.getModelObject方法的具體用法?Java DropDownChoice.getModelObject怎麽用?Java DropDownChoice.getModelObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.wicket.markup.html.form.DropDownChoice
的用法示例。
在下文中一共展示了DropDownChoice.getModelObject方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createContentQuery
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
@Override
protected ObjectQuery createContentQuery() {
String oid = getModelObject().getOid();
DropDownChoice<String> searchScopeChoice = (DropDownChoice<String>) get(
createComponentPath(ID_FORM, ID_SEARCH_SCOPE));
String scope = searchScopeChoice.getModelObject();
ObjectTypes searchType = getSearchType();
S_FilterEntryOrEmpty q = QueryBuilder.queryFor(ObjectType.class, getPageBase().getPrismContext());
if (!searchType.equals(ObjectTypes.OBJECT)) {
q = q.type(searchType.getClassDefinition());
}
ObjectQuery query;
if (SEARCH_SCOPE_ONE.equals(scope)) {
query = q.isDirectChildOf(oid).build();
} else {
query = q.isChildOf(oid).build();
}
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Searching members of org {} with query:\n{}", oid, query.debugDump());
}
return query;
}
示例2: discoverConnectorsPerformed
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void discoverConnectorsPerformed(AjaxRequestTarget target) {
DropDownChoice<PrismObject<ConnectorHostType>> connectorHostChoice =
((DropDownFormGroup<PrismObject<ConnectorHostType>>) get(ID_CONNECTOR_HOST)).getInput();
PrismObject<ConnectorHostType> connectorHostObject = connectorHostChoice.getModelObject();
ConnectorHostType host = connectorHostObject != null ? connectorHostObject.asObjectable() : null;
if (host != null) {
discoverConnectors(host);
allConnectorsModel.reset();
}
relevantConnectorsModel.reset();
DropDownFormGroup<PrismObject<ConnectorType>> connectorDropDown = getConnectorDropDown();
PrismObject<ConnectorType> selectedConnector = connectorDropDown.getInput().getModelObject();
if (selectedConnector != null) {
if (!isConnectorOnHost(selectedConnector, connectorHostObject)) {
PrismObject<ConnectorType> compatibleConnector = null;
for (PrismObject<ConnectorType> relevantConnector : relevantConnectorsModel.getObject()) {
if (isConfigurationSchemaCompatible(relevantConnector)) {
compatibleConnector = relevantConnector;
break;
}
}
selectedConnectorModel.setObject(compatibleConnector);
}
}
target.add(connectorDropDown.getInput(), connectorDropDown.getAdditionalInfoComponent(), ((PageBase) getPage()).getFeedbackPanel());
}
示例3: refreshTable
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
protected void refreshTable(AjaxRequestTarget target) {
DropDownChoice<ObjectTypes> typeChoice = (DropDownChoice<ObjectTypes>) get(
createComponentPath(ID_FORM, ID_SEARCH_BY_TYPE));
ObjectTypes type = typeChoice.getModelObject();
target.add(get(createComponentPath(ID_FORM, ID_SEARCH_SCOPE)));
getMemberTable().clearCache();
getMemberTable().refreshTable(WebComponentUtil
.qnameToClass(getPageBase().getPrismContext(), type.getTypeQName(), ObjectType.class), target);
}
示例4: createDirectMemberQuery
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
protected ObjectQuery createDirectMemberQuery() {
ObjectQuery query;
String oid = getModelObject().getOid();
S_AtomicFilterExit q = QueryBuilder.queryFor(FocusType.class, getPrismContext())
.item(FocusType.F_ASSIGNMENT, AssignmentType.F_TARGET_REF)
.ref(createReferenceValuesList());
ChooseTypePanel<OrgType> tenantChoice = (ChooseTypePanel) get(createComponentPath(ID_TENANT));
ObjectViewDto<OrgType> tenant = tenantChoice.getModelObject();
if (tenant != null && tenant.getObjectType() != null) {
q = q.and().item(FocusType.F_ASSIGNMENT, AssignmentType.F_TENANT_REF).ref(createReference(tenant.getObjectType()).asReferenceValue());
}
ChooseTypePanel<OrgType> projectChoice = (ChooseTypePanel) get(createComponentPath(ID_PROJECT));
ObjectViewDto<OrgType> project = projectChoice.getModelObject();
if (project != null && project.getObjectType() !=null) {
q = q.and().item(FocusType.F_ASSIGNMENT, AssignmentType.F_ORG_REF).ref(createReference(project.getObjectType()).asReferenceValue());
}
query = q.build();
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Searching members of role {} with query:\n{}", oid, query.debugDump());
}
DropDownChoice<QName> objectTypeChoice = (DropDownChoice) get(createComponentPath(ID_OBJECT_TYPE));
QName objectType = objectTypeChoice.getModelObject();
if (objectType == null || FocusType.COMPLEX_TYPE.equals(objectType)) {
return query;
} else {
return ObjectQuery.createObjectQuery(TypeFilter.createType(objectType, query.getFilter()));
}
}
示例5: createContentQuery
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
@Override
protected ObjectQuery createContentQuery() {
String oid = getModelObject().getOid();
DropDownChoice<String> searchScopeChoice = (DropDownChoice<String>) get(
createComponentPath(ID_FORM, ID_SEARCH_SCOPE));
String scope = searchScopeChoice.getModelObject();
ObjectTypes searchType = getSearchType();
S_FilterEntryOrEmpty q = QueryBuilder.queryFor(ObjectType.class, getPageBase().getPrismContext());
if (!searchType.equals(ObjectTypes.OBJECT)) {
q = q.type(searchType.getClassDefinition());
}
RelationTypes relation = getSelectedRelation();
QName relationValue = null;
if (relation == null){
relationValue = PrismConstants.Q_ANY;
} else {
relationValue = relation.getRelation();
}
PrismReferenceValue ref = new PrismReferenceValue(oid);
ref.setRelation(relationValue);
ObjectQuery query;
if (SEARCH_SCOPE_ONE.equals(scope)) {
query = q.isDirectChildOf(ref)
.build();
} else {
query = q.isChildOf(ref)
.build();
}
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Searching members of org {} with query:\n{}", oid, query.debugDump());
}
return query;
}
示例6: createDirectMemberQuery
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
protected ObjectQuery createDirectMemberQuery(List<QName> relations) {
ObjectQuery query;
String oid = getModelObject().getOid();
S_AtomicFilterExit q = QueryBuilder.queryFor(FocusType.class, getPrismContext())
.item(FocusType.F_ASSIGNMENT, AssignmentType.F_TARGET_REF)
.ref(createReferenceValuesList(relations));
ChooseTypePanel<OrgType> tenantChoice = (ChooseTypePanel) get(createComponentPath(ID_TENANT));
ObjectViewDto<OrgType> tenant = tenantChoice.getModelObject();
if (tenant != null && tenant.getObjectType() != null) {
q = q.and().item(FocusType.F_ASSIGNMENT, AssignmentType.F_TENANT_REF).ref(createReference(tenant.getObjectType()).asReferenceValue());
}
ChooseTypePanel<OrgType> projectChoice = (ChooseTypePanel) get(createComponentPath(ID_PROJECT));
ObjectViewDto<OrgType> project = projectChoice.getModelObject();
if (project != null && project.getObjectType() !=null) {
q = q.and().item(FocusType.F_ASSIGNMENT, AssignmentType.F_ORG_REF).ref(createReference(project.getObjectType()).asReferenceValue());
}
query = q.build();
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Searching members of role {} with query:\n{}", oid, query.debugDump());
}
DropDownChoice<QName> objectTypeChoice = (DropDownChoice) get(createComponentPath(ID_OBJECT_TYPE));
QName objectType = objectTypeChoice.getModelObject();
if (objectType == null || FocusType.COMPLEX_TYPE.equals(objectType)) {
return query;
} else {
return ObjectQuery.createObjectQuery(TypeFilter.createType(objectType, query.getFilter()));
}
}
示例7: createOrgChildQuery
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
protected ObjectQuery createOrgChildQuery() {
SelectableBean<OrgType> dto = selected.getObject();
String oid = dto != null && dto.getValue() != null ? dto.getValue().getOid() : getModel().getObject();
BasicSearchPanel<String> basicSearch = (BasicSearchPanel) get(createComponentPath(ID_SEARCH_FORM, ID_BASIC_SEARCH));
String object = basicSearch.getModelObject();
DropDownChoice<String> searchScopeChoice = (DropDownChoice) get(createComponentPath(ID_SEARCH_FORM, ID_SEARCH_SCOPE));
String scope = searchScopeChoice.getModelObject();
if (StringUtils.isBlank(object)) {
object = null;
}
PageBase page = getPageBase();
PrismContext context = page.getPrismContext();
S_AtomicFilterExit q;
if (object == null || SEARCH_SCOPE_ONE.equals(scope)) {
q = QueryBuilder.queryFor(OrgType.class, context)
.isDirectChildOf(oid);
} else {
q = QueryBuilder.queryFor(OrgType.class, context)
.isChildOf(oid);
}
if (object == null) {
return q.build();
}
PolyStringNormalizer normalizer = context.getDefaultPolyStringNormalizer();
String normalizedString = normalizer.normalize(object);
if (StringUtils.isEmpty(normalizedString)) {
return q.build();
}
ObjectQuery query = q.and().block()
.item(OrgType.F_NAME).containsPoly(normalizedString).matchingNorm()
.or().item(OrgType.F_DISPLAY_NAME).containsPoly(normalizedString).matchingNorm()
.build();
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Searching child orgs of org {} with query:\n{}", oid, query.debugDump());
}
return query;
}
示例8: getSearchType
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private ObjectTypes getSearchType() {
DropDownChoice<ObjectTypes> searchByTypeChoice = (DropDownChoice<ObjectTypes>) get(
createComponentPath(ID_FORM, ID_SEARCH_BY_TYPE));
return searchByTypeChoice.getModelObject();
}
示例9: refreshTable
import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
protected void refreshTable(AjaxRequestTarget target) {
DropDownChoice<QName> typeChoice = (DropDownChoice) get(createComponentPath(ID_OBJECT_TYPE));
QName type = typeChoice.getModelObject();
getMemberTable().clearCache();
getMemberTable().refreshTable(WebComponentUtil.qnameToClass(getPrismContext(), type, FocusType.class), target);
}