Following your instructions I have done:

  <select>
    <div nevow:render="formats">
      <option nevow:pattern="option">
        <nevow:attr name="value"><nevow:slot name="value" /></nevow:attr>
        <nevow:slot name="label" />
      </option>
    </div>
  </select>

On the other side I have:

    def render_formats(self, ctx, data):        

        for k,v in mydict.iteritems():
            pattern.fillSlots('value', v).fillSlots('label', k)

But I cannot acces the pattern variable, what am I doing wrong?


Moe Aboulkheir escribió:
<option nevow:pattern="option">
 <nevow:attr name="value"><nevow:slot name="value" /></nevow:attr>
 <nevow:slot name="label" />
</option>

You can then do pattern.fillSlots('value', '1').fillSlots('label', 'Option 1') to get to something that'll serialize to <option value="1">Option 1</option>.

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web



--

Daniel de la Cuesta Navarrete
Técnico de Desarrollo de Software

FUNDACIÓN IAVANTE
[EMAIL PROTECTED]
Tel. 951 015 300


Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.


_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to