You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sergey <sa...@signalauto.ru> on 2007/07/14 04:57:13 UTC

Problem witn TAP 4.1.2 and operation in template

Hello

I have a problem with migration to TAP 4.1.2
previously I'm use some increment operation in template (tst="ognl:count=count+1")
              <tr jwcid="tableRows1" class="org.apache.tapestry.bean.EvenOdd.next" row="ognl:row" cid="ognl:row.id" tst="ognl:count=count+1">
                <td jwcid="tableValues1" align="center"/>
              </tr>
and calculate total display rows

after migration all works, but occur exception:
org.apache.hivemind.ApplicationRuntimeException: Unable to add method void set(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class $ASTAssign_113c292aa77: [source error] ; is missing
        at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278)
        at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:214)
        at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
        at ognl.Ognl.compileExpression(Ognl.java:141)
        at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(ExpressionCacheImpl.java:152)
        at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression(ExpressionCacheImpl.java:115)
..........
If i remove calculation attribute tst="ognl:count=count+1" all works
fine


How I can do some operation in template in tap 4.1.2
(increment,calculate... )



-- 
 Sergey                          mailto:sale@signalauto.ru




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re[4]: Problem witn TAP 4.1.2 and operation in template

Posted by Sergey Kashin <ay...@ngs.ru>.
Hello Andrea,


Thanks, all works fine with created component.

I have not thought about component somehow, thanks for idea.



Monday, July 16, 2007, 5:48:20 AM, you wrote:

AC> Sergey,
AC> it's enough easy, you can create a component like this for example <div
AC> jwcid="@your:Expression" var="ognl:variable" expression="ognl:assignedToVar
+1" />> the code is trivial.

AC> Ciao,
AC> kiuma

AC> On 7/15/07, Sergey <sa...@signalauto.ru> wrote:
>>
>> It was not work in previous version, and not work in 4.1.2
>>
>> Working with @Table and index not resolve overall problem of working with
>> variables
>>
>> Question is topical, how to work with variables in template like in
>> velocity template?
>>
>>
>> JK> You could try count++.  I think that would work,  but would probably
>> have to
>> JK> play with it to be sure.
>>
>> JK> The @Table component also has an "index" parameter that would allow it
>> to
>> JK> update a property of your choice with the current row index
>> value.  Maybe
>> JK> that's what you wanted.
>>
>> JK> On 7/13/07, Sergey <sa...@signalauto.ru> wrote:
>> >>
>> >> Hello
>> >>
>> >> I have a problem with migration to TAP 4.1.2
>> >> previously I'm use some increment operation in template
>> >> (tst="ognl:count=count+1")
>> >>               <tr jwcid="tableRows1" class="
>> >> org.apache.tapestry.bean.EvenOdd.next" row="ognl:row" cid="ognl:row.id"
>> >> tst="ognl:count=count+1">
>> >>                 <td jwcid="tableValues1" align="center"/>
>> >>               </tr>
>> >> and calculate total display rows
>> >>
>> >> after migration all works, but occur exception:
>> >> org.apache.hivemind.ApplicationRuntimeException: Unable to add method
>> void
>> >> set(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class
>> >> $ASTAssign_113c292aa77: [source error] ; is missing
>> >>         at org.apache.tapestry.enhance.ClassFabImpl.addMethod(
>> >> ClassFabImpl.java:278)
>> >>         at
>> >>
>> org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression
>> >> (HiveMindExpressionCompiler.java:214)
>> >>         at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
>> >>         at ognl.Ognl.compileExpression(Ognl.java:141)
>> >>         at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(
>> >> ExpressionCacheImpl.java:152)
>> >>         at
>> >>
>> org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression
>> >> (ExpressionCacheImpl.java:115)
>> >> ..........
>> >> If i remove calculation attribute tst="ognl:count=count+1" all works
>> >> fine
>> >>
>> >>
>> >> How I can do some operation in template in tap 4.1.2
>> >> (increment,calculate... )
>> >>
>> >>
>> >>
>> >> --
>> >> Sergey                          mailto:sale@signalauto.ru
>> >>
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>>
>>
>>
>>
>>
>> --
>> С наилучшими пожеланиями,
>> Sergey                            mailto:sale@signalauto.ru
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>



-- 
Best regards,
 Sergey                            mailto:ayrton@ngs.ru



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Re[2]: Problem witn TAP 4.1.2 and operation in template

Posted by Andrea Chiumenti <ki...@gmail.com>.
Sergey,
it's enough easy, you can create a component like this for example <div
jwcid="@your:Expression" var="ognl:variable" expression="ognl:assignedToVar
+1" /> the code is trivial.

Ciao,
kiuma

On 7/15/07, Sergey <sa...@signalauto.ru> wrote:
>
> It was not work in previous version, and not work in 4.1.2
>
> Working with @Table and index not resolve overall problem of working with
> variables
>
> Question is topical, how to work with variables in template like in
> velocity template?
>
>
> JK> You could try count++.  I think that would work,  but would probably
> have to
> JK> play with it to be sure.
>
> JK> The @Table component also has an "index" parameter that would allow it
> to
> JK> update a property of your choice with the current row index
> value.  Maybe
> JK> that's what you wanted.
>
> JK> On 7/13/07, Sergey <sa...@signalauto.ru> wrote:
> >>
> >> Hello
> >>
> >> I have a problem with migration to TAP 4.1.2
> >> previously I'm use some increment operation in template
> >> (tst="ognl:count=count+1")
> >>               <tr jwcid="tableRows1" class="
> >> org.apache.tapestry.bean.EvenOdd.next" row="ognl:row" cid="ognl:row.id"
> >> tst="ognl:count=count+1">
> >>                 <td jwcid="tableValues1" align="center"/>
> >>               </tr>
> >> and calculate total display rows
> >>
> >> after migration all works, but occur exception:
> >> org.apache.hivemind.ApplicationRuntimeException: Unable to add method
> void
> >> set(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class
> >> $ASTAssign_113c292aa77: [source error] ; is missing
> >>         at org.apache.tapestry.enhance.ClassFabImpl.addMethod(
> >> ClassFabImpl.java:278)
> >>         at
> >>
> org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression
> >> (HiveMindExpressionCompiler.java:214)
> >>         at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
> >>         at ognl.Ognl.compileExpression(Ognl.java:141)
> >>         at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(
> >> ExpressionCacheImpl.java:152)
> >>         at
> >>
> org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression
> >> (ExpressionCacheImpl.java:115)
> >> ..........
> >> If i remove calculation attribute tst="ognl:count=count+1" all works
> >> fine
> >>
> >>
> >> How I can do some operation in template in tap 4.1.2
> >> (increment,calculate... )
> >>
> >>
> >>
> >> --
> >> Sergey                          mailto:sale@signalauto.ru
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
>
>
>
>
>
> --
> С наилучшими пожеланиями,
> Sergey                            mailto:sale@signalauto.ru
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re[2]: Problem witn TAP 4.1.2 and operation in template

Posted by Sergey <sa...@signalauto.ru>.
It was not work in previous version, and not work in 4.1.2

Working with @Table and index not resolve overall problem of working with variables

Question is topical, how to work with variables in template like in velocity template?


JK> You could try count++.  I think that would work,  but would probably have to
JK> play with it to be sure.

JK> The @Table component also has an "index" parameter that would allow it to
JK> update a property of your choice with the current row index value.  Maybe
JK> that's what you wanted.

JK> On 7/13/07, Sergey <sa...@signalauto.ru> wrote:
>>
>> Hello
>>
>> I have a problem with migration to TAP 4.1.2
>> previously I'm use some increment operation in template
>> (tst="ognl:count=count+1")
>>               <tr jwcid="tableRows1" class="
>> org.apache.tapestry.bean.EvenOdd.next" row="ognl:row" cid="ognl:row.id"
>> tst="ognl:count=count+1">
>>                 <td jwcid="tableValues1" align="center"/>
>>               </tr>
>> and calculate total display rows
>>
>> after migration all works, but occur exception:
>> org.apache.hivemind.ApplicationRuntimeException: Unable to add method void
>> set(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class
>> $ASTAssign_113c292aa77: [source error] ; is missing
>>         at org.apache.tapestry.enhance.ClassFabImpl.addMethod(
>> ClassFabImpl.java:278)
>>         at
>> org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression
>> (HiveMindExpressionCompiler.java:214)
>>         at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
>>         at ognl.Ognl.compileExpression(Ognl.java:141)
>>         at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(
>> ExpressionCacheImpl.java:152)
>>         at
>> org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression
>> (ExpressionCacheImpl.java:115)
>> ..........
>> If i remove calculation attribute tst="ognl:count=count+1" all works
>> fine
>>
>>
>> How I can do some operation in template in tap 4.1.2
>> (increment,calculate... )
>>
>>
>>
>> --
>> Sergey                          mailto:sale@signalauto.ru
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>





-- 
Ñ íàèëó÷øèìè ïîæåëàíèÿìè,
 Sergey                            mailto:sale@signalauto.ru




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Problem witn TAP 4.1.2 and operation in template

Posted by Jesse Kuhnert <jk...@gmail.com>.
You could try count++.  I think that would work,  but would probably have to
play with it to be sure.

The @Table component also has an "index" parameter that would allow it to
update a property of your choice with the current row index value.  Maybe
that's what you wanted.

On 7/13/07, Sergey <sa...@signalauto.ru> wrote:
>
> Hello
>
> I have a problem with migration to TAP 4.1.2
> previously I'm use some increment operation in template
> (tst="ognl:count=count+1")
>               <tr jwcid="tableRows1" class="
> org.apache.tapestry.bean.EvenOdd.next" row="ognl:row" cid="ognl:row.id"
> tst="ognl:count=count+1">
>                 <td jwcid="tableValues1" align="center"/>
>               </tr>
> and calculate total display rows
>
> after migration all works, but occur exception:
> org.apache.hivemind.ApplicationRuntimeException: Unable to add method void
> set(ognl.OgnlContext, java.lang.Object, java.lang.Object) to class
> $ASTAssign_113c292aa77: [source error] ; is missing
>         at org.apache.tapestry.enhance.ClassFabImpl.addMethod(
> ClassFabImpl.java:278)
>         at
> org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression
> (HiveMindExpressionCompiler.java:214)
>         at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498)
>         at ognl.Ognl.compileExpression(Ognl.java:141)
>         at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(
> ExpressionCacheImpl.java:152)
>         at
> org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression
> (ExpressionCacheImpl.java:115)
> ..........
> If i remove calculation attribute tst="ognl:count=count+1" all works
> fine
>
>
> How I can do some operation in template in tap 4.1.2
> (increment,calculate... )
>
>
>
> --
> Sergey                          mailto:sale@signalauto.ru
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com