incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tsuyoshi Ito <tsuy....@trialox.org>
Subject Re: Bug in render function?
Date Mon, 29 Nov 2010 10:46:10 GMT
Hi Reto

I have tested it today - it is not working because the returned list
of the render call has an empty element.

When using apache clerezza with CLEREZZA-363,
render(res/dam("hasFilterPanel"), "panel")) produces the following
output:

List(<div id="filter-tab">
<h3>Digital Asset Filter</h3>
     .... (deleted)
</div>,
)

without CLEREZZA-363,

List(<div id="filter-tab">
<h3>Digital Asset Filter</h3>
     .... (deleted)
</div>)

It seems to be an empty elem (after the first element there is a comma
and than nothing).

Cheers
Tsuy

On Mon, Nov 29, 2010 at 11:34 AM, Reto Bachmann-Gmuer
<reto.bachmann@trialox.org> wrote:
> Hi Tsuy
>
> I expected this behaviour to have disappeared with the following patch:
>
> http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala?p2=%2Fincubator%2Fclerezza%2Ftrunk%2Forg.apache.clerezza.parent%2Forg.apache.clerezza.platform.typerendering.scala%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fclerezza%2Fplatform%2Ftyperendering%2Fscala%2FRenderedPage.scala&p1=%2Fincubator%2Fclerezza%2Ftrunk%2Forg.apache.clerezza.parent%2Forg.apache.clerezza.platform.typerendering.scala%2Fsrc%2Fmain%2Fscala%2Forg%2Fapache%2Fclerezza%2Fplatform%2Ftyperendering%2Fscala%2FRenderedPage.scala&r1=1037866&r2=1037865&view=diff&pathrev=1037866
>
> What I'm currently working on is tests actually ussing
> ScalaServerPages in platform.tests so that such regressions can be
> avoided in future.
>
> Cheers,
> Reto
>
> On Thu, Nov 25, 2010 at 9:41 AM, Tsuyoshi Ito <tsuy.ito@trialox.org> wrote:
>> HI Reto
>>
>> We are using render(res/dam("hasFilterPanel"), "panel")).last in a lot
>> of apps - since your ssp improvements (CLEREZZA-363) all these apps
>> are not working anymore. So should we try to fix them or could you
>> have a look why the improvements of CLEREZZA-363 produce this problem.
>>
>> Thanks for your help.
>>
>> Cheers Tsuy
>>
>> On Thu, Nov 25, 2010 at 8:12 AM, Reto Bachmann-Gmuer
>> <reto.bachmann@trialox.org> wrote:
>>> Hi Hasan,
>>>
>>> It sounds like the last element is itself a list. last should return
>>> the same as reverse.head.
>>>
>>> Cheers,
>>> Reto
>>>
>>> On Wed, Nov 24, 2010 at 3:33 PM, Hasan Hasan <hasan@trialox.org> wrote:
>>>> Dear all
>>>>
>>>> We have within an ssp a call to the render function
>>>>
>>>> render(res/dam("hasFilterPanel"), "panel")).last
>>>>
>>>> The invocation of render(res/dam("hasFilterPanel"), "panel")) returns a List
>>>>
>>>> List(<div id="filter-tab">
>>>> <h3>Digital Asset Filter</h3>
>>>>       .... (deleted)
>>>> </div>,
>>>> )
>>>>
>>>> Note the comma before the closing bracket. It seems there is an empty value
>>>> after the comma, since retrieving the "last" item of the list results in
an
>>>> empty element.
>>>>
>>>> Workaround at the moment is to use head instead of last.
>>>>
>>>> cheers
>>>> hasan
>>>>
>>>
>>
>



-- 
--trialox ag--------------------------------------

Tsuyoshi Ito
Binzmuehlestrasse 14
CH-8050 Zürich
Tel. +41 44 635 75 77
URL: http://trialox.org

Mime
View raw message