From: Ronald v. K. <Rva...@de...> - 2012-01-20 14:45:11
|
>From what I remember this is still a limitation in the dialog (implemented by me) I did not know how to fix this, so I personally put it outside the repeat and have it bind to the selected index of the repeat... Ronald > -----Original Message----- > From: Daniel Ebner [mailto:dan...@un...] > Sent: vrijdag 20 januari 2012 15:17 > To: bet...@li... > Subject: [Betterform-users] Combing Dialogs and Repeats > > Hi everyone > > I have a nodeset of items elements. > > <xf:model id="my-editor-model"> > <xf:instance id="my-editor-instance"> > <data xmlns=""> > <item id="1" name="one">eins</item> > <item id="2" name="two">zwei</item> > </data> > </xf:instance> > </xf:model> > > The data of this items is displayed using a xf:repeat > > <xf:repeat nodeset="item"> > <xf:group> > <xf:label>Item Dialog</xf:label> > <xf:input ref="./@name" /> > <xf:input ref="./@id" /> > <xf:input ref="." /> > </xf:group> > </xf:repeat> > > But what I want to do is do display this data not directly on the page but in a > bfc:dialog. On the page there should be a button for each item to open the > corresponding data dialog.I tied it this way: > > <xf:repeat nodeset="item"> > <xf:group> > <xf:trigger> > <xf:label ref="./@name"></xf:label> > <bfc:show dialog="itemDialog" > ev:event="DOMActivate"></bfc:show> > </xf:trigger> > <bfc:dialog id="itemDialog"> > <xf:label>Item Dialog</xf:label> > <xf:input ref="./@name" /> > <xf:input ref="./@id" /> > <xf:input ref="." /> > </bfc:dialog> > </xf:group> > </xf:repeat> > > This works as long as no other item elements are inserted into the nodeset. When > inserting a new item using xf:insert The data of the new Item is displayed on the > page under the corresponding button, not in a dialog. > > Do I do something wrong? Is there another way to solve this? > > Cheers Daniel > > The complete Code: > > <div> > <div> > <xf:model id="my-editor-model"> > <xf:instance id="my-editor-instance"> > <data xmlns=""> > <item id="1" name="one">eins</item> > <item id="2" name="two">zwei</item> > </data> > </xf:instance> > </xf:model> > </div> > <div> > <xf:group model="my-editor-model"> > > <xf:repeat nodeset="item"> > <xf:group> > <xf:trigger> > <xf:label ref="./@name"></xf:label> > <bfc:show dialog="itemDialog" > ev:event="DOMActivate"></bfc:show> > </xf:trigger> > <bfc:dialog id="itemDialog"> > <xf:label>Item Dialog</xf:label> > <xf:input ref="./@name" /> > <xf:input ref="./@id" /> > <xf:input ref="." /> > </bfc:dialog> > </xf:group> > </xf:repeat> > > <xf:trigger> > <xf:label>+</xf:label> > <xf:action> > <xf:insert nodeset="item"></xf:insert> > </xf:action> > </xf:trigger> > </xf:group> > </div> > </div> > > > > > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers is just > $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, > more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Betterform-users mailing list > Bet...@li... > https://lists.sourceforge.net/lists/listinfo/betterform-users |