no message
This commit is contained in:
parent
028410c128
commit
e4ed1bbaa6
|
@ -11,8 +11,7 @@ public class UserManager {
|
||||||
Document viewStyleDoc = XmlBuilder.fromXml(profile.getViewstyle().getDefinition());
|
Document viewStyleDoc = XmlBuilder.fromXml(profile.getViewstyle().getDefinition());
|
||||||
Element root = (Element)viewStyleDoc.getDocumentElement();
|
Element root = (Element)viewStyleDoc.getDocumentElement();
|
||||||
entities.xmlmodels.viewstyledefinition.ViewStyleModel viewstyle= new entities.xmlmodels.viewstyledefinition.ViewStyleModel().fromXml(root);
|
entities.xmlmodels.viewstyledefinition.ViewStyleModel viewstyle= new entities.xmlmodels.viewstyledefinition.ViewStyleModel().fromXml(root);
|
||||||
JSONObject jobject = new JSONObject(viewstyle);
|
|
||||||
System.out.println(jobject.toString());
|
|
||||||
Document profileDoc = XmlBuilder.fromXml(profile.getDefinition());
|
Document profileDoc = XmlBuilder.fromXml(profile.getDefinition());
|
||||||
root = (Element)profileDoc.getDocumentElement();
|
root = (Element)profileDoc.getDocumentElement();
|
||||||
entities.xmlmodels.modeldefinition.FieldGroup fieldGroup = new entities.xmlmodels.modeldefinition.FieldGroup().fromXml(root);
|
entities.xmlmodels.modeldefinition.FieldGroup fieldGroup = new entities.xmlmodels.modeldefinition.FieldGroup().fromXml(root);
|
||||||
|
|
|
@ -120,21 +120,28 @@ public class ModelBuilderCollector {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param sections
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static List<Rule> collectRules(List<entities.xmlmodels.viewstyledefinition.Section> sections){
|
public static List<Rule> collectRules(List<entities.xmlmodels.viewstyledefinition.Section> sections){
|
||||||
List<Rule> rules = new LinkedList();
|
List<Rule> rules = new LinkedList();
|
||||||
rules.addAll(
|
for(entities.xmlmodels.viewstyledefinition.Section section: sections){
|
||||||
sections
|
if(!section.getSections().isEmpty()){
|
||||||
.stream()
|
rules.addAll(collectRules(section.getSections()));
|
||||||
.map(section->section.getFieldGroups())
|
}
|
||||||
.flatMap(List::stream)
|
rules.addAll(
|
||||||
.map(group->group.getFieldSets())
|
section.getFieldGroups().stream()
|
||||||
.flatMap(List::stream)
|
.map(group->group.getFieldSets())
|
||||||
.map(fieldset->fieldset.getFields())
|
.flatMap(List::stream)
|
||||||
.flatMap(List::stream)
|
.map(fieldset->fieldset.getFields())
|
||||||
.map(field->getRulesFromField(field.getId(),field.getVisible()
|
.flatMap(List::stream)
|
||||||
.getRules()))
|
.map(field->getRulesFromField(field.getId(),field.getVisible()
|
||||||
.flatMap(List::stream)
|
.getRules()))
|
||||||
.collect(Collectors.toList()));
|
.flatMap(List::stream)
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
|
||||||
return rules;
|
return rules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="ui-g dynamic-form">
|
<div class="ui-g dynamic-form">
|
||||||
<ng-sidebar-container class="ui-g" style="height: 100vh;">
|
<ng-sidebar-container class="ui-g" style="height: 100vh;">
|
||||||
<ng-sidebar mode="push" style="height: 100vh;" position="right" [(opened)]="visibleSidebar">
|
<ng-sidebar mode="push" style="height: 100vh;" position="right" [(opened)]="visibleSidebar">
|
||||||
<table-of-content [model]="dataModel"></table-of-content>
|
<!-- <table-of-content [model]="dataModel"></table-of-content> -->
|
||||||
</ng-sidebar>
|
</ng-sidebar>
|
||||||
|
|
||||||
<div class="ui-g" ng-sidebar-content>
|
<div class="ui-g" ng-sidebar-content>
|
||||||
|
@ -13,8 +13,8 @@
|
||||||
[readonly]="false"></p-steps>
|
[readonly]="false"></p-steps>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-g-12">
|
<div class="ui-g-12">
|
||||||
<progress-bar *ngIf="form" [formGroup]="form"></progress-bar>
|
<!-- <progress-bar *ngIf="form" [formGroup]="form"></progress-bar>
|
||||||
</div>
|
--> </div>
|
||||||
<div class="col-md-12 form-body-container" id="form-container">
|
<div class="col-md-12 form-body-container" id="form-container">
|
||||||
|
|
||||||
<form *ngIf="form" novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
<form *ngIf="form" novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||||
|
|
|
@ -13,6 +13,6 @@ export class PaginationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public isElementVisible(elementPage: number):boolean {
|
public isElementVisible(elementPage: number):boolean {
|
||||||
return elementPage - 1 == this.currentPageIndex ; //TODO
|
return elementPage == this.currentPageIndex ; //TODO
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,11 +6,12 @@ import {Field} from './Field'
|
||||||
export class CompositeField extends BaseModel implements Serializable<CompositeField> {
|
export class CompositeField extends BaseModel implements Serializable<CompositeField> {
|
||||||
public fields:Array<Field> = new Array<Field>();
|
public fields:Array<Field> = new Array<Field>();
|
||||||
public ordinal:number
|
public ordinal:number
|
||||||
|
public id:number
|
||||||
fromJSONObject(item:any):CompositeField{
|
fromJSONObject(item:any):CompositeField{
|
||||||
|
|
||||||
this.fields = new JsonSerializer<Field>().fromJSONArray(item.fields,Field);
|
this.fields = new JsonSerializer<Field>().fromJSONArray(item.fields,Field);
|
||||||
this.ordinal = item.ordinal;
|
this.ordinal = item.ordinal;
|
||||||
|
this.id = item.id;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ export class VisibilityRulesService {
|
||||||
if (this.checkElementVisibility(visibilityRule)) {
|
if (this.checkElementVisibility(visibilityRule)) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
if (pathKey) this.formGroup.get(pathKey + '.value').patchValue(null)
|
if (pathKey && this.formGroup.get(pathKey + '.value')) this.formGroup.get(pathKey + '.value').patchValue(null)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue