<% for (AssociationVariable assocVar: mergeList) { %> <% BackingObject assBck=bckObject.getFragmentProvider().getClassMap().get(assocVar.getType()); String assPack=preffix + ((assBck.getPackageName().trim().length()>0)?("." + assBck.getPackageName()):"");%> var a<%=assocVar.getUpperCaseName()%>:<%=assocVar.getType()%>; <% for (AttributeVariable attVar: assBck.getKeysAttributes()) { %> <%=bckObject.getFragmentProvider().getDeclarationFragment(attVar, attVar.getValue()!=null?"false":"true",attVar.getValue()!=null?attVar.getValue():"\"\"", "false", assocVar.getUpperCaseName()+"Selected", " bind a"+assocVar.getUpperCaseName()+"!=null")%> <% } %> var a<%=assocVar.getUpperCaseName()%>VBox = VBox { spacing: 5 nodeHPos: HPos.RIGHT content: [ <% iterList= assBck.getKeysAttributes().iterator(); while (iterList.hasNext()) { AttributeVariable attVar=iterList.next(); %> HBox {spacing: 5; content:[ Label { text: "<%=attVar.getUpperCaseName()%>" translateX: 0 translateY: 1 }, <%=attVar.getName()%><%=assocVar.getUpperCaseName()%>SelectedBox]}<%=iterList.hasNext()?",":""%> <%}%> ] } var a<%=assocVar.getUpperCaseName()%>Box = HBox { spacing: 5; nodeVPos: VPos.CENTER; content: [ a<%=assocVar.getUpperCaseName()%>VBox, Button { graphic: ImageView {image: Application.imageGlass} width: 16 cursor: Cursor.HAND skin: ButtonSkin { borderFill: Color.TRANSPARENT focusFill: Color.TRANSPARENT highlightFill: Color.TRANSPARENT shadowFill: Color.TRANSPARENT textFill: Color.TRANSPARENT fill: Color.TRANSPARENT } action: function () { goto<%=assocVar.getUpperCaseName()%>s(); } } ]} function goto<%=assocVar.getUpperCaseName()%>s() { var view: <%=assPack%>.<%=assocVar.getType()%>SelectOneView = <%=assPack%>.<%=assocVar.getType()%>SelectOneView{ selected<%=assocVar.getType()%>: a<%=assocVar.getUpperCaseName()%> onConfirm: function () { <% for (AttributeVariable attVar: assBck.getKeysAttributes()) { %> <%=bckObject.getFragmentProvider().getAsignationFragment(attVar, "view.selected"+assocVar.getType()+".get"+attVar.getUpperCaseName()+"()", assocVar.getUpperCaseName() +"Selected") %> <%}%> a<%=assocVar.getUpperCaseName()%> = view.selected<%=assocVar.getType()%>; view.stage.close(); } } // DialogUtils { }; var popUp:PopUp=PopUp { title: "<%=assocVar.getUpperCaseName()%>s" header: HBox { spacing: 0 nodeVPos: VPos.BOTTOM content: [ Text { content: "<%=assocVar.getUpperCaseName()%>s" fill: Color.WHITE; font: Font {name: "Arial Bold Italic" size: 24} effect: Reflection {topOffset: -4} } ] } content: ScrollPane { background: Color.WHITE border: 10 content: VBox { spacing: 10 content: [view.a<%=assocVar.getType()%>SelectOneView ] } } } view.stage=popUp.stage; return ""; } <% } %>