Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of SelectingOption


Ignore:
Timestamp:
11/16/05 11:58:48 (9 years ago)
Author:
koorb
Comment:

tidied

Legend:

Unmodified
Added
Removed
Modified
  • SelectingOption

    v1 v2  
     1= Selecting a HTML option = 
     2 
     3From the mailing list ... 
     4 
     5On 11/2/05, Jaime Wyant <programmer.py@gmail.com> wrote: 
    16{{{ 
    2 On 11/2/05, Jaime Wyant <programmer.py@gmail.com> wrote: 
    3 > 
    4 > <!-- 
    5 >      I want to `set' the selection based on the character.ascended expression. 
    6 >     This just seems clunky. 
    7 > --> 
    8 > <select py:if="$character.ascended" name="ascended"> 
    9 >     <option  value="True" selected="selected">True</option> 
    10 >     <option value="False">False</option> 
    11 > </select> 
    12 > 
    13 > <select py:if="not $character.ascended" name="ascended"> 
    14 >     <option  value="True">True</option> 
    15 >     <option value="False" selected="selected">False</option> 
    16 > </select> 
     7#!text/html 
     8<!-- 
     9     I want to `set' the selection based on the character.ascended expression. 
     10    This just seems clunky. 
     11--> 
     12<select py:if="$character.ascended" name="ascended"> 
     13    <option  value="True" selected="selected">True</option> 
     14    <option value="False">False</option> 
     15</select> 
    1716 
    18 Yes, that would be painful to have to do that everywhere... There was 
    19 another thread on this recently, which shows that we need to add some 
    20 documentation about this. 
    21  
    22 <select name="ascended"> 
    23    <option  value="True" 
    24 py:attrs="selected=std.selector(character.ascended)">True</option> 
    25    <option value="False" py:attrs="selected=std.selector(not 
    26 character.ascended">False</option> 
     17<select py:if="not $character.ascended" name="ascended"> 
     18    <option  value="True">True</option> 
     19    <option value="False" selected="selected">False</option> 
    2720</select> 
    2821}}} 
     22 
     23Yes, that would be painful to have to do that everywhere... There was another thread on this recently, which shows that we need to add some documentation about this. 
     24 
     25{{{ 
     26#!text/html 
     27<select name="ascended"> 
     28   <option  value="True" py:attrs="selected=std.selector(character.ascended)">True</option> 
     29   <option value="False" py:attrs="selected=std.selector(not character.ascended">False</option> 
     30</select> 
     31}}}