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());
|
||||
Element root = (Element)viewStyleDoc.getDocumentElement();
|
||||
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());
|
||||
root = (Element)profileDoc.getDocumentElement();
|
||||
entities.xmlmodels.modeldefinition.FieldGroup fieldGroup = new entities.xmlmodels.modeldefinition.FieldGroup().fromXml(root);
|
||||
|
|
|
@ -120,21 +120,28 @@ public class ModelBuilderCollector {
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sections
|
||||
* @return
|
||||
*/
|
||||
public static List<Rule> collectRules(List<entities.xmlmodels.viewstyledefinition.Section> sections){
|
||||
List<Rule> rules = new LinkedList();
|
||||
rules.addAll(
|
||||
sections
|
||||
.stream()
|
||||
.map(section->section.getFieldGroups())
|
||||
.flatMap(List::stream)
|
||||
.map(group->group.getFieldSets())
|
||||
.flatMap(List::stream)
|
||||
.map(fieldset->fieldset.getFields())
|
||||
.flatMap(List::stream)
|
||||
.map(field->getRulesFromField(field.getId(),field.getVisible()
|
||||
.getRules()))
|
||||
.flatMap(List::stream)
|
||||
.collect(Collectors.toList()));
|
||||
for(entities.xmlmodels.viewstyledefinition.Section section: sections){
|
||||
if(!section.getSections().isEmpty()){
|
||||
rules.addAll(collectRules(section.getSections()));
|
||||
}
|
||||
rules.addAll(
|
||||
section.getFieldGroups().stream()
|
||||
.map(group->group.getFieldSets())
|
||||
.flatMap(List::stream)
|
||||
.map(fieldset->fieldset.getFields())
|
||||
.flatMap(List::stream)
|
||||
.map(field->getRulesFromField(field.getId(),field.getVisible()
|
||||
.getRules()))
|
||||
.flatMap(List::stream)
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
return rules;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="ui-g dynamic-form">
|
||||
<ng-sidebar-container class="ui-g" style="height: 100vh;">
|
||||
<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>
|
||||
|
||||
<div class="ui-g" ng-sidebar-content>
|
||||
|
@ -13,8 +13,8 @@
|
|||
[readonly]="false"></p-steps>
|
||||
</div>
|
||||
<div class="ui-g-12">
|
||||
<progress-bar *ngIf="form" [formGroup]="form"></progress-bar>
|
||||
</div>
|
||||
<!-- <progress-bar *ngIf="form" [formGroup]="form"></progress-bar>
|
||||
--> </div>
|
||||
<div class="col-md-12 form-body-container" id="form-container">
|
||||
|
||||
<form *ngIf="form" novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
|
|
|
@ -13,6 +13,6 @@ export class PaginationService {
|
|||
}
|
||||
|
||||
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> {
|
||||
public fields:Array<Field> = new Array<Field>();
|
||||
public ordinal:number
|
||||
|
||||
public id:number
|
||||
fromJSONObject(item:any):CompositeField{
|
||||
|
||||
this.fields = new JsonSerializer<Field>().fromJSONArray(item.fields,Field);
|
||||
this.ordinal = item.ordinal;
|
||||
this.id = item.id;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ export class VisibilityRulesService {
|
|||
if (this.checkElementVisibility(visibilityRule)) {
|
||||
return true
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue