Quantcast

Fwd: Bug or feature?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: Bug or feature?

Łukasz Pytlarz
Hi,

I past the code from previously attached file repeat.xml, because I realized that attachments are not included into news in the mozilla lists.

<xhtml xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
   <head>
      <title>Phone List</title>
      <xf:model>
         <xf:instance xmlns="" id="phonebook">
            <PhoneList>
               <Person>
                  <Name>Peggy</Name>
                  <Phone>123</Phone>
               </Person>
               <Person>
                  <Name>Dan</Name>
                  <Phone>456</Phone>
               </Person>
               <Person>
                  <Name>John</Name>
                  <Phone>789</Phone>
               </Person>
               <Person>
                  <Name>Sue</Name>
                  <Phone>234</Phone>
               </Person>
            </PhoneList>
         </xf:instance>
         <xf:instance xmlns="" id="saverepeatindex">
                <root>
                   <index></index>
                </root>
         </xf:instance>
      </xf:model>
         <style type="text/css"><![CDATA[
 
                @namespace xf url("http://www.w3.org/2002/xforms");
               
                xf|repeat xf|trigger[appearance="minimal"].test > xf|label
                {
               
                        /*with rule float:left trigger don't change index of repeat from version 0.8.7pre to current beta version for firefox 4 (0.8.8b1) of xforms plugin*/
                       
                        float:left;
               
                }
 
        ]]>
        </style>

   </head>
   <body>
   <xf:input ref="instance('saverepeatindex')/index">
    <xf:label>Selected index inside repeat</xf:label>
   </xf:input>
      <fieldset>
     
         <legend>Company Phone List</legend>
         <p><b>Name, Phone</b>
         <xf:repeat nodeset="instance('phonebook')/Person" id="repeatid" >
            <xf:output ref="Name" incremental="true"/>,
            <xf:output ref="Phone" incremental="true"/>
            <xf:trigger appearance="minimal" class="test">
            <xf:label>Trigger</xf:label>
            <xf:action ev:event="DOMActivate">
                        <xf:setvalue ref="instance('saverepeatindex')/index" value="index('repeatid')"/>
                </xf:action>
            </xf:trigger>
           
         </xf:repeat>
         </p>
      </fieldset>
   </body>
</xhtml>



-------- Original Message --------
Subject: Bug or feature?
Date: Fri, 24 Jun 2011 15:59:13 +0200
From: Łukasz Pytlarz <[hidden email]>
To: [hidden email] <[hidden email]>



Hi,

There is a strange case with /xform:trigger/ element inside
/xform:repeat/. When attribute /appearance/ is set to /minimal/ and also
css rule is written with /float: left/ there is no way, using the
trigger, to change xf-repeat-index.

In older version of the Xforms plug-in, for example 0.8.6ff3, such
construction has just worked fine. Now, one only way, to use trigger to
change index is to use /display: //inline-block/ instead /float: left./
Of course, there is a lot more way do to this, using other controls with
different action but I have only /xform:output/ and /xform:triggers/ in
this case.
/
/Is there something I don't understand with this or is just a bug?

By the way, when we can expect the official release of the Xforms
plug-in for FF4, 0.8.8?


_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Loading...