Forum OpenACS Development: listtemplate style tag breaks list display

I have a listbuilder list that I'd like to use an alternate template with.  I've got <listtemplate name=answers></listtemplate> in my .adp file, and everything works fine with no custom template.

However, if I try to use a custom template (or even the NORMAL template) by specifying it with style=, things go haywire.  The custom template does get used, based on what I'm seeing the the page source, but none of my data actually shows up in the list.

Here's my list definition:

template::list::create -name answers  -multirow answers \
    -key specific_id \
    -has_checkboxes \
    -elements {
        question_string { label "Question"
                display_template {
                        <i>@answers.question_string;noquote@</i><p>
                        <table width="100%">
                          <group column="generator_id">
                        <tr><td valign=top width="75%">        <b>@answers.name@</b><br>
                        @answers.pretty_student_answer;noquote@<p>
                <td valign=top width=10px><b>Points</b><br><input name="mailto:points.@answers.specific_id@" value="@answers.points@" size="8">
                <td valign=top><b>Comments</b><br>
                <textarea name=comments.@answers.specific_id@ cols=20>@answers.comments@</textarea>
                </tr>
                                </group>
                        </table>
                }
        }
        } \
        -bulk_actions {
            "Update Grades" "grades-update" "Record these grades"
        } \
        -bulk_action_export_vars {
            assessment_id
        }

Here's a snipped of what I get without the style=list tag included in listtemplate:


    <form name="answers" method="post">
    <input type="hidden" name="assessment_id" value="9636" />


      <tr class="list-header">

          <th class="list">

              Question

          </th>

      </tr>


                <tr class="list-odd">
                <td class="list">


            <i><p>You find two red painted metal cubes in your garage. &nbsp;Based on labels that have fallen to the floor, you know that one cube is lead and one cube is copper. &nbsp;The cubes are different sizes. &nbsp;Briefly describe how you might determine which cube is which using only a scale and a ruler. &nbsp;(You may nnot use either to remove the paint)</p>
</i><p>
            <table width="100%">

            <tr><td valign=top width="75%">        <b>STUDENT A</b><br>
            <p><p>To solve this problem, you need to use the equation:&nbsp; density= mass/volume<br /><br />

First, you measure the mass of each cube separately to find the mass number.<br /><br />
Then, calculate volume by using the rule to measure height, width, and length for both cubes.<br /><br />
By multiplying the height, width, and length, you'll know the volume.<br /><br />
Then you just&nbsp; insert the number into the equation for each cube to find out their density.&nbsp; The one with the higher density is going to be lead because lead is a heavier metal than copper (according to the periodic table).</p>
</p>
<p>
                <td valign=top width=10px><b>Points</b><br><input name="points.11544" value="2" size="8">
        <td valign=top><b>Comments</b><br>

        <textarea name=comments.11544 cols=20>.</textarea>
        </tr>

            <tr><td valign=top width="75%">        <b>STUDENT B</b><br>
            <p><p>Lead is generally denser than copper thus if the smaller cube weighs proportionally more than the bigger cube, then the smaller cube is lead. First you would use the ruler to find and record the area of each cube by measuring a side's length and multiplying that number by 3. Then find and record the weight of each cube. Next divide the smaller cube's area by the larger cube's area then mulitply that number by the larger cube's weight. Compare that final result with the weight of the smaller cube, which ever is greater is lead.</p>

If I include the style tag, none of that shows up.. I get:

<table class="list-tiny" cellpadding="3" cellspacing="1">

  <form name="answers" method="post">

      <p class="list-row">
      </p>

with <p class=... </p> repeating for each line that should be in the datasource.

Any ideas?

Collapse
Posted by Cathy Sarisky on
I should have specified that this is OpenACS 5.0.4/DotLRN 2.0
Collapse
Posted by Cathy Sarisky on
Bah.  Found the problem.  (Why does that always happen right AFTER I make a post?)  Everything works fine if I set style=table, instead of style=list.  Is table.adp actually the default?  list.adp definitely isn't.