Last Comment Bug 311019 - label bound to model doesn't work for choices inside of select
: label bound to model doesn't work for choices inside of select
Status: RESOLVED FIXED
: fixed1.8
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: alexander :surkov
: Stephen Pride
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-03 23:37 PDT by alexander :surkov
Modified: 2016-07-15 14:46 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Testcase (1.40 KB, application/xhtml+xml)
2005-10-04 00:15 PDT, Allan Beaufour
no flags Details
patch (1.45 KB, patch)
2005-10-04 00:46 PDT, alexander :surkov
no flags Details | Diff | Splinter Review
patch (1.42 KB, patch)
2005-10-04 00:54 PDT, alexander :surkov
allan: review+
doronr: review+
Details | Diff | Splinter Review

Description alexander :surkov 2005-10-03 23:37:53 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4

<xf:select ref="/example/select">
  <xf:label>Flavors</xf:label>
  <xf:choices>
    <!-- You cannot see the label -->
    <xf:label ref="/example/label"/>
    <xf:item>
      <xf:label ref="/example/label"/>
      <xf:value>v</xf:value>
  </xf:choices>
</xf:select>

It is true for <select appearance="compact"/> and <select appearance="full"/>.

Error code lines:

http://lxr.mozilla.org/mozilla/source/extensions/xforms/resources/content/select.xml#334
http://lxr.mozilla.org/mozilla/source/extensions/xforms/resources/content/select.xml#645

Reproducible: Always
Comment 1 alexander :surkov 2005-10-03 23:51:09 PDT
For bug fixing label control can realize textValue property like it proposes
nsIXFormsLabelElement interface.
Comment 2 Allan Beaufour 2005-10-04 00:15:00 PDT
Created attachment 198419 [details]
Testcase
Comment 3 alexander :surkov 2005-10-04 00:46:44 PDT
Created attachment 198423 [details] [diff] [review]
patch
Comment 4 alexander :surkov 2005-10-04 00:54:26 PDT
Created attachment 198424 [details] [diff] [review]
patch
Comment 5 Allan Beaufour 2005-10-04 01:20:08 PDT
Comment on attachment 198424 [details] [diff] [review]
patch

Seems like a good plan to clone them instead. But I do not know if there was a
reason for not to. Doron'll answer that I guess :)

r=me
Comment 6 alexander :surkov 2005-10-04 01:36:00 PDT
Label can contain arbitrary tags. If label will be cloned then choice label can
have custom look. For example:

<xf:choices>
    <xf:label><span style="color: blue">It's a label</span></xf:label>
    <xf:item
Comment 7 Doron Rosenberg (IBM) 2005-10-05 09:18:09 PDT
checked into trunk
Comment 8 aaronr 2005-10-06 23:54:51 PDT
Reopening bug since the patch hasn't been checked into the branch, yet.
Comment 9 Doron Rosenberg (IBM) 2005-10-21 09:27:13 PDT
checked into branch.

Note You need to log in before you can comment on or make changes to this bug.