If I have a repeat containing a trigger which has an empty label (which
I style with an image using CSS), the second time I add an item to the repeat the trigger mistakenly gets given the label text of $xforms-label-value$. Attached is an example: hit the Add button twice to see the problem. I hunted through the js & the java for what could be the problem, but I found it pretty complex :) I can see in XFormsTriggerHandler where the incorrect value originates from: final String labelValue = handlerContext.isGenerateTemplate() ? "$xforms-label-value$" : controlInfo.getLabel(); But I don't understand why it's only a problem the second time around, and where to make the change to ensure $xforms-label-value$ is replaced even when the label is blank. Adrian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws badRepeatTriggerLabel.xhtml (15K) Download Attachment |
Administrator
|
Adrian,
I can reproduce this and added this bug to the tracker: http://forge.objectweb.org/tracker/index.php?func=detail&aid=304761&group_id=168&atid=350207 Alex On 3/6/06, Adrian Baker <[hidden email]> wrote: > If I have a repeat containing a trigger which has an empty label (which > I style with an image using CSS), the second time I add an item to the > repeat the trigger mistakenly gets given the label text of > $xforms-label-value$. > > Attached is an example: hit the Add button twice to see the problem. I > hunted through the js & the java for what could be the problem, but I > found it pretty complex :) I can see in XFormsTriggerHandler where the > incorrect value originates from: > > final String labelValue = handlerContext.isGenerateTemplate() ? > "$xforms-label-value$" : controlInfo.getLabel(); > > But I don't understand why it's only a problem the second time around, > and where to make the change to ensure $xforms-label-value$ is replaced > even when the label is blank. > > > > > Adrian > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Adrian,
This is fixed now. The bug was in JavaScript where in a couple of places we had if (x) {...} and we wanted to run something if x was not null and not undefined, but when x is a string which happens to be empty, this also returns false. This is the joy of languages that are not strongly typed :). Alex On 3/9/06, Alessandro Vernet <[hidden email]> wrote: > Adrian, > > I can reproduce this and added this bug to the tracker: > > http://forge.objectweb.org/tracker/index.php?func=detail&aid=304761&group_id=168&atid=350207 > > Alex > > On 3/6/06, Adrian Baker <[hidden email]> wrote: > > If I have a repeat containing a trigger which has an empty label (which > > I style with an image using CSS), the second time I add an item to the > > repeat the trigger mistakenly gets given the label text of > > $xforms-label-value$. > > > > Attached is an example: hit the Add button twice to see the problem. I > > hunted through the js & the java for what could be the problem, but I > > found it pretty complex :) I can see in XFormsTriggerHandler where the > > incorrect value originates from: > > > > final String labelValue = handlerContext.isGenerateTemplate() ? > > "$xforms-label-value$" : controlInfo.getLabel(); > > > > But I don't understand why it's only a problem the second time around, > > and where to make the change to ensure $xforms-label-value$ is replaced > > even when the label is blank. > > > > > > > > > > Adrian > > > > > > > > -- > > You receive this message as a subscriber of the [hidden email] mailing list. > > To unsubscribe: mailto:[hidden email] > > For general help: mailto:[hidden email]?subject=help > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > > > > > > > -- > Blog (XML, Web apps, Open Source): > http://www.orbeon.com/blog/ > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |