You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Hasan Hasan <ha...@trialox.org> on 2010/11/24 15:33:44 UTC

Bug in render function?

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

Re: Bug in render function?

Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
using typerendering utilities for scala you got an additional newline
at the end, it's fixed now.

Cheers,
reto

On Tue, Nov 30, 2010 at 5:51 PM, Oliver Strässer
<ol...@getunik.com> wrote:
> I have the same problem in my templates
>
> -----Ursprüngliche Nachricht-----
> Von: Tsuyoshi Ito [mailto:tsuy.ito@trialox.org]
> Gesendet: Montag, 29. November 2010 11:46
> An: clerezza-dev@incubator.apache.org
> Betreff: Re: Bug in render function?
>
> 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
> <re...@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 <ts...@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
>>> <re...@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 <ha...@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
>

AW: Bug in render function?

Posted by Oliver Strässer <ol...@getunik.com>.
I have the same problem in my templates

-----Ursprüngliche Nachricht-----
Von: Tsuyoshi Ito [mailto:tsuy.ito@trialox.org] 
Gesendet: Montag, 29. November 2010 11:46
An: clerezza-dev@incubator.apache.org
Betreff: Re: Bug in render function?

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
<re...@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 <ts...@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
>> <re...@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 <ha...@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

Re: Bug in render function?

Posted by Tsuyoshi Ito <ts...@trialox.org>.
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
<re...@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 <ts...@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
>> <re...@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 <ha...@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

Re: Bug in render function?

Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
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 <ts...@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
> <re...@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 <ha...@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
>>>
>>
>

Re: Bug in render function?

Posted by Tsuyoshi Ito <ts...@trialox.org>.
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
<re...@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 <ha...@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
>>
>

Re: Bug in render function?

Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
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 <ha...@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
>