Thread: [Xsltforms-support] Incorrect dialog opens when using repeats with tables
Brought to you by:
alain-couthures
From: David A. <am...@gm...> - 2010-02-20 20:21:52
Attachments:
dialog-repeat-table.xhtml
dialog-repeat-div.xhtml
|
When using an xf:repeat within an HTML table, the dialog that opens from an xsf:show is the correct dialog the first time that the button for the associated trigger is clicked, but clicking any other button subsequently opens the first dialog instead of correctly opening the dialog for the button that was clicked. I have a table with the following structure: <table> <xf:repeat nodeset="item"> <tr> <td> <xf:trigger> <xf:label>Modify</xf:label> <xsf:show ev:event="DOMActivate" dialog="dialog"/> </xf:trigger> </td> ... </tr> <div> <xsf:dialog id="dialog"> ... </xsf:dialog> </div> </xf:repeat> </table> If I replace all the table/tr/td elements with div/span elements, then the behavior is correct. To reproduce the issue, open the attached file "dialog-repeat-table.xhtml" in a browser. Click on the first "Modify" button. The dialog associated with the first button will open. Now, close this dialog, and click the second "Modify" button. The dialog associated with the first button will open, but this is incorrect because the dialog associated with the second button should open instead. If you open the attached file "dialog-repeat-div.xhtml" and try the same actions, then the behavior is correct and the correct dialog will open each time. This file ("dialog-repeat-div.xhtml") uses div/span elements instead of table/tr/td elements, which are used in "dialog-repeat-table.xhtml". I am using revision #314 from the SVN repository. Thank you, David |
From: COUTHURES A. <ala...@ag...> - 2010-02-20 22:00:38
|
David, It seems there is a simple workaround for this bug: insert a tbody element to contain the xf:repeat element. It works for me with the latest SVN revision. Does it work for you with revision #314 ? Thanks! -Alain > When using an xf:repeat within an HTML table, the dialog that opens > from an xsf:show is the correct dialog the first time that the button > for the associated trigger is clicked, but clicking any other button > subsequently opens the first dialog instead of correctly opening the > dialog for the button that was clicked. > > I have a table with the following structure: > > <table> > <xf:repeat nodeset="item"> > <tr> > <td> > <xf:trigger> > <xf:label>Modify</xf:label> > <xsf:show ev:event="DOMActivate" dialog="dialog"/> > </xf:trigger> > </td> > ... > </tr> > <div> > <xsf:dialog id="dialog"> > ... > </xsf:dialog> > </div> > </xf:repeat> > </table> > > If I replace all the table/tr/td elements with div/span elements, then > the behavior is correct. > > To reproduce the issue, open the attached file > "dialog-repeat-table.xhtml" in a browser. Click on the first "Modify" > button. The dialog associated with the first button will open. Now, > close this dialog, and click the second "Modify" button. The dialog > associated with the first button will open, but this is incorrect > because the dialog associated with the second button should open > instead. > > If you open the attached file "dialog-repeat-div.xhtml" and try the > same actions, then the behavior is correct and the correct dialog will > open each time. This file ("dialog-repeat-div.xhtml") uses div/span > elements instead of table/tr/td elements, which are used in > "dialog-repeat-table.xhtml". > > I am using revision #314 from the SVN repository. > > Thank you, > David > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > ------------------------------------------------------------------------ > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: David A. <am...@gm...> - 2010-02-20 22:40:51
|
Alain, For this basic case, adding a tbody element does work. However, in a more advanced case, where I am using a server endpoint to provide the instance, I still see the bug. I have determined that the inclusion of an xf:send element inside the "Close" trigger causes the behavior to occur. When the xf:send element is present in the "Close" trigger then the bug occurs, but if I remove the xf:send element then the bug does not occur. The problem is that for my application I need an xf:send action to take place on the closing of the dialog. Can you suggest a work around for this? Thank you, David On Sat, Feb 20, 2010 at 2:01 PM, COUTHURES Alain <ala...@ag...> wrote: > David, > > It seems there is a simple workaround for this bug: insert a tbody element > to contain the xf:repeat element. > > It works for me with the latest SVN revision. > > Does it work for you with revision #314 ? > > Thanks! > > -Alain > > When using an xf:repeat within an HTML table, the dialog that opens > from an xsf:show is the correct dialog the first time that the button > for the associated trigger is clicked, but clicking any other button > subsequently opens the first dialog instead of correctly opening the > dialog for the button that was clicked. > > I have a table with the following structure: > > <table> > <xf:repeat nodeset="item"> > <tr> > <td> > <xf:trigger> > <xf:label>Modify</xf:label> > <xsf:show ev:event="DOMActivate" dialog="dialog"/> > </xf:trigger> > </td> > ... > </tr> > <div> > <xsf:dialog id="dialog"> > ... > </xsf:dialog> > </div> > </xf:repeat> > </table> > > If I replace all the table/tr/td elements with div/span elements, then > the behavior is correct. > > To reproduce the issue, open the attached file > "dialog-repeat-table.xhtml" in a browser. Click on the first "Modify" > button. The dialog associated with the first button will open. Now, > close this dialog, and click the second "Modify" button. The dialog > associated with the first button will open, but this is incorrect > because the dialog associated with the second button should open > instead. > > If you open the attached file "dialog-repeat-div.xhtml" and try the > same actions, then the behavior is correct and the correct dialog will > open each time. This file ("dialog-repeat-div.xhtml") uses div/span > elements instead of table/tr/td elements, which are used in > "dialog-repeat-table.xhtml". > > I am using revision #314 from the SVN repository. > > Thank you, > David > > > ________________________________ > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > ________________________________ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > |
From: COUTHURES A. <ala...@ag...> - 2010-02-22 21:23:28
|
David, > I have determined that the inclusion of an xf:send element inside the > "Close" trigger causes the behavior to occur. When the xf:send > element is present in the "Close" trigger then the bug occurs, but if > I remove the xf:send element then the bug does not occur. > Sorry, I'm not able to reproduce this behavior by just adding an xf:send myself. Can you construct a minimal test case to allow debugging? Thanks! -Alain |