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

Lukas Renggli renggli at gmail.com
Wed Aug 3 21:07:40 UTC 2011


Did you follow the principles of how to compose components?

   http://book.seaside.st/book/components/embedding/children

Lukas

On 3 August 2011 22:55, Cong Tan <congcongtan at gmail.com> wrote:
> 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
>>
>> 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
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside mailing list