[Seaside] WABatchedList\WATableReport example code-snap for Set

Cong Tan congcongtan at gmail.com
Wed Aug 3 20:55:13 UTC 2011


I have followed the example, but still unable to get anything on the brower.

result_set is a set that contains an object called "triples", each triple
has three instance variable, 'subject', 'predictor' and 'object'.  I have
accessing and modifier method for each instances.

Here is what I have for renderResult: html:

result_array := result_set asArray.
rows := result_array.
columns := OrderedCollection new
add: (WAReportColumn selector: #subject title: 'Subject');
add: (WAReportColumn selector: #predicate title: 'Predictor');
add: (WAReportColumn selector: #object title: 'Object').
 report := WATableReport new rows: rows; columns: columns.
html heading level3; with:'My Table'.
html render: report.

I don't get what the 'youself' in the example means, it gives me error
regardless has it or not.

In addition, how to integrate WABatchedList with WABatchedTable?  I have
following code for for BatchedList, but nothing is displayed either.
result_array := result_set asArray.
batchedlist := WABatchedList new.
batchedlist items: result_array.
batchedlist batchSize: 10.
batchedlist renderContentOn: html.

On Wed, Aug 3, 2011 at 12:33 PM, Paul DeBruicker <pdebruic at gmail.com> wrote:

> a detailed guide to tables see:
>
> http://www.shaffer-consulting.**com/david/Seaside/**
> WATableReport/index.html<http://www.shaffer-consulting.com/david/Seaside/WATableReport/index.html>
>
> but basically in your component initialise table in an inst var, add it to
> the #children, and add the columns then set your Set as the rows. then in
> the renderContentOn: method do something like
>
> renderContentOn: html
> html heading level3; with:'My Table'.
> html render: table.
>
>
>
>
>
> On 08/03/2011 01:19 PM, Cong Tan wrote:
>
>> I tried to use WABatchedList and WATableReport to display a Set from
>> my query engine, but failed to find any code examples online.  Can
>> anyone providing me a code-snap of how to display them in renderContentOn?
>>
>> Thanks
>>
>>
>> ______________________________**_________________
>> seaside mailing list
>> seaside at lists.**squeakfoundation.org <seaside at lists.squeakfoundation.org>
>> http://lists.squeakfoundation.**org/cgi-bin/mailman/listinfo/**seaside<http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
>>
>
> ______________________________**_________________
> seaside mailing list
> seaside at lists.**squeakfoundation.org <seaside at lists.squeakfoundation.org>
> http://lists.squeakfoundation.**org/cgi-bin/mailman/listinfo/**seaside<http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110803/626afbba/attachment-0001.htm


More information about the seaside mailing list