mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 12:17:41 +08:00
PL-8764 Create CustomValueCollectionDatasource, CustomValueGroupDatasource, CustomValueHierarchicalDatasource (datasourceClass XML attribute)
This commit is contained in:
parent
608f29f5e1
commit
6ed7ee38a4
@ -2324,6 +2324,7 @@
|
|||||||
<xs:attribute name="id" type="xs:string" use="required"/>
|
<xs:attribute name="id" type="xs:string" use="required"/>
|
||||||
<xs:attribute name="maxResults" type="xs:int"/>
|
<xs:attribute name="maxResults" type="xs:int"/>
|
||||||
<xs:attribute name="store" type="xs:string"/>
|
<xs:attribute name="store" type="xs:string"/>
|
||||||
|
<xs:attribute name="datasourceClass" type="xs:string"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<!-- ValueGroupDatasource -->
|
<!-- ValueGroupDatasource -->
|
||||||
@ -2342,6 +2343,7 @@
|
|||||||
<xs:attribute name="id" type="xs:string" use="required"/>
|
<xs:attribute name="id" type="xs:string" use="required"/>
|
||||||
<xs:attribute name="maxResults" type="xs:int"/>
|
<xs:attribute name="maxResults" type="xs:int"/>
|
||||||
<xs:attribute name="store" type="xs:string"/>
|
<xs:attribute name="store" type="xs:string"/>
|
||||||
|
<xs:attribute name="datasourceClass" type="xs:string"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<!-- ValueHierarchicalDatasource -->
|
<!-- ValueHierarchicalDatasource -->
|
||||||
@ -2361,6 +2363,7 @@
|
|||||||
<xs:attribute name="maxResults" type="xs:int"/>
|
<xs:attribute name="maxResults" type="xs:int"/>
|
||||||
<xs:attribute name="store" type="xs:string"/>
|
<xs:attribute name="store" type="xs:string"/>
|
||||||
<xs:attribute name="hierarchyProperty" type="xs:string"/>
|
<xs:attribute name="hierarchyProperty" type="xs:string"/>
|
||||||
|
<xs:attribute name="datasourceClass" type="xs:string"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:complexType name="valueDatasourcePropertiesType">
|
<xs:complexType name="valueDatasourcePropertiesType">
|
||||||
|
@ -464,7 +464,9 @@ public class DsContextLoader {
|
|||||||
String id = getDatasourceId(element);
|
String id = getDatasourceId(element);
|
||||||
builder.reset().setMetaClass(metadata.getClassNN(KeyValueEntity.class)).setId(id);
|
builder.reset().setMetaClass(metadata.getClassNN(KeyValueEntity.class)).setId(id);
|
||||||
|
|
||||||
ValueCollectionDatasourceImpl datasource = builder.buildValuesCollectionDatasource();
|
ValueCollectionDatasourceImpl datasource = builder
|
||||||
|
.setDsClass(getDatasourceClass(element))
|
||||||
|
.buildValuesCollectionDatasource();
|
||||||
|
|
||||||
String maxResults = element.attributeValue("maxResults");
|
String maxResults = element.attributeValue("maxResults");
|
||||||
if (!StringUtils.isEmpty(maxResults))
|
if (!StringUtils.isEmpty(maxResults))
|
||||||
@ -485,7 +487,9 @@ public class DsContextLoader {
|
|||||||
String id = getDatasourceId(element);
|
String id = getDatasourceId(element);
|
||||||
builder.reset().setMetaClass(metadata.getClassNN(KeyValueEntity.class)).setId(id);
|
builder.reset().setMetaClass(metadata.getClassNN(KeyValueEntity.class)).setId(id);
|
||||||
|
|
||||||
ValueGroupDatasourceImpl datasource = builder.buildValuesGroupDatasource();
|
ValueGroupDatasourceImpl datasource = builder
|
||||||
|
.setDsClass(getDatasourceClass(element))
|
||||||
|
.buildValuesGroupDatasource();
|
||||||
|
|
||||||
String maxResults = element.attributeValue("maxResults");
|
String maxResults = element.attributeValue("maxResults");
|
||||||
if (!StringUtils.isEmpty(maxResults))
|
if (!StringUtils.isEmpty(maxResults))
|
||||||
@ -506,7 +510,9 @@ public class DsContextLoader {
|
|||||||
String id = getDatasourceId(element);
|
String id = getDatasourceId(element);
|
||||||
builder.reset().setMetaClass(metadata.getClassNN(KeyValueEntity.class)).setId(id);
|
builder.reset().setMetaClass(metadata.getClassNN(KeyValueEntity.class)).setId(id);
|
||||||
|
|
||||||
ValueHierarchicalDatasourceImpl datasource = builder.buildValuesHierarchicalDatasource();
|
ValueHierarchicalDatasourceImpl datasource = builder
|
||||||
|
.setDsClass(getDatasourceClass(element))
|
||||||
|
.buildValuesHierarchicalDatasource();
|
||||||
|
|
||||||
String maxResults = element.attributeValue("maxResults");
|
String maxResults = element.attributeValue("maxResults");
|
||||||
if (!StringUtils.isEmpty(maxResults))
|
if (!StringUtils.isEmpty(maxResults))
|
||||||
|
Loading…
Reference in New Issue
Block a user